Skip to content

Commit

Permalink
Fix set tickrate
Browse files Browse the repository at this point in the history
  • Loading branch information
peterekepeter committed Oct 20, 2024
1 parent 3a88f74 commit ef8d7a9
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions MVES/Classes/MapVote.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1511,14 +1511,11 @@ function PrintCircularExtendsError(MV_Result r, int idx)
Err("Detected circular extends: "$list);
}
//Validity assumed
// Validity assumed
final function bool SetupTravelString( string mapStringWithIdx )
{
local string spk, GameClassName, LogoTexturePackage, mapFileName, idxString;
local int idx, TickRate, playerCount;
local MV_MapOverrides MapOverrides;
local MV_Result Result;
local LevelInfo info;
if ( !class'MV_Parser'.static.TrySplit(mapStringWithIdx, ":", mapFileName, idxString) )
{
Expand All @@ -1530,8 +1527,7 @@ final function bool SetupTravelString( string mapStringWithIdx )
if ( Result.Map ~= "Random" )
{
PlayerCount = GetPlayerCount();
Result.Map = MapList.RandomMap(Result.GameIndex, PlayerCount);
Result.Map = MapList.RandomMap(Result.GameIndex, GetPlayerCount());
}
if ( Result.CanMapBeLoaded() == False )
Expand Down Expand Up @@ -1594,14 +1590,11 @@ final function bool SetupTravelString( string mapStringWithIdx )
Nfo("-> ServerPackages: `"$spk$"`");
ConsoleCommand("set ini:Engine.Engine.GameEngine ServerPackages "$spk);
}
TickRate = DefaultTickRate;
if ( CustomGame[idx].TickRate != 0 )
TickRate = CustomGame[idx].TickRate;
if ( TickRate > 0 )
if ( Result.TickRate > 0 )
{
ConsoleCommand("set ini:Engine.Engine.NetworkDevice NetServerMaxTickRate "$CustomGame[idx].TickRate);
ConsoleCommand("set ini:Engine.Engine.NetworkDevice LanServerMaxTickRate "$CustomGame[idx].TickRate);
Nfo("-> TickRate: `"$TickRate$"`");
ConsoleCommand("set ini:Engine.Engine.NetworkDevice NetServerMaxTickRate "$Result.TickRate);
ConsoleCommand("set ini:Engine.Engine.NetworkDevice LanServerMaxTickRate "$Result.TickRate);
Nfo("-> TickRate: `"$Result.TickRate$"`");
}
return True; // SUCCESS!!!
}
Expand Down

0 comments on commit ef8d7a9

Please sign in to comment.