mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-18 17:01:20 +00:00
Rename PlayerRespawn to PlayerSpawnPoint
This commit is contained in:
parent
03c080c07b
commit
f45156fea8
3 changed files with 9 additions and 9 deletions
|
@ -2836,7 +2836,7 @@ void G_SpawnPlayer(INT32 playernum)
|
||||||
|
|
||||||
void G_MovePlayerToSpawnOrStarpost(INT32 playernum)
|
void G_MovePlayerToSpawnOrStarpost(INT32 playernum)
|
||||||
{
|
{
|
||||||
spawnpoint_t *spawnpoint = LUA_HookPlayerRespawn(&players[playernum]);
|
spawnpoint_t *spawnpoint = LUA_HookPlayerSpawnPoint(&players[playernum]);
|
||||||
|
|
||||||
if (spawnpoint == NULL)
|
if (spawnpoint == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,7 @@ automatically.
|
||||||
X (MusicChange),\
|
X (MusicChange),\
|
||||||
X (PlayerHeight),/* override player height */\
|
X (PlayerHeight),/* override player height */\
|
||||||
X (PlayerCanEnterSpinGaps),\
|
X (PlayerCanEnterSpinGaps),\
|
||||||
X (PlayerRespawn),\
|
X (PlayerSpawnPoint),\
|
||||||
X (KeyDown),\
|
X (KeyDown),\
|
||||||
X (KeyUp),\
|
X (KeyUp),\
|
||||||
|
|
||||||
|
@ -149,5 +149,5 @@ int LUA_HookShouldJingleContinue(player_t *, const char *musname);
|
||||||
int LUA_HookPlayerCmd(player_t *, ticcmd_t *);
|
int LUA_HookPlayerCmd(player_t *, ticcmd_t *);
|
||||||
int LUA_HookMusicChange(const char *oldname, struct MusicChange *);
|
int LUA_HookMusicChange(const char *oldname, struct MusicChange *);
|
||||||
fixed_t LUA_HookPlayerHeight(player_t *player);
|
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);
|
int LUA_HookPlayerCanEnterSpinGaps(player_t *player);
|
||||||
|
|
|
@ -1177,7 +1177,7 @@ fixed_t LUA_HookPlayerHeight(player_t *player)
|
||||||
return hook.status.type_fixed;
|
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;
|
hook->status.type_void_pointer = NULL;
|
||||||
|
|
||||||
|
@ -1210,7 +1210,7 @@ static void res_playerrespawn(Hook_State *hook)
|
||||||
|
|
||||||
#define TYPEERROR(f,t) \
|
#define TYPEERROR(f,t) \
|
||||||
CONS_Alert(CONS_WARNING, \
|
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))
|
f, lua_typename(gL, t), luaL_typename(gL, -2))
|
||||||
#define GETNUMBER(r,f) \
|
#define GETNUMBER(r,f) \
|
||||||
if (!strcmp(key, f)) { \
|
if (!strcmp(key, f)) { \
|
||||||
|
@ -1266,7 +1266,7 @@ static void res_playerrespawn(Hook_State *hook)
|
||||||
{
|
{
|
||||||
#define TYPEERROR(f,t,i) \
|
#define TYPEERROR(f,t,i) \
|
||||||
CONS_Alert(CONS_WARNING, \
|
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))
|
f, lua_typename(gL, t), luaL_typename(gL, i))
|
||||||
#define GETNUMBER(r,f,i) \
|
#define GETNUMBER(r,f,i) \
|
||||||
if (!lua_isnil(gL, i)) { \
|
if (!lua_isnil(gL, i)) { \
|
||||||
|
@ -1319,13 +1319,13 @@ static void res_playerrespawn(Hook_State *hook)
|
||||||
hook->status.type_void_pointer = result;
|
hook->status.type_void_pointer = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnpoint_t *LUA_HookPlayerRespawn(player_t *player)
|
spawnpoint_t *LUA_HookPlayerSpawnPoint(player_t *player)
|
||||||
{
|
{
|
||||||
Hook_State hook;
|
Hook_State hook;
|
||||||
if (prepare_hook(&hook, -1, HOOK(PlayerRespawn)))
|
if (prepare_hook(&hook, -1, HOOK(PlayerSpawnPoint)))
|
||||||
{
|
{
|
||||||
LUA_PushUserdata(gL, player, META_PLAYER);
|
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;
|
return (spawnpoint_t *)hook.status.type_void_pointer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue