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 ,
2020-07-19 00:37:44 +02:00
EXPLOSION_BOAT ,
2019-07-25 16:33:37 +02:00
EXPLOSION_HELI ,
2020-07-19 00:37:44 +02:00
EXPLOSION_HELI2 ,
2019-07-25 16:33:37 +02:00
EXPLOSION_MINE ,
EXPLOSION_BARREL ,
EXPLOSION_TANK_GRENADE ,
EXPLOSION_HELI_BOMB
2019-07-09 18:50:35 +02:00
} ;
class CExplosion
{
2020-03-12 18:26:47 +02: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 22:29:02 +03:00
uint8 m_nIteration ;
uint8 m_nActiveCounter ;
2020-10-05 03:04:35 +03:00
bool m_bIsBoat ;
2020-10-05 19:05:13 +03:00
bool m_bMakeSound ;
2020-04-08 22:29:02 +03:00
float m_fStartTime ;
2020-03-12 18:26:47 +02:00
uint32 m_nParticlesExpireTime ;
float m_fPower ;
2020-04-08 22:29:02 +03:00
float m_fZshift ;
2019-07-09 18:50:35 +02:00
public :
2020-10-05 17:24:57 +03:00
static bool AddExplosion ( CEntity * explodingEntity , CEntity * culprit , eExplosionType type , const CVector & pos , uint32 lifetime , bool makeSound = true ) ; //done(new parametr in android ver is fix for one mission)
2020-10-05 16:14:48 +03:00
static void ClearAllExplosions ( ) ; //done
static bool DoesExplosionMakeSound ( uint8 id ) ; //done
static int8 GetExplosionActiveCounter ( uint8 id ) ; //done
static CVector * GetExplosionPosition ( uint8 id ) ; //done
static uint8 GetExplosionType ( uint8 id ) ; //done, mb need change type to tExplosionType
static void Initialise ( ) ; //done
static void RemoveAllExplosionsInArea ( CVector pos , float radius ) ; //done
static void ResetExplosionActiveCounter ( uint8 id ) ; //done
static void Shutdown ( ) ; //done
static void Update ( ) ; //done
static bool TestForExplosionInArea ( eExplosionType type , float x1 , float x2 , float y1 , float y2 , float z1 , float z2 ) ; //done, not used
2019-07-09 18:50:35 +02:00
} ;
2020-03-12 18:26:47 +02:00
2020-04-16 01:56:15 +03:00
extern CExplosion gaExplosion [ NUM_EXPLOSIONS ] ;