hedgewars/uGears.pas
changeset 2813 25213bcab42f
parent 2811 4cad87e11bf6
child 2814 71e80c6e74bb
equal deleted inserted replaced
2812:0a24853de796 2813:25213bcab42f
   851 defaultPos:= true;
   851 defaultPos:= true;
   852 HatVisible:= false;
   852 HatVisible:= false;
   853 
   853 
   854 sx:= hwRound(Gear^.X) + 1 + WorldDx;
   854 sx:= hwRound(Gear^.X) + 1 + WorldDx;
   855 sy:= hwRound(Gear^.Y) - 3 + WorldDy;
   855 sy:= hwRound(Gear^.Y) - 3 + WorldDy;
       
   856 if ((Gear^.State and gstWinner) <> 0) and
       
   857    ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
       
   858 	begin
       
   859 	DrawHedgehog(sx, sy,
       
   860 			hwSign(Gear^.dX),
       
   861 			2,
       
   862 			0,
       
   863 			0);
       
   864 	defaultPos:= false
       
   865 	end;
   856 if (Gear^.State and gstDrowning) <> 0 then
   866 if (Gear^.State and gstDrowning) <> 0 then
   857 	begin
   867 	begin
   858 	DrawHedgehog(sx, sy,
   868 	DrawHedgehog(sx, sy,
   859 			hwSign(Gear^.dX),
   869 			hwSign(Gear^.dX),
   860 			1,
   870 			1,
   861 			7,
   871 			7,
   862 			0);
       
   863 	defaultPos:= false
       
   864 	end else
       
   865 if ((Gear^.State and gstWinner) <> 0) and
       
   866    ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
       
   867 	begin
       
   868 	DrawHedgehog(sx, sy,
       
   869 			hwSign(Gear^.dX),
       
   870 			2,
       
   871 			0,
       
   872 			0);
   872 			0);
   873 	defaultPos:= false
   873 	defaultPos:= false
   874 	end else
   874 	end else
   875 if (Gear^.State and gstLoser) <> 0 then // for now using the jackhammer for its kind of bemused "oops" look
   875 if (Gear^.State and gstLoser) <> 0 then // for now using the jackhammer for its kind of bemused "oops" look
   876 	begin
   876 	begin
   991 					hAngle:= 0;
   991 					hAngle:= 0;
   992 					i:= -1
   992 					i:= -1
   993 					end;
   993 					end;
   994                 sx:= hwRound(Gear^.X) + WorldDx;
   994                 sx:= hwRound(Gear^.X) + WorldDx;
   995                 sy:= hwRound(Gear^.Y) + WorldDy;
   995                 sy:= hwRound(Gear^.Y) + WorldDy;
   996 				DrawHedgehog(sx, sy,
   996                if ((Gear^.State and gstWinner) = 0) then
   997 						i,
   997                    begin
   998 						1,
   998                    DrawHedgehog(sx, sy,
   999 						0,
   999                            i,
  1000 						DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
  1000                            1,
  1001 				with PHedgehog(Gear^.Hedgehog)^ do
  1001                            0,
  1002 					if (HatTex <> nil) then
  1002                            DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
  1003 						DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, 32,
  1003                    with PHedgehog(Gear^.Hedgehog)^ do
  1004 							i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
  1004                        if (HatTex <> nil) then
  1005 				
  1005                            DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, 32,
       
  1006                                i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
       
  1007                    end;
  1006 				DrawAltWeapon(Gear, sx, sy);
  1008 				DrawAltWeapon(Gear, sx, sy);
  1007 				defaultPos:= false
  1009 				defaultPos:= false
  1008 				end;
  1010 				end;
  1009 			gtBlowTorch: begin
  1011 			gtBlowTorch: begin
  1010 				DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle);
  1012 				DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle);