mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: Slight cleanup on e0e459216d
.
This commit is contained in:
parent
4958241c57
commit
ae39645169
1 changed files with 3 additions and 6 deletions
|
@ -516,24 +516,21 @@ void GameInterface::doPlayerMovement(const float scaleAdjust)
|
|||
if (isRRRA() && (p->OnMotorcycle || p->OnBoat))
|
||||
{
|
||||
static constexpr float VEHICLETURN = (20.f * 360.f / 2048.f);
|
||||
float baseVel, velScale;
|
||||
float baseVel, velScale; unsigned vehFlags;
|
||||
|
||||
if (p->OnMotorcycle)
|
||||
{
|
||||
vehFlags = VEH_CANTURN | (VEH_CANMOVE * !p->moto_underwater) | (VEH_SCALETURN * (p->MotoSpeed <= 0));
|
||||
velScale = (3.f / 10.f);
|
||||
baseVel = VEHICLETURN * Sgn(p->MotoSpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
vehFlags = VEH_CANMOVE | (VEH_CANTURN * (p->MotoSpeed || p->moto_drink));
|
||||
velScale = !p->NotOnWater? 1.f : (6.f / 19.f);
|
||||
baseVel = VEHICLETURN * velScale;
|
||||
}
|
||||
|
||||
unsigned vehFlags = 0;
|
||||
vehFlags |= VEH_CANMOVE * (p->OnBoat || !p->moto_underwater);
|
||||
vehFlags |= VEH_CANTURN * (p->OnMotorcycle || p->MotoSpeed || p->moto_drink);
|
||||
vehFlags |= VEH_SCALETURN * (p->OnMotorcycle && p->MotoSpeed <= 0);
|
||||
|
||||
gameInput.processVehicle(&p->Angles, scaleAdjust, baseVel, velScale, vehFlags);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue