2019-06-30 12:59:55 +02:00
|
|
|
#include "common.h"
|
|
|
|
#include "patcher.h"
|
|
|
|
#include "Fire.h"
|
|
|
|
|
2019-07-09 18:50:35 +02:00
|
|
|
CFireManager &gFireManager = *(CFireManager*)0x8F31D0;
|
|
|
|
|
|
|
|
WRAPPER void CFire::Extinguish(void) { EAXJMP(0x479D40); }
|
|
|
|
|
2019-09-15 01:28:07 +02:00
|
|
|
CFire* CFireManager::FindNearestFire(CVector vecPos, float* pDistance)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < MAX_FIREMEN_ATTENDING; i++) {
|
|
|
|
int fireId = -1;
|
|
|
|
float minDistance = 999999;
|
|
|
|
for (int j = 0; j < NUM_FIRES; j++) {
|
|
|
|
if (!m_aFires[j].m_bIsOngoing)
|
|
|
|
continue;
|
|
|
|
if (m_aFires[j].m_bIsScriptFire)
|
|
|
|
continue;
|
|
|
|
if (m_aFires[j].m_nFiremenPuttingOut != i)
|
|
|
|
continue;
|
|
|
|
float distance = (m_aFires[j].m_vecPos - vecPos).Magnitude2D();
|
|
|
|
if (distance < minDistance) {
|
|
|
|
minDistance = distance;
|
|
|
|
fireId = j;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*pDistance = minDistance;
|
|
|
|
if (fireId != -1)
|
|
|
|
return &m_aFires[fireId];
|
|
|
|
}
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
2019-07-09 18:50:35 +02:00
|
|
|
WRAPPER void CFireManager::StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32) { EAXJMP(0x479590); }
|
2019-10-19 00:23:40 +02:00
|
|
|
WRAPPER void CFireManager::Update(void) { EAXJMP(0x479310); }
|
2019-07-26 14:27:13 +02:00
|
|
|
WRAPPER CFire *CFireManager::FindFurthestFire_NeverMindFireMen(CVector coors, float, float) { EAXJMP(0x479430); }
|