Skip to content

Commit

Permalink
Use DefaultTickRate and log tickrate
Browse files Browse the repository at this point in the history
  • Loading branch information
peterekepeter committed Nov 10, 2024
1 parent 43cddc4 commit b3a1478
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 0 additions & 5 deletions MVES/Classes/MV_MapFilter.uc
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
{
Expand Down
2 changes: 1 addition & 1 deletion MVES/Classes/MV_SubExtension.uc
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
Expand Down
12 changes: 10 additions & 2 deletions MVES/Classes/MapVote.uc
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ event PostBeginPlay()

if ( bReloadOnEveryRun )
{
Log("[MVE] [WARNING] bReloadOnEveryRun is enabled, disable it to improve server performance");
bReloadOnNextRun = True;
}

Expand Down Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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!!!
}
Expand Down

0 comments on commit b3a1478

Please sign in to comment.