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
|
|
|
|
|
|
|
class CWeaponInfo {
|
2019-06-21 18:16:51 +00:00
|
|
|
// static CWeaponInfo(&ms_apWeaponInfos)[14];
|
2020-05-24 13:41:29 +00:00
|
|
|
static CWeaponInfo ms_apWeaponInfos[WEAPONTYPE_LAST_WEAPONTYPE];
|
2019-06-20 11:22:44 +00:00
|
|
|
public:
|
|
|
|
eWeaponFire m_eWeaponFire;
|
|
|
|
float m_fRange;
|
|
|
|
uint32 m_nFiringRate;
|
|
|
|
uint32 m_nReload;
|
2020-05-24 13:41:29 +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;
|
|
|
|
AnimationId m_AnimToPlay;
|
|
|
|
AnimationId m_Anim2ToPlay;
|
|
|
|
float m_fAnimLoopStart;
|
|
|
|
float m_fAnimLoopEnd;
|
|
|
|
float m_fAnimFrameFire;
|
|
|
|
float m_fAnim2FrameFire;
|
|
|
|
int32 m_nModelId;
|
|
|
|
// 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;
|
|
|
|
|
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-10 15:49:33 +00:00
|
|
|
VALIDATE_SIZE(CWeaponInfo, 0x54);
|