-
-
Notifications
You must be signed in to change notification settings - Fork 205
/
mom_stickybomb.h
63 lines (46 loc) · 1.58 KB
/
mom_stickybomb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#include "mom_explosive.h"
#ifdef CLIENT_DLL
#define CMomStickybomb C_MomStickybomb
#endif
class CMomStickybomb : public CMomExplosive
{
public:
DECLARE_CLASS(CMomStickybomb, CMomExplosive);
DECLARE_NETWORKCLASS();
CMomStickybomb();
~CMomStickybomb();
void SetChargeTime(float flChargeTime) { m_flChargeTime = flChargeTime; }
void UpdateOnRemove() override;
void Spawn() override;
bool IsArmed() const;
bool CanExplode() const { return m_bCanExplode.Get(); }
void SetCanExplode(bool bCanExplode) { m_bCanExplode.Set(bCanExplode); }
#ifdef CLIENT_DLL
float GetDrawDelayTime() override;
void CreateTrailParticles() override;
void OnDataChanged(DataUpdateType_t type) OVERRIDE;
void Simulate() OVERRIDE;
#else
float GetDamageAmount() override { return 120.0f; }
void InitExplosive(CBaseEntity *pOwner, const Vector &velocity, const QAngle &angles) override;
static CMomStickybomb *Create(const Vector &position, const QAngle &angles, const Vector &velocity, CBaseEntity *pOwner);
void Explode(trace_t *pTrace, CBaseEntity *pOther);
void Fizzle() override;
void PlayFizzleSound() override;
void Detonate();
void VPhysicsCollision(int index, gamevcollisionevent_t *pEvent) override;
bool DidHitWorld() const { return m_bDidHitWorld; }
#endif
private:
IMPLEMENT_NETWORK_VAR_FOR_DERIVED(m_fFlags);
CNetworkVar(bool, m_bCanExplode);
#ifdef CLIENT_DLL
bool m_bPulsed;
#else
bool m_bDidHitWorld;
Vector m_vecImpactNormal;
float m_flCreationTime;
#endif
float m_flChargeTime;
};