- Duke: Restore underwater input scaling to unsynchronised input which was lost back in March (b3c27a177e4787bf9341973039e73c1403e1b230).

This commit is contained in:
Mitchell Richters 2023-10-03 14:53:27 +11:00
parent 6cff02d33b
commit 82d029fe28
4 changed files with 2 additions and 15 deletions

View file

@ -511,7 +511,7 @@ unsigned GameInterface::getCrouchState()
void GameInterface::doPlayerMovement(const float scaleAdjust)
{
auto const p = getPlayer(myconnectindex);
const auto p = getPlayer(myconnectindex);
if (isRRRA() && (p->OnMotorcycle || p->OnBoat))
{
@ -535,7 +535,7 @@ void GameInterface::doPlayerMovement(const float scaleAdjust)
}
else
{
gameInput.processMovement(&p->Angles, scaleAdjust, p->drink_amt);
gameInput.processMovement(&p->Angles, scaleAdjust, p->drink_amt, true, (p->psectlotag != ST_2_UNDERWATER) ? 1.f : 0.875f);
}
}

View file

@ -1717,10 +1717,6 @@ void processinput_d(int snum)
p->cmd.ucmd.avel = 0;
setForcedSyncInput(snum);
}
else
{
p->cmd.ucmd.avel = p->adjustavel(PlayerInputAngVel(snum));
}
p->Angles.doYawInput(&p->cmd.ucmd);

View file

@ -2544,10 +2544,6 @@ void processinput_r(int snum)
p->cmd.ucmd.avel = 0;
setForcedSyncInput(snum);
}
else
{
p->cmd.ucmd.avel = p->adjustavel(PlayerInputAngVel(snum));
}
p->Angles.doYawInput(&p->cmd.ucmd);

View file

@ -361,11 +361,6 @@ public:
void checkhardlanding();
void playerweaponsway(double xvel);
inline float adjustavel(float avel)
{
return (psectlotag == ST_2_UNDERWATER)? avel * 0.875f : avel;
}
inline void setCursector(sectortype* sect)
{
cursector = sect;