--- a/hedgewars/uGears.pas Sun Sep 28 15:55:07 2008 +0000
+++ b/hedgewars/uGears.pas Sun Sep 28 21:56:37 2008 +0000
@@ -650,10 +650,13 @@
if CurAmmoGear <> nil then
begin
case CurAmmoGear^.Kind of
- gtShotgunShot: if (CurAmmoGear^.State and gstAnimation <> 0) then
- DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle)
- else
- DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
+ gtShotgunShot: begin
+ if (CurAmmoGear^.State and gstAnimation <> 0) then
+ DrawRotated(sprShotgun, hx, hy, hwSign(Gear^.dX), aangle)
+ else
+ DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle);
+ HatVisible:= true
+ end;
gtDEagleShot: DrawRotated(sprDEagle, hx, hy, hwSign(Gear^.dX), aangle);
gtRope: begin
if Gear^.X < CurAmmoGear^.X then
@@ -839,7 +842,8 @@
HatVisible:= true;
with PHedgehog(Gear^.Hedgehog)^ do
- if HatVisibility > 0 then
+ if (HatTex <> nil)
+ and (HatVisibility > 0) then
DrawTextureF(HatTex,
HatVisibility,
hwRound(Gear^.X) + 1 + WorldDx,
@@ -909,7 +913,8 @@
if HatVisibility > 0.0 then
HatVisibility:= HatVisibility - 0.2;
- if HatVisibility > 0 then
+ if (HatTex <> nil)
+ and (HatVisibility > 0) then
if DefaultPos then
DrawTextureF(HatTex,
HatVisibility,