Skip to content

Commit

Permalink
Add Setting bAlwaysUseDefaultMap
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Mar 17, 2023
1 parent 0fac60e commit 43cc59e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/MutVoteSys.uc
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ function TallyVotes() {
Level.Game.SetPropertyText("bDontRestart", "False");
return;
}
M = Info.ResolveMapOfPreset(DefaultPresetRef, Settings.DefaultMap);
if (Settings.bAlwaysUseDefaultMap || bChangeMapImmediately)
M = Info.ResolveMapOfPreset(DefaultPresetRef, Settings.DefaultMap);
if (M == none)
M = SelectRandomMapFromList(DefaultPresetRef.MapList);
if (M == none)
Expand Down
2 changes: 2 additions & 0 deletions Classes/VS_ServerSettings.uc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ var config int IdleTimeout;
var config int MinimumMapRepeatDistance;
var config int PresetProbeDepth;
var config bool bChangeGameNameForPresets;
var config bool bAlwaysUseDefaultMap;

defaultproperties {
MidGameVoteThreshold=0.5
Expand All @@ -57,4 +58,5 @@ defaultproperties {
MinimumMapRepeatDistance=0
PresetProbeDepth=1
bChangeGameNameForPresets=False
bAlwaysUseDefaultMap=False
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ bManageServerPackages=False
bUseServerActorsCompatibilityMode=False
PresetProbeDepth=1
IdleTimeout=0
bChangeGameNameForPresets=False
bAlwaysUseDefaultMap=False
DefaultPackages=SoldierSkins
DefaultPackages=CommandoSkins
DefaultPackages=FCommandoSkins
Expand Down Expand Up @@ -234,6 +236,13 @@ If true, changes the `GameName` property of the gamemode to the full preset name

Defaults to false.

#### bAlwaysUseDefaultMap

If true, uses the `DefaultMap` setting whenever switching maps without any votes by players.
If false, only uses the `DefaultMap` setting when recovering from crashes or server restarts.

Defaults to false.

### VoteSysPresets.ini
```ini
[VS_PresetConfig0]
Expand Down

0 comments on commit 43cc59e

Please sign in to comment.