mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- SW: Hook up horizAdjust
and adjust all ticrate amendments of q16horiz
via playerAddHoriz()
/playerSetHoriz()
.
This commit is contained in:
parent
2e2ca03812
commit
681a8ebec2
2 changed files with 21 additions and 10 deletions
|
@ -280,7 +280,7 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool
|
|||
if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN))
|
||||
DoPlayerTurn(pp, !TEST(pp->Flags, PF_DEAD) || TEST(pp->Flags, PF_DEAD) && TEST(pp->Flags, PF_DEAD_HEAD|PF_HEAD_CONTROL) ? q16avel : 0, scaleAdjust);
|
||||
if (TEST(pp->Flags2, PF2_INPUT_CAN_AIM))
|
||||
DoPlayerHorizon(pp, q16horz, scaleAdjust);
|
||||
DoPlayerHorizon(pp, !TEST(pp->Flags, PF_DEAD) ? q16horz : 0, scaleAdjust);
|
||||
}
|
||||
|
||||
loc.fvel = clamp(loc.fvel + fvel, -MAXFVEL, MAXFVEL);
|
||||
|
|
|
@ -1936,6 +1936,11 @@ DoPlayerHorizon(PLAYERp pp, fixed_t const q16horz, double const scaleAdjust)
|
|||
|
||||
// add base and offsets
|
||||
pp->q16horiz = pp->q16horizbase + pp->q16horizoff;
|
||||
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
pp->q16horiz += xs_CRoundToInt(scaleAdjust * pp->horizAdjust);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -6288,24 +6293,30 @@ DoPlayerBeginDie(PLAYERp pp)
|
|||
RESET(pp->Flags, PF_HEAD_CONTROL);
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
DoPlayerDeathHoriz(PLAYERp pp, short target, short speed)
|
||||
{
|
||||
if (pp->q16horiz > IntToFixed(target))
|
||||
{
|
||||
pp->q16horiz -= IntToFixed(speed);
|
||||
{
|
||||
if (!cl_syncinput)
|
||||
SET(pp->Flags2, PF2_INPUT_CAN_AIM);
|
||||
|
||||
playerAddHoriz(pp, -speed);
|
||||
|
||||
if (pp->q16horiz <= IntToFixed(target))
|
||||
pp->q16horiz = IntToFixed(target);
|
||||
playerSetHoriz(pp, target);
|
||||
}
|
||||
|
||||
if (pp->q16horiz < IntToFixed(target))
|
||||
{
|
||||
pp->q16horiz += IntToFixed(speed);
|
||||
if (pp->q16horiz >= IntToFixed(target))
|
||||
pp->q16horiz = IntToFixed(target);
|
||||
}
|
||||
if (!cl_syncinput)
|
||||
SET(pp->Flags2, PF2_INPUT_CAN_AIM);
|
||||
|
||||
return pp->q16horiz == IntToFixed(target);
|
||||
playerAddHoriz(pp, speed);
|
||||
|
||||
if (pp->q16horiz >= IntToFixed(target))
|
||||
playerSetHoriz(pp, target);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue