Only set zombie hat if the hog didn't have a hat. I'm keeping my dinos dammit!
authornemo
Sat, 30 Oct 2010 21:06:55 -0400
changeset 4035 3ed9573bcf5e
parent 4033 e03b6be88b49
child 4036 69e535a0e43a
Only set zombie hat if the hog didn't have a hat. I'm keeping my dinos dammit!
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;