# HG changeset patch # User unc0rr # Date 1210271932 0 # Node ID 1d0022336fbb147306df21db3a886dae850730c4 # Parent 33040b7695c0dfabfb02fe37245a6c2668fbeef5 - Small optimization in hwFloat - Debug message in rndSign to help discover cluster bomb issue diff -r 33040b7695c0 -r 1d0022336fbb hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Thu May 08 18:02:52 2008 +0000 +++ b/hedgewars/uFloat.pas Thu May 08 18:38:52 2008 +0000 @@ -230,7 +230,7 @@ operator < (const z1, z2: hwFloat) b : boolean; begin -if z1.isNegative <> z2.isNegative then +if z1.isNegative xor z2.isNegative then b:= z1.isNegative else if z1.QWordValue = z2.QWordValue then @@ -241,7 +241,7 @@ operator > (const z1, z2: hwFloat) b : boolean; begin -if z1.isNegative <> z2.isNegative then +if z1.isNegative xor z2.isNegative then b:= z2.isNegative else if z1.QWordValue = z2.QWordValue then diff -r 33040b7695c0 -r 1d0022336fbb hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Thu May 08 18:02:52 2008 +0000 +++ b/hedgewars/uMisc.pas Thu May 08 18:38:52 2008 +0000 @@ -346,7 +346,7 @@ {$I+} finalization -uRandom.DumpBuffer; +//uRandom.DumpBuffer; writeln(f, '-= halt at ',GameTicks,' ticks =-'); Flush(f); close(f) diff -r 33040b7695c0 -r 1d0022336fbb hedgewars/uRandom.pas --- a/hedgewars/uRandom.pas Thu May 08 18:02:52 2008 +0000 +++ b/hedgewars/uRandom.pas Thu May 08 18:38:52 2008 +0000 @@ -82,6 +82,7 @@ function rndSign(num: hwFloat): hwFloat; begin num.isNegative:= odd(GetNext); +if num.isNegative then AddFileLog('isNegative TRUE') else AddFileLog('isNegative FALSE'); rndSign:= num end;