summaryrefslogtreecommitdiffstats
path: root/src/peds/PedAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds/PedAI.cpp')
-rw-r--r--src/peds/PedAI.cpp44
1 files changed, 9 insertions, 35 deletions
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp
index 73958a43..089c8d9d 100644
--- a/src/peds/PedAI.cpp
+++ b/src/peds/PedAI.cpp
@@ -2244,9 +2244,6 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
enterDoor = DOOR_REAR_LEFT;
break;
default:
-#ifdef FIX_BUGS
- enterDoor = DOOR_BONNET;
-#endif
break;
}
@@ -2359,7 +2356,7 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; pedInSeat = veh->pPassengers[2]; break;
case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; pedInSeat = veh->pDriver; break;
case CAR_DOOR_LR: door = DOOR_REAR_LEFT; pedInSeat = veh->pPassengers[1]; break;
- default: assert(0); debug("This shouldn't happen"); return;
+ default: assert(0);
}
if (ped->m_fHealth == 0.0f || CPad::GetPad(0)->ArePlayerControlsDisabled() && pedInSeat && pedInSeat->IsPlayer()) {
@@ -2557,9 +2554,6 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg)
case PEDTYPE_PLAYER4:
padNo = 3;
break;
- default:
- padNo = 0;
- break;
}
CPad *pad = CPad::GetPad(padNo);
@@ -2663,9 +2657,6 @@ CPed::PedAnimGetInCB(CAnimBlendAssociation *animAssoc, void *arg)
enterDoor = DOOR_REAR_LEFT;
break;
default:
-#ifdef FIX_BUGS
- enterDoor = DOOR_BONNET;
-#endif
break;
}
if (!veh->IsDoorMissing(enterDoor)) {
@@ -2761,15 +2752,12 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg)
veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_CLOSEDOOR_LHS, 1.0f);
eDoors door;
- switch(ped->m_vehDoor) {
- case CAR_DOOR_RF: door = DOOR_FRONT_RIGHT; break;
- case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; break;
- case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; break;
- case CAR_DOOR_LR: door = DOOR_REAR_LEFT; break;
- default:
- assert(0);
- debug("This shouldn't happen");
- return;
+ switch (ped->m_vehDoor) {
+ case CAR_DOOR_RF: door = DOOR_FRONT_RIGHT; break;
+ case CAR_DOOR_RR: door = DOOR_REAR_RIGHT; break;
+ case CAR_DOOR_LF: door = DOOR_FRONT_LEFT; break;
+ case CAR_DOOR_LR: door = DOOR_REAR_LEFT; break;
+ default: assert(0);
}
if (veh->Damage.GetDoorStatus(door) == DOOR_STATUS_SWINGING)
@@ -2938,9 +2926,6 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
door = DOOR_REAR_LEFT;
break;
default:
-#ifdef FIX_BUGS
- door = DOOR_BONNET;
-#endif
break;
}
bool closeDoor = !veh->IsDoorMissing(door);
@@ -2962,12 +2947,6 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
case PEDTYPE_PLAYER4:
padNo = 3;
break;
- default:
-#ifdef FIX_BUGS
- padNo = 0;
- debug("This shouldn't happen");
-#endif
- break;
}
CPad* pad = CPad::GetPad(padNo);
bool engineIsIntact = veh->IsCar() && ((CAutomobile*)veh)->Damage.GetEngineStatus() >= 225;
@@ -3306,9 +3285,6 @@ CPed::SetCarJack(CVehicle* car)
{
uint8 doorFlag;
eDoors door;
-#ifdef FIX_BUGS
- door = DOOR_BONNET;
-#endif
CPed *pedInSeat = nil;
if (car->IsBoat())
@@ -3464,10 +3440,8 @@ CPed::BeingDraggedFromCar(void)
if (!dontRunAnim)
m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, enterAnim);
-#ifdef FIX_BUGS
- if(m_pVehicleAnim)
-#endif
- m_pVehicleAnim->SetFinishCallback(PedSetDraggedOutCarCB, this);
+
+ m_pVehicleAnim->SetFinishCallback(PedSetDraggedOutCarCB, this);
lineUpType = LINE_UP_TO_CAR_START;
} else if (m_pVehicleAnim->currentTime <= 1.4f) {
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);