/
misc.cpp
39 lines (34 loc) · 840 Bytes
/
misc.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
#include "../features.hpp"
void misc::movement::bunny_hop(c_usercmd* cmd)
{//note: let user choose the key
if (GetAsyncKeyState('V') || variables::bhop_max < 1)
variables::bhop_count = 0;
if (!variables::bhop_enable || rand() % 100 > variables::bhop_hitchance)
return;
if (variables::bhop_count > variables::bhop_max) {
return;
}
static bool last_jumped = false, should_fake = false;
if (!last_jumped && should_fake) {
should_fake = false;
variables::bhop_count += 1;
cmd->buttons |= in_jump;
}
else if (cmd->buttons & in_jump) {
if (csgo::local_player->flags() & fl_onground) {
last_jumped = true;
should_fake = true;
}
else {
cmd->buttons &= ~in_jump;
last_jumped = false;
}
}
else {
last_jumped = false;
should_fake = false;
}
};
void misc::movement::auto_strafe(c_usercmd* cmd)
{
}