# HG changeset patch # User unc0rr # Date 1225042863 0 # Node ID 0855275d443ff926c6c113cfd9d4a82782b563b6 # Parent b510f7a74ef69b4b9dbacf022fdc41bf65e84c38 Support 'Divide teams' option in engine diff -r b510f7a74ef6 -r 0855275d443f QTfrontend/gamecfgwidget.cpp --- a/QTfrontend/gamecfgwidget.cpp Sun Oct 26 17:39:33 2008 +0000 +++ b/QTfrontend/gamecfgwidget.cpp Sun Oct 26 17:41:03 2008 +0000 @@ -86,9 +86,9 @@ quint32 result = 0; if (CB_mode_Forts->isChecked()) - result |= 1; + result |= 0x01; if (CB_teamsDivide->isChecked()) - result |= 1; + result |= 0x10; return result; } diff -r b510f7a74ef6 -r 0855275d443f hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sun Oct 26 17:39:33 2008 +0000 +++ b/hedgewars/uConsts.pas Sun Oct 26 17:41:03 2008 +0000 @@ -171,6 +171,7 @@ gfForts = $00000001; gfMultiWeapon = $00000002; gfSolidLand = $00000004; + gfDivideTeams = $00000010; gfOneClanMode = $10000000; gstDrowning = $00000001; diff -r b510f7a74ef6 -r 0855275d443f hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Oct 26 17:39:33 2008 +0000 +++ b/hedgewars/uGears.pas Sun Oct 26 17:41:03 2008 +0000 @@ -1262,9 +1262,10 @@ ar: array[0..Pred(cMaxHHs)] of PGear; Count: Longword; begin -if (GameFlags and gfForts) <> 0 then +if (GameFlags and (gfForts or gfDivideTeams)) <> 0 then begin t:= 0; + TryDo(ClansCount = 2, 'More or less than 2 clans on map in divided teams mode!', true); for p:= 0 to 1 do begin with ClansArray[p]^ do diff -r b510f7a74ef6 -r 0855275d443f hedgewars/uLand.pas --- a/hedgewars/uLand.pas Sun Oct 26 17:39:33 2008 +0000 +++ b/hedgewars/uLand.pas Sun Oct 26 17:41:03 2008 +0000 @@ -551,7 +551,6 @@ var tmpsurf: PSDL_Surface; begin WriteLnToConsole('Generating forts land...'); -TryDo(ClansCount = 2, 'More or less than 2 clans on map in forts mode!', true); tmpsurf:= LoadImage(Pathz[ptForts] + '/' + ClansArray[0]^.Teams[0]^.FortName + 'L', true, true, true); BlitImageAndGenerateCollisionInfo(0, 0, 1024, tmpsurf);