2019-07-09 18:50:35 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class CEntity;
|
2019-07-31 17:54:18 +02:00
|
|
|
class CVector;
|
2019-07-09 18:50:35 +02:00
|
|
|
|
|
|
|
enum eExplosionType
|
|
|
|
{
|
2019-07-25 16:33:37 +02:00
|
|
|
EXPLOSION_GRENADE,
|
|
|
|
EXPLOSION_MOLOTOV,
|
|
|
|
EXPLOSION_ROCKET,
|
|
|
|
EXPLOSION_CAR,
|
|
|
|
EXPLOSION_CAR_QUICK,
|
|
|
|
EXPLOSION_HELI,
|
|
|
|
EXPLOSION_MINE,
|
|
|
|
EXPLOSION_BARREL,
|
|
|
|
EXPLOSION_TANK_GRENADE,
|
|
|
|
EXPLOSION_HELI_BOMB
|
2019-07-09 18:50:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class CExplosion
|
|
|
|
{
|
2020-03-12 17:26:47 +01:00
|
|
|
eExplosionType m_ExplosionType;
|
|
|
|
CVector m_vecPosition;
|
|
|
|
float m_fRadius;
|
|
|
|
float m_fPropagationRate;
|
|
|
|
CEntity *m_pCreatorEntity;
|
|
|
|
CEntity *m_pVictimEntity;
|
|
|
|
float m_fStopTime;
|
|
|
|
bool m_bActive;
|
|
|
|
int8 m_bActiveCounter;
|
|
|
|
int32 m_nStartTime;
|
|
|
|
uint32 m_nParticlesExpireTime;
|
|
|
|
float m_fPower;
|
|
|
|
int32 field_34;
|
|
|
|
int32 field_38;
|
2019-07-09 18:50:35 +02:00
|
|
|
public:
|
2020-03-12 17:26:47 +01:00
|
|
|
static void Initialise();
|
|
|
|
static void Shutdown();
|
2019-07-31 17:54:18 +02:00
|
|
|
static void AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type,
|
|
|
|
const CVector &pos, uint32);
|
|
|
|
|
|
|
|
static int8 GetExplosionActiveCounter(uint8 id);
|
|
|
|
static CVector *GetExplosionPosition(uint8 id);
|
|
|
|
static uint8 GetExplosionType(uint8 id);
|
|
|
|
static void ResetExplosionActiveCounter(uint8 id);
|
2019-12-02 21:02:32 +01:00
|
|
|
static void RemoveAllExplosionsInArea(CVector, float);
|
2020-01-03 17:48:13 +01:00
|
|
|
static bool TestForExplosionInArea(eExplosionType, float, float, float, float, float, float);
|
2019-07-09 18:50:35 +02:00
|
|
|
};
|
2020-03-12 17:26:47 +01:00
|
|
|
|
|
|
|
extern CExplosion (&gaExplosion)[48];
|