hedgewars/uCollisions.pas
changeset 838 1faae19f2116
parent 542 ec26095f1bed
child 839 1493f697d1bb
equal deleted inserted replaced
837:05e910ef2bf8 838:1faae19f2116
   117         if (hwRound(IntersectGear^.X) + IntersectGear^.Radius < hwRound(X) - Radius) or
   117         if (hwRound(IntersectGear^.X) + IntersectGear^.Radius < hwRound(X) - Radius) or
   118            (hwRound(IntersectGear^.X) - IntersectGear^.Radius > hwRound(X) + Radius) then
   118            (hwRound(IntersectGear^.X) - IntersectGear^.Radius > hwRound(X) + Radius) then
   119            begin
   119            begin
   120            IntersectGear:= nil;
   120            IntersectGear:= nil;
   121            TestWord:= 0
   121            TestWord:= 0
   122            end else    
   122            end else
   123            TestWord:= COLOR_LAND - 1
   123            TestWord:= COLOR_LAND - 1
   124    else TestWord:= 0;
   124    else TestWord:= 0;
   125    
   125 
   126 x:= hwRound(Gear^.X);
   126 x:= hwRound(Gear^.X);
   127 if Dir < 0 then x:= x - Gear^.Radius
   127 if Dir < 0 then x:= x - Gear^.Radius
   128            else x:= x + Gear^.Radius;
   128            else x:= x + Gear^.Radius;
   129 if (x and $FFFFF800) = 0 then
   129 if (x and $FFFFF800) = 0 then
   130    begin
   130    begin