- Duke: Move cancellation of spin from FinalizeInput() into applylook() in gameinput.cpp.

This commit is contained in:
Mitchell Richters 2021-01-02 10:26:16 +11:00
parent 5f33b0087f
commit 4397646cc4
2 changed files with 8 additions and 11 deletions

View file

@ -387,6 +387,7 @@ void applylook(PlayerAngle* angle, float const avel, ESyncBits* actions, double
{ {
// add player's input // add player's input
angle->ang += degang(avel); angle->ang += degang(avel);
angle->spin = bamlook(0);
} }
} }

View file

@ -794,21 +794,17 @@ static void FinalizeInput(int playerNum, InputPacket& input, bool vehicle)
loc.svel = input.svel = 0; loc.svel = input.svel = 0;
} }
if (p->on_crane == nullptr && p->newOwner == nullptr) if (p->newOwner != nullptr)
{ {
if (!SyncInput() && input.avel) if (p->on_crane != nullptr)
{ {
p->angle.spin = bamlook(0); loc.avel = input.avel = 0;
} }
}
else
{
loc.avel = input.avel = 0;
}
if (p->newOwner != nullptr && ((p->sync.actions & SB_CENTERVIEW) || !(p->sync.actions & SB_CENTERVIEW) && abs(p->horizon.horiz.asbuild()) > 5)) if ((p->sync.actions & SB_CENTERVIEW) || (!(p->sync.actions & SB_CENTERVIEW) && abs(p->horizon.horiz.asbuild()) > 5))
{ {
loc.horz = input.horz = 0; loc.horz = input.horz = 0;
}
} }
} }
} }