mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-11-30 15:57:47 +00:00
Some debug stuff
This commit is contained in:
@@ -188,6 +188,33 @@ namespace game
|
||||
return answer;
|
||||
}
|
||||
|
||||
// cmd_function_s *__usercall Cmd_FindCommand@<eax>(const char *cmdName@<esi>)
|
||||
cmd_function_s* Cmd_FindCommand(const char* cmdName, void* call_addr)
|
||||
{
|
||||
cmd_function_s* answer;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov esi, cmdName;
|
||||
call call_addr;
|
||||
mov answer, eax;
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
void Cmd_AddCommand(const char* name, void (__cdecl *function)())
|
||||
{
|
||||
cmd_function_s* newCmd = utils::memory::allocate<cmd_function_s>();
|
||||
|
||||
*newCmd = {};
|
||||
newCmd->next = *cmd_functions;
|
||||
newCmd->function = function;
|
||||
newCmd->name = utils::memory::duplicate_string(name);
|
||||
|
||||
*cmd_functions = newCmd;
|
||||
}
|
||||
|
||||
// restored
|
||||
void Sys_EnterCriticalSection(CriticalSection critSect)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user