Only set zombie hat if the hog didn't have a hat. I'm keeping my dinos dammit!
--- 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;