# HG changeset patch # User unc0rr # Date 1289138508 -10800 # Node ID 043c17a8b3ca6705f7c152ecf4596ad2a9cab636 # Parent 64e677349124e2e6c7aae902aba84554c0450c73 Don't call getrandom() from parameters to a function. The order of calls is undefined, so desyncs are probable. diff -r 64e677349124 -r 043c17a8b3ca hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Nov 07 16:41:03 2010 +0300 +++ b/hedgewars/GSHandlers.inc Sun Nov 07 17:01:48 2010 +0300 @@ -422,7 +422,11 @@ begin doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound); for i:= 0 to 2 do - AddGear(int64(hwRound(Gear^.X)) - 30 + GetRandom(60), int64(hwRound(Gear^.Y)) - 20 + GetRandom(40), gtPoisonCloud, 0, _0, _0, 0); + begin + x:= GetRandom(60); + y:= GetRandom(40); + AddGear(hwRound(Gear^.X) - 30 + x, hwRound(Gear^.Y) - 20 + y, gtPoisonCloud, 0, _0, _0, 0); + end end; end; DeleteGear(Gear);