2019-06-20 11:22:44 +00:00
|
|
|
#pragma once
|
2020-03-28 14:47:52 +00:00
|
|
|
|
2020-04-19 16:34:08 +00:00
|
|
|
#include "AnimationId.h"
|
|
|
|
#include "WeaponType.h"
|
2019-06-20 11:22:44 +00:00
|
|
|
|
2020-05-15 14:30:25 +00:00
|
|
|
enum AssocGroupId;
|
|
|
|
|
2019-06-20 11:22:44 +00:00
|
|
|
class CWeaponInfo {
|
2020-05-15 14:30:25 +00:00
|
|
|
static CWeaponInfo ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS];
|
2019-06-20 11:22:44 +00:00
|
|
|
public:
|
2020-05-15 14:30:25 +00:00
|
|
|
static int32 ms_aMaxAmmoForWeapon[WEAPONTYPE_TOTALWEAPONS];
|
|
|
|
|
2019-06-20 11:22:44 +00:00
|
|
|
eWeaponFire m_eWeaponFire;
|
|
|
|
float m_fRange;
|
|
|
|
uint32 m_nFiringRate;
|
|
|
|
uint32 m_nReload;
|
2020-05-16 12:07:09 +00:00
|
|
|
int32 m_nAmountofAmmunition;
|
2019-06-20 11:22:44 +00:00
|
|
|
uint32 m_nDamage;
|
|
|
|
float m_fSpeed;
|
|
|
|
float m_fRadius;
|
|
|
|
float m_fLifespan;
|
|
|
|
float m_fSpread;
|
|
|
|
CVector m_vecFireOffset;
|
2020-05-15 14:30:25 +00:00
|
|
|
AssocGroupId m_AnimToPlay;
|
2019-06-20 11:22:44 +00:00
|
|
|
float m_fAnimLoopStart;
|
|
|
|
float m_fAnimLoopEnd;
|
|
|
|
float m_fAnimFrameFire;
|
2020-05-15 14:30:25 +00:00
|
|
|
float m_fAnim2LoopStart;
|
|
|
|
float m_fAnim2LoopEnd;
|
2019-06-20 11:22:44 +00:00
|
|
|
float m_fAnim2FrameFire;
|
2020-05-15 14:30:25 +00:00
|
|
|
float m_fAnimBreakout;
|
2019-06-20 11:22:44 +00:00
|
|
|
int32 m_nModelId;
|
2020-05-15 14:30:25 +00:00
|
|
|
int32 m_nModel2Id;
|
2019-06-20 11:22:44 +00:00
|
|
|
// 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;
|
2020-05-15 14:30:25 +00:00
|
|
|
|
2019-06-20 11:22:44 +00:00
|
|
|
uint8 m_b1stPerson : 1;
|
|
|
|
uint8 m_bHeavy : 1;
|
|
|
|
uint8 m_bThrow : 1;
|
2020-05-15 14:30:25 +00:00
|
|
|
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_nWeaponSlot;
|
2019-06-20 11:22:44 +00:00
|
|
|
|
2019-06-21 18:16:51 +00:00
|
|
|
static void Initialise(void);
|
|
|
|
static void LoadWeaponData(void);
|
2019-06-20 11:22:44 +00:00
|
|
|
static CWeaponInfo *GetWeaponInfo(eWeaponType weaponType);
|
2019-06-21 18:16:51 +00:00
|
|
|
static eWeaponFire FindWeaponFireType(char *name);
|
|
|
|
static eWeaponType FindWeaponType(char *name);
|
|
|
|
static void Shutdown(void);
|
2019-06-20 11:22:44 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 14:30:25 +00:00
|
|
|
VALIDATE_SIZE(CWeaponInfo, 0x64);
|