yeah. this was a bad idea. the minor difference in thaw speed vs last hog of team never unthawing.
authornemo
Wed, 06 Mar 2013 19:50:25 -0500
changeset 8681 d0fc1dca739c
parent 8680 5fe344cc8610
child 8682 158d7b36b18e
child 8683 45a976bf9ca4
yeah. this was a bad idea. the minor difference in thaw speed vs last hog of team never unthawing.
hedgewars/uGearsRender.pas
hedgewars/uTeams.pas
--- a/hedgewars/uGearsRender.pas	Wed Mar 06 17:06:35 2013 -0500
+++ b/hedgewars/uGearsRender.pas	Wed Mar 06 19:50:25 2013 -0500
@@ -759,7 +759,7 @@
 
     end else // not gstHHDriven
         begin
-        if (Gear^.Damage > 0)
+        if (Gear^.Damage > 0) and (HH^.Effects[heFrozen] = 0)
         and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
             begin
             DrawHedgehog(sx, sy,
@@ -948,7 +948,7 @@
     if HH^.Effects[heFrozen] < 150000 then
         begin
         if HH^.Effects[heFrozen] < 150000 then
-            Tint($FF, $FF, $FF, min(255,127+HH^.Effects[heFrozen] div 1200));
+            Tint($FF, $FF, $FF, min(255,127+HH^.Effects[heFrozen] div 800));
 
         iceOffset:= trunc(min(256,HH^.Effects[heFrozen]) / 256 * 64);
         r.x := 128;
--- a/hedgewars/uTeams.pas	Wed Mar 06 17:06:35 2013 -0500
+++ b/hedgewars/uTeams.pas	Wed Mar 06 19:50:25 2013 -0500
@@ -110,7 +110,7 @@
 end;
 
 procedure SwitchHedgehog;
-var c: LongWord;
+var c, i, j: LongWord;
     PrevHH, PrevTeam : LongWord;
 begin
 TargetPoint.X:= NoPointX;
@@ -173,7 +173,15 @@
     if c = ClansCount then
         begin
         if not PlacingHogs then
+            begin
             inc(TotalRounds);
+            for i:= 0 to Pred(TeamsCount) do
+                with TeamsArray[i]^ do
+                    for j:= 0 to Pred(HedgehogsNumber) do
+                        with Hedgehogs[j] do
+                            if Effects[heFrozen] > 255 then
+                                Effects[heFrozen]:= max(255,Effects[heFrozen]-50000)
+            end;
         c:= 0
         end;
 
@@ -239,13 +247,6 @@
     end;
 
 inc(CurrentTeam^.Clan^.TurnNumber);
-with CurrentTeam^.Clan^ do
-    for t:= 0 to Pred(TeamsNumber) do
-        with Teams[t]^ do
-            for i:= 0 to Pred(HedgehogsNumber) do
-                with Hedgehogs[i] do
-                    if Effects[heFrozen] > 255 then
-                        Effects[heFrozen]:= max(255,Effects[heFrozen]-50000);
 
 CurWeapon:= GetCurAmmoEntry(CurrentHedgehog^);
 if CurWeapon^.Count = 0 then