Merge branch 'abpolish' into 'master'
Autobrake polish Closes #176 See merge request STJr/SRB2Internal!293
This commit is contained in:
commit
121d8b7838
|
@ -285,6 +285,9 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
|
|
||||||
if (spring->info->painchance != 2)
|
if (spring->info->painchance != 2)
|
||||||
{
|
{
|
||||||
|
if (object->player)
|
||||||
|
object->player->pflags &= ~PF_APPLYAUTOBRAKE;
|
||||||
|
|
||||||
if ((horizspeed && vertispeed) || (object->player && object->player->homing)) // Mimic SA
|
if ((horizspeed && vertispeed) || (object->player && object->player->homing)) // Mimic SA
|
||||||
{
|
{
|
||||||
object->momx = object->momy = 0;
|
object->momx = object->momy = 0;
|
||||||
|
|
10
src/p_user.c
10
src/p_user.c
|
@ -11248,6 +11248,16 @@ void P_PlayerThink(player_t *player)
|
||||||
|
|
||||||
if (!currentlyonground)
|
if (!currentlyonground)
|
||||||
acceleration /= 2;
|
acceleration /= 2;
|
||||||
|
// fake skidding! see P_SkidStuff for reference on conditionals
|
||||||
|
else if (!player->skidtime && !(player->mo->eflags & MFE_GOOWATER) && !(player->pflags & (PF_JUMPED|PF_SPINNING|PF_SLIDING)) && !(player->charflags & SF_NOSKID) && P_AproxDistance(player->mo->momx, player->mo->momy) >= FixedMul(player->runspeed/2, player->mo->scale))
|
||||||
|
{
|
||||||
|
if (player->mo->state-states != S_PLAY_SKID)
|
||||||
|
P_SetPlayerMobjState(player->mo, S_PLAY_SKID);
|
||||||
|
player->mo->tics = player->skidtime = (player->mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||||
|
|
||||||
|
if (P_IsLocalPlayer(player)) // the sound happens way more frequently now, so give co-op players' ears a brake...
|
||||||
|
S_StartSound(player->mo, sfx_skid);
|
||||||
|
}
|
||||||
|
|
||||||
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
||||||
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
|
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
|
||||||
|
|
Loading…
Reference in New Issue