From 8f5519d5ace526ce15f8f162a72644dc2d8c8f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eke=20P=C3=A9ter?= Date: Mon, 20 Nov 2023 21:54:18 +0100 Subject: [PATCH] Apply aliases to settings. --- MVES/Classes/MapVote.uc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/MVES/Classes/MapVote.uc b/MVES/Classes/MapVote.uc index 931465c..193a68e 100644 --- a/MVES/Classes/MapVote.uc +++ b/MVES/Classes/MapVote.uc @@ -279,7 +279,10 @@ event PostBeginPlay() if ( DefaultSettings != "" ) { - ExecuteSettings(DefaultSettings); + Cmd = DefaultSettings; + if ( InStr( Cmd, "<") >= 0 ) + Cmd = ParseAliases( Cmd); + ExecuteSettings(Cmd); } bNeedToRestorePackages = false; @@ -382,7 +385,8 @@ event PostBeginPlay() } DEFAULT_MODE: Cmd = CurrentGame.Settings; - //Log("[MVE] Loading settings:",'MapVote'); + if ( InStr( Cmd, "<") >= 0 ) + Cmd = ParseAliases( Cmd); ExecuteSettings(Cmd); Cmd = ParseAliases(CurrentGame.ServerActors); @@ -1584,15 +1588,15 @@ final function bool SetupTravelString( string mapStringWithIdx ) spk = ParseAliases( spk); } Nfo("-> ServerPackages: `"$spk$"`"); - ConsoleCommand( "set ini:Engine.Engine.GameEngine ServerPackages "$spk); + ConsoleCommand("set ini:Engine.Engine.GameEngine ServerPackages "$spk); } TickRate = DefaultTickRate; if (CustomGame[idx].TickRate != 0) TickRate = CustomGame[idx].TickRate; if (TickRate > 0) { - ConsoleCommand( "set ini:Engine.Engine.NetworkDevice NetServerMaxTickRate "$CustomGame[idx].TickRate); - ConsoleCommand( "set ini:Engine.Engine.NetworkDevice LanServerMaxTickRate "$CustomGame[idx].TickRate); + ConsoleCommand("set ini:Engine.Engine.NetworkDevice NetServerMaxTickRate "$CustomGame[idx].TickRate); + ConsoleCommand("set ini:Engine.Engine.NetworkDevice LanServerMaxTickRate "$CustomGame[idx].TickRate); Nfo("-> TickRate: `"$TickRate$"`"); } return true; // SUCCESS!!!