merge
authorkoda
Wed, 06 Mar 2013 03:49:52 +0100
changeset 8663 25b35de44234
parent 8662 bfcc09f2accc (current diff)
parent 8658 e7df553193ba (diff)
child 8664 6204ac0293b4
merge
--- a/hedgewars/uGearsHedgehog.pas	Wed Mar 06 03:46:22 2013 +0100
+++ b/hedgewars/uGearsHedgehog.pas	Wed Mar 06 03:49:52 2013 +0100
@@ -1010,13 +1010,10 @@
     Hedgehog: PHedgehog;
 begin
 Hedgehog:= HHGear^.Hedgehog;
-//if isInMultiShoot and not AllInactive and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then HHGear^.Message:= HHGear^.Message and not gmAttack;
-if isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then
-    begin
-    AllInactive:= true;
-    HHGear^.Message:= 0
-    end
-else AllInactive:= false;
+if not isInMultiShoot then
+    AllInactive:= false
+else if Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle] then
+    HHGear^.Message:= 0;
 
 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
     begin
--- a/hedgewars/uGearsRender.pas	Wed Mar 06 03:46:22 2013 +0100
+++ b/hedgewars/uGearsRender.pas	Wed Mar 06 03:49:52 2013 +0100
@@ -242,7 +242,7 @@
     HatVisible:= false;
 
     if HH^.Effects[heFrozen] > 0 then
-        if HH^.Effects[heFrozen] < 256 then
+        if HH^.Effects[heFrozen] < 150000 then
             begin
             DrawHedgehog(sx, sy,
                     sign,
@@ -250,7 +250,9 @@
                     0,
                     0);
             defaultPos:= false;
-            HatVisible:= true
+            if HH^.Effects[heFrozen] < 256 then
+                 HatVisible:= true
+            else HatVisible:= false
             end
         else 
             begin
@@ -260,8 +262,7 @@
                     4,
                     0);
             defaultPos:= false;
-            HatVisible:= false;
-            exit
+            HatVisible:= false
             end;
 
 
@@ -944,11 +945,12 @@
         DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
         end;
 
-    if HH^.Effects[heFrozen] = HH^.Effects[heFrozen] and $FF then
+    if HH^.Effects[heFrozen] < 150000 then
         begin
-       /// Tint($00, $FF, $40, $40);  (HH^.Effects[heFrozen] and $FF)
-        iceOffset:= trunc(HH^.Effects[heFrozen] / 256 * 64);
-        Tint($FF, $FF, $FF, $FF);        
+        if HH^.Effects[heFrozen] < 150000 then
+            Tint($FF, $FF, $FF, min(255,127+HH^.Effects[heFrozen] div 1200));
+
+        iceOffset:= trunc(min(256,HH^.Effects[heFrozen]) / 256 * 64);
         r.x := 128;
         r.y := 128 - iceOffset;
         r.w := 64;
@@ -956,7 +958,8 @@
         //DrawTextureFromRect(sx-32, sy-iceoffset+32, @r, SpritesData[sprFrozenHog].texture);
         DrawTextureFromRectDir(sx-16+sign*2, sy+48-iceoffset, r.w, r.h, @r, HHTexture, sign);
 
-        Tint($FF, $FF, $FF, $FF);
+        if HH^.Effects[heFrozen] < 150000 then
+            Tint($FF, $FF, $FF, $FF);
         end;