hedgewars/uCollisions.pas
changeset 15303 b761efebe3c4
parent 15302 9299f43ba0ec
child 15304 b043b5d5219a
equal deleted inserted replaced
15302:9299f43ba0ec 15303:b761efebe3c4
  1054     p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]));
  1054     p:= PByteArray(@(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]));
  1055     Gear:= GearsList;
  1055     Gear:= GearsList;
  1056 
  1056 
  1057     while Gear <> nil do
  1057     while Gear <> nil do
  1058         begin
  1058         begin
  1059         if (Gear^.Kind = gtAirMine) or ((Gear^.Kind = gtHedgehog) and (Gear^.CollisionIndex = 0)) then
  1059         if (Gear^.Kind in [gtCase, gtExplosives, gtTarget, gtKnife, gtMine, gtAirMine, gtSMine]) or
       
  1060             ((Gear^.Kind = gtHedgehog) and (Gear^.CollisionIndex = 0)) then
  1060             begin
  1061             begin
  1061             gx:= hwRound(Gear^.X);
  1062             gx:= hwRound(Gear^.X);
  1062             gy:= hwRound(Gear^.Y);
  1063             gy:= hwRound(Gear^.Y);
  1063             r:= Gear^.Radius + 1;
  1064             r:= Gear^.Radius + 1;
  1064             if (gx + r >= sprX) and (gx - r < sprX + w) and (gy + r >= sprY) and (gy - r < sprY + h) then
  1065             if (gx + r >= sprX) and (gx - r < sprX + w) and (gy + r >= sprY) and (gy - r < sprY + h) then