mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Move hook into G_SpawnPlayer
This commit is contained in:
parent
000ec9ac67
commit
5c9aaf2fe4
3 changed files with 7 additions and 6 deletions
|
@ -2328,6 +2328,12 @@ void G_SpawnPlayer(INT32 playernum, boolean starpost)
|
|||
}
|
||||
}
|
||||
P_MovePlayerToSpawn(playernum, spawnpoint);
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
player_t *p = &players[playernum];
|
||||
LUAh_PlayerSpawn(p); // Lua hook for player spawning :)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
mapthing_t *G_FindCTFStart(INT32 playernum)
|
||||
|
|
|
@ -76,6 +76,6 @@ boolean LUAh_BotAI(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd); // Hook for B_B
|
|||
boolean LUAh_LinedefExecute(line_t *line, mobj_t *mo, sector_t *sector); // Hook for linedef executors
|
||||
boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg); // Hook for chat messages
|
||||
boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source); // Hook for hurt messages
|
||||
#define LUAh_PlayerSpawn(player) LUAh_PlayerHook(player, hook_PlayerSpawn) // Hook for P_SpawnPlayer
|
||||
#define LUAh_PlayerSpawn(player) LUAh_PlayerHook(player, hook_PlayerSpawn) // Hook for G_SpawnPlayer
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8294,11 +8294,6 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
|
||||
// Spawn with a pity shield if necessary.
|
||||
P_DoPityCheck(p);
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_PlayerSpawn(p); // Lua hook for player spawning :)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void P_AfterPlayerSpawn(INT32 playernum)
|
||||
|
|
Loading…
Reference in a new issue