Commit Graph

8 Commits

Author SHA1 Message Date
Mitchell Richters ff9c7bf0bb - binaryangle.h: Create `osum()` for `PlayerHorizon` and `PlayerAngle` structs and use within each struct's `interpolatedsum()` method.
* Already doubled up by calculating `sum()` again within `interpolatedsum()` and no point changing that out without an `osum()`.
2020-10-18 22:43:42 +11:00
Mitchell Richters cd683e6511 - binaryangle.h: Add missed line from 4e07942cff to calculate interpolation ratio using multiply instead of divide. Hopefully in the future we can just use a true double between 0 and 1 like GZDoom... 2020-10-18 22:05:21 +11:00
Mitchell Richters 4e07942cff - binaryangle.h: Minor clean up of PlayerHorizon/PlayerAngle structs.
* Sync PlayerHorizon's `settarget()` with changes to PlayerAngle's from 19d9e1a947.
* For each struct's `addadjustment()`, multiply value by unit there rather than always within `processhelpers()`.
* Properly use `xs_CRoundToUInt()` within PlayerAngle's `processhelpers()` method instead of the signed version.
* Use `abs()` within PlayerAngle's `processhelpers()` like PlayerHorizon's.
2020-10-18 22:00:39 +11:00
Mitchell Richters 19d9e1a947 - binaryangle.h: Fix issues with `PlayerAngle.settarget()` following changes in bf5bd01164.
* Just was not working whatsoever, really...
2020-10-18 21:31:36 +11:00
Mitchell Richters a792f329ca - binaryangle.h/PlayerAngle: Fix incorrect variable declaration on `dang` within `interpolatedsum()` method.
* Didn't seem to be causing an issue but better it be correct.
2020-10-12 16:28:05 +11:00
Mitchell Richters bf5bd01164 - binaryangle.h/PlayerAngle: Make `settarget()` method consistent with `PlayerHorizon` class and fix incorrect variable declaration. 2020-10-12 14:51:53 +11:00
Christoph Oelckers cb8d2eb94c - added serializers for PlayerAngle and PlayerHorizon. 2020-10-11 16:55:12 +02:00
Christoph Oelckers 1757ef2aa6 - split the game input code off gamecontrol.cpp into its own file. 2020-10-11 16:33:43 +02:00