Skip to content

Commit 9fb60c4

Browse files
committed
don't modify Output directly
1 parent b169e2f commit 9fb60c4

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

game/addons/menu/Code/Modals/CreateGameModal/CreateGameModal.razor

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,25 +148,25 @@
148148
ServerName = $"{Sandbox.Utility.Steam.PersonaName}'s game"
149149
} );
150150

151+
//
152+
// Apply config / defaults
153+
//
154+
Players = Output.MaxPlayers;
155+
ServerName = Output.ServerName;
156+
Settings = Package.GetMeta( "GameSettings", new List<GameSetting>() );
157+
151158
//
152159
// Verify cookie data
153160
//
154-
if ( Output.MaxPlayers < MinPlayers )
161+
if ( Players < MinPlayers )
155162
{
156-
Output.MaxPlayers = MinPlayers;
163+
Players = MinPlayers;
157164
}
158-
if ( string.IsNullOrEmpty( Output.ServerName ) )
165+
if ( string.IsNullOrEmpty( ServerName ) )
159166
{
160167
ServerName = $"{Sandbox.Utility.Steam.PersonaName}'s game";
161168
}
162169

163-
//
164-
// Apply config / defaults
165-
//
166-
Players = Output.MaxPlayers;
167-
ServerName = Output.ServerName;
168-
Settings = Package.GetMeta( "GameSettings", new List<GameSetting>() );
169-
170170
//
171171
// Initialize GameSettings dictionary with defaults if missing
172172
//

0 commit comments

Comments
 (0)