2019-05-30 15:24:47 -04:00
|
|
|
#pragma once
|
|
|
|
|
2020-03-28 10:02:44 -04:00
|
|
|
#define WATERCANNON_GRAVITY (0.009f)
|
|
|
|
#define WATERCANNON_LIFETIME (150)
|
|
|
|
|
2019-09-24 07:33:16 -04:00
|
|
|
class CWaterCannon
|
2019-05-30 15:24:47 -04:00
|
|
|
{
|
|
|
|
public:
|
2020-03-28 10:02:44 -04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
NUM_SEGMENTPOINTS = 16,
|
|
|
|
};
|
|
|
|
|
2019-09-24 07:33:16 -04:00
|
|
|
int32 m_nId;
|
2020-03-28 10:02:44 -04:00
|
|
|
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);
|
2019-10-12 18:35:01 -04:00
|
|
|
};
|
|
|
|
|
2020-05-10 11:49:33 -04:00
|
|
|
VALIDATE_SIZE(CWaterCannon, 412);
|
2019-09-24 07:33:16 -04:00
|
|
|
|
2019-10-12 18:35:01 -04:00
|
|
|
class CWaterCannons
|
|
|
|
{
|
|
|
|
public:
|
2020-03-28 10:02:44 -04:00
|
|
|
static CWaterCannon aCannons[NUM_WATERCANNONS];
|
|
|
|
|
|
|
|
static void Init(void);
|
2019-07-26 08:27:13 -04:00
|
|
|
static void UpdateOne(uint32 id, CVector *pos, CVector *dir);
|
2020-03-28 10:02:44 -04:00
|
|
|
static void Update();
|
2019-05-30 15:24:47 -04:00
|
|
|
static void Render(void);
|
2020-03-28 10:02:44 -04:00
|
|
|
};
|