summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/vehicles/Automobile.cpp9
-rw-r--r--src/vehicles/Boat.cpp1
-rw-r--r--src/vehicles/DamageManager.cpp1
-rw-r--r--src/vehicles/Heli.cpp4
-rw-r--r--src/vehicles/Train.cpp2
-rw-r--r--src/vehicles/Train.h2
6 files changed, 14 insertions, 5 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 50eec49f..ecf821bc 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -248,6 +248,7 @@ CAutomobile::ProcessControl(void)
strongGrip2 = true;
}
}
+ default: break;
}
}
@@ -419,6 +420,7 @@ CAutomobile::ProcessControl(void)
m_fGasPedal = 0.0f;
m_nCarHornTimer = 0;
break;
+ default: break;
}
// what's going on here?
@@ -1252,6 +1254,7 @@ CAutomobile::PreRender(void)
m_aWheelColPoints[i].point + CVector(0.0f, 0.0f, 0.05f),
CVector(0.0f, 0.0f, 0.0f), nil, 0.1f);
break;
+ default: break;
}
}
}else{
@@ -1376,6 +1379,7 @@ CAutomobile::PreRender(void)
GetForward().x, GetForward().y,
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_LEFT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_LEFT]);
break;
+ default: break;
}
switch(m_aWheelState[CARWHEEL_REAR_RIGHT]){
@@ -1393,6 +1397,7 @@ CAutomobile::PreRender(void)
GetForward().x, GetForward().y,
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_RIGHT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_RIGHT]);
break;
+ default: break;
}
}
@@ -1845,7 +1850,7 @@ CAutomobile::PreRender(void)
false);
CVector pos = GetPosition() - 4.0f*GetForward();
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK ||
- Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
+ Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) {
if(m_fBrakePedal > 0.0f)
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f),
10.0f, 1.0f, 0.0f, 0.0f,
@@ -1854,6 +1859,7 @@ CAutomobile::PreRender(void)
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f),
7.0f, 0.6f, 0.0f, 0.0f,
CPointLights::FOG_NONE, false);
+ }
}
}else{
// Lights off
@@ -3775,6 +3781,7 @@ CAutomobile::IsDoorReady(eDoors door)
case DOOR_FRONT_RIGHT: doorflag = CAR_DOOR_FLAG_RF; break;
case DOOR_REAR_LEFT: doorflag = CAR_DOOR_FLAG_LR; break;
case DOOR_REAR_RIGHT: doorflag = CAR_DOOR_FLAG_RR; break;
+ default: break;
}
return (doorflag & m_nGettingInFlags) == 0;
}
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 5694651c..2f056b02 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -180,6 +180,7 @@ CBoat::ProcessControl(void)
return;
}
break;
+ default: break;
}
float collisionDamage = pHandling->fCollisionDamageMultiplier * m_fDamageImpulse;
diff --git a/src/vehicles/DamageManager.cpp b/src/vehicles/DamageManager.cpp
index 03ccfe77..6b59ccda 100644
--- a/src/vehicles/DamageManager.cpp
+++ b/src/vehicles/DamageManager.cpp
@@ -85,6 +85,7 @@ CDamageManager::ApplyDamage(tComponent component, float damage, float unused)
ProgressEngineDamage();
ProgressPanelDamage(subComp);
break;
+ default: break;
}
return true;
}
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index d9c364d2..5cd6488a 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -980,7 +980,7 @@ CHeli::TestRocketCollision(CVector *rocketPos)
for(i = 0; i < NUM_HELIS; i++){
if(pHelis[i] && !pHelis[i]->bExplosionProof && (*rocketPos - pHelis[i]->GetPosition()).MagnitudeSqr() < sq(8.0f)){
- pHelis[i]->m_fAngularSpeed = (CGeneral::GetRandomNumber() < RAND_MAX/2) ? 0.05f : -0.05f;
+ pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 10000;
hit = true;
@@ -1007,7 +1007,7 @@ CHeli::TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, i
if(pHelis[i]->m_heliType == HELI_CATALINA && pHelis[i]->m_nBulletDamage > 400 ||
pHelis[i]->m_heliType != HELI_CATALINA && pHelis[i]->m_nBulletDamage > 700){
- pHelis[i]->m_fAngularSpeed = (CGeneral::GetRandomNumber() < RAND_MAX/2) ? 0.05f : -0.05f;
+ pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 10000;
}
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index fef712e6..5dab70c5 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -514,7 +514,7 @@ CTrain::Shutdown(void)
}
void
-CTrain::ReadAndInterpretTrackFile(char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
+CTrain::ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail)
{
#ifdef GTA_TRAIN
diff --git a/src/vehicles/Train.h b/src/vehicles/Train.h
index e20a08fd..d8ee949d 100644
--- a/src/vehicles/Train.h
+++ b/src/vehicles/Train.h
@@ -87,7 +87,7 @@ public:
static void InitTrains(void);
static void Shutdown(void);
- static void ReadAndInterpretTrackFile(char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
+ static void ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail);
static void UpdateTrains(void);
};