Skip to content

Commit b25d6dc

Browse files
committed
Added toggleable slash commands
1 parent c71e483 commit b25d6dc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

cod4qol/game.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -477,20 +477,20 @@ __declspec(naked) void game::hookedConsole_Key()
477477
{
478478
const static uint32_t retn_addr = 0x467534;
479479

480-
__asm
481-
{
482-
//pushad;
483-
484-
/*mov eax, enabled;
485-
test eax, eax;
486-
jz original;*/
480+
__asm pushad;
487481

488-
//popad;
489-
jmp retn_addr;
482+
if(commands::qol_disableslashcommands->current.enabled)
483+
__asm
484+
{
485+
popad;
486+
jmp retn_addr;
487+
}
490488

491-
/*original:
489+
__asm
490+
{
491+
original:
492492
popad;
493-
jmp game::pConsole_Key;*/
493+
jmp game::pConsole_Key;
494494
}
495495
}
496496

0 commit comments

Comments
 (0)