- Another amendment to 18541d1ab4 and 1ac58dc41c to ensure input lock is only set when we're running unsynchronised input.

This commit is contained in:
Mitchell Richters 2022-06-05 21:24:50 +10:00
parent bc5c742930
commit dcf1c540e6

View file

@ -92,13 +92,13 @@ struct PlayerHorizon
void settarget(fixedhoriz value, bool const lock = false)
{
// Clamp incoming variable because sometimes the caller can exceed bounds.
value = q16horiz(clamp(value.asq16(), gi->playerHorizMin(), gi->playerHorizMax()));
inputdisabled = lock;
if (!SyncInput())
{
target = value;
if (!targetset()) target = q16horiz(1);
inputdisabled = lock;
target = value.asq16() ? value : q16horiz(1);
}
else
{
@ -210,12 +210,10 @@ struct PlayerAngle
void settarget(binangle const value, bool const lock = false)
{
inputdisabled = lock;
if (!SyncInput())
{
target = value;
if (!targetset()) target = bamang(1);
inputdisabled = lock;
target = value.asbam() ? value : bamang(1);
}
else
{