--- a/QTfrontend/game.cpp Sat Sep 22 16:19:11 2007 +0000
+++ b/QTfrontend/game.cpp Sat Sep 22 17:04:28 2007 +0000
@@ -142,7 +142,7 @@
QTextStream stream(&file);
while(!stream.atEnd())
{
- HWProto::addStringToBuffer(teamscfg, stream.readLine());
+ HWProto::addStringToBuffer(teamscfg, "e" + stream.readLine());
}
RawSendIPC(teamscfg);
--- a/hedgewars/HHHandlers.inc Sat Sep 22 16:19:11 2007 +0000
+++ b/hedgewars/HHHandlers.inc Sat Sep 22 17:04:28 2007 +0000
@@ -184,8 +184,12 @@
if (Gear^.Message and gm_Right )<>0 then Gear^.dX:= cLittle else exit;
StepTicks:= cHHStepTicks;
- if PrevdX <> hwSign(Gear^.dX) then exit;
- DeleteCI(Gear); // after exit!! ^^^^
+ if PrevdX <> hwSign(Gear^.dX) then
+ begin
+ FollowGear:= Gear;
+ exit
+ end;
+ DeleteCI(Gear); // must be after exit!! (see previous line)
PHedgehog(Gear^.Hedgehog)^.visStepPos:= (PHedgehog(Gear^.Hedgehog)^.visStepPos + 1) and 7;
if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
--- a/hedgewars/uTriggers.pas Sat Sep 22 16:19:11 2007 +0000
+++ b/hedgewars/uTriggers.pas Sat Sep 22 17:04:28 2007 +0000
@@ -29,7 +29,7 @@
procedure TickTrigger(id: Longword);
implementation
-uses uGears, uFloat, uMisc;
+uses uGears, uFloat, uMisc, uWorld;
type PTrigger = ^TTrigger;
TTrigger = record
id: Longword;
@@ -69,7 +69,10 @@
begin
with Trigger^ do
case Action of
- taSpawnGear: AddGear(X, Y, SpawnGearType, 0, _0, _0, 0)^.TriggerId:= SpawnGearTriggerId;
+ taSpawnGear: begin
+ FollowGear:= AddGear(X, Y, SpawnGearType, 0, _0, _0, 0);
+ FollowGear^.TriggerId:= SpawnGearTriggerId
+ end
end
end;
--- a/share/hedgewars/Data/Trainings/001_Shotgun.txt Sat Sep 22 16:19:11 2007 +0000
+++ b/share/hedgewars/Data/Trainings/001_Shotgun.txt Sat Sep 22 17:04:28 2007 +0000
@@ -1,14 +1,14 @@
-eseed none
-e$gmflags 268435456
-e$turntime 60000
-emap mushrooms
-etheme avematan
-eammstore 00009000000000000000
-ehhcoords 1310 250
-eaddtrig s2147483649 1 1 33 1100 -100 1
-eaddtrig s1 1 1 33 760 545 2
-eaddtrig s2 1 1 33 1750 460 3
-eaddtrig s3 1 1 33 635 215 4
-eaddtrig s4 1 1 33 1450 275 5
-eaddtrig s5 1 1 33 220 535 6
-eaddtrig s6 1 1 33 1410 505 0
+seed none
+$gmflags 268435456
+$turntime 60000
+map mushrooms
+theme avematan
+ammstore 00009000000000000000
+hhcoords 1310 250
+addtrig s2147483649 1 1 33 1150 310 1
+addtrig s1 1 1 33 760 545 2
+addtrig s2 1 1 33 1750 460 3
+addtrig s3 1 1 33 635 215 4
+addtrig s4 1 1 33 1450 275 5
+addtrig s5 1 1 33 220 535 6
+addtrig s6 1 1 33 1410 505 0