-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebullets.cpp
43 lines (31 loc) · 1022 Bytes
/
firebullets.cpp
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
#include "includes.h"
class C_TEFireBullets {
public:
PAD( 0xC );
int m_index;
int m_item_id;
vec3_t m_origin;
ang_t m_angles;
int m_weapon_id;
int m_mode;
int m_seed;
float m_spread;
};
void Hooks::PostDataUpdate( DataUpdateType_t type ) {
//C_TEFireBullets* shot = ( C_TEFireBullets* )this;
//Player* player = g_csgo.m_entlist->GetClientEntity< Player* >( shot->m_index + 1 );
g_hooks.m_fire_bullets.GetOldMethod< PostDataUpdate_t >( 7 )( this, type );
}
void Hooks::StandardBlendingRules(int a2, int a3, int a4, int a5, int a6)
{
// cast thisptr to player ptr.
Player* player = (Player*)this;
if (!player || (player->index() - 1) > 63)
return g_hooks.m_StandardBlendingRules(this, a2, a3, a4, a5, a6);
// disable interpolation.
if (!(player->m_fEffects() & EF_NOINTERP))
player->m_fEffects() |= EF_NOINTERP;
g_hooks.m_StandardBlendingRules(this, a2, a3, a4, a5, a6);
// restore interpolation.
player->m_fEffects() &= ~EF_NOINTERP;
}