summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-08-17 21:17:28 +0200
committerGitHub <noreply@github.com>2019-08-17 21:17:28 +0200
commitde1627eb4c2fb427655a5e688349928255b6aae3 (patch)
tree82f5205ffe573d41060ec29646e821841f651837 /src/peds
parentMerge pull request #193 from erorcun/erorcun (diff)
parentmerge (diff)
downloadre3-de1627eb4c2fb427655a5e688349928255b6aae3.tar
re3-de1627eb4c2fb427655a5e688349928255b6aae3.tar.gz
re3-de1627eb4c2fb427655a5e688349928255b6aae3.tar.bz2
re3-de1627eb4c2fb427655a5e688349928255b6aae3.tar.lz
re3-de1627eb4c2fb427655a5e688349928255b6aae3.tar.xz
re3-de1627eb4c2fb427655a5e688349928255b6aae3.tar.zst
re3-de1627eb4c2fb427655a5e688349928255b6aae3.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp28
-rw-r--r--src/peds/Ped.h4
2 files changed, 16 insertions, 16 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index e2c63d9c..7fcd6525 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -471,7 +471,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
m_ped_flagD4 = false;
m_ped_flagD8 = false;
bIsPedDieAnimPlaying = false;
- bIsFleeing = false;
+ bUsePedNodeSeek = false;
m_ped_flagD40 = false;
bScriptObjectiveCompleted = false;
@@ -511,7 +511,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
m_ped_flagH40 = false;
m_ped_flagH80 = false;
- m_ped_flagI1 = false;
+ bShakeFist = false;
bNoCriticalHits = false;
m_ped_flagI4 = false;
bHasAlreadyBeenRecorded = false;
@@ -997,7 +997,7 @@ CPed::ClearLookFlag(void) {
if (bIsLooking) {
bIsLooking = false;
bIsRestoringLook = true;
- m_ped_flagI1 = false;
+ bShakeFist = false;
m_pedIK.m_flags &= ~CPedIK::FLAG_2;
if (IsPlayer())
@@ -2553,7 +2553,7 @@ CPed::SetObjective(eObjective newObj, void *entity)
case OBJECTIVE_KILL_CHAR_ANY_MEANS:
case OBJECTIVE_MUG_CHAR:
m_pNextPathNode = nil;
- bIsFleeing = false;
+ bUsePedNodeSeek = false;
m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f);
m_pedInObjective = (CPed*)entity;
m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
@@ -3740,7 +3740,7 @@ void
CPed::ClearFlee(void)
{
RestorePreviousState();
- bIsFleeing = false;
+ bUsePedNodeSeek = false;
m_standardTimer = 0;
m_fleeTimer = 0;
}
@@ -4839,7 +4839,7 @@ CPed::SetFlee(CEntity* fleeFrom, int time)
SetStoredState();
m_nPedState = PED_FLEE_ENTITY;
- bIsFleeing = true;
+ bUsePedNodeSeek = true;
SetMoveState(PEDMOVE_RUN);
m_fleeFrom = fleeFrom;
m_fleeFrom->RegisterReference((CEntity **) &m_fleeFrom);
@@ -4875,7 +4875,7 @@ CPed::SetFlee(CVector2D const &from, int time)
m_fleeFromPosY = from.y;
}
- bIsFleeing = true;
+ bUsePedNodeSeek = true;
m_pNextPathNode = nil;
m_fleeTimer = CTimer::GetTimeInMilliseconds() + time;
@@ -5348,7 +5348,7 @@ CPed::CollideWithPed(CPed *collideWith)
doWeRun = false;
SetFlee(collideWith, 5000);
- bIsFleeing = true;
+ bUsePedNodeSeek = true;
m_pNextPathNode = nil;
if (!doWeRun)
SetMoveState(PEDMOVE_WALK);
@@ -6380,7 +6380,7 @@ SelectClosestNodeForSeek(CPed *ped, CPathNode *node, CVector2D closeDist, CVecto
bool
CPed::FindBestCoordsFromNodes(CVector unused, CVector *bestCoords)
{
- if (m_pNextPathNode || !bIsFleeing)
+ if (m_pNextPathNode || !bUsePedNodeSeek)
return false;
CVector ourPos = GetPosition();
@@ -6772,7 +6772,7 @@ CPed::Wait(void)
SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, m_pLookTarget);
if (m_nPedState == PED_FLEE_ENTITY || m_nPedState == PED_FLEE_POS) {
- bIsFleeing = true;
+ bUsePedNodeSeek = true;
m_pNextPathNode = nil;
}
if (m_nMoveState != PEDMOVE_RUN)
@@ -6790,7 +6790,7 @@ CPed::Wait(void)
SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, m_pLookTarget);
if (m_nPedState == PED_FLEE_ENTITY || m_nPedState == PED_FLEE_POS)
{
- bIsFleeing = true;
+ bUsePedNodeSeek = true;
m_pNextPathNode = nil;
}
SetMoveState(PEDMOVE_RUN);
@@ -6998,7 +6998,7 @@ CPed::Seek(void)
else
bScriptObjectiveCompleted = true;
- bIsFleeing = true;
+ bUsePedNodeSeek = true;
}
if (SeekFollowingPath(nil))
@@ -7038,7 +7038,7 @@ CPed::Flee(void)
m_fleeTimer = CTimer::GetTimeInMilliseconds() + 5000;
}
- if (bIsFleeing) {
+ if (bUsePedNodeSeek) {
CPathNode *realLastNode = nil;
uint8 nextDirection = 0;
uint8 curDirectionShouldBe = 9; // means not defined yet
@@ -7091,7 +7091,7 @@ CPed::Flee(void)
m_nPathState = nextDirection;
m_standardTimer = CTimer::GetTimeInMilliseconds() + 2000;
} else {
- bIsFleeing = false;
+ bUsePedNodeSeek = false;
SetMoveState(PEDMOVE_RUN);
Flee();
}
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 459d0601..3085f74d 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -285,7 +285,7 @@ public:
uint8 m_ped_flagD4 : 1;
uint8 m_ped_flagD8 : 1;
uint8 bIsPedDieAnimPlaying : 1;
- uint8 bIsFleeing : 1;
+ uint8 bUsePedNodeSeek : 1;
uint8 m_ped_flagD40 : 1; // reset when objective changes
uint8 bScriptObjectiveCompleted : 1;
@@ -325,7 +325,7 @@ public:
uint8 m_ped_flagH40 : 1;
uint8 m_ped_flagH80 : 1;
- uint8 m_ped_flagI1 : 1;
+ uint8 bShakeFist : 1; // test shake hand at look entity
uint8 bNoCriticalHits : 1; // if set, limbs won't came off
uint8 m_ped_flagI4 : 1;
uint8 bHasAlreadyBeenRecorded : 1;