summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-18 13:08:24 +0200
committerGitHub <noreply@github.com>2020-05-18 13:08:24 +0200
commit2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e (patch)
treeda615f0e7ebbaf9c7c9e48ed283569e3056e3adb /src/peds
parentMerge pull request #558 from Sergeanur/VC/text (diff)
parentsome debug changes (diff)
downloadre3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.gz
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.bz2
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.lz
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.xz
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.tar.zst
re3-2d4861454c819f60ceca4ddd1d1ab6cfb3725d5e.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/CivilianPed.cpp4
-rw-r--r--src/peds/Ped.cpp2
-rw-r--r--src/peds/Ped.h4
3 files changed, 6 insertions, 4 deletions
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp
index b68b96c0..48b1f6cd 100644
--- a/src/peds/CivilianPed.cpp
+++ b/src/peds/CivilianPed.cpp
@@ -325,7 +325,7 @@ CCivilianPed::ProcessControl(void)
CWorld::Players[CWorld::PlayerInFocus].m_nSexFrequency = Max(250, playerSexFrequency - 10);
}
- m_pMyVehicle->pDriver->m_fHealth = Min(125.0f, 1.0f + m_pMyVehicle->pDriver->m_fHealth);
+ m_pMyVehicle->pDriver->m_fHealth = Min(CWorld::Players[0].m_nMaxHealth + 25.0f, 1.0f + m_pMyVehicle->pDriver->m_fHealth);
if (CWorld::Players[CWorld::PlayerInFocus].m_nSexFrequency == 250)
CWorld::Players[CWorld::PlayerInFocus].m_nNextSexFrequencyUpdateTime = CTimer::GetTimeInMilliseconds() + 3000;
} else {
@@ -336,7 +336,7 @@ CCivilianPed::ProcessControl(void)
} else {
bWanderPathAfterExitingCar = true;
CWorld::Players[CWorld::PlayerInFocus].m_pHooker = nil;
- m_pMyVehicle->pDriver->m_fHealth = 125.0f;
+ m_pMyVehicle->pDriver->m_fHealth = CWorld::Players[0].m_nMaxHealth + 25.0f;
SetObjective(OBJECTIVE_LEAVE_VEHICLE, m_pMyVehicle);
}
} else {
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 0eb85f34..e25e592e 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -537,6 +537,8 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
m_fAirResistance = 0.4f / m_fMass;
m_fElasticity = 0.05f;
+ m_ceaseAttackTimer = 0;
+
bIsStanding = false;
bWasStanding = false;
bIsAttacking = false;
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 42fec06c..0e80c378 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -209,7 +209,7 @@ enum eObjective : uint32 {
OBJECTIVE_LEAVE_CAR_AND_DIE,
OBJECTIVE_USE_SEAT_ATTRACTOR,
OBJECTIVE_USE_ATM_ATTRACTOR,
- OBJECTIVE_FLEE_CAR, // is it 41?
+ OBJECTIVE_FLEE_CAR,
OBJ_42,
OBJECTIVE_USE_STOP_ATTRACTOR,
OBJECTIVE_USE_PIZZA_ATTRACTOR,
@@ -551,7 +551,7 @@ public:
uint32 m_duckAndCoverTimer;
uint32 m_bloodyFootprintCountOrDeathTime; // Death time when bDoBloodyFootprints is false. Weird decision
uint32 m_shotTime;
- uint32 m_shotTimeAdd;
+ uint32 m_ceaseAttackTimer;
uint8 m_panicCounter;
bool m_deadBleeding;
int8 m_bodyPartBleeding; // PedNode, but -1 if there isn't