Skip to content
Snippets Groups Projects
Commit fbee00d6 authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

Ensure hook status is initialized properly

parent f45156fe
No related branches found
No related tags found
1 merge request!2108Draft: Gametype refactor
...@@ -318,6 +318,8 @@ static boolean init_hook_type ...@@ -318,6 +318,8 @@ static boolean init_hook_type
const char * string, const char * string,
int nonzero int nonzero
){ ){
memset(&hook->status, 0, sizeof(hook->status));
hook->status.type_int = status; hook->status.type_int = status;
if (nonzero) if (nonzero)
...@@ -1322,7 +1324,7 @@ static void res_playerspawnpoint(Hook_State *hook) ...@@ -1322,7 +1324,7 @@ static void res_playerspawnpoint(Hook_State *hook)
spawnpoint_t *LUA_HookPlayerSpawnPoint(player_t *player) spawnpoint_t *LUA_HookPlayerSpawnPoint(player_t *player)
{ {
Hook_State hook; Hook_State hook;
if (prepare_hook(&hook, -1, HOOK(PlayerSpawnPoint))) if (prepare_hook(&hook, 0, HOOK(PlayerSpawnPoint)))
{ {
LUA_PushUserdata(gL, player, META_PLAYER); LUA_PushUserdata(gL, player, META_PLAYER);
call_hooks(&hook, 8, res_playerspawnpoint); call_hooks(&hook, 8, res_playerspawnpoint);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment