hedgewars/uGears.pas
changeset 959 18b05fc2d0a6
parent 958 92bb9fa046f9
child 966 664ae90b5b0c
--- a/hedgewars/uGears.pas	Wed May 28 18:40:42 2008 +0000
+++ b/hedgewars/uGears.pas	Wed May 28 18:54:45 2008 +0000
@@ -605,7 +605,8 @@
 	begin
 		amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType;
 		case amt of
-			amBazooka: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle);
+			amBazooka,
+			amMortar: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle);
 			amRope: DrawRotated(sprHandRope, hx, hy, hwSign(Gear^.dX), aangle);
 			amShotgun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
 			amDEagle: DrawRotated(sprHandDEagle, hx, hy, hwSign(Gear^.dX), aangle);
@@ -821,6 +822,7 @@
                     end;
         gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, (GameTicks shr 6) mod 12);
           gtTarget: DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
+          gtMortar: DrawRotated(sprMortar, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
               end;
       Gear:= Gear^.NextGear
       end;
@@ -989,7 +991,7 @@
 							if (Gear <> nil) and (Gear^.X.QWordValue = 0) then
 								begin
 								FindPlace(Gear, false, t, t + 1024);
-								Gear^.Pos:= GetRandom(19);
+								Gear^.Pos:= GetRandom(19)
 								end;
 		inc(t, 1024)
 		end
@@ -1012,6 +1014,7 @@
 		begin
 		i:= GetRandom(Count);
 		FindPlace(ar[i], false, 0, 2048);
+		ar[i]^.Pos:= GetRandom(19);
 		ar[i]:= ar[Count - 1];
 		dec(Count)
 		end