2019-06-30 10:59:55 +00:00
|
|
|
#pragma once
|
2019-07-09 16:50:35 +00:00
|
|
|
|
|
|
|
class CEntity;
|
2019-06-30 10:59:55 +00:00
|
|
|
|
|
|
|
class CFire
|
|
|
|
{
|
2019-07-26 12:27:13 +00:00
|
|
|
public:
|
2019-07-09 16:50:35 +00:00
|
|
|
bool m_bIsOngoing;
|
2019-09-14 23:28:07 +00:00
|
|
|
bool m_bIsScriptFire;
|
2020-03-24 16:24:47 +00:00
|
|
|
bool m_bPropagationFlag;
|
2019-07-09 16:50:35 +00:00
|
|
|
bool m_bAudioSet;
|
2019-06-30 10:59:55 +00:00
|
|
|
CVector m_vecPos;
|
|
|
|
CEntity *m_pEntity;
|
|
|
|
CEntity *m_pSource;
|
2020-03-24 16:24:47 +00:00
|
|
|
uint32 m_nExtinguishTime;
|
|
|
|
uint32 m_nStartTime;
|
2020-03-25 20:09:27 +00:00
|
|
|
uint32 m_nNextTimeToAddFlames;
|
2020-03-24 16:24:47 +00:00
|
|
|
float m_fStrength;
|
2020-10-10 11:23:17 +00:00
|
|
|
float m_fWaterExtinguishCountdown;
|
|
|
|
bool m_bExtinguishedWithWater;
|
2019-06-30 10:59:55 +00:00
|
|
|
|
2020-03-24 16:24:47 +00:00
|
|
|
CFire();
|
|
|
|
~CFire();
|
|
|
|
void ProcessFire(void);
|
|
|
|
void ReportThisFire(void);
|
2019-06-30 10:59:55 +00:00
|
|
|
void Extinguish(void);
|
2019-07-09 16:50:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CFireManager
|
|
|
|
{
|
2019-09-14 23:28:07 +00:00
|
|
|
enum {
|
|
|
|
MAX_FIREMEN_ATTENDING = 2,
|
|
|
|
};
|
2019-07-09 16:50:35 +00:00
|
|
|
public:
|
2020-03-24 16:24:47 +00:00
|
|
|
uint32 m_nTotalFires;
|
2020-02-24 20:09:05 +00:00
|
|
|
CFire m_aFires[NUM_FIRES];
|
2020-10-10 11:23:17 +00:00
|
|
|
|
|
|
|
void StartFire(CVector pos, float size, uint8 propagation);
|
|
|
|
CFire *StartFire(CEntity *entityOnFire, CEntity *fleeFrom, float strength, uint8 propagation);
|
2019-10-18 22:23:40 +00:00
|
|
|
void Update(void);
|
2020-03-24 16:24:47 +00:00
|
|
|
CFire *FindFurthestFire_NeverMindFireMen(CVector coords, float minRange, float maxRange);
|
|
|
|
CFire *FindNearestFire(CVector vecPos, float *pDistance);
|
|
|
|
CFire *GetNextFreeFire(void);
|
2020-03-25 20:01:10 +00:00
|
|
|
uint32 GetTotalActiveFires() const;
|
2020-03-24 16:24:47 +00:00
|
|
|
void ExtinguishPoint(CVector point, float range);
|
2020-10-10 11:23:17 +00:00
|
|
|
bool ExtinguishPointWithWater(CVector point, float range);
|
|
|
|
int32 StartScriptFire(const CVector &pos, CEntity *target, float strength, uint8 propagation);
|
2020-03-24 16:24:47 +00:00
|
|
|
bool IsScriptFireExtinguish(int16 index);
|
2019-12-31 23:35:54 +00:00
|
|
|
void RemoveAllScriptFires(void);
|
2020-03-24 16:24:47 +00:00
|
|
|
void RemoveScriptFire(int16 index);
|
|
|
|
void SetScriptFireAudio(int16 index, bool state);
|
2019-07-09 16:50:35 +00:00
|
|
|
};
|
2020-04-17 05:54:14 +00:00
|
|
|
extern CFireManager gFireManager;
|