diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2020-07-29 11:20:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 11:20:02 +0200 |
commit | 52e77c66345399f7f1064b80676a2495e299bb46 (patch) | |
tree | 358b7762beb8809084c65358087d5899e4546f18 /src/peds/Ped.h | |
parent | miami shadows (diff) | |
parent | some fakerw additions for shadows; update librw (diff) | |
download | re3-52e77c66345399f7f1064b80676a2495e299bb46.tar re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.gz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.bz2 re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.lz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.xz re3-52e77c66345399f7f1064b80676a2495e299bb46.tar.zst re3-52e77c66345399f7f1064b80676a2495e299bb46.zip |
Diffstat (limited to 'src/peds/Ped.h')
-rw-r--r-- | src/peds/Ped.h | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h index d0a2abf0..979eb29c 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -30,6 +30,13 @@ struct PedAudioData int m_nMaxRandomDelayTime; }; +enum +{ + ATTACK_IN_PROGRESS, + CANT_ATTACK, + WATCH_UNTIL_HE_DISAPPEARS, +}; + enum eFormation { FORMATION_UNDEFINED, @@ -98,7 +105,6 @@ enum PedFightMoves FIGHTMOVE_PUNCHHOOK, FIGHTMOVE_PUNCHJAB, FIGHTMOVE_PUNCH, - FIGHTMOVE_BODYBLOW = FIGHTMOVE_PUNCH, FIGHTMOVE_LONGKICK, FIGHTMOVE_ROUNDHOUSE, // Directionals @@ -460,11 +466,9 @@ public: uint32 bIsDrowning : 1; uint32 bDrownsInWater : 1; //uint32 b156_4 - uint32 b156_8 : 1; + uint32 bHeldHostageInCar : 1; uint32 bIsPlayerFriend : 1; -#ifdef VC_PED_PORTS uint32 bHeadStuckInCollision : 1; -#endif uint32 bDeadPedInFrontOfCar : 1; uint32 bStayInCarOnJack : 1; @@ -472,22 +476,21 @@ public: uint32 bDoomAim : 1; uint32 bCanBeShotInVehicle : 1; //uint32 b157_8 - //uint32 b157_10 - //uint32 b157_20 + uint32 bMakeFleeScream : 1; + uint32 bPushedAlongByCar : 1; uint32 b157_40 : 1; uint32 bIgnoreThreatsBehindObjects : 1; uint32 bNeverEverTargetThisPed : 1; uint32 bCrouchWhenScared : 1; uint32 bKnockedOffBike : 1; - //uint32 b158_8 + uint32 b158_8 : 1; uint32 b158_10 : 1; uint32 bBoughtIceCream : 1; - //uint32 b158_40 + uint32 b158_40 : 1; //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 uint8 m_gangFlags; @@ -595,8 +598,8 @@ public: uint8 m_wepAccuracy; CEntity *m_pPointGunAt; CVector m_vecHitLastPos; + uint32 m_curFightMove; uint32 m_lastFightMove; - uint32 m_lastHitState; // TODO(Miami): What's this? uint8 m_fightButtonPressure; FightState m_fightState; bool m_takeAStepAfterAttack; @@ -634,8 +637,8 @@ public: uint32 m_threatFlags; uint32 m_threatCheck; uint32 m_lastThreatCheck; - uint32 m_sayType; - uint32 m_sayTimer; + uint32 m_delayedSoundID; + uint32 m_delayedSoundTimer; uint32 m_lastSoundStart; uint32 m_soundStart; uint16 m_lastQueuedSound; @@ -667,6 +670,7 @@ public: void AimGun(void); void KillPedWithCar(CVehicle *veh, float impulse); void Say(uint16 audio); + void Say(uint16 audio, int32 time); void SetLookFlag(CEntity* target, bool keepTryingToLook, bool cancelPrevious = false); void SetLookFlag(float direction, bool keepTryingToLook, bool cancelPrevious = false); void SetLookTimer(int time); @@ -761,6 +765,8 @@ public: void SetWaitState(eWaitState, void*); bool FightStrike(CVector&, bool); void FightHitPed(CPed*, CVector&, CVector&, int16); + int32 ChooseAttackPlayer(uint8, bool); + int32 ChooseAttackAI(uint8, bool); int GetLocalDirection(const CVector2D &); void StartFightDefend(uint8, uint8, uint8); void PlayHitSound(CPed*); @@ -948,6 +954,8 @@ public: void ClearWaitState(void); void Undress(const char*); void Dress(void); + int32 KillCharOnFootMelee(CVector&, CVector&, CVector&); + int32 KillCharOnFootArmed(CVector&, CVector&, CVector&); bool HasWeaponSlot(uint8 slot) { return m_weapons[slot].m_eWeaponType != WEAPONTYPE_UNARMED; } CWeapon& GetWeapon(uint8 slot) { return m_weapons[slot]; } @@ -964,6 +972,7 @@ public: bool Dying(void) { return m_nPedState == PED_DIE; } bool DyingOrDead(void) { return m_nPedState == PED_DIE || m_nPedState == PED_DEAD; } bool OnGround(void) { return m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD; } + bool OnGroundOrGettingUp(void) { return OnGround() || m_nPedState == PED_GETUP; } bool Driving(void) { return m_nPedState == PED_DRIVING; } bool InVehicle(void) { return bInVehicle && m_pMyVehicle; } // True when ped is sitting/standing in vehicle, not in enter/exit state. @@ -1032,6 +1041,20 @@ public: else return (AnimationId)0; } + + static AnimationId GetFinishingAttackAnim(CWeaponInfo* weapon) { + if (!!weapon->m_bFinish3rd) + return ANIM_MELEE_ATTACK_FINISH; + else + return (AnimationId)0; + } + + static AnimationId GetSecondFireAnim(CWeaponInfo* weapon) { + if (!!weapon->m_bUse2nd) + return ANIM_WEAPON_FIRE_2ND; // or ANIM_MELEE_ATTACK_2ND + else + return (AnimationId)0; + } // -- // My additions, because there were many, many instances of that. |