summaryrefslogtreecommitdiffstats
path: root/src/peds/EmergencyPed.h
blob: 5693e90815e1358959bd950c51f043119f9dab51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once

#include "Ped.h"

class CAccident;
class CFire;

enum EmergencyPedState
{
	EMERGENCY_PED_READY = 0x0,
	EMERGENCY_PED_DETERMINE_NEXT_STATE = 0x1, // you can set that anytime you want
	EMERGENCY_PED_START_CPR = 0x2,
	EMERGENCY_PED_FLAG_4 = 0x4, // unused
	EMERGENCY_PED_FLAG_8 = 0x8, // unused
	EMERGENCY_PED_FACE_TO_PATIENT = 0x10, // for CPR
	EMERGENCY_PED_PERFORM_CPR = 0x20,
	EMERGENCY_PED_STOP_CPR = 0x40,
	EMERGENCY_PED_STAND_STILL = 0x80, // waiting colleagues for medics, "extinguishing" fire for firemen
	EMERGENCY_PED_STOP = 0x100,
};

class CEmergencyPed : public CPed
{
public:
	// 0x53C
	CPed *m_pRevivedPed;
	EmergencyPedState m_nEmergencyPedState;
	CAccident *m_pAttendedAccident;
	CFire *m_pAttendedFire;
	bool m_bStartedToCPR; // set but unused(?)
	int32 field_1360; // also something for medics, unused(?)

	CEmergencyPed(uint32);
	~CEmergencyPed() { }
	bool InRange(CPed*);
	void ProcessControl(void);
	void FiremanAI(void);
	void MedicAI(void);
};
static_assert(sizeof(CEmergencyPed) == 0x554, "CEmergencyPed: error");