2019-06-20 14:22:44 +03:00
|
|
|
#pragma once
|
2020-03-28 17:47:52 +03:00
|
|
|
|
2020-04-19 18:34:08 +02:00
|
|
|
#include "AnimationId.h"
|
|
|
|
#include "WeaponType.h"
|
2019-06-20 14:22:44 +03:00
|
|
|
|
2020-12-26 14:21:45 +02:00
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
2019-06-20 14:22:44 +03:00
|
|
|
class CWeaponInfo {
|
|
|
|
public:
|
|
|
|
eWeaponFire m_eWeaponFire;
|
|
|
|
float m_fRange;
|
|
|
|
uint32 m_nFiringRate;
|
|
|
|
uint32 m_nReload;
|
2020-05-24 16:41:29 +03:00
|
|
|
int32 m_nAmountofAmmunition;
|
2019-06-20 14:22:44 +03: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;
|
2020-12-26 14:21:45 +02:00
|
|
|
uint32 m_Flags;
|
2019-06-20 14:22:44 +03:00
|
|
|
|
2019-06-21 21:16:51 +03:00
|
|
|
static void Initialise(void);
|
|
|
|
static void LoadWeaponData(void);
|
2019-06-20 14:22:44 +03:00
|
|
|
static CWeaponInfo *GetWeaponInfo(eWeaponType weaponType);
|
2019-06-21 21:16:51 +03:00
|
|
|
static eWeaponFire FindWeaponFireType(char *name);
|
|
|
|
static eWeaponType FindWeaponType(char *name);
|
|
|
|
static void Shutdown(void);
|
2020-12-26 14:21:45 +02:00
|
|
|
bool IsFlagSet(uint32 flag) const { return (m_Flags & flag) != 0; }
|
2019-06-20 14:22:44 +03:00
|
|
|
};
|
|
|
|
|
2020-05-10 21:49:33 +06:00
|
|
|
VALIDATE_SIZE(CWeaponInfo, 0x54);
|