diff options
author | withmorten <morten.with@gmail.com> | 2021-06-28 13:57:05 +0200 |
---|---|---|
committer | withmorten <morten.with@gmail.com> | 2021-06-28 13:57:05 +0200 |
commit | d17d437de319ca4c388dc724cffea91702d3a699 (patch) | |
tree | 806104fa5fe0e994cd7f55f1b7b48dc64a998c44 /src/vehicles/Vehicle.cpp | |
parent | Redo ReadSaveBuf + common.h cleanup (diff) | |
download | re3-d17d437de319ca4c388dc724cffea91702d3a699.tar re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.gz re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.bz2 re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.lz re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.xz re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.zst re3-d17d437de319ca4c388dc724cffea91702d3a699.zip |
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r-- | src/vehicles/Vehicle.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 8fbf8224..a41e0fa0 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -479,11 +479,11 @@ CVehicle::FlyingControl(eFlightModel flightModel) ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep()); if (GetUp().z > 0.0f){ - float upRight = clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); + float upRight = Clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep(); ApplyTurnForce(upImpulseRight * GetUp(), GetRight()); - float upFwd = clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); + float upFwd = Clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift); float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep(); ApplyTurnForce(upImpulseFwd * GetUp(), GetForward()); }else{ @@ -522,8 +522,8 @@ CVehicle::FlyingControl(eFlightModel flightModel) fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f; if (CPad::GetPad(0)->GetHorn()) { fYaw = 0.0f; - fPitch = clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f); - fRoll = clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); + fPitch = Clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f); + fRoll = Clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); } ApplyTurnForce(fPitch * GetUp() * flyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward()); ApplyTurnForce(fRoll * GetUp() * flyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight()); @@ -2162,9 +2162,9 @@ CVehicle::HeliDustGenerate(CEntity *heli, float radius, float ground, int rnd) float red = (0.3*CTimeCycle::GetDirectionalRed() + CTimeCycle::GetAmbientRed_Obj())*255.0f/4.0f; float green = (0.3*CTimeCycle::GetDirectionalGreen() + CTimeCycle::GetAmbientGreen_Obj())*255.0f/4.0f; float blue = (0.3*CTimeCycle::GetDirectionalBlue() + CTimeCycle::GetAmbientBlue_Obj())*255.0f/4.0f; - r = clamp(red, 0.0f, 255.0f); - g = clamp(green, 0.0f, 255.0f); - b = clamp(blue, 0.0f, 255.0f); + r = Clamp(red, 0.0f, 255.0f); + g = Clamp(green, 0.0f, 255.0f); + b = Clamp(blue, 0.0f, 255.0f); RwRGBA col1 = { r, g, b, (RwUInt8)CGeneral::GetRandomNumberInRange(8, 32) }; RwRGBA col2 = { 255, 255, 255, 32 }; |