From b3a147802cd37fef9f8b8941fc0a7fa48cdeb117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eke=20P=C3=A9ter?= Date: Mon, 11 Nov 2024 00:53:01 +0100 Subject: [PATCH] Use DefaultTickRate and log tickrate --- MVES/Classes/MV_MapFilter.uc | 5 ----- MVES/Classes/MV_SubExtension.uc | 2 +- MVES/Classes/MapVote.uc | 12 ++++++++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/MVES/Classes/MV_MapFilter.uc b/MVES/Classes/MV_MapFilter.uc index f070eb4..db92128 100644 --- a/MVES/Classes/MV_MapFilter.uc +++ b/MVES/Classes/MV_MapFilter.uc @@ -139,11 +139,6 @@ function ApplyFilterLists(MV_Sort sorter) } } - for ( i = 0; i < iMapList; i+=1 ) - { - Log(i$" "$MapList[i]); - } - // clear the rest for ( i = iMapList ; i < ArrayCount(MapList) ; i++ ) { diff --git a/MVES/Classes/MV_SubExtension.uc b/MVES/Classes/MV_SubExtension.uc index 9e30a44..aa87336 100644 --- a/MVES/Classes/MV_SubExtension.uc +++ b/MVES/Classes/MV_SubExtension.uc @@ -68,7 +68,7 @@ function MLC_Rules( Info MapListCacheActor) for ( i = 0; i < ArrayCount(MLC.iNewMaps); i++ ) { // FEATURE IS DISABLED - MLC.iNewMaps[i] = ""; + MLC.iNewMaps[i] = 0; // Log("copy MapList.iNewMaps["$i$"] "$MapList.iNewMaps[i]); } } diff --git a/MVES/Classes/MapVote.uc b/MVES/Classes/MapVote.uc index 701159a..ed21c3b 100644 --- a/MVES/Classes/MapVote.uc +++ b/MVES/Classes/MapVote.uc @@ -235,6 +235,7 @@ event PostBeginPlay() if ( bReloadOnEveryRun ) { + Log("[MVE] [WARNING] bReloadOnEveryRun is enabled, disable it to improve server performance"); bReloadOnNextRun = True; } @@ -290,6 +291,7 @@ event PostBeginPlay() // check that current packages contains all packages specified by mapvote CurrentPackages = ConsoleCommand("Get ini:Engine.Engine.GameEngine ServerPackages"); Log("[MVE] CurrentPackages is "$CurrentPackages); + Log("[MVE] Current TickRate is "$ConsoleCommand("get ini:Engine.Engine.NetworkDevice NetServerMaxTickRate")); LogoTexturePackage = GetPackageNameFromString(ClientLogoTexture); if ( LogoTexturePackage != "" && InStr(CurrentPackages, "\""$LogoTexturePackage$"\"") < 0 ) { @@ -1457,11 +1459,17 @@ final function MV_Result GenerateMapResult(string map, int idx) r = class'MV_Result'.static.Create(); r.Map = map; r.GameIndex = idx; + PopulateResultWithDefaults(r); PopulateResultWithRule(r, idx); return r; } +function PopulateResultWithDefaults(MV_Result r) +{ + r.SetTickRate(DefaultTickRate); +} + function PopulateResultWithRule(MV_Result r, int idx) { local string extends, extendsIdx; @@ -1584,14 +1592,14 @@ final function bool SetupTravelString( string mapStringWithIdx ) { spk = ParseAliases( spk); } - Nfo("-> ServerPackages: `"$spk$"`"); ConsoleCommand("set ini:Engine.Engine.GameEngine ServerPackages "$spk); + Nfo("-> ServerPackages: `"$ConsoleCommand("get ini:Engine.Engine.GameEngine ServerPackages")$"`"); } if ( Result.TickRate > 0 ) { ConsoleCommand("set ini:Engine.Engine.NetworkDevice NetServerMaxTickRate "$Result.TickRate); ConsoleCommand("set ini:Engine.Engine.NetworkDevice LanServerMaxTickRate "$Result.TickRate); - Nfo("-> TickRate: `"$Result.TickRate$"`"); + Nfo("-> TickRate: `"$ConsoleCommand("get ini:Engine.Engine.NetworkDevice NetServerMaxTickRate")$"`"); } return True; // SUCCESS!!! }