hedgewars/uCollisions.pas
changeset 967 8be3938d73c2
parent 906 1cc10dde304c
child 1066 1f1b3686a2b0
equal deleted inserted replaced
966:664ae90b5b0c 967:8be3938d73c2
   192 TestCollisionXKick:= flag;
   192 TestCollisionXKick:= flag;
   193 
   193 
   194 if flag then
   194 if flag then
   195    begin
   195    begin
   196    if hwAbs(Gear^.dX) < cHHKick then exit;
   196    if hwAbs(Gear^.dX) < cHHKick then exit;
       
   197    if (Gear^.State and gstHHJumping <> 0)
       
   198    and (hwAbs(Gear^.dX) < _0_4) then exit;
       
   199 
   197    mx:= hwRound(Gear^.X);
   200    mx:= hwRound(Gear^.X);
   198    my:= hwRound(Gear^.Y);
   201    my:= hwRound(Gear^.Y);
   199 
   202 
   200    for i:= 0 to Pred(Count) do
   203    for i:= 0 to Pred(Count) do
   201     with cinfos[i] do
   204     with cinfos[i] do
   240 TestCollisionYKick:= flag;
   243 TestCollisionYKick:= flag;
   241 
   244 
   242 if flag then
   245 if flag then
   243    begin
   246    begin
   244    if hwAbs(Gear^.dY) < cHHKick then exit(true);
   247    if hwAbs(Gear^.dY) < cHHKick then exit(true);
       
   248    if (Gear^.State and gstHHJumping <> 0)
       
   249    and (not Gear^.dY.isNegative)
       
   250    and (Gear^.dY < _0_4) then exit;
       
   251 
   245    mx:= hwRound(Gear^.X);
   252    mx:= hwRound(Gear^.X);
   246    my:= hwRound(Gear^.Y);
   253    my:= hwRound(Gear^.Y);
   247 
   254 
   248    for i:= 0 to Pred(Count) do
   255    for i:= 0 to Pred(Count) do
   249     with cinfos[i] do
   256     with cinfos[i] do