--- 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;