- binaryangle.h/PlayerAngle: Make settarget() method consistent with PlayerHorizon class and fix incorrect variable declaration.

This commit is contained in:
Mitchell Richters 2020-10-12 14:51:53 +11:00
parent c08851e4c0
commit bf5bd01164

View file

@ -93,7 +93,8 @@ struct PlayerAngle
{ {
binangle ang, oang; binangle ang, oang;
lookangle look_ang, olook_ang, rotscrnang, orotscrnang, spin; lookangle look_ang, olook_ang, rotscrnang, orotscrnang, spin;
double adjustment, target; uint32_t target;
double adjustment;
void backup() void backup()
{ {
@ -130,8 +131,8 @@ struct PlayerAngle
{ {
if (!cl_syncinput) if (!cl_syncinput)
{ {
if (value == 0) value += (1. / BAMUNIT);
target = xs_CRoundToUInt(value * BAMUNIT); target = xs_CRoundToUInt(value * BAMUNIT);
if (target == 0) target += 1;
} }
else else
{ {