From 8a0a29c64e5ebdfa71fe2d2a6a6e64c756a99961 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 31 Aug 2020 21:09:48 +0300 Subject: Stinger done --- src/objects/Stinger.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/objects/Stinger.h (limited to 'src/objects/Stinger.h') diff --git a/src/objects/Stinger.h b/src/objects/Stinger.h new file mode 100644 index 00000000..80ac3d1e --- /dev/null +++ b/src/objects/Stinger.h @@ -0,0 +1,41 @@ +#pragma once + +#include "Object.h" + +class CStingerSegment : public CObject +{ +public: + CStingerSegment(); + ~CStingerSegment(); +}; + +#define NUM_STINGER_SEGMENTS (12) + +class CStinger +{ + // TODO: better names + enum { + STINGERSTATE_NONE = 0, + STINGERSTATE_STATE1, + STINGERSTATE_STATE2, + STINGERSTATE_STATE3, + STINGERSTATE_REMOVE, + }; + + bool bIsDeployed; + uint32 m_nTimeOfDeploy; + CVector m_vPos; + float m_fMax_Z; + float m_fMin_Z; + CVector2D m_vPositions[60]; + CStingerSegment *pSpikes[NUM_STINGER_SEGMENTS]; + class CPed *pOwner; + uint8 m_nSpikeState; +public: + CStinger(); + void Init(CPed *pPed); + void Remove(); + void Deploy(CPed *pPed); + void CheckForBurstTyres(); + void Process(); +}; \ No newline at end of file -- cgit v1.2.3