mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-18 08:51:29 +00:00
Ensure hook status is initialized properly
This commit is contained in:
parent
f45156fea8
commit
fbee00d62a
1 changed files with 3 additions and 1 deletions
|
@ -318,6 +318,8 @@ static boolean init_hook_type
|
|||
const char * string,
|
||||
int nonzero
|
||||
){
|
||||
memset(&hook->status, 0, sizeof(hook->status));
|
||||
|
||||
hook->status.type_int = status;
|
||||
|
||||
if (nonzero)
|
||||
|
@ -1322,7 +1324,7 @@ static void res_playerspawnpoint(Hook_State *hook)
|
|||
spawnpoint_t *LUA_HookPlayerSpawnPoint(player_t *player)
|
||||
{
|
||||
Hook_State hook;
|
||||
if (prepare_hook(&hook, -1, HOOK(PlayerSpawnPoint)))
|
||||
if (prepare_hook(&hook, 0, HOOK(PlayerSpawnPoint)))
|
||||
{
|
||||
LUA_PushUserdata(gL, player, META_PLAYER);
|
||||
call_hooks(&hook, 8, res_playerspawnpoint);
|
||||
|
|
Loading…
Reference in a new issue