hedgewars/uCollisions.pas
changeset 15631 b2ed495a7fb1
parent 15304 b043b5d5219a
child 15646 c2a1a34d1841
equal deleted inserted replaced
15630:c9fec197335a 15631:b2ed495a7fb1
   528     for i:= 0 to Pred(Count) do
   528     for i:= 0 to Pred(Count) do
   529         with cinfos[i] do
   529         with cinfos[i] do
   530             if  (Gear <> cGear) and
   530             if  (Gear <> cGear) and
   531                 ((mx > x) xor (Dir > 0)) and
   531                 ((mx > x) xor (Dir > 0)) and
   532                 (
   532                 (
   533                   ((cGear^.Kind in [gtHedgehog, gtMine, gtKnife]) and ((Gear^.State and gstNotKickable) = 0)) or
   533                   ((cGear^.Kind in [gtHedgehog, gtMine, gtKnife]) and ((cGear^.State and gstNotKickable) = 0)) or
   534                 // only apply X kick if the barrel is knocked over
   534                 // only apply X kick if the barrel is knocked over
   535                   ((cGear^.Kind = gtExplosives) and ((cGear^.State and gsttmpflag) <> 0))
   535                   ((cGear^.Kind = gtExplosives) and ((cGear^.State and gsttmpflag) <> 0))
   536                 ) and
   536                 ) and
   537                 (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) then
   537                 (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) then
   538                     begin
   538                     begin
   592 
   592 
   593     for i:= 0 to Pred(Count) do
   593     for i:= 0 to Pred(Count) do
   594         with cinfos[i] do
   594         with cinfos[i] do
   595             if (Gear <> cGear) and
   595             if (Gear <> cGear) and
   596                ((myr > y) xor (Dir > 0)) and
   596                ((myr > y) xor (Dir > 0)) and
   597                (Gear^.State and gstNotKickable = 0) and
   597                (cGear^.State and gstNotKickable = 0) and
   598                (cGear^.Kind in [gtHedgehog, gtMine, gtKnife, gtExplosives]) and
   598                (cGear^.Kind in [gtHedgehog, gtMine, gtKnife, gtExplosives]) and
   599                (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) then
   599                (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) then
   600                     begin
   600                     begin
   601                     with cGear^ do
   601                     with cGear^ do
   602                         begin
   602                         begin