Fix two desync causes webgl
authorunc0rr
Wed, 08 Jan 2014 00:13:12 +0400
branchwebgl
changeset 9968 7fb2f35bdd5b
parent 9966 01e198990211
child 9970 88353250ad7d
Fix two desync causes
hedgewars/uFloat.pas
hedgewars/uGears.pas
--- a/hedgewars/uFloat.pas	Tue Jan 07 22:08:02 2014 +0400
+++ b/hedgewars/uFloat.pas	Wed Jan 08 00:13:12 2014 +0400
@@ -152,7 +152,7 @@
           _0_999: hwFloat = (isNegative: false; QWordValue:  4290672328);
               _0: hwFloat = (isNegative: false; QWordValue:           0);
               _1: hwFloat = (isNegative: false; QWordValue:  4294967296);
-            _1_2: hwFloat = (isNegative: false; QWordValue:  1288490189*4);
+            _1_2: hwFloat = (isNegative: false; QWordValue:  4294967296 * 6 div 5 + 1);
             _1_5: hwFloat = (isNegative: false; QWordValue:  4294967296 * 3 div 2);
             _1_6: hwFloat = (isNegative: false; QWordValue:  4294967296 * 8 div 5);
             _1_9: hwFloat = (isNegative: false; QWordValue:  8160437862);
--- a/hedgewars/uGears.pas	Tue Jan 07 22:08:02 2014 +0400
+++ b/hedgewars/uGears.pas	Wed Jan 08 00:13:12 2014 +0400
@@ -626,7 +626,11 @@
 
 if (not hasBorder) and cSnow then
     for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do
-        AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LAND_HEIGHT + LongInt(GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0);
+        begin
+        ry:= LAND_HEIGHT + LongInt(GetRandom(750)) - 1300;
+        rx:= LongInt(GetRandom(snowRight - snowLeft)) + snowLeft;
+        AddGear(rx, ry, gtFlake, 0, _0, _0, 0);
+        end
 end;
 
 procedure AssignHHCoords;