mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 10:53:27 +00:00
Changes to match the new default value and to make player acceleration perfectly match what it was previously.
This commit is contained in:
parent
4ccb3b88d0
commit
7b5fbad6a7
2 changed files with 5 additions and 6 deletions
|
@ -1087,7 +1087,7 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
diff |= MD_TRACER;
|
||||
if (mobj->friction != ORIG_FRICTION)
|
||||
diff |= MD_FRICTION;
|
||||
if (mobj->movefactor != ORIG_FRICTION_FACTOR)
|
||||
if (mobj->movefactor != FRACUNIT)
|
||||
diff |= MD_MOVEFACTOR;
|
||||
if (mobj->fuse)
|
||||
diff |= MD_FUSE;
|
||||
|
@ -2073,7 +2073,7 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
|||
if (diff & MD_MOVEFACTOR)
|
||||
mobj->movefactor = READFIXED(save_p);
|
||||
else
|
||||
mobj->movefactor = ORIG_FRICTION_FACTOR;
|
||||
mobj->movefactor = FRACUNIT;
|
||||
if (diff & MD_FUSE)
|
||||
mobj->fuse = READINT32(save_p);
|
||||
if (diff & MD_WATERTOP)
|
||||
|
|
|
@ -4634,8 +4634,8 @@ static void P_3dMovement(player_t *player)
|
|||
acceleration = player->accelstart + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * player->acceleration;
|
||||
}
|
||||
|
||||
// Friction-scaled acceleration...
|
||||
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
|
||||
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
||||
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
|
||||
|
||||
// Forward movement
|
||||
if (player->climbing)
|
||||
|
@ -6291,8 +6291,7 @@ static void P_SkidStuff(player_t *player)
|
|||
// If your push angle is more than this close to a full 180 degrees, trigger a skid.
|
||||
if (dang > ANGLE_157h)
|
||||
{
|
||||
//player->skidtime = TICRATE/2;
|
||||
player->skidtime = (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||
player->skidtime = (player->mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||
S_StartSound(player->mo, sfx_skid);
|
||||
if (player->panim != PA_WALK)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
|
|
Loading…
Reference in a new issue