hedgewars/HHHandlers.inc
changeset 2024 2985f3bd18b7
parent 2023 41d3afaa20c7
child 2040 7c366fc3c099
equal deleted inserted replaced
2023:41d3afaa20c7 2024:2985f3bd18b7
   346          if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _1;
   346          if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _1;
   347       if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX))
   347       if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX))
   348          or   TestCollisionYwithGear(Gear, -1)) then
   348          or   TestCollisionYwithGear(Gear, -1)) then
   349          begin
   349          begin
   350          Gear^.dY:= -_0_15;
   350          Gear^.dY:= -_0_15;
   351          Gear^.dX:= SignAs(_0_15, Gear^.dX);
   351          if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX);
   352          Gear^.State:= Gear^.State or gstMoving or gstHHJumping;
   352          Gear^.State:= Gear^.State or gstMoving or gstHHJumping;
   353          PlaySound(sndJump1, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
   353          PlaySound(sndJump1, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
   354          exit
   354          exit
   355          end;
   355          end;
   356       end;
   356       end;
   630 			PlaySound(sndJump2, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
   630 			PlaySound(sndJump2, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
   631 			end;
   631 			end;
   632 	
   632 	
   633 	Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump);
   633 	Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump);
   634 
   634 
   635 	if wasJumping and
   635 	if (not cArtillery) and wasJumping and
   636 		TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX);
   636 		TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX);
   637 
   637 
   638 	doStepHedgehogMoving(Gear);
   638 	doStepHedgehogMoving(Gear);
   639 
   639 
   640 	if ((Gear^.State and (gstMoving or gstDrowning)) = 0) then
   640 	if ((Gear^.State and (gstMoving or gstDrowning)) = 0) then