-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathgrenades.h
41 lines (35 loc) · 1.01 KB
/
grenades.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
#pragma once
class Grenades {
private:
enum GrenadeFlags : size_t {
NONE = 0,
DETONATE,
BOUNCE,
};
struct bounce_t {
vec3_t point;
Color color;
};
using path_t = std::vector< vec3_t >;
using bounces_t = std::vector< bounce_t >;
private:
int m_id;
path_t m_path;
bounces_t m_bounces;
float m_vel, m_power;
vec3_t m_start, m_velocity, m_move;
public:
void reset( );
void paint( );
void think( );
void simulate( );
void setup( );
size_t advance( size_t tick );
bool detonate( size_t tick, CGameTrace& trace );
void ResolveFlyCollisionBounce( CGameTrace& trace );
void PhysicsPushEntity( vec3_t& start, const vec3_t& move, CGameTrace& trace, Entity* ent );
void TraceHull( const vec3_t& start, const vec3_t& end, CGameTrace& trace, Entity* ent );
void PhysicsAddGravityMove( vec3_t& move );
void PhysicsClipVelocity( const vec3_t& in, const vec3_t& normal, vec3_t& out, float overbounce );
};
extern Grenades g_grenades;