diff options
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Automobile.h | 4 | ||||
-rw-r--r-- | src/vehicles/Bike.cpp | 6 | ||||
-rw-r--r-- | src/vehicles/Boat.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/Train.cpp | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h index 6c13c117..eaceef7b 100644 --- a/src/vehicles/Automobile.h +++ b/src/vehicles/Automobile.h @@ -165,4 +165,6 @@ public: static const uint32 nSaveStructSize; static void SetAllTaxiLights(bool set); -};
\ No newline at end of file +}; + +extern CVector vecHunterGunPos;
\ No newline at end of file diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 01b489b2..6f52c33f 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -411,13 +411,13 @@ CBike::ProcessControl(void) fDx = fDAxisXExtra; if(!(m_aWheelTimer[BIKESUSP_R1] == 0.0f && m_aWheelTimer[BIKESUSP_R2] == 0.0f) && GetForward().z > 0.0f) - res.x -= Max(0.25f*Abs(pBikeHandling->fWheelieAng-GetForward().z), 0.07f); + res.x -= Min(0.25f*Abs(pBikeHandling->fWheelieAng-GetForward().z), 0.07f); else res.x = fInAirXRes; }else if(m_aWheelTimer[BIKESUSP_R1] == 0.0f && m_aWheelTimer[BIKESUSP_R2] == 0.0f){ fDx = fDAxisXExtra; if(GetForward().z < 0.0f) - res.x *= Max(0.3f*Abs(pBikeHandling->fStoppieAng-GetForward().z), 0.1f) + 0.9f; + res.x *= Min(0.3f*Abs(pBikeHandling->fStoppieAng-GetForward().z), 0.1f) + 0.9f; } } @@ -1014,7 +1014,7 @@ CBike::ProcessControl(void) m_vecAvgSurfaceRight.Normalise(); float lean; if(m_nWheelsOnGround == 0) - lean = -m_fSteerAngle/DEGTORAD(pHandling->fSteeringLock)*0.5f*GRAVITY*CTimer::GetTimeStep(); + lean = -(m_fSteerAngle/DEGTORAD(pHandling->fSteeringLock))*0.5f*GRAVITY*CTimer::GetTimeStep(); else lean = DotProduct(m_vecMoveSpeed-initialMoveSpeed, m_vecAvgSurfaceRight); lean /= GRAVITY*Max(CTimer::GetTimeStep(), 0.01f); diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 6bc8ef0c..673372b0 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -957,8 +957,8 @@ CBoat::AddWakePoint(CVector point) } m_avec2dWakePoints[0] = point; m_afWakePointLifeTime[0] = 150.0f; - if (m_nNumWakePoints < 32) - ++m_nNumWakePoints; + if (m_nNumWakePoints < ARRAY_SIZE(m_afWakePointLifeTime)) + m_nNumWakePoints++; } } else { diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 50f7cb1d..546f72c2 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -663,8 +663,8 @@ PlayAnnouncement(uint8 sound, uint8 station) void ProcessTrainAnnouncements(void) { - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 3; j++) { + for (int i = 0; i < ARRAY_SIZE(StationDist); i++) { + for (int j = 0; j < ARRAY_SIZE(EngineTrackPosition); j++) { if (!bTrainArrivalAnnounced[i]) { float preDist = StationDist[i] - 100.0f; if (preDist < 0.0f) |