hedgewars/uGears.pas
changeset 1792 c30c6944bd49
parent 1784 dfe9bafb4590
child 1794 8ae48e3b02d9
--- a/hedgewars/uGears.pas	Sat Feb 14 16:25:58 2009 +0000
+++ b/hedgewars/uGears.pas	Sat Feb 14 16:30:22 2009 +0000
@@ -422,7 +422,6 @@
 function CheckNoDamage: boolean; // returns TRUE in case of no damaged hhs
 var Gear: PGear;
 begin
-SweepDirty; // convenient place to clean up pixels after damage is run 
 CheckNoDamage:= true;
 Gear:= GearsList;
 while Gear <> nil do
@@ -494,7 +493,14 @@
 		if delay = 0 then
 			inc(step)
 		end;
-	stChDmg: if CheckNoDamage then inc(step) else step:= stDelay;
+	stChDmg: begin
+			if CheckNoDamage then inc(step) else step:= stDelay;
+			if SweepDirty then
+				begin
+				SetAllToActive;
+				step:= stChDmg
+				end;
+			end;
 	stTurnReact: begin
 		if (not bBetweenTurns) and (not isInMultiShoot) then
 			begin
@@ -1367,7 +1373,10 @@
 					inc(Count)
 					end;
 		end;
-
+    // unC0Rr, while it is true user can watch value on map screen, IMO this (and check above) should be enforced in UI
+    // - is there a good place to put values for the different widgets to check?  Right now they are kind of disconnected.
+    //it'd be nice if divide teams, forts mode and hh per map could all be checked by the team widget, or maybe disable start button
+	TryDo(Count <= MaxHedgehogs, 'Too many hedgehogs for this map!', true);
 	while (Count > 0) do
 		begin
 		i:= GetRandom(Count);