Normalize to length of _1_9 to avoid endless normalization leading to fire particles floating midair indefinitely
authorunc0rr
Mon, 08 Dec 2014 23:00:13 +0300
changeset 10642 8fdfa2b77d83
parent 10641 802589828f99
child 10643 8d6063af793a
Normalize to length of _1_9 to avoid endless normalization leading to fire particles floating midair indefinitely
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Mon Dec 08 14:52:56 2014 -0500
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Dec 08 23:00:13 2014 +0300
@@ -2171,7 +2171,7 @@
         then
         begin
             // norm speed vector to length of 2 for fire particles to keep flying in the same direction
-            f:= _2 / Distance(Gear^.dX, Gear^.dY);
+            f:= _1_9 / Distance(Gear^.dX, Gear^.dY);
             Gear^.dX:= Gear^.dX * f;
             Gear^.dY:= Gear^.dY * f;
         end