This should be ok right?
authornemo
Tue, 12 Sep 2017 08:32:01 -0400
changeset 12455 2660611f8b22
parent 12454 a675a94b5cc1
child 12456 3827fd64bb58
This should be ok right?
hedgewars/hwengine.pas
hedgewars/uScript.pas
--- a/hedgewars/hwengine.pas	Mon Sep 11 14:28:58 2017 -0400
+++ b/hedgewars/hwengine.pas	Tue Sep 12 08:32:01 2017 -0400
@@ -80,6 +80,7 @@
                 AddClouds;
             AddFlakes;
             SetRandomSeed(cSeed, false);
+            AddRandomness(CheckSum);
             StoreLoad(false);
             if not allOK then exit;
             AssignHHCoords;
--- a/hedgewars/uScript.pas	Mon Sep 11 14:28:58 2017 -0400
+++ b/hedgewars/uScript.pas	Tue Sep 12 08:32:01 2017 -0400
@@ -3011,9 +3011,9 @@
                         inComment := true
                     // gonna add any non-magic whitespace and skip - just to make comment avoidance easier
                     else if not inComment and (byte(mybuf[i]) > $20) and (byte(mybuf[i]) < $7F) and (mybuf[i]<>'-') then
-                       AddRandomness(byte(mybuf[i]));
+                       CheckSum := CheckSum xor (byte(mybuf[i]) shl (i mod 4));
                     lastChar := mybuf[i];
-                    if inComment and ((byte(mybuf[i]) = $0D) or (byte(mybuf[i]) = $0A)) then
+                    if (byte(mybuf[i]) = $0D) or (byte(mybuf[i]) = $0A) then
                         inComment := false 
                 end;
         end;