hedgewars/uGears.pas
changeset 595 5ee863f2f568
parent 593 1f5e66379a43
child 601 78a68cc4d846
equal deleted inserted replaced
594:221ffeb92f30 595:5ee863f2f568
    47              CollisionIndex: LongInt;
    47              CollisionIndex: LongInt;
    48              Tag: LongInt;
    48              Tag: LongInt;
    49              Surf: PSDL_Surface;
    49              Surf: PSDL_Surface;
    50              Z: Longword;
    50              Z: Longword;
    51              IntersectGear: PGear;
    51              IntersectGear: PGear;
       
    52              TriggerId: Longword;
    52              end;
    53              end;
    53 
    54 
    54 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
    55 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
    55 procedure ProcessGears;
    56 procedure ProcessGears;
    56 procedure SetAllToActive;
    57 procedure SetAllToActive;
   330       PHedgehog(Gear^.Hedgehog)^.Gear:= nil;
   331       PHedgehog(Gear^.Hedgehog)^.Gear:= nil;
   331       inc(KilledHHs);
   332       inc(KilledHHs);
   332       RecountTeamHealth(team);
   333       RecountTeamHealth(team);
   333       end;
   334       end;
   334 {$IFDEF DEBUGFILE}AddFileLog('DeleteGear');{$ENDIF}
   335 {$IFDEF DEBUGFILE}AddFileLog('DeleteGear');{$ENDIF}
       
   336 if Gear^.TriggerId <> 0 then TickTrigger(Gear^.TriggerId);
   335 if CurAmmoGear = Gear then CurAmmoGear:= nil;
   337 if CurAmmoGear = Gear then CurAmmoGear:= nil;
   336 if FollowGear = Gear then FollowGear:= nil;
   338 if FollowGear = Gear then FollowGear:= nil;
   337 RemoveGearFromList(Gear);
   339 RemoveGearFromList(Gear);
   338 Dispose(Gear)
   340 Dispose(Gear)
   339 end;
   341 end;