just ignore gfDivideTeams if more/less than 2 teams. instead of quitting with fatal error
authorsheepluva
Mon, 13 Jul 2015 06:19:51 +0200
changeset 11005 71927bdb776a
parent 11004 bd62cdbea391
child 11006 cb06b7985261
just ignore gfDivideTeams if more/less than 2 teams. instead of quitting with fatal error
ChangeLog.txt
hedgewars/uGears.pas
--- a/ChangeLog.txt	Sun Jul 12 23:15:39 2015 +0200
+++ b/ChangeLog.txt	Mon Jul 13 06:19:51 2015 +0200
@@ -5,6 +5,7 @@
  + Map previews can now take script parameters into account and preview waypoints in TechRacer
  + Added a couple new flags
  + Small improvements to the interface and in-game chat
+ + Divided teams options will now just be ignored when more/less than 2 teams, instead of displaying a fatal error
  * Generated bridges/girders are now connected better to the land mass
  * Fixed rubberband sprite
  * The game will now fallback to default voicepack if a team's voicepack is not locally installed. (Instead of rendering team voiceless)
--- a/hedgewars/uGears.pas	Sun Jul 12 23:15:39 2015 +0200
+++ b/hedgewars/uGears.pas	Mon Jul 13 06:19:51 2015 +0200
@@ -723,7 +723,7 @@
 begin
 if (GameFlags and gfPlaceHog) <> 0 then
     PlacingHogs:= true;
-if (GameFlags and gfDivideTeams) <> 0 then
+if (ClansCount = 2) and ((GameFlags and gfDivideTeams) <> 0) then
     begin
     t:= 0;
     TryDo(ClansCount = 2, 'More or less than 2 clans on map in divided teams mode!', true);