hedgewars/uTriggers.pas
changeset 610 9b5a6200f667
parent 595 5ee863f2f568
child 613 e8cf72d0e0f7
--- 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;