hedgewars/uGears.pas
changeset 1294 50198e5c7f02
parent 1286 a02a5345b91e
child 1295 27bec661581c
equal deleted inserted replaced
1293:5943efa67299 1294:50198e5c7f02
   648 	aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
   648 	aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
   649 
   649 
   650 	if CurAmmoGear <> nil then
   650 	if CurAmmoGear <> nil then
   651 	begin
   651 	begin
   652 		case CurAmmoGear^.Kind of
   652 		case CurAmmoGear^.Kind of
   653 			gtShotgunShot: if (CurAmmoGear^.State and gstAnimation <> 0) then
   653 			gtShotgunShot: begin
   654 					DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle)
   654 					if (CurAmmoGear^.State and gstAnimation <> 0) then
   655 				else
   655 						DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle)
   656 					DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
   656 					else
       
   657 						DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
       
   658 					HatVisible:= true
       
   659 				end;
   657 			gtDEagleShot: DrawRotated(sprDEagle, hx, hy, hwSign(Gear^.dX), aangle);
   660 			gtDEagleShot: DrawRotated(sprDEagle, hx, hy, hwSign(Gear^.dX), aangle);
   658 			gtRope: begin
   661 			gtRope: begin
   659 				if Gear^.X < CurAmmoGear^.X then
   662 				if Gear^.X < CurAmmoGear^.X then
   660 					begin
   663 					begin
   661 					dAngle:= 0;
   664 					dAngle:= 0;
   837 				4,
   840 				4,
   838 				0);
   841 				0);
   839 			
   842 			
   840 			HatVisible:= true;
   843 			HatVisible:= true;
   841 			with PHedgehog(Gear^.Hedgehog)^ do
   844 			with PHedgehog(Gear^.Hedgehog)^ do
   842 				if HatVisibility > 0 then
   845 				if (HatTex <> nil)
       
   846 				and (HatVisibility > 0) then
   843 					DrawTextureF(HatTex,
   847 					DrawTextureF(HatTex,
   844 						HatVisibility,
   848 						HatVisibility,
   845 						hwRound(Gear^.X) + 1 + WorldDx,
   849 						hwRound(Gear^.X) + 1 + WorldDx,
   846 						hwRound(Gear^.Y) - 8 + WorldDy,
   850 						hwRound(Gear^.Y) - 8 + WorldDy,
   847 						0,
   851 						0,
   907 		else
   911 		else
   908 	else
   912 	else
   909 		if HatVisibility > 0.0 then
   913 		if HatVisibility > 0.0 then
   910 			HatVisibility:= HatVisibility - 0.2;
   914 			HatVisibility:= HatVisibility - 0.2;
   911 	
   915 	
   912 	if HatVisibility > 0 then
   916 	if (HatTex <> nil)
       
   917 	and (HatVisibility > 0) then
   913 		if DefaultPos then
   918 		if DefaultPos then
   914 			DrawTextureF(HatTex,
   919 			DrawTextureF(HatTex,
   915 				HatVisibility,
   920 				HatVisibility,
   916 				hwRound(Gear^.X) + 1 + WorldDx,
   921 				hwRound(Gear^.X) + 1 + WorldDx,
   917 				hwRound(Gear^.Y) - 8 + WorldDy,
   922 				hwRound(Gear^.Y) - 8 + WorldDy,