mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Merge branch 'Lua-playerspawn-hook-fix' into 'next'
Fix for Lua's "PlayerSpawn" hook This fixes how functions for the "PlayerSpawn" Lua hook aren't called when the player respawns at a starpost instead of at a map thing start. (Note to Lua scripters who may want to adjust their scripts accordingly with this in future, checking if `player.starposttime` is non-zero is the best way to detect if you're spawning at a starpost or not.) See merge request !198
This commit is contained in:
commit
8ab4b8c7fe
1 changed files with 3 additions and 0 deletions
|
@ -2288,6 +2288,9 @@ void G_SpawnPlayer(INT32 playernum, boolean starpost)
|
|||
if (starpost) //Don't even bother with looking for a place to spawn.
|
||||
{
|
||||
P_MovePlayerToStarpost(playernum);
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_PlayerSpawn(&players[playernum]); // Lua hook for player spawning :)
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue