I a recent commit I caused flames to use uninitialized values. that lead to fire burning slow and desyncs. this commit fixes/reverts this
authorsheepluva
Wed, 13 Aug 2014 13:36:35 +0200
changeset 10379 caa5b40e405b
parent 10378 c2b976d6c4f1
child 10380 07ae8fd1d7d4
I a recent commit I caused flames to use uninitialized values. that lead to fire burning slow and desyncs. this commit fixes/reverts this
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Tue Aug 12 17:58:36 2014 +0400
+++ b/hedgewars/uGearsHandlersMess.pas	Wed Aug 13 13:36:35 2014 +0200
@@ -2197,7 +2197,8 @@
             Gear^.Y:= Gear^.Y+_6;
             if (landPixel and lfIce <> 0) or (TestCollisionYwithGear(Gear, 1) and lfIce <> 0) then
                 begin
-                gY := gy-6;
+                gX := hwRound(Gear^.X);
+                gY := hwRound(Gear^.Y) - 6;
                 DrawExplosion(gX, gY, 4);
                 PlaySound(sndVaporize);
                 AddVisualGear(gX - 3 + Random(6), gY - 2, vgtSteam);
@@ -2227,6 +2228,8 @@
             end
         else
             begin
+            gX := hwRound(Gear^.X);
+            gY := hwRound(Gear^.Y);
             // Standard fire
             if not sticky then
                 begin
@@ -2276,6 +2279,8 @@
         end;
     if Gear^.Health = 0 then
         begin
+        gX := hwRound(Gear^.X);
+        gY := hwRound(Gear^.Y);
         if not sticky then
             begin
             if ((GameTicks and $3) = 0) and (Random(1) = 0) then