From 021885465b9dbb2da74ba157c5c725b53b562e88 Mon Sep 17 00:00:00 2001 From: John Lillis Date: Thu, 18 Jul 2024 10:30:21 -0400 Subject: [PATCH] Fix gamemodePlayerReady being triggered many times --- [gamemodes]/[deathmatch]/deathmatch/server/player.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/[gamemodes]/[deathmatch]/deathmatch/server/player.lua b/[gamemodes]/[deathmatch]/deathmatch/server/player.lua index 569630954..36eec4c61 100644 --- a/[gamemodes]/[deathmatch]/deathmatch/server/player.lua +++ b/[gamemodes]/[deathmatch]/deathmatch/server/player.lua @@ -28,7 +28,10 @@ addEventHandler("onPlayerQuit", root, processPlayerQuit) -- gamemodePlayerReady: triggered when a client is ready to play -- -- triggered by the client post-onClientResourceStart - function gamemodePlayerReady() + function gamemodePlayerReady(loadedResource) + if loadedResource ~= resource then + return + end -- inform client of current game state by triggering certain events local gameState = getElementData(resourceRoot, "gameState") if gameState == GAME_STARTING then