diff --git a/src/g_game.c b/src/g_game.c index 8eed82129..ced2275b0 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2836,7 +2836,7 @@ void G_SpawnPlayer(INT32 playernum) void G_MovePlayerToSpawnOrStarpost(INT32 playernum) { - spawnpoint_t *spawnpoint = LUA_HookPlayerRespawn(&players[playernum]); + spawnpoint_t *spawnpoint = LUA_HookPlayerSpawnPoint(&players[playernum]); if (spawnpoint == NULL) { diff --git a/src/lua_hook.h b/src/lua_hook.h index b78a9bbe5..cd05e7aaa 100644 --- a/src/lua_hook.h +++ b/src/lua_hook.h @@ -72,7 +72,7 @@ automatically. X (MusicChange),\ X (PlayerHeight),/* override player height */\ X (PlayerCanEnterSpinGaps),\ - X (PlayerRespawn),\ + X (PlayerSpawnPoint),\ X (KeyDown),\ X (KeyUp),\ @@ -149,5 +149,5 @@ int LUA_HookShouldJingleContinue(player_t *, const char *musname); int LUA_HookPlayerCmd(player_t *, ticcmd_t *); int LUA_HookMusicChange(const char *oldname, struct MusicChange *); fixed_t LUA_HookPlayerHeight(player_t *player); -spawnpoint_t *LUA_HookPlayerRespawn(player_t *player); +spawnpoint_t *LUA_HookPlayerSpawnPoint(player_t *player); int LUA_HookPlayerCanEnterSpinGaps(player_t *player); diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index a1483bb4e..2b5bbee4d 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -1177,7 +1177,7 @@ fixed_t LUA_HookPlayerHeight(player_t *player) return hook.status.type_fixed; } -static void res_playerrespawn(Hook_State *hook) +static void res_playerspawnpoint(Hook_State *hook) { hook->status.type_void_pointer = NULL; @@ -1210,7 +1210,7 @@ static void res_playerrespawn(Hook_State *hook) #define TYPEERROR(f,t) \ CONS_Alert(CONS_WARNING, \ - "bad value for \"%s\" in table returned by \"PlayerRespawn\" hook (%s expected, got %s)\n", \ + "bad value for \"%s\" in table returned by \"PlayerSpawnPoint\" hook (%s expected, got %s)\n", \ f, lua_typename(gL, t), luaL_typename(gL, -2)) #define GETNUMBER(r,f) \ if (!strcmp(key, f)) { \ @@ -1266,7 +1266,7 @@ static void res_playerrespawn(Hook_State *hook) { #define TYPEERROR(f,t,i) \ CONS_Alert(CONS_WARNING, \ - "bad value for \"%s\" returned by \"PlayerRespawn\" hook (%s expected, got %s)\n", \ + "bad value for \"%s\" returned by \"PlayerSpawnPoint\" hook (%s expected, got %s)\n", \ f, lua_typename(gL, t), luaL_typename(gL, i)) #define GETNUMBER(r,f,i) \ if (!lua_isnil(gL, i)) { \ @@ -1319,13 +1319,13 @@ static void res_playerrespawn(Hook_State *hook) hook->status.type_void_pointer = result; } -spawnpoint_t *LUA_HookPlayerRespawn(player_t *player) +spawnpoint_t *LUA_HookPlayerSpawnPoint(player_t *player) { Hook_State hook; - if (prepare_hook(&hook, -1, HOOK(PlayerRespawn))) + if (prepare_hook(&hook, -1, HOOK(PlayerSpawnPoint))) { LUA_PushUserdata(gL, player, META_PLAYER); - call_hooks(&hook, 8, res_playerrespawn); + call_hooks(&hook, 8, res_playerspawnpoint); } return (spawnpoint_t *)hook.status.type_void_pointer; }