SmokeTrace: animation got aborted before last animation frame was displayed
authorsheepluva
Mon, 25 Oct 2010 17:39:50 +0200
changeset 3995 360332f8785f
parent 3994 486da687d76a
child 3996 eb549fd864a5
SmokeTrace: animation got aborted before last animation frame was displayed
hedgewars/VGSHandlers.inc
--- a/hedgewars/VGSHandlers.inc	Sun Oct 24 22:00:36 2010 +0200
+++ b/hedgewars/VGSHandlers.inc	Mon Oct 25 17:39:50 2010 +0200
@@ -516,12 +516,16 @@
 inc(Gear^.Timer, Steps );
 if Gear^.Timer > 64 then
     begin
+    if Gear^.State = 0 then
+      begin
+      DeleteVisualGear(Gear);
+      exit;
+      end;
     dec(Gear^.State, Gear^.Timer div 65);
     Gear^.Timer:= Gear^.Timer mod 65;
     end;
 Gear^.dX:= Gear^.dX + cWindSpeedf * Steps;
 Gear^.X:= Gear^.X + Gear^.dX;
-if Gear^.State = 0 then DeleteVisualGear(Gear);
 end;
 
 ////////////////////////////////////////////////////////////////////////////////