hedgewars/uCollisions.pas
changeset 3411 30d0d780d605
parent 3408 56e636b83cb4
child 3414 b2f3bb44777e
equal deleted inserted replaced
3410:6748602cb878 3411:30d0d780d605
   208    for i:= 0 to Pred(Count) do
   208    for i:= 0 to Pred(Count) do
   209     with cinfos[i] do
   209     with cinfos[i] do
   210       if (Gear <> cGear) and
   210       if (Gear <> cGear) and
   211          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) and
   211          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) and
   212          ((mx > x) xor (Dir > 0)) then
   212          ((mx > x) xor (Dir > 0)) then
   213          if (cGear^.Kind in [gtHedgehog, gtMine]) and ((Gear^.State and gstNotKickable) = 0) then
   213          if (cGear^.Kind in [gtHedgehog, gtMine, gtExplosives]) and ((Gear^.State and gstNotKickable) = 0) then
   214              begin
   214              begin
   215              with cGear^ do
   215              with cGear^ do
   216                   begin
   216                   begin
   217                   dX:= Gear^.dX;
   217                   dX:= Gear^.dX;
   218                   dY:= Gear^.dY * _0_5;
   218                   dY:= Gear^.dY * _0_5;
   260    for i:= 0 to Pred(Count) do
   260    for i:= 0 to Pred(Count) do
   261     with cinfos[i] do
   261     with cinfos[i] do
   262       if (Gear <> cGear) and
   262       if (Gear <> cGear) and
   263          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) and
   263          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) and
   264          ((my > y) xor (Dir > 0)) then
   264          ((my > y) xor (Dir > 0)) then
   265          if (cGear^.Kind in [gtHedgehog, gtMine]) and ((Gear^.State and gstNotKickable) = 0) then
   265          if (cGear^.Kind in [gtHedgehog, gtMine, gtExplosives]) and ((Gear^.State and gstNotKickable) = 0) then
   266              begin
   266              begin
   267              with cGear^ do
   267              with cGear^ do
   268                   begin
   268                   begin
   269                   dX:= Gear^.dX * _0_5;
   269                   dX:= Gear^.dX * _0_5;
   270                   dY:= Gear^.dY;
   270                   dY:= Gear^.dY;