re3/src/weapons/Explosion.h

53 lines
1.3 KiB
C
Raw Normal View History

2019-07-09 16:50:35 +00:00
#pragma once
class CEntity;
2019-07-31 15:54:18 +00:00
class CVector;
2019-07-09 16:50:35 +00:00
enum eExplosionType
{
2019-07-25 14:33:37 +00:00
EXPLOSION_GRENADE,
EXPLOSION_MOLOTOV,
EXPLOSION_ROCKET,
EXPLOSION_CAR,
EXPLOSION_CAR_QUICK,
2020-07-18 22:37:44 +00:00
EXPLOSION_BOAT,
2019-07-25 14:33:37 +00:00
EXPLOSION_HELI,
2020-07-18 22:37:44 +00:00
EXPLOSION_HELI2,
2019-07-25 14:33:37 +00:00
EXPLOSION_MINE,
EXPLOSION_BARREL,
EXPLOSION_TANK_GRENADE,
EXPLOSION_HELI_BOMB
2019-07-09 16:50:35 +00:00
};
class CExplosion
{
2020-03-12 16:26:47 +00:00
eExplosionType m_ExplosionType;
CVector m_vecPosition;
float m_fRadius;
float m_fPropagationRate;
CEntity *m_pCreatorEntity;
CEntity *m_pVictimEntity;
float m_fStopTime;
2020-04-08 19:29:02 +00:00
uint8 m_nIteration;
uint8 m_nActiveCounter;
float m_fStartTime;
2020-03-12 16:26:47 +00:00
uint32 m_nParticlesExpireTime;
float m_fPower;
2020-04-08 19:29:02 +00:00
bool m_bIsBoat;
float m_fZshift;
2019-07-09 16:50:35 +00:00
public:
2020-03-12 16:26:47 +00:00
static void Initialise();
2020-09-26 18:10:23 +00:00
static void ClearAllExplosions();
2020-03-12 16:26:47 +00:00
static void Shutdown();
2019-07-31 15:54:18 +00:00
static int8 GetExplosionActiveCounter(uint8 id);
static void ResetExplosionActiveCounter(uint8 id);
2020-04-08 19:29:02 +00:00
static uint8 GetExplosionType(uint8 id);
static CVector *GetExplosionPosition(uint8 id);
2020-05-31 15:05:49 +00:00
// TODO(MIAMI): that new parameter
static bool AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime, bool unk = true);
2020-04-08 19:29:02 +00:00
static void Update();
static bool TestForExplosionInArea(eExplosionType type, float x1, float x2, float y1, float y2, float z1, float z2);
static void RemoveAllExplosionsInArea(CVector pos, float radius);
2019-07-09 16:50:35 +00:00
};
2020-03-12 16:26:47 +00:00
extern CExplosion gaExplosion[NUM_EXPLOSIONS];