From 41dbd754dee344c79207e0821df6bcc262f90726 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 14 Jul 2019 12:49:03 +0300 Subject: Partial RunningScript part2 --- src/peds/Ped.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index cd7d88af..d13371ab 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -210,7 +210,7 @@ public: uint8 m_ped_flagD10 : 1; uint8 m_ped_flagD20 : 1; uint8 m_ped_flagD40 : 1; // reset when objective changes - uint8 m_ped_flagD80 : 1; + uint8 m_bScriptObjectiveCompleted : 1; uint8 m_ped_flagE1 : 1; uint8 m_ped_flagE2 : 1; @@ -460,6 +460,9 @@ public: void MakeChangesForNewWeapon(int8); void CheckAroundForPossibleCollisions(void); bool Seek(void); + void ClearAll(void); + void SetWanderPath(int8); + void SetFollowPath(CVector); // Static methods static void GetLocalPositionToOpenCarDoor(CVector *output, CVehicle *veh, uint32 enterType, float offset); -- cgit v1.2.3 From 2c138b2b77cf661d9f119061963a726fdcde56d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Mon, 15 Jul 2019 15:11:40 +0300 Subject: Phone, World, Ped --- src/peds/Ped.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index cd7d88af..8439e0f8 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -198,13 +198,13 @@ public: uint8 bRespondsToThreats : 1; uint8 m_ped_flagC4 : 1; // false when in bus, bRenderPedInCar? uint8 m_ped_flagC8 : 1; - uint8 m_ped_flagC10 : 1; + uint8 m_ped_flagC10 : 1; // related with phone uint8 m_ped_flagC20 : 1; // just left some body part? uint8 m_ped_flagC40 : 1; uint8 m_ped_flagC80 : 1; uint8 m_ped_flagD1 : 1; - uint8 m_ped_flagD2 : 1; + uint8 m_ped_flagD2 : 1; // seen an event uint8 m_ped_flagD4 : 1; uint8 m_ped_flagD8 : 1; uint8 m_ped_flagD10 : 1; @@ -328,7 +328,7 @@ public: uint8 field_31C; uint8 field_31D; int16 m_phoneId; - uint32 m_lookingForPhone; + uint32 m_lookingForPhone; // unused uint32 m_phoneTalkTimer; void *m_lastAccident; int32 m_nPedType; @@ -459,7 +459,16 @@ public: void Chat(void); void MakeChangesForNewWeapon(int8); void CheckAroundForPossibleCollisions(void); - bool Seek(void); + void SetSeek(CVector, float); + bool MakePhonecall(void); + bool FacePhone(void); + CPed *CheckForDeadPeds(void); + bool CheckForExplosions(CVector2D &area); + CPed *CheckForGunShots(void); + uint8 CheckForPointBlankPeds(CPed*); + bool CheckIfInTheAir(void); + void ClearAll(void); + void SetPointGunAt(CEntity*); // Static methods static void GetLocalPositionToOpenCarDoor(CVector *output, CVehicle *veh, uint32 enterType, float offset); -- cgit v1.2.3 From 59671fab03703570eeb4837b713108619d762a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Thu, 18 Jul 2019 05:26:46 +0300 Subject: The Peds, mainly dying/injuring There is also some reorganization --- src/peds/Ped.h | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 2cc064a5..778a5b48 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -13,6 +13,17 @@ struct CPathNode; +enum ePedPieceTypes +{ + PEDPIECE_NONE, + PEDPIECE_BODY, + PEDPIECE_LEFTARM, + PEDPIECE_RIGHTARM, + PEDPIECE_LEFTLEG, + PEDPIECE_RIGHTLEG, + PEDPIECE_HEAD, +}; + enum eWaitState { WAITSTATE_FALSE, WAITSTATE_TRAFFIC_LIGHTS, @@ -196,10 +207,10 @@ public: uint8 m_ped_flagC1 : 1; uint8 bRespondsToThreats : 1; - uint8 m_ped_flagC4 : 1; // false when in bus, bRenderPedInCar? - uint8 m_ped_flagC8 : 1; + uint8 bRenderPedInCar : 1; + uint8 bChangedSeat : 1; uint8 m_ped_flagC10 : 1; // related with phone - uint8 m_ped_flagC20 : 1; // just left some body part? + uint8 bBodyPartJustCameOff : 1; uint8 m_ped_flagC40 : 1; uint8 m_ped_flagC80 : 1; @@ -207,7 +218,7 @@ public: uint8 m_ped_flagD2 : 1; // seen an event uint8 m_ped_flagD4 : 1; uint8 m_ped_flagD8 : 1; - uint8 m_ped_flagD10 : 1; + uint8 bIsPedDieAnimPlaying : 1; uint8 m_ped_flagD20 : 1; uint8 m_ped_flagD40 : 1; // reset when objective changes uint8 m_bScriptObjectiveCompleted : 1; @@ -225,7 +236,7 @@ public: uint8 m_ped_flagF2 : 1; uint8 m_ped_flagF4 : 1; uint8 m_ped_flagF8 : 1; - uint8 m_ped_flagF10 : 1; + uint8 m_ped_flagF10 : 1; // set before "quickjack" uint8 m_ped_flagF20 : 1; uint8 m_ped_flagF40 : 1; uint8 m_ped_flagF80 : 1; @@ -249,7 +260,7 @@ public: uint8 m_ped_flagH80 : 1; uint8 m_ped_flagI1 : 1; - uint8 m_ped_flagI2 : 1; + uint8 m_ped_flagI2 : 1; // limbs won't be removed if set uint8 m_ped_flagI4 : 1; uint8 bHasAlreadyBeenRecorded : 1; uint8 m_ped_flagI10 : 1; @@ -416,8 +427,8 @@ public: void SetDie(AnimationId anim, float arg1, float arg2); void SetDead(void); void ApplyHeadShot(eWeaponType weaponType, CVector pos, bool evenOnPlayer); - void RemoveBodyPart(PedNode nodeId, int8 unknown); - void SpawnFlyingComponent(int, int8 unknown); + void RemoveBodyPart(PedNode nodeId, int8 direction); + void SpawnFlyingComponent(int, int8); bool OurPedCanSeeThisOne(CEntity *target); void Avoid(void); void Attack(void); @@ -472,6 +483,13 @@ public: bool Seek(void); void SetWanderPath(int8); void SetFollowPath(CVector); + void ClearAttackByRemovingAnim(void); + void SetStoredState(void); + void StopNonPartialAnims(void); + bool InflictDamage(CEntity*, eWeaponType, float, ePedPieceTypes, uint8); + void ClearFlee(void); + void ClearFall(void); + void SetGetUp(void); // Static methods static void GetLocalPositionToOpenCarDoor(CVector *output, CVehicle *veh, uint32 enterType, float offset); @@ -545,6 +563,7 @@ public: static bool &bNastyLimbsCheat; static bool &bPedCheat2; static bool &bPedCheat3; + static CColPoint &ms_tempColPoint; }; void FinishFuckUCB(CAnimBlendAssociation *assoc, void *arg); -- cgit v1.2.3 From d0fd14cb1a1882753aee9bc64a478da304247273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Thu, 18 Jul 2019 05:41:57 +0300 Subject: Wanted changes in PlayerPed/PedModelInfo And some typos --- src/peds/Ped.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 778a5b48..9f1858b4 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -15,8 +15,8 @@ struct CPathNode; enum ePedPieceTypes { - PEDPIECE_NONE, - PEDPIECE_BODY, + PEDPIECE_TORSO, + PEDPIECE_MID, PEDPIECE_LEFTARM, PEDPIECE_RIGHTARM, PEDPIECE_LEFTLEG, @@ -260,7 +260,7 @@ public: uint8 m_ped_flagH80 : 1; uint8 m_ped_flagI1 : 1; - uint8 m_ped_flagI2 : 1; // limbs won't be removed if set + uint8 m_ped_flagI2 : 1; // if set, limbs won't came off uint8 m_ped_flagI4 : 1; uint8 bHasAlreadyBeenRecorded : 1; uint8 m_ped_flagI10 : 1; -- cgit v1.2.3 From 936acedcf045208afca770082771dd7e52d0c235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 21 Jul 2019 00:29:58 +0300 Subject: CPed continues, including some fixes --- src/peds/Ped.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 9f1858b4..7b8bc2ce 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -228,7 +228,7 @@ public: uint8 bNotAllowedToDuck : 1; uint8 bCrouchWhenShooting : 1; uint8 bIsDucking : 1; // set if you don't want ped to attack - uint8 m_ped_flagE20 : 1; + uint8 m_ped_flagE20 : 1; // getup complete? uint8 bDoBloodyFootprints : 1; uint8 m_ped_flagE80 : 1; @@ -336,7 +336,7 @@ public: bool bInVehicle; uint8 pad_315[3]; float field_318; - uint8 field_31C; + uint8 field_31C; // may be cutscene or phone cutscene status uint8 field_31D; int16 m_phoneId; uint32 m_lookingForPhone; // unused @@ -481,7 +481,7 @@ public: void ClearAll(void); void SetPointGunAt(CEntity*); bool Seek(void); - void SetWanderPath(int8); + bool SetWanderPath(int8); void SetFollowPath(CVector); void ClearAttackByRemovingAnim(void); void SetStoredState(void); @@ -490,6 +490,19 @@ public: void ClearFlee(void); void ClearFall(void); void SetGetUp(void); + void ClearInvestigateEvent(void); + void ClearLeader(void); + void ClearLook(void); + void ClearObjective(void); + void ClearPause(void); + void ClearSeek(void); + void ClearWeapons(void); + void RestoreGunPosition(void); + void RestoreHeadingRate(void); + void SetAimFlag(CEntity* to); + void SetAimFlag(float angle); + void SetAmmo(eWeaponType weaponType, uint32 ammo); + void SetEvasiveStep(CEntity*, uint8); // Static methods static void GetLocalPositionToOpenCarDoor(CVector *output, CVehicle *veh, uint32 enterType, float offset); -- cgit v1.2.3