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
This commit is contained in:
TAHuntling 2023-07-23 18:04:45 -05:00 committed by GitHub
parent d1316cfc9f
commit 0610fe99f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<bool>(u"bInUse")) {
self->SetNetworkVar(u"bInUse", true);
self->SetVar(u"playerID", sender->GetObjectID());