Skip to content

Commit

Permalink
Ease changing default map maxplayers.
Browse files Browse the repository at this point in the history
Closes ticket 4849.
  • Loading branch information
kreuvf authored and KJeff01 committed Dec 8, 2018
1 parent db81858 commit 5807d38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/configuration.cpp
Expand Up @@ -143,7 +143,7 @@ bool loadConfig()
// Set a default map to prevent hosting games without a map.
sstrcpy(game.map, DEFAULTSKIRMISHMAP);
game.hash.setZero();
game.maxPlayers = 4;
game.maxPlayers = DEFAULTSKIRMISHMAPMAXPLAYERS;

game.techLevel = 1;

Expand Down Expand Up @@ -346,7 +346,7 @@ bool reloadMPConfig()
// Set a default map to prevent hosting games without a map.
sstrcpy(game.map, DEFAULTSKIRMISHMAP);
game.hash.setZero();
game.maxPlayers = 4;
game.maxPlayers = DEFAULTSKIRMISHMAPMAXPLAYERS;

ini.setValue("powerLevel", game.power); // power
ini.setValue("base", game.base); // size of base
Expand All @@ -365,7 +365,7 @@ bool reloadMPConfig()
// Set a default map to prevent hosting games without a map.
sstrcpy(game.map, DEFAULTSKIRMISHMAP);
game.hash.setZero();
game.maxPlayers = 4;
game.maxPlayers = DEFAULTSKIRMISHMAPMAXPLAYERS;

game.power = ini.value("powerLevel", LEV_MED).toInt();
game.base = ini.value("base", CAMP_BASE).toInt();
Expand Down
1 change: 1 addition & 0 deletions src/configuration.h
Expand Up @@ -30,5 +30,6 @@ bool reloadMPConfig();

/// Default map for Skirmish
static const char DEFAULTSKIRMISHMAP[] = "Sk-Rush";
static const int DEFAULTSKIRMISHMAPMAXPLAYERS = 4;

#endif // __INCLUDED_SRC_CONFIGURATION_H__
2 changes: 1 addition & 1 deletion src/multiint.cpp
Expand Up @@ -4039,7 +4039,7 @@ bool startMultiOptions(bool bReenter)
game.type = SKIRMISH;
sstrcpy(game.map, DEFAULTSKIRMISHMAP);
game.hash = levGetMapNameHash(game.map);
game.maxPlayers = 4;
game.maxPlayers = DEFAULTSKIRMISHMAPMAXPLAYERS;
}

ingame.localOptionsReceived = false;
Expand Down

0 comments on commit 5807d38

Please sign in to comment.