hedgewars/uGears.pas
changeset 1014 3c7d4e7ccdff
parent 1013 17148964400d
child 1020 2cbffbc0dc70
equal deleted inserted replaced
1013:17148964400d 1014:3c7d4e7ccdff
   709 		end;
   709 		end;
   710 
   710 
   711 		defaultPos:= false
   711 		defaultPos:= false
   712 	end
   712 	end
   713 end else // not gstHHDriven
   713 end else // not gstHHDriven
   714 if (Gear^.Damage > 0)
   714 	begin
   715 and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
   715 	if (Gear^.Damage > 0)
   716 	begin
   716 	and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
   717 	DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
   717 		begin
   718 		hwSign(Gear^.dX),
       
   719 		2,
       
   720 		1,
       
   721 		Gear^.DirAngle);
       
   722 	defaultPos:= false
       
   723 	end;
       
   724 if ((Gear^.State and gstHHJumping) <> 0) then
       
   725 	begin
       
   726 	if ((Gear^.State and gstHHHJump) <> 0) then
       
   727 		DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
       
   728 			- hwSign(Gear^.dX),
       
   729 			1,
       
   730 			1,
       
   731 			0)
       
   732 		else
       
   733 		DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
   718 		DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
   734 			hwSign(Gear^.dX),
   719 			hwSign(Gear^.dX),
       
   720 			2,
   735 			1,
   721 			1,
   736 			1,
   722 			Gear^.DirAngle);
   737 			0);
       
   738 		defaultPos:= false
   723 		defaultPos:= false
       
   724 		end;
       
   725 
       
   726 	if ((Gear^.State and gstHHJumping) <> 0) then
       
   727 		begin
       
   728 		if ((Gear^.State and gstHHHJump) <> 0) then
       
   729 			DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
       
   730 				- hwSign(Gear^.dX),
       
   731 				1,
       
   732 				1,
       
   733 				0)
       
   734 			else
       
   735 			DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
       
   736 				hwSign(Gear^.dX),
       
   737 				1,
       
   738 				1,
       
   739 				0);
       
   740 			defaultPos:= false
       
   741 		end;
   739 	end;
   742 	end;
   740 
   743 
   741 
   744 
   742 if defaultPos then
   745 if defaultPos then
   743 	begin
   746 	begin