BunnymodXT
BunnymodXT copied to clipboard
restructuring: windows: find cmd functions from linked list instead of using patterns
To hook cmd functions such as changelevel2 or record it is not necessary to create patterns at all
There is cmd_function_t* cmd_functions global variable in the engine code in which all commands is stored
cmd_function_t structure:
typedef void (*xcommand_t) (void);
typedef struct cmd_function_s
{
struct cmd_function_s *next;
char *name;
xcommand_t function;
int flags;
} cmd_function_t;