mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Duke: Move cancellation of spin from FinalizeInput()
into applylook()
in gameinput.cpp.
This commit is contained in:
parent
5f33b0087f
commit
4397646cc4
2 changed files with 8 additions and 11 deletions
|
@ -387,6 +387,7 @@ void applylook(PlayerAngle* angle, float const avel, ESyncBits* actions, double
|
|||
{
|
||||
// add player's input
|
||||
angle->ang += degang(avel);
|
||||
angle->spin = bamlook(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -794,21 +794,17 @@ static void FinalizeInput(int playerNum, InputPacket& input, bool vehicle)
|
|||
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))
|
||||
{
|
||||
loc.horz = input.horz = 0;
|
||||
if ((p->sync.actions & SB_CENTERVIEW) || (!(p->sync.actions & SB_CENTERVIEW) && abs(p->horizon.horiz.asbuild()) > 5))
|
||||
{
|
||||
loc.horz = input.horz = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue