Make basic training solvable again. Freeze RNG at current version for less of this kind of issue in future, and a bit more savable of seeds. Disable offsets in preparation for release.
authornemo
Fri, 24 Dec 2010 11:54:34 -0500
changeset 4665 fa7ad5f3725f
parent 4664 debfdc340e68
child 4666 34551d8639cf
Make basic training solvable again. Freeze RNG at current version for less of this kind of issue in future, and a bit more savable of seeds. Disable offsets in preparation for release.
hedgewars/uRandom.pas
hedgewars/uUtils.pas
share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua
--- a/hedgewars/uRandom.pas	Fri Dec 24 10:04:01 2010 -0500
+++ b/hedgewars/uRandom.pas	Fri Dec 24 11:54:34 2010 -0500
@@ -58,7 +58,7 @@
     cirbuf[i]:= byte(Seed[i + 1]);
 
 for i:= Length(Seed) to 54 do
-    cirbuf[i]:= $A98765 + (cNetProtoVersion * 2); // odd number
+    cirbuf[i]:= $A98765 + 68; // odd number
 
 for i:= 0 to 1023 do GetNext
 end;
--- a/hedgewars/uUtils.pas	Fri Dec 24 10:04:01 2010 -0500
+++ b/hedgewars/uUtils.pas	Fri Dec 24 11:54:34 2010 -0500
@@ -277,18 +277,22 @@
 
 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
 begin
+    GetLaunchX:= 0
+(*
     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
         GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
     else
-        GetLaunchX:= 0
+        GetLaunchX:= 0 *)
 end;
 
 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
 begin
+    GetLaunchY:= 0
+(*
     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
         GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
     else
-        GetLaunchY:= 0
+        GetLaunchY:= 0*)
 end;
 
 function CheckNoTeamOrHH: boolean;
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Fri Dec 24 10:04:01 2010 -0500
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Fri Dec 24 11:54:34 2010 -0500
@@ -62,7 +62,7 @@
 	-- Things we don't modify here will use their default values.
 
 	-- The base number for the random number generator
-	Seed = 0
+	Seed = 1
 	-- Game settings and rules
 	GameFlags = gfMultiWeapon + gfOneClanMode + gfSolidLand
 	-- The time the player has to move each round (in ms)
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua	Fri Dec 24 10:04:01 2010 -0500
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua	Fri Dec 24 11:54:34 2010 -0500
@@ -66,11 +66,11 @@
 	-- Things we don't modify here will use their default values.
 
 	-- The base number for the random number generator
-	Seed = 0
+	Seed = 1
 	-- Game settings and rules
 	GameFlags = gfMultiWeapon + gfOneClanMode
 	-- The time the player has to move each round (in ms)
-	TurnTime = 25000
+	TurnTime = 30000
 	-- The frequency of crate drops
 	CaseFreq = 0
 	-- The number of mines being placed