summaryrefslogtreecommitdiffstats
path: root/src/renderer/WaterCannon.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-15 17:19:32 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-17 23:04:26 +0200
commitd0404cbdb77bd82abf578ce28093990db94743f2 (patch)
tree1a7232c3dcdd6c371ab5fbde0fc6bf04c5bc7005 /src/renderer/WaterCannon.h
parentMerge pull request #1217 from Nopey/master (diff)
downloadre3-d0404cbdb77bd82abf578ce28093990db94743f2.tar
re3-d0404cbdb77bd82abf578ce28093990db94743f2.tar.gz
re3-d0404cbdb77bd82abf578ce28093990db94743f2.tar.bz2
re3-d0404cbdb77bd82abf578ce28093990db94743f2.tar.lz
re3-d0404cbdb77bd82abf578ce28093990db94743f2.tar.xz
re3-d0404cbdb77bd82abf578ce28093990db94743f2.tar.zst
re3-d0404cbdb77bd82abf578ce28093990db94743f2.zip
Diffstat (limited to 'src/renderer/WaterCannon.h')
-rw-r--r--src/renderer/WaterCannon.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/renderer/WaterCannon.h b/src/renderer/WaterCannon.h
new file mode 100644
index 00000000..a37bdd12
--- /dev/null
+++ b/src/renderer/WaterCannon.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#define WATERCANNON_GRAVITY (0.009f)
+#define WATERCANNON_LIFETIME (150)
+
+class CWaterCannon
+{
+public:
+ enum
+ {
+ NUM_SEGMENTPOINTS = 16,
+ };
+
+ int32 m_nId;
+ int16 m_nCur;
+ 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);
+};
+
+VALIDATE_SIZE(CWaterCannon, 412);
+
+class CWaterCannons
+{
+public:
+ 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);
+}; \ No newline at end of file