hedgewars/uGears.pas
changeset 3415 1ca22b3493e9
parent 3407 dcc129c4352e
child 3422 41ae3c48faa0
equal deleted inserted replaced
3414:b2f3bb44777e 3415:1ca22b3493e9
    58             IntersectGear: PGear;
    58             IntersectGear: PGear;
    59             FlightTime: Longword;
    59             FlightTime: Longword;
    60             uid: Longword;
    60             uid: Longword;
    61             ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
    61             ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
    62             nImpactSounds: Word; // count of ImpactSounds
    62             nImpactSounds: Word; // count of ImpactSounds
    63             SoundChannel: LongInt
    63             SoundChannel: LongInt;
       
    64             PortedCounter: LongWord // TEMPORARY. To break portal loops pending handling it w/ something a bit saner.
    64         end;
    65         end;
    65 
    66 
    66 var AllInactive: boolean;
    67 var AllInactive: boolean;
    67     PrvInactive: boolean;
    68     PrvInactive: boolean;
    68     CurAmmoGear: PGear;
    69     CurAmmoGear: PGear;
   856                   end;
   857                   end;
   857     iterator:= GearsList;
   858     iterator:= GearsList;
   858     tmpGear:= nil;
   859     tmpGear:= nil;
   859     while iterator <> nil do
   860     while iterator <> nil do
   860         begin
   861         begin
       
   862         iterator^.PortedCounter:= 0;
   861         if (iterator^.Kind = gtPortal) then 
   863         if (iterator^.Kind = gtPortal) then 
   862             begin
   864             begin
   863             tmpGear:= iterator;
   865             tmpGear:= iterator;
   864             if iterator^.NextGear <> nil then iterator:= iterator^.NextGear;
   866             if iterator^.NextGear <> nil then iterator:= iterator^.NextGear;
   865             DeleteGear(tmpGear)
   867             DeleteGear(tmpGear)