Add features folder and bhop
This commit is contained in:
19
src/features/movement.c
Normal file
19
src/features/movement.c
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "include/movement.h"
|
||||
#include "../include/sdk.h"
|
||||
#include "../include/globals.h"
|
||||
|
||||
void bhop(usercmd_t* cmd) {
|
||||
/* TODO: Check !bhop_var */
|
||||
if (false || i_pmove->movetype != MOVETYPE_WALK)
|
||||
return;
|
||||
|
||||
static bool was_in_air = false;
|
||||
|
||||
if (was_in_air && !(i_pmove->flags & FL_ONGROUND))
|
||||
cmd->buttons &= ~IN_JUMP;
|
||||
|
||||
was_in_air = (i_pmove->flags & FL_ONGROUND) == 0;
|
||||
}
|
||||
Reference in New Issue
Block a user