summaryrefslogtreecommitdiffstats
path: root/src/render/WaterCannon.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-28 18:55:15 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-28 18:55:15 +0100
commit101c21e06472e81bfd7f2b11e02c7fb7503dbd5a (patch)
tree4cd8c69f467a9e11f9360dca58888f8752addafa /src/render/WaterCannon.h
parentgarage update part 2 (diff)
parentMerge pull request #363 from erorcun/erorcun (diff)
downloadre3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.tar
re3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.tar.gz
re3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.tar.bz2
re3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.tar.lz
re3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.tar.xz
re3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.tar.zst
re3-101c21e06472e81bfd7f2b11e02c7fb7503dbd5a.zip
Diffstat (limited to 'src/render/WaterCannon.h')
-rw-r--r--src/render/WaterCannon.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/render/WaterCannon.h b/src/render/WaterCannon.h
index c2b288f2..826dc78e 100644
--- a/src/render/WaterCannon.h
+++ b/src/render/WaterCannon.h
@@ -1,15 +1,29 @@
#pragma once
+#define WATERCANNON_GRAVITY (0.009f)
+#define WATERCANNON_LIFETIME (150)
+
class CWaterCannon
{
public:
+ enum
+ {
+ NUM_SEGMENTPOINTS = 16,
+ };
+
int32 m_nId;
- int16 m_wIndex;
- char gap_6[2];
- int32 m_nTimeCreated;
- CVector m_avecPos[16];
- CVector m_avecVelocity[16];
- char m_abUsed[16];
+ int16 m_nCur;
+ char _pad0[2];
+ uint32 m_nTimeCreated;
+ CVector m_avecPos[NUM_SEGMENTPOINTS];
+ CVector m_avecVelocity[NUM_SEGMENTPOINTS];
+ bool m_abUsed[NUM_SEGMENTPOINTS];
+
+ void Init(void);
+ void Update_OncePerFrame(int16 index);
+ void Update_NewInput(CVector *pos, CVector *dir);
+ void Render(void);
+ void PushPeds(void);
};
static_assert(sizeof(CWaterCannon) == 412, "CWaterCannon: error");
@@ -17,11 +31,10 @@ static_assert(sizeof(CWaterCannon) == 412, "CWaterCannon: error");
class CWaterCannons
{
public:
- static void Update();
+ static CWaterCannon aCannons[NUM_WATERCANNONS];
+
+ static void Init(void);
static void UpdateOne(uint32 id, CVector *pos, CVector *dir);
+ static void Update();
static void Render(void);
- static void Init(void);
-};
-
-extern CWaterCannon (&aCannons)[NUM_WATERCANNONS];
-
+}; \ No newline at end of file