Make explosion look depend less on fps
authorunc0rr
Wed, 24 Oct 2012 12:41:46 +0400
changeset 7808 cc1805cd9138
parent 7807 482b0c751df6
child 7809 7d4fb2f35f4f
Make explosion look depend less on fps
hedgewars/VGSHandlers.inc
--- a/hedgewars/VGSHandlers.inc	Wed Oct 24 04:21:29 2012 +0200
+++ b/hedgewars/VGSHandlers.inc	Wed Oct 24 12:41:46 2012 +0400
@@ -157,10 +157,12 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepExpl(Gear: PVisualGear; Steps: Longword);
+var s: LongInt;
 begin
-Gear^.X:= Gear^.X + Gear^.dX * Steps;
+s:= min(Steps, cExplFrameTicks);
 
-Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
+Gear^.X:= Gear^.X + Gear^.dX * s;
+Gear^.Y:= Gear^.Y + Gear^.dY * s;
 //Gear^.dY:= Gear^.dY + cGravityf;
 
 if Gear^.FrameTicks <= Steps then