Skip to content

Instantly share code, notes, and snippets.

@LuxXx
Created February 14, 2017 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LuxXx/1d4b044b2bd99096f5110247131458ce to your computer and use it in GitHub Desktop.
Save LuxXx/1d4b044b2bd99096f5110247131458ce to your computer and use it in GitHub Desktop.
urban terror no stamina hack 4.1 version, late 2011
//////////////////////////////////////////////////
// IN "VM_LoadQVM" OBEN
//////////////////////////////////////////////////
cvar_t *sv_keineStamina;
//////////////////////////////////////////////////
// ÜBER "VM_LoadQVM"
//////////////////////////////////////////////////
/*================= VMhook_KeineStamina ================= */
#define SPRINTOFFSET 0x103C8
#define SPRUNGOFFSET 0x114C5
#define DUCKOFFSET 0x14399
static void VMhook_KeineStamina( byte * code ) {
code[DUCKOFFSET] = code[SPRUNGOFFSET] = code[SPRINTOFFSET] = OP_POP;
}
//////////////////////////////////////////////////
// ÜBER "return header;" IN "VM_LoadQVM"
//////////////////////////////////////////////////
sv_keineStamina = Cvar_Get ( "sv_keineStamina", "0", CVAR_LATCH | CVAR_ARCHIVE );
if ( sv_keineStamina->integer > 0 && !Q_stricmp (vm->name, "qagame") )
VMhook_KeineStamina ( ( byte * ) header + header->codeOffset );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment