summaryrefslogtreecommitdiff
path: root/src/peds
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2021-01-31 21:06:38 +0100
committerFilip Gawin <filip.gawin@zoho.com>2021-01-31 21:06:38 +0100
commit3d4791f2915a5b1f38c34a0cf01e0dffc588af8c (patch)
treef6a510c62b8322a11292acafbbc266d1c2c466c2 /src/peds
parent7a3b80a9b7f414967fe59f89ab0fe5416735babe (diff)
Revert "First batch of fixes (CallAndMessage)"
This reverts commit 7a3b80a9b7f414967fe59f89ab0fe5416735babe.
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp16
-rw-r--r--src/peds/PedAI.cpp44
2 files changed, 16 insertions, 44 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index a498e251..87e77ef3 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -4348,15 +4348,13 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg)
}
#endif
-#ifdef FIX_BUGS
- if(dragAssoc)
-#endif
- if(quickJackedAssoc) {
- dragAssoc->SetDeleteCallback(PedSetQuickDraggedOutCarPositionCB, ped);
- } else {
- dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped);
- if(ped->CanSetPedState()) CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
- }
+ if (quickJackedAssoc) {
+ dragAssoc->SetDeleteCallback(PedSetQuickDraggedOutCarPositionCB, ped);
+ } else {
+ dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped);
+ if (ped->CanSetPedState())
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
+ }
ped->ReplaceWeaponWhenExitingVehicle();
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);