SW: With the input tied to frame rate, disable aiming while the

player is dead, and also disable horizontal aiming while on a ladder.
This commit is contained in:
NY00123 2020-04-11 11:19:06 +03:00 committed by Christoph Oelckers
parent 40ca656f38
commit 120abb1029

View file

@ -3289,6 +3289,10 @@ void getinput(int const playerNum)
localInput.q16avel = fix16_clamp(fix16_sadd(localInput.q16avel, input.q16avel), fix16_from_int(-MAXANGVEL), fix16_from_int(MAXANGVEL));
localInput.q16horz = fix16_clamp(fix16_sadd(localInput.q16horz, input.q16horz), fix16_from_int(-MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));
if (!TEST(pp->Flags, PF_DEAD))
{
if (!TEST(pp->Flags, PF_CLIMBING))
{
if (!TEST(pp->Flags, PF_TURN_180))
{
if (TEST_SYNC_KEY(pp, SK_TURN_180))
@ -3357,6 +3361,7 @@ void getinput(int const playerNum)
sprite[pp->PlayerUnderSprite].ang = fix16_to_int(pp->q16ang);
}
}
}
// Fixme: This should probably be made optional.
if (cl_slopetilting)
@ -3497,6 +3502,7 @@ void getinput(int const playerNum)
// add base and offsets
pp->q16horiz = fix16_clamp((pp->q16horizbase + pp->q16horizoff), fix16_from_int(PLAYER_HORIZ_MIN), fix16_from_int(PLAYER_HORIZ_MAX));
}
if (!CommEnabled)
{