summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/CopPed.cpp4
-rw-r--r--src/peds/CopPed.h5
-rw-r--r--src/peds/EmergencyPed.h5
-rw-r--r--src/peds/Ped.cpp25
-rw-r--r--src/peds/Ped.h2
5 files changed, 27 insertions, 14 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index 63811eae..81c9fa6e 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -63,7 +63,7 @@ CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP)
m_bIsInPursuit = false;
field_1350 = 1;
m_bIsDisabledCop = false;
- field_1356 = 0;
+ m_fAbseilPos = 0.0f;
m_attackTimer = 0;
m_bBeatingSuspect = false;
m_bStopAndShootDisabledZone = false;
@@ -668,7 +668,7 @@ CCopPed::ProcessControl(void)
}
if (bDuckAndCover) {
-#ifndef GTA3_1_1_PATCH
+#if !defined(GTA3_1_1_PATCH) && !defined(VC_PED_PORTS)
if (!bNotAllowedToDuck && Seek()) {
SetMoveState(PEDMOVE_STILL);
SetMoveAnim();
diff --git a/src/peds/CopPed.h b/src/peds/CopPed.h
index 62234b7e..e3454875 100644
--- a/src/peds/CopPed.h
+++ b/src/peds/CopPed.h
@@ -20,12 +20,9 @@ public:
bool m_bBeatingSuspect;
bool m_bStopAndShootDisabledZone;
bool m_bZoneDisabled;
- int32 field_1356;
+ float m_fAbseilPos; // VC leftover, unused
eCopType m_nCopType;
int8 field_1364;
- int8 field_1365;
- int8 field_1366;
- int8 field_1367;
CCopPed(eCopType);
~CCopPed();
diff --git a/src/peds/EmergencyPed.h b/src/peds/EmergencyPed.h
index 5693e908..6546e902 100644
--- a/src/peds/EmergencyPed.h
+++ b/src/peds/EmergencyPed.h
@@ -22,13 +22,12 @@ enum EmergencyPedState
class CEmergencyPed : public CPed
{
public:
- // 0x53C
CPed *m_pRevivedPed;
EmergencyPedState m_nEmergencyPedState;
CAccident *m_pAttendedAccident;
CFire *m_pAttendedFire;
- bool m_bStartedToCPR; // set but unused(?)
- int32 field_1360; // also something for medics, unused(?)
+ bool m_bStartedToCPR; // set but unused
+ int32 field_1360; // set to 0 but unused
CEmergencyPed(uint32);
~CEmergencyPed() { }
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 1f1930d7..915c5d35 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -9191,8 +9191,11 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->QuitEnteringCar();
return;
}
- bool itsVan = veh->bIsVan;
- bool itsBus = veh->bIsBus;
+ bool itsVan = !!veh->bIsVan;
+ bool itsBus = !!veh->bIsBus;
+#ifdef FIX_BUGS
+ bool itsLow = !!veh->bLowVehicle;
+#endif
eDoors enterDoor;
AnimationId enterAnim;
@@ -9227,6 +9230,10 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
enterAnim = ANIM_VAN_GETIN;
} else if (itsBus) {
enterAnim = ANIM_COACH_IN_R;
+#ifdef FIX_BUGS
+ } else if (itsLow) {
+ enterAnim = ANIM_CAR_GETIN_LOW_RHS;
+#endif
} else {
enterAnim = ANIM_CAR_GETIN_RHS;
}
@@ -9234,6 +9241,10 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
enterAnim = ANIM_VAN_GETIN_L;
} else if (itsBus) {
enterAnim = ANIM_COACH_IN_L;
+#ifdef FIX_BUGS
+ } else if (itsLow) {
+ enterAnim = ANIM_CAR_GETIN_LOW_LHS;
+#endif
} else {
enterAnim = ANIM_CAR_GETIN_LHS;
}
@@ -10806,6 +10817,11 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
}
}
}
+#ifdef CANCELLABLE_CAR_ENTER
+ if (!veh->IsDoorMissing(door) && veh->CanPedOpenLocks(ped) && veh->IsCar()) {
+ ((CAutomobile*)veh)->Damage.SetDoorStatus(door, DOOR_STATUS_SWINGING);
+ }
+#endif
ped->QuitEnteringCar();
ped->RestorePreviousObjective();
ped->bCancelEnteringCar = false;
@@ -14492,7 +14508,8 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints)
if (collidingEnt->IsVehicle() && ((CVehicle*)collidingEnt)->IsBoat())
collidedWithBoat = true;
- if (!field_EF && !m_phy_flagA80
+ // ofc we're not vehicle
+ if (!m_bIsVehicleBeingShifted && !m_phy_flagA80
#ifdef VC_PED_PORTS
&& !collidingEnt->IsPed()
#endif
@@ -15259,7 +15276,7 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
{
uint32 optedDoorNode = wantedDoorNode;
bool teleportNeeded = false;
- bool isLow = veh->bLowVehicle;
+ bool isLow = !!veh->bLowVehicle;
if (!veh->CanPedExitCar()) {
if (veh->pDriver && !veh->pDriver->IsPlayer()) {
veh->AutoPilot.m_nCruiseSpeed = 0;
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index fc53e4bc..90e16269 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -435,7 +435,7 @@ public:
float m_fRotationCur;
float m_fRotationDest;
float m_headingRate;
- uint16 m_vehEnterType; // TODO: this is more like a door, not a type
+ uint16 m_vehEnterType;
int16 m_walkAroundType;
CPhysical *m_pCurrentPhysSurface;
CVector m_vecOffsetFromPhysSurface;