hedgewars/uGearsList.pas
changeset 10625 125e120165aa
parent 10589 98ea597e5cd9
child 10634 35d059bd0932
--- a/hedgewars/uGearsList.pas	Thu Dec 04 11:19:38 2014 -0500
+++ b/hedgewars/uGearsList.pas	Thu Dec 04 20:15:03 2014 +0100
@@ -285,7 +285,12 @@
                             dx := -dx
                         end;
                     State:= State or gstInvisible;
-                    Health:= random(vobFrameTicks);
+                    // use health field to store current frameticks
+                    if vobFrameTicks > 0 then
+                        Health:= random(vobFrameTicks)
+                    else
+                        Health:= 0;
+                    // use timer to store currently displayed frame index
                     if gear^.Timer = 0 then Timer:= random(vobFramesCount);
                     Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8;
                     Tint:= ((ExplosionBorderColor and RMask) shl RShift) or