Skip to content

Duke3D: Slightly tune return to centre code in P_GetInput().

Mitchell Richters requested to merge mjr4077au/eduke32:HardLandingTweak into master

Ever since tying the player's input with the frame-rate, I've observed that when the player is recovering from a hard landing (say, after dropping down the ventilation shaft in E1L1), the player can't aim up/down with the mouse for ~1 second.

End user experience is that it appears the player is still trying to be returned to centre and the game fights the player's input to do so.

Notes from commit below.

  • Lock player horizon while returning to centre.
  • Check player's horizon is between 99 and 101 degrees, not 99.9 and 100.1. The extra 0.9 degrees of precision is not noticeable and is dramatically slower.
  • Reset 'pPlayer->return_to_center' to '0' when player's horizon is at 100.
  • Match q16horizoff precision to precision of q16horiz.
Edited by Richard Gobeille

Merge request reports