- gameinput.h: Correctly use targetset() in PlayerHorizon and PlayerAngle structs.

This commit is contained in:
Mitch Richters 2021-10-30 20:30:08 +11:00 committed by Christoph Oelckers
parent 15c4d38694
commit 0fe5ac6a56

View file

@ -47,7 +47,7 @@ struct PlayerHorizon
// Input locking helpers.
void lockinput() { inputdisabled = true; }
void unlockinput() { inputdisabled = false; }
bool movementlocked() { return target.asq16() || inputdisabled; }
bool movementlocked() { return targetset() || inputdisabled; }
// Draw code helpers.
double horizsumfrac(double const smoothratio) { return (!SyncInput() ? sum() : interpolatedsum(smoothratio)).asbuildf() * (1. / 16.); }
@ -151,7 +151,7 @@ struct PlayerAngle
// Input locking helpers.
void lockinput() { inputdisabled = true; }
void unlockinput() { inputdisabled = false; }
bool movementlocked() { return target.asq16() || inputdisabled; }
bool movementlocked() { return targetset() || inputdisabled; }
// Draw code helpers.
double look_anghalf(double const smoothratio) { return (!SyncInput() ? look_ang : interpolatedlookang(smoothratio)).signedbuildf() * 0.5; }