-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrenadePrediction.h
37 lines (32 loc) · 988 Bytes
/
GrenadePrediction.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
#pragma once
#pragma once
#include "SDK.h"
#include "singleton.hpp"
enum ACT
{
ACT_NONE,
ACT_THROW,
ACT_LOB,
ACT_DROP,
};
class grenade_prediction
: public singleton<grenade_prediction>
{
private:
std::vector<Vector> path;
int type = 0;
int act = 0;
void Setup(Vector& vecSrc, Vector& vecThrow, Vector viewangles);
void Simulate(CViewSetup* setup);
int Step(Vector& vecSrc, Vector& vecThrow, int tick, float interval);
bool CheckDetonate(const Vector& vecThrow, const trace_t& tr, int tick, float interval);
void TraceHull(Vector& src, Vector& end, trace_t& tr);
void AddGravityMove(Vector& move, Vector& vel, float frametime, bool onground);
void PushEntity(Vector& src, const Vector& move, trace_t& tr);
void ResolveFlyCollisionCustom(trace_t& tr, Vector& vecVelocity, float interval);
int PhysicsClipVelocity(const Vector& in, const Vector& normal, Vector& out, float overbounce);
public:
void Tick(int buttons);
void View(CViewSetup* setup);
void Paint();
};