diff options
author | aap <aap@papnet.eu> | 2020-05-24 10:44:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 10:44:28 +0200 |
commit | 34f5e923efe620aa25192ce1fb31695b082ce5b4 (patch) | |
tree | df812c11da162c563c3484e0dfe1851dd1a61e82 /src/control/SetPieces.h | |
parent | Merge branch 'master' into miami (diff) | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
download | re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.tar re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.tar.gz re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.tar.bz2 re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.tar.lz re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.tar.xz re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.tar.zst re3-34f5e923efe620aa25192ce1fb31695b082ce5b4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/SetPieces.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/control/SetPieces.h b/src/control/SetPieces.h new file mode 100644 index 00000000..5776d35a --- /dev/null +++ b/src/control/SetPieces.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config.h" + +class CVehicle; +class CCopPed; + +enum eSetPieceType : uint8 +{ + SETPIECE_NONE = 0, + SETPIECE_TWOCOPCARSINALLEY, + SETPIECE_CARBLOCKINGPLAYERFROMSIDE, + SETPIECE_CARRAMMINGPLAYERFROMSIDE, + SETPIECE_CREATECOPPERONFOOT, + SETPIECE_CREATETWOCOPPERSONFOOT, + SETPIECE_TWOCARSBLOCKINGPLAYERFROMSIDE, + SETPIECE_TWOCARSRAMMINGPLAYERFROMSIDE +}; + +class CSetPiece +{ +public: + eSetPieceType m_nType; + uint32 m_nLastTimeCreated; + CVector2D m_vTriggerInf; + CVector2D m_vTriggerSup; + CVector2D m_vSpawn1; + CVector2D m_vSpawn2; + CVector2D m_vTarget1; + CVector2D m_vTarget2; + + CVehicle* TryToGenerateCopCar(CVector2D, CVector2D); + CCopPed* TryToGenerateCopPed(CVector2D); + void Update(void); +}; + +class CSetPieces +{ + static bool bDebug; + static uint32 NumSetPieces; + static CSetPiece aSetPieces[NUM_SETPIECES]; +public: + static void Init(void); + static void AddOne(uint8 type, CVector2D, CVector2D, CVector2D, CVector2D, CVector2D, CVector2D); + static void Save(uint8*, uint32*); + static void Load(uint8*, uint32); + static void Update(void); +}; |