From 4c822e8375268ac34f92af3f1960965446d32506 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Tue, 19 May 2020 20:54:05 +0300 Subject: script revision --- src/peds/Ped.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 1fa36b05..f34de765 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -418,9 +418,6 @@ public: uint32 bVehExitWillBeInstant : 1; uint32 bHasAlreadyBeenRecorded : 1; uint32 bFallenDown : 1; -#ifdef VC_PED_PORTS - uint32 bSomeVCflag1 : 1; -#endif #ifdef PED_SKIN uint32 bDontAcceptIKLookAts : 1; // TODO: find uses of this #endif @@ -433,6 +430,10 @@ public: uint32 bHasAlreadyUsedAttractor : 1; // 0x155 0x1 uint32 bCarPassenger : 1; // 0x155 0x4 uint32 bMiamiViceCop : 1; // 0x155 0x20 + uint32 bIsPlayerFriend : 1; // 0x156 0x10 +#ifdef VC_PED_PORTS + uint32 bHeadStuckInCollision : 1; // 0x156 0x20 +#endif uint32 bDeadPedInFrontOfCar : 1; // 0x156 0x40 uint8 CharCreatedBy; @@ -666,7 +667,9 @@ public: void SetPointGunAt(CEntity*); bool Seek(void); bool SetWanderPath(int8); - bool SetFollowPath(CVector); + bool SetFollowPath(CVector dest, float radius, eMoveState state, CEntity*, CEntity*, int); + bool SetFollowPathStatic(void); + bool SetFollowPathDynamic(void); void ClearAttackByRemovingAnim(void); void SetStoredState(void); void StopNonPartialAnims(void); @@ -873,7 +876,12 @@ public: CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; } PedState GetPedState(void) { return m_nPedState; } - void SetPedState(PedState state) { m_nPedState = state; } + void SetPedState(PedState state) + { + if (GetPedState() == PED_FOLLOW_PATH) + ClearFollowPath(); + m_nPedState = state; + } bool Dead(void) { return m_nPedState == PED_DEAD; } bool Dying(void) { return m_nPedState == PED_DIE; } bool DyingOrDead(void) { return m_nPedState == PED_DIE || m_nPedState == PED_DEAD; } -- cgit v1.2.3 From 46d1889344bc8837721b3eb102e2ea41dca6cfa4 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Tue, 19 May 2020 21:34:28 +0300 Subject: slightly restructured ped flags for convenience --- src/peds/Ped.h | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index f34de765..c01e3630 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -421,21 +421,51 @@ public: #ifdef PED_SKIN uint32 bDontAcceptIKLookAts : 1; // TODO: find uses of this #endif + uint32 bReachedAttractorHeadingTarget : 1; + uint32 bTurnedAroundOnAttractor : 1; + + uint32 bHasAlreadyUsedAttractor : 1; + //uint32 b155_2 + uint32 bCarPassenger : 1; + //uint32 b155_8 + //uint32 b155_10 + uint32 bMiamiViceCop : 1; + //uint32 b155_40 + //uint32 b155_80 + + //uint32 b156_1 + //uint32 b156_2 + //uint32 b156_4 + //uint32 b156_8 + uint32 bIsPlayerFriend : 1; +#ifdef VC_PED_PORTS + uint32 bHeadStuckInCollision : 1; +#endif + uint32 bDeadPedInFrontOfCar : 1; + //uint32 b156_80 + + //uint32 b157_1 + //uint32 b157_2 + //uint32 b157_4 + //uint32 b157_8 + //uint32 b157_10 + //uint32 b157_20 + //uint32 b157_40 + //uint32 b157_80 + + //uint32 b158_1 + //uint32 b158_2 + //uint32 b158_4 + //uint32 b158_8 + //uint32 b158_10 + //uint32 b158_20 + //uint32 b158_40 + //uint32 b158_80 + // our own flags uint32 m_ped_flagI40 : 1; // bMakePedsRunToPhonesToReportCrimes makes use of this as runover by car indicator uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle - uint32 bReachedAttractorHeadingTarget : 1; // 0x154 0x40 - uint32 bTurnedAroundOnAttractor : 1; // 0x154 0x80 - uint32 bHasAlreadyUsedAttractor : 1; // 0x155 0x1 - uint32 bCarPassenger : 1; // 0x155 0x4 - uint32 bMiamiViceCop : 1; // 0x155 0x20 - uint32 bIsPlayerFriend : 1; // 0x156 0x10 -#ifdef VC_PED_PORTS - uint32 bHeadStuckInCollision : 1; // 0x156 0x20 -#endif - uint32 bDeadPedInFrontOfCar : 1; // 0x156 0x40 - uint8 CharCreatedBy; eObjective m_objective; eObjective m_prevObjective; -- cgit v1.2.3