From 0610fe99f85b4e1c66dd6b3d6bdecee106f561d8 Mon Sep 17 00:00:00 2001 From: TAHuntling <38479763+TAHuntling@users.noreply.github.com> Date: Sun, 23 Jul 2023 18:04:45 -0500 Subject: [PATCH] fix: Nexus Tower Combat Challenge can be started twice if two players start it at the same time (#1147) * Nexus Tower Dummy Challenge Dual Instance Fix Fix for dual instance starting when two players hit start on the challenge at the same time. * Changed GetVar to GetNetworkVar Changed the if statement to GetNetworkVar boolean of bInUse rather than GetVar boolean of bInUse --- dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp b/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp index 2c2f84c2..011a67ea 100644 --- a/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp +++ b/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp @@ -43,7 +43,7 @@ void NtCombatChallengeServer::OnFireEventServerSide(Entity* self, Entity* sender void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) { - if (identifier == u"PlayButton" && button == 1) { + if (identifier == u"PlayButton" && button == 1 && !self->GetNetworkVar(u"bInUse")) { self->SetNetworkVar(u"bInUse", true); self->SetVar(u"playerID", sender->GetObjectID());