summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-12 23:55:52 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-12 23:55:52 +0200
commit7c2b9478d52e5122eff2e11298f31bfc1b896f94 (patch)
tree53ad6828eb1366a5dd00d9977eec330bd3d7b52f /src/peds
parentMerge remote-tracking branch 'origin/master' into miami (diff)
parentMerge pull request #537 from ShFil119/linux_warns (diff)
downloadre3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.gz
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.bz2
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.lz
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.xz
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.zst
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.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 38ea4bef..2cb36843 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -163,6 +163,7 @@ CEmergencyPed::FiremanAI(void)
m_nEmergencyPedState = EMERGENCY_PED_READY;
SetMoveState(PEDMOVE_WALK);
break;
+ default: break;
}
}
@@ -407,6 +408,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 8cf52e91..91b74b96 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -5056,13 +5056,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);
@@ -10617,6 +10617,7 @@ CPed::ProcessControl(void)
Say(SOUND_PED_HANDS_UP);
}
break;
+ default: break;
}
SetMoveAnim();
if (bPedIsBleeding) {
@@ -11741,8 +11742,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;
@@ -11752,10 +11755,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)
@@ -17002,6 +17005,7 @@ CPed::SetObjective(eObjective newObj, CVector dest)
if (sq(m_distanceToCountSeekDone) > (m_nextRoutePointPos - GetPosition()).MagnitudeSqr2D())
return;
break;
+ default: break;
}
if (IsTemporaryObjective(m_objective)) {