diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-12-26 13:22:02 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-12-26 13:22:02 +0100 |
commit | c9c447e7a9f9616b111b9d6211ac072e7739ba4c (patch) | |
tree | 15b4054d867ea8f60b90550033ccf85cbfc86102 /src/weapons/WeaponInfo.h | |
parent | fix mblur stencil (diff) | |
download | re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.gz re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.bz2 re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.lz re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.xz re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.zst re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.zip |
Diffstat (limited to 'src/weapons/WeaponInfo.h')
-rw-r--r-- | src/weapons/WeaponInfo.h | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/src/weapons/WeaponInfo.h b/src/weapons/WeaponInfo.h index 6e09e9f2..0f53dded 100644 --- a/src/weapons/WeaponInfo.h +++ b/src/weapons/WeaponInfo.h @@ -4,7 +4,31 @@ #include "AnimationId.h" #include "WeaponType.h" -enum AssocGroupId; +enum +{ + WEAPONFLAG_USE_GRAVITY = 1, + WEAPONFLAG_SLOWS_DOWN = 1 << 1, + WEAPONFLAG_DISSIPATES = 1 << 2, + WEAPONFLAG_RAND_SPEED = 1 << 3, + WEAPONFLAG_EXPANDS = 1 << 4, + WEAPONFLAG_EXPLODES = 1 << 5, + WEAPONFLAG_CANAIM = 1 << 6, + WEAPONFLAG_CANAIM_WITHARM = 1 << 7, + WEAPONFLAG_1ST_PERSON = 1 << 8, + WEAPONFLAG_HEAVY = 1 << 9, + WEAPONFLAG_THROW = 1 << 10, + WEAPONFLAG_RELOAD_LOOP2START = 1 << 11, + WEAPONFLAG_USE_2ND = 1 << 12, + WEAPONFLAG_GROUND_2ND = 1 << 13, + WEAPONFLAG_FINISH_3RD = 1 << 14, + WEAPONFLAG_RELOAD = 1 << 15, + WEAPONFLAG_FIGHTMODE = 1 << 16, + WEAPONFLAG_CROUCHFIRE = 1 << 17, + WEAPONFLAG_COP3_RD = 1 << 18, + WEAPONFLAG_GROUND_3RD = 1 << 19, + WEAPONFLAG_PARTIALATTACK = 1 << 20, + WEAPONFLAG_ANIMDETONATE = 1 << 21, +}; class CWeaponInfo { static CWeaponInfo ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS]; @@ -34,31 +58,7 @@ public: float m_fAnimBreakout; int32 m_nModelId; int32 m_nModel2Id; - // flags - uint8 m_bUseGravity : 1; - uint8 m_bSlowsDown : 1; - uint8 m_bDissipates : 1; - uint8 m_bRandSpeed : 1; - uint8 m_bExpands : 1; - uint8 m_bExplodes : 1; - uint8 m_bCanAim : 1; - uint8 m_bCanAimWithArm : 1; - - uint8 m_b1stPerson : 1; - uint8 m_bHeavy : 1; - uint8 m_bThrow : 1; - uint8 m_bReloadLoop2Start : 1; - uint8 m_bUse2nd : 1; - uint8 m_bGround2nd : 1; - uint8 m_bFinish3rd : 1; - uint8 m_bReload : 1; - - uint8 m_bFightMode : 1; - uint8 m_bCrouchFire : 1; - uint8 m_bCop3rd : 1; - uint8 m_bGround3rd : 1; - uint8 m_bPartialAttack : 1; - uint8 m_bAnimDetonate : 1; + uint32 m_Flags; uint32 m_nWeaponSlot; @@ -69,6 +69,7 @@ public: static eWeaponType FindWeaponType(char *name); static void Shutdown(void); static bool IsWeaponSlotAmmoMergeable(uint32 slot) { return slot == WEAPONSLOT_SHOTGUN || slot == WEAPONSLOT_SUBMACHINEGUN || slot == WEAPONSLOT_RIFLE; } + bool IsFlagSet(uint32 flag) const { return (m_Flags & flag) != 0; } }; VALIDATE_SIZE(CWeaponInfo, 0x64); |