- Duke: Allow horz input to go through when returning to center and horiz is abs(5) or less. This mimics the original behaviour where Duke would stop returning to center at 95/105. This allows faster mouse input to be applied instead of waiting for player's horizon to return to 0.

This commit is contained in:
Mitchell Richters 2020-12-30 18:04:30 +11:00
parent 5c87b7b894
commit f2c6a23f38

View file

@ -825,7 +825,7 @@ static void FinalizeInput(int playerNum, InputPacket& input, bool vehicle)
loc.avel = input.avel = 0;
}
if (p->newOwner == nullptr && !(p->sync.actions & SB_CENTERVIEW))
if (p->newOwner == nullptr && (!(p->sync.actions & SB_CENTERVIEW) || p->sync.actions & SB_CENTERVIEW && abs(p->horizon.horiz.asbuild()) <= 5))
{
// input.horz already added to loc in processMovement()
loc.horz = clamp(loc.horz, -MAXHORIZVEL, MAXHORIZVEL);