Try out "tumbling" frame as a drowning frame
authornemo
Sat, 06 Mar 2010 21:56:43 +0000
changeset 2964 312e74a21603
parent 2963 0f0789204802
child 2965 2a8c76b23e2c
Try out "tumbling" frame as a drowning frame
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sat Mar 06 21:32:04 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 06 21:56:43 2010 +0000
@@ -1590,10 +1590,14 @@
                                         end;
                          end;
       gtExplosives: begin
-                    i:= (GameTicks shr 6 + Gear^.uid*3) mod 64;
-                    if i > 18 then i:= 0;
-                    if Gear^.State and gstAnimation = 0 then
+                    if ((Gear^.State and gstDrowning) <> 0) then
+                        DrawSprite(sprExplosivesRoll, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, 0)
+                    else if Gear^.State and gstAnimation = 0 then
+                        begin
+                        i:= (GameTicks shr 6 + Gear^.uid*3) mod 64;
+                        if i > 18 then i:= 0;
                         DrawSprite(sprExplosives, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, i)
+                        end
                     else if Gear^.State and gsttmpFlag = 0 then
                         DrawRotatedF(sprExplosivesRoll, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) +4 + WorldDy, 0, 0, Gear^.DirAngle)
                     else