mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Clear hooks on lua shutdown
This commit is contained in:
parent
26cc9ee17f
commit
d7bf47c5de
3 changed files with 3 additions and 1 deletions
|
@ -183,6 +183,7 @@ void smlua_shutdown(void) {
|
|||
audio_custom_shutdown();
|
||||
smlua_cobject_allowlist_shutdown();
|
||||
smlua_cpointer_allowlist_shutdown();
|
||||
smlua_clear_hooks();
|
||||
lua_State* L = gLuaState;
|
||||
if (L != NULL) {
|
||||
lua_close(L);
|
||||
|
|
|
@ -977,7 +977,7 @@ int smlua_hook_on_sync_table_change(lua_State* L) {
|
|||
// misc //
|
||||
//////////
|
||||
|
||||
static void smlua_clear_hooks(void) {
|
||||
void smlua_clear_hooks(void) {
|
||||
for (int i = 0; i < HOOK_MAX; i++) {
|
||||
struct LuaHookedEvent* hooked = &sHookedEvents[i];
|
||||
for (int j = 0; j < hooked->count; j++) {
|
||||
|
|
|
@ -88,6 +88,7 @@ u32 smlua_get_action_interaction_type(struct MarioState* m);
|
|||
bool smlua_call_chat_command_hook(char* command);
|
||||
void smlua_display_chat_commands(void);
|
||||
|
||||
void smlua_clear_hooks(void);
|
||||
void smlua_bind_hooks(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue