diff options
author | aap <aap@papnet.eu> | 2019-06-19 16:55:01 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-06-19 16:55:01 +0200 |
commit | 864f719b1ee6d042d33de1728ec30fff1963a4b7 (patch) | |
tree | 04f002df571c184f16faf4b80c38469b5117e72b /src/control/PedStats.h | |
parent | finished CPedType (diff) | |
download | re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.tar re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.tar.gz re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.tar.bz2 re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.tar.lz re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.tar.xz re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.tar.zst re3-864f719b1ee6d042d33de1728ec30fff1963a4b7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/PedStats.h | 75 |
1 files changed, 67 insertions, 8 deletions
diff --git a/src/control/PedStats.h b/src/control/PedStats.h index 12ebdbc2..6b53ea37 100644 --- a/src/control/PedStats.h +++ b/src/control/PedStats.h @@ -1,23 +1,82 @@ #pragma once -struct PedStat +enum ePedStats { - uint32 m_id; + PEDSTAT_PLAYER, + PEDSTAT_COP, + PEDSTAT_MEDIC, + PEDSTAT_FIREMAN, + PEDSTAT_GANG1, + PEDSTAT_GANG2, + PEDSTAT_GANG3, + PEDSTAT_GANG4, + PEDSTAT_GANG5, + PEDSTAT_GANG6, + PEDSTAT_GANG7, + PEDSTAT_STREET_GUY, + PEDSTAT_SUIT_GUY, + PEDSTAT_SENSIBLE_GUY, + PEDSTAT_GEEK_GUY, + PEDSTAT_OLD_GUY, + PEDSTAT_TOUGH_GUY, + PEDSTAT_STREET_GIRL, + PEDSTAT_SUIT_GIRL, + PEDSTAT_SENSIBLE_GIRL, + PEDSTAT_GEEK_GIRL, + PEDSTAT_OLD_GIRL, + PEDSTAT_TOUGH_GIRL, + PEDSTAT_TRAMP_MALE, + PEDSTAT_TRAMP_FEMALE, + PEDSTAT_TOURIST, + PEDSTAT_PROSTITUTE, + PEDSTAT_CRIMINAL, + PEDSTAT_BUSKER, + PEDSTAT_TAXIDRIVER, + PEDSTAT_PSYCHO, + PEDSTAT_STEWARD, + PEDSTAT_SPORTSFAN, + PEDSTAT_SHOPPER, + PEDSTAT_OLDSHOPPER, + + NUM_PEDSTATS +}; + +// flags +enum +{ + STAT_PUNCH_ONLY = 1, + STAT_CAN_KNEE_HEAD = 2, + STAT_CAN_KICK = 4, + STAT_CAN_ROUNDHOUSE = 8, + STAT_NO_DIVE = 0x10, + STAT_ONE_HIT_KNOCKDOWN = 0x20, + STAT_SHOPPING_BAGS = 0x40, + STAT_GUN_PANIC = 0x80 +}; + +struct CPedStat +{ + ePedStats m_type; char m_name[24]; - int32 m_fleeDistance; - int32 m_headingChangeRate; + float m_fleeDistance; + float m_headingChangeRate; int8 m_fear; int8 m_temper; int8 m_lawfulness; int8 m_sexiness; - int32 m_attackStrength; - int32 m_defendWeakness; + float m_attackStrength; + float m_defendWeakness; int16 m_flags; }; -static_assert(sizeof(PedStat) == 0x34, "PedStat: error"); +static_assert(sizeof(CPedStat) == 0x34, "CPedStat: error"); class CPedStats { + static CPedStat *(&ms_apPedStats)[NUM_PEDSTATS]; + public: - static int32 GetPedStatType(char *type); + static void Initialise(void); + static void Shutdown(void); + static void LoadPedStats(void); + static int32 GetPedStatType(char *name); }; |