# HG changeset patch
# User nemo
# Date 1288487215 14400
# Node ID 3ed9573bcf5ee6885208933e9bf7de92243aae7c
# Parent  e03b6be88b4969a3d126106996b78604e07950ae
Only set zombie hat if the hog didn't have a hat.  I'm keeping my dinos dammit!

diff -r e03b6be88b49 -r 3ed9573bcf5e hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sun Oct 31 01:20:44 2010 +0200
+++ b/hedgewars/GSHandlers.inc	Sat Oct 30 21:06:55 2010 -0400
@@ -4149,10 +4149,13 @@
                 DeleteGear(graves[i]);
                 RenderHealth(PHedgehog(resgear^.Hedgehog)^);
                 RecountTeamHealth(Phedgehog(resgear^.Hedgehog)^.Team);
-                FreeTexture(PHedgehog(resgear^.Hedgehog)^.HatTex);
-                PHedgehog(resgear^.Hedgehog)^.HatTex := Surface2Tex(
-                    LoadImage(Pathz[ptHats] + '/Reserved/Zombie', ifNone),
-                    True);
+                if PHedgehog(resgear^.Hedgehog)^.Hat = 'NoHat' then
+                    begin
+                    FreeTexture(PHedgehog(resgear^.Hedgehog)^.HatTex);
+                    PHedgehog(resgear^.Hedgehog)^.HatTex := Surface2Tex(
+                        LoadImage(Pathz[ptHats] + '/Reserved/Zombie', ifNone),
+                        True)
+                    end
             end;
 
         hh^.Gear^.dY := _0;