hedgewars/uCollisions.pas
changeset 10635 8e8b320eefad
parent 10551 4eefc711309e
child 10818 f642a28cab0c
equal deleted inserted replaced
10634:35d059bd0932 10635:8e8b320eefad
    95 procedure DeleteCI(Gear: PGear);
    95 procedure DeleteCI(Gear: PGear);
    96 begin
    96 begin
    97 if Gear^.CollisionIndex >= 0 then
    97 if Gear^.CollisionIndex >= 0 then
    98     begin
    98     begin
    99     with cinfos[Gear^.CollisionIndex] do
    99     with cinfos[Gear^.CollisionIndex] do
   100         ChangeRoundInLand(X, Y, Radius - 1, false, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen = 0)));
   100         ChangeRoundInLand(X, Y, Radius - 1, false, ((CurrentHedgehog <> nil) and (Gear = CurrentHedgehog^.Gear)) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen = 0)));
   101     cinfos[Gear^.CollisionIndex]:= cinfos[Pred(Count)];
   101     cinfos[Gear^.CollisionIndex]:= cinfos[Pred(Count)];
   102     cinfos[Gear^.CollisionIndex].cGear^.CollisionIndex:= Gear^.CollisionIndex;
   102     cinfos[Gear^.CollisionIndex].cGear^.CollisionIndex:= Gear^.CollisionIndex;
   103     Gear^.CollisionIndex:= -1;
   103     Gear^.CollisionIndex:= -1;
   104     dec(Count)
   104     dec(Count)
   105     end;
   105     end;