hedgewars/uGears.pas
changeset 3112 f1bbe35ddb83
parent 3111 38e0f05afbdb
child 3114 3a3d1ee2ebd0
--- a/hedgewars/uGears.pas	Sat Mar 27 15:41:21 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 27 15:48:59 2010 +0000
@@ -585,7 +585,7 @@
 	begin
 		if Gear^.Kind = gtHedgehog then
 			begin
-            if PHedgehog(Gear^.Hedgehog)^.Poisoned then
+            if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then
                 inc(Gear^.Damage, min(5, max(0,Gear^.Health - 1 - Gear^.Damage)));
             inc(Gear^.Damage, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage)));
             if PHedgehog(Gear^.Hedgehog)^.King then
@@ -917,6 +917,14 @@
 
 sx:= hwRound(Gear^.X) + 1 + WorldDx;
 sy:= hwRound(Gear^.Y) - 3 + WorldDy;
+
+if HH^.Effects[hePoisoned] then
+    begin
+    glColor4f(0.25, 1, 0, 0.25);
+    DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360);
+    glColor4f(1, 1, 1, 1)
+    end;
+
 if ((Gear^.State and gstWinner) <> 0) and
    ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
     begin
@@ -1247,8 +1255,7 @@
                                   cWaterLine+WorldDy,
                                   LongInt(leftX)+WorldDx)
                 end;
-            //amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle);
-            amBee: DrawRotatedF(sprHandBee, hx, hy, 0, hwSign(Gear^.dX), aangle);
+            amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle);
         end;
 
         case amt of
@@ -1429,6 +1436,13 @@
         end
     end;
 
+if HH^.Effects[hePoisoned] then
+    begin
+    glColor4f(0.25, 1, 0, 0.5);
+    DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
+    glColor4f(1, 1, 1, 1)
+    end;
+
 if Gear^.Invulnerable then
     begin
     glColor4f(1, 1, 1, 0.25 + abs(1 - ((RealTicks div 2) mod 1500) / 750));
@@ -1819,11 +1833,10 @@
                                     Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner);
                                 Gear^.Active:= true;
                                 FollowGear:= Gear
-														end;
-
-													if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) then
-														PHedgehog(Gear^.Hedgehog)^.Poisoned := true;
-							end;
+                                end;
+                            if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) then
+                                PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] := true;
+                            end;
 
                         end;
                 gtGrave: begin