forked from sstokic-tgm/Gladiatorcheatz-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIVEffects.hpp
69 lines (55 loc) · 1.29 KB
/
IVEffects.hpp
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
64
65
66
67
68
69
#pragma once
#include "harCs.hpp"
#include "VT.hpp"
class IClientRenderable;
struct ColorRGBExp32
{
byte r, g, b;
signed char exponent;
};
struct dlight_t
{
int flags;
Vector3 origin;
float radius;
ColorRGBExp32 color;
float die; // stop lighting after this time
float decay; // drop this each second
float minLight; // don't add when contributing less
int key;
int style; // lightstyle
// For spotlights. Use m_OuterAngle == 0 for point lights
Vector3 m_direction; // center of the light cone
float m_innerAngle;
float m_outerAngle;
// If this ptr is set, the dlight will only affect this particular client renderable
const IClientRenderable* m_pExclusiveLightReceiver;
dlight_t() : m_pExclusiveLightReceiver(NULL) {}
float getRadius() const
{
return radius;
}
float getRadiusSquared() const
{
return radius * radius;
}
float isRadiusGreaterThanZero() const
{
return radius > 0.0f;
}
};
class IVEffects
{
public:
dlight_t *CL_AllocDlight(int key)
{
typedef dlight_t*(__thiscall *o_CL_AllocDlight)(PVOID, int);
return VT::vfunc<o_CL_AllocDlight>(this, 4)(this, key);
}
dlight_t *CL_AllocElight(int key)
{
typedef dlight_t*(__thiscall *o_CL_AllocElight)(PVOID, int);
return VT::vfunc<o_CL_AllocElight>(this, 5)(this, key);
}
};
extern IVEffects *p_IVEffects;