Add features folder and bhop

This commit is contained in:
8dcc
2023-07-20 23:20:39 +02:00
parent 5849eb2ed3
commit 1f1df22414
3 changed files with 30 additions and 2 deletions

19
src/features/movement.c Normal file
View 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;
}