summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-05-12 01:24:57 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-05-12 23:18:54 +0200
commitc2ac6b3759901ecede7b22c1e9ab9f5a04ddd527 (patch)
treecf51d6ab8430cd186e02f0e8105004f8e5476728 /src/peds
parentfix shotgun (diff)
downloadre3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.gz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.bz2
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.lz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.xz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.zst
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/EmergencyPed.cpp2
-rw-r--r--src/peds/Ped.cpp18
2 files changed, 13 insertions, 7 deletions
diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp
index 7229ed3f..cdaee657 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -166,6 +166,7 @@ CEmergencyPed::FiremanAI(void)
m_nEmergencyPedState = EMERGENCY_PED_READY;
SetMoveState(PEDMOVE_WALK);
break;
+ default: break;
}
}
@@ -410,6 +411,7 @@ CEmergencyPed::MedicAI(void)
m_nEmergencyPedState = EMERGENCY_PED_READY;
SetMoveState(PEDMOVE_WALK);
break;
+ default: break;
}
}
}
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 2bd5c152..f4e99d4d 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -5048,13 +5048,13 @@ CPed::LoadFightData(void)
sscanf(
&line[lp],
"%s %f %f %f %f %c %s %d %d",
- &moveName,
+ moveName,
&startFireTime,
&endFireTime,
&comboFollowOnTime,
&strikeRadius,
&hitLevel,
- &animName,
+ animName,
&damage,
&flags);
@@ -10686,6 +10686,7 @@ CPed::ProcessControl(void)
Say(SOUND_PED_HANDS_UP);
}
break;
+ default: break;
}
SetMoveAnim();
if (bPedIsBleeding) {
@@ -11810,8 +11811,10 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg)
}
} else if (ped->m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER) {
- switch (ped->m_vehEnterType) {
- if (!veh->bIsBus) {
+ if (veh->bIsBus) {
+ veh->AddPassenger(ped);
+ } else {
+ switch (ped->m_vehEnterType) {
case CAR_DOOR_RF:
veh->AddPassenger(ped, 0);
break;
@@ -11821,10 +11824,10 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg)
case CAR_DOOR_LR:
veh->AddPassenger(ped, 1);
break;
- }
- default:
- veh->AddPassenger(ped);
+ default:
+ veh->AddPassenger(ped);
break;
+ }
}
ped->m_nPedState = PED_DRIVING;
if (ped->m_prevObjective == OBJECTIVE_RUN_TO_AREA || ped->m_prevObjective == OBJECTIVE_GOTO_CHAR_ON_FOOT || ped->m_prevObjective == OBJECTIVE_KILL_CHAR_ON_FOOT)
@@ -17119,6 +17122,7 @@ CPed::SetObjective(eObjective newObj, CVector dest)
if (sq(m_distanceToCountSeekDone) > (m_nextRoutePointPos - GetPosition()).MagnitudeSqr2D())
return;
break;
+ default: break;
}
if (IsTemporaryObjective(m_objective)) {