hedgewars/GSHandlers.inc
changeset 4874 f508adb769b8
parent 4867 e604ee83e34f
child 4880 07e9849c6a70
--- a/hedgewars/GSHandlers.inc	Tue Jan 25 20:32:58 2011 +0100
+++ b/hedgewars/GSHandlers.inc	Fri Jan 28 02:47:11 2011 +0100
@@ -4507,13 +4507,9 @@
                 RenderHealth(resgear^.Hedgehog^);
                 RecountTeamHealth(resgear^.Hedgehog^.Team);
                 resgear^.Hedgehog^.Effects[heResurrected]:= true;
+                // only make hat-less hedgehogs look like zombies, preserve existing hats
                 if resgear^.Hedgehog^.Hat = 'NoHat' then
-                    begin
-                    FreeTexture(resgear^.Hedgehog^.HatTex);
-                    resgear^.Hedgehog^.HatTex := Surface2Tex(
-                        LoadImage(Pathz[ptHats] + '/Reserved/Zombie', ifNone),
-                        True)
-                    end
+                    LoadHedgehogHat(resgear, 'Reserved/Zombie');
                 end;
 
         hh^.Gear^.dY := _0;