mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: Clamp RRRA vehicle input in processVehicleInput()
.
This commit is contained in:
parent
aeb16e390c
commit
e79c6bacd3
1 changed files with 4 additions and 11 deletions
|
@ -755,7 +755,7 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
|
|||
input.avel = boatApplyTurn(p, hidInput, kbdLeft, kbdRight, scaleAdjust);
|
||||
}
|
||||
|
||||
input.fvel = xs_CRoundToInt(p->MotoSpeed);
|
||||
input.fvel = clamp(xs_CRoundToInt(p->MotoSpeed), -(MAXVELMOTO >> 3), MAXVELMOTO);
|
||||
input.avel *= BAngToDegree;
|
||||
loc.avel += input.avel;
|
||||
}
|
||||
|
@ -766,7 +766,7 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void FinalizeInput(player_struct *p, InputPacket& input, bool vehicle)
|
||||
static void FinalizeInput(player_struct *p, InputPacket& input)
|
||||
{
|
||||
if (movementBlocked(p) || p->GetActor()->s.extra <= 0 || (p->dead_flag && !ud.god && !p->resurrected))
|
||||
{
|
||||
|
@ -777,14 +777,7 @@ static void FinalizeInput(player_struct *p, InputPacket& input, bool vehicle)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (p->on_crane == nullptr)
|
||||
{
|
||||
if (vehicle)
|
||||
{
|
||||
loc.fvel = clamp(input.fvel, -(MAXVELMOTO >> 3), MAXVELMOTO);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (p->on_crane != nullptr)
|
||||
{
|
||||
loc.fvel = input.fvel = 0;
|
||||
loc.svel = input.svel = 0;
|
||||
|
@ -833,7 +826,7 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
|||
processMovement(&input, &loc, hidInput, scaleAdjust, p->drink_amt);
|
||||
}
|
||||
|
||||
FinalizeInput(p, input, rrraVehicle);
|
||||
FinalizeInput(p, input);
|
||||
|
||||
if (!SyncInput())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue