Browse Source

Fix vote menu having a wrong mode selected by default

develop
Anton Tarasenko 2 years ago
parent
commit
313d6d0a00
  1. 5
      sources/VotingHandlerAdapter.uc

5
sources/VotingHandlerAdapter.uc

@ -127,6 +127,10 @@ public final function InjectIntoVotingHandler()
nextGameMode = GameMode(class'GameMode'.static nextGameMode = GameMode(class'GameMode'.static
.GetConfigInstance(availableGameModes[i])); .GetConfigInstance(availableGameModes[i]));
newVotingHandlerConfig[i] = BuildVotingHandlerConfig(nextGameMode); newVotingHandlerConfig[i] = BuildVotingHandlerConfig(nextGameMode);
// Setup proper game mode index
if (availableGameModes[i].ToString() == targetGameMode) {
votingHandler.currentGameConfig = i;
}
// Report omitted mutators / server options // Report omitted mutators / server options
nextGameMode.ReportBadMutatorNames(); nextGameMode.ReportBadMutatorNames();
nextGameMode.ReportBadOptions(); nextGameMode.ReportBadOptions();
@ -295,6 +299,7 @@ public final function RestoreVotingHandlerConfigBackup()
votingHandler.gameConfig = backupVotingHandlerConfig; votingHandler.gameConfig = backupVotingHandlerConfig;
votingHandler.default.gameConfig = backupVotingHandlerConfig; votingHandler.default.gameConfig = backupVotingHandlerConfig;
votingHandler.currentGameConfig = 0;
votingHandler.SaveConfig(); votingHandler.SaveConfig();
} }

Loading…
Cancel
Save