From c09fc915749d4646bc2d4f7152327f77e27e53db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eke=20P=C3=A9ter?= Date: Wed, 7 Aug 2024 21:12:57 +0200 Subject: [PATCH] Fix multiple instances is not an error, it's gracefully handled. --- MVES/Classes/MapVote.uc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/MVES/Classes/MapVote.uc b/MVES/Classes/MapVote.uc index bc569a3..7213788 100644 --- a/MVES/Classes/MapVote.uc +++ b/MVES/Classes/MapVote.uc @@ -220,17 +220,15 @@ event PostBeginPlay() local bool bGotoSuccess; local bool bNeedToRestorePackages, bNeedToRestoreMap; - Log("[MVE] Map Vote Extended version: "$ClientPackageInternal); - if ( IsOtherInstanceRunning() ) { - Err("Detected multiple instances of MapVote"); - Err("Please use Mapvote either as ServerActor or Mutator"); - Err("Never add it as both ServerActor and Mutator at the same time"); + Nfo("Detected multiple MapVotes, only first mapvote will work."); Destroy(); return; } + Log("[MVE] Map Vote Extended version: "$ClientPackageInternal); + TravelInfo = Spawn(class'MV_TravelInfo'); Spawn(class'MapVoteDelayedInit').InitializeDelayedInit(Self); Spawn(class'MV_IdleTimer').Initialize(Self, TravelInfo.bIsIdle, TravelInfo.EmptyMinutes); @@ -479,7 +477,6 @@ event PostBeginPlay() function bool IsOtherInstanceRunning() { local Mutator M; - local bool bIsThisRegistered, bIsAnotherRegistered; // Check if mutator was added to GameInfo for ( M = Level.Game.BaseMutator; M != None; M = M.NextMutator )