hedgewars/uCollisions.pas
changeset 15304 b043b5d5219a
parent 15303 b761efebe3c4
child 15631 b2ed495a7fb1
equal deleted inserted replaced
15303:b761efebe3c4 15304:b043b5d5219a
  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 in [gtCase, gtExplosives, gtTarget, gtKnife, gtMine, gtAirMine, gtSMine]) or
  1059         if (Gear^.Kind = gtAirMine) or
  1060             ((Gear^.Kind = gtHedgehog) and (Gear^.CollisionIndex = 0)) then
  1060             ((Gear^.Kind in [gtCase, gtExplosives, gtTarget, gtKnife, gtMine, gtHedgehog, gtSMine]) and (Gear^.CollisionIndex = -1)) then
  1061             begin
  1061             begin
  1062             gx:= hwRound(Gear^.X);
  1062             gx:= hwRound(Gear^.X);
  1063             gy:= hwRound(Gear^.Y);
  1063             gy:= hwRound(Gear^.Y);
  1064             r:= Gear^.Radius + 1;
  1064             r:= Gear^.Radius + 1;
  1065             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