mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- Call updateTurnHeldAmt()
after doing the turn, not before it. This gives one tic more preamble.
This commit is contained in:
parent
e016f65321
commit
4324f923bc
2 changed files with 10 additions and 7 deletions
|
@ -215,7 +215,6 @@ void processMovement(InputPacket* const currInput, InputPacket* const inputBuffe
|
||||||
|
|
||||||
if (turnleft || turnright)
|
if (turnleft || turnright)
|
||||||
{
|
{
|
||||||
updateTurnHeldAmt(scaleAdjust);
|
|
||||||
double const turnspeed = getTicrateScale(running ? RUNNINGTURNBASE : NORMALTURNBASE) * turnscale * BAngToDegree;
|
double const turnspeed = getTicrateScale(running ? RUNNINGTURNBASE : NORMALTURNBASE) * turnscale * BAngToDegree;
|
||||||
float const turnamount = float(scaleAdjust * turnspeed * (isTurboTurnTime() ? 1. : PREAMBLESCALE));
|
float const turnamount = float(scaleAdjust * turnspeed * (isTurboTurnTime() ? 1. : PREAMBLESCALE));
|
||||||
|
|
||||||
|
@ -224,6 +223,8 @@ void processMovement(InputPacket* const currInput, InputPacket* const inputBuffe
|
||||||
|
|
||||||
if (turnright)
|
if (turnright)
|
||||||
currInput->avel += turnamount;
|
currInput->avel += turnamount;
|
||||||
|
|
||||||
|
updateTurnHeldAmt(scaleAdjust);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -589,7 +589,6 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (kbdLeft || p->moto_drink < 0 || hidInput->mouseturnx < 0 || hidInput->dyaw < 0)
|
if (kbdLeft || p->moto_drink < 0 || hidInput->mouseturnx < 0 || hidInput->dyaw < 0)
|
||||||
{
|
{
|
||||||
updateTurnHeldAmt(factor);
|
|
||||||
p->TiltStatus -= (float)factor;
|
p->TiltStatus -= (float)factor;
|
||||||
|
|
||||||
if (p->TiltStatus < -10)
|
if (p->TiltStatus < -10)
|
||||||
|
@ -603,11 +602,12 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (hidInput->dyaw < 0)
|
if (hidInput->dyaw < 0)
|
||||||
turnvel += (p->MotoSpeed > 0 ? baseVel : baseVel * velScale) * hidInput->dyaw;
|
turnvel += (p->MotoSpeed > 0 ? baseVel : baseVel * velScale) * hidInput->dyaw;
|
||||||
|
|
||||||
|
updateTurnHeldAmt(factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kbdRight || p->moto_drink > 0 || hidInput->mouseturnx > 0 || hidInput->dyaw > 0)
|
if (kbdRight || p->moto_drink > 0 || hidInput->mouseturnx > 0 || hidInput->dyaw > 0)
|
||||||
{
|
{
|
||||||
updateTurnHeldAmt(factor);
|
|
||||||
p->TiltStatus += (float)factor;
|
p->TiltStatus += (float)factor;
|
||||||
|
|
||||||
if (p->TiltStatus > 10)
|
if (p->TiltStatus > 10)
|
||||||
|
@ -621,6 +621,8 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (hidInput->dyaw > 0)
|
if (hidInput->dyaw > 0)
|
||||||
turnvel += (p->MotoSpeed > 0 ? baseVel : baseVel * velScale) * hidInput->dyaw;
|
turnvel += (p->MotoSpeed > 0 ? baseVel : baseVel * velScale) * hidInput->dyaw;
|
||||||
|
|
||||||
|
updateTurnHeldAmt(factor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -660,8 +662,6 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (kbdLeft || p->moto_drink < 0 || hidInput->mouseturnx < 0 || hidInput->dyaw < 0)
|
if (kbdLeft || p->moto_drink < 0 || hidInput->mouseturnx < 0 || hidInput->dyaw < 0)
|
||||||
{
|
{
|
||||||
updateTurnHeldAmt(factor);
|
|
||||||
|
|
||||||
if (!p->NotOnWater)
|
if (!p->NotOnWater)
|
||||||
{
|
{
|
||||||
p->TiltStatus -= (float)factor;
|
p->TiltStatus -= (float)factor;
|
||||||
|
@ -677,12 +677,12 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (hidInput->dyaw < 0)
|
if (hidInput->dyaw < 0)
|
||||||
turnvel += baseVel * hidInput->dyaw;
|
turnvel += baseVel * hidInput->dyaw;
|
||||||
|
|
||||||
|
updateTurnHeldAmt(factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kbdRight || p->moto_drink > 0 || hidInput->mouseturnx > 0 || hidInput->dyaw > 0)
|
if (kbdRight || p->moto_drink > 0 || hidInput->mouseturnx > 0 || hidInput->dyaw > 0)
|
||||||
{
|
{
|
||||||
updateTurnHeldAmt(factor);
|
|
||||||
|
|
||||||
if (!p->NotOnWater)
|
if (!p->NotOnWater)
|
||||||
{
|
{
|
||||||
p->TiltStatus += (float)factor;
|
p->TiltStatus += (float)factor;
|
||||||
|
@ -698,6 +698,8 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (hidInput->dyaw > 0)
|
if (hidInput->dyaw > 0)
|
||||||
turnvel += baseVel * hidInput->dyaw;
|
turnvel += baseVel * hidInput->dyaw;
|
||||||
|
|
||||||
|
updateTurnHeldAmt(factor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!p->NotOnWater)
|
else if (!p->NotOnWater)
|
||||||
|
|
Loading…
Reference in a new issue