* Fixed a typo with the bit-shifting of the max speed, meaning that it wasn't being set as desired.

* Made the speed capping/minimising done at the point of changing it via player control, as opposed to the point of macerotate, in an attempt to fix a potential cause of mace rotation desynchronisation (not netplay, just https://cdn.discordapp.com/attachments/293238104096112641/331453363499696139/srb20180.gif stuff.)
This commit is contained in:
toasterbabe 2017-07-04 14:58:58 +01:00
parent 370d9c3176
commit 25fb318a0b
2 changed files with 10 additions and 8 deletions

View File

@ -6488,10 +6488,6 @@ static void P_MaceRotate(mobj_t *mobj)
maceretry:
// Set the top speed for the link if it happens to be over that speed.
if (mobj->tracer->lastlook > mobj->tracer->friction)
mobj->tracer->lastlook = mobj->tracer->friction;
fa = (FixedAngle(mobj->tracer->movefactor*FRACUNIT) >> ANGLETOFINESHIFT);
radius = FixedMul(FINECOSINE(fa), radius);
v[1] = -FixedMul(FINESINE(fa), radius)
@ -9951,7 +9947,7 @@ ML_EFFECT4 : Don't clip inside the ground
mlength = abs(lines[line].dx >> FRACBITS);
mspeed = abs(lines[line].dy >> (FRACBITS - 4));
mphase = (sides[lines[line].sidenum[0]].textureoffset >> FRACBITS) % 360;
if ((mmaxspeed = sides[lines[line].sidenum[0]].rowoffset >> FRACBITS) < mspeed)
if ((mmaxspeed = sides[lines[line].sidenum[0]].rowoffset >> (FRACBITS - 4)) < mspeed)
mmaxspeed = mspeed << 1;
mpitch = (lines[line].frontsector->floorheight >> FRACBITS) % 360;
myaw = (lines[line].frontsector->ceilingheight >> FRACBITS) % 360;

View File

@ -9985,9 +9985,15 @@ void P_PlayerAfterThink(player_t *player)
player->pflags &= ~PF_THOKKED;
if (cmd->forwardmove > 0)
player->mo->tracer->tracer->lastlook += 2;
else if (cmd->forwardmove < 0 && player->mo->tracer->tracer->lastlook > player->mo->tracer->tracer->movecount)
player->mo->tracer->tracer->lastlook -= 2;
{
if ((player->mo->tracer->tracer->lastlook += 2) > player->mo->tracer->tracer->friction)
player->mo->tracer->tracer->lastlook = player->mo->tracer->tracer->friction;
}
else if (cmd->forwardmove < 0)
{
if ((player->mo->tracer->tracer->lastlook -= 2) < player->mo->tracer->tracer->movecount)
player->mo->tracer->tracer->lastlook = player->mo->tracer->tracer->movecount;
}
if ((player->mo->tracer->tracer->flags & MF_SLIDEME) // Noclimb on chain parameters gives this
&& !(twodlevel || player->mo->flags2 & MF2_TWOD)) // why on earth would you want to turn them in 2D mode?