hedgewars/GSHandlers.inc
changeset 4874 f508adb769b8
parent 4867 e604ee83e34f
child 4880 07e9849c6a70
equal deleted inserted replaced
4873:98dbb9b985e5 4874:f508adb769b8
  4505                 PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear;
  4505                 PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear;
  4506                 DeleteGear(graves[i]);
  4506                 DeleteGear(graves[i]);
  4507                 RenderHealth(resgear^.Hedgehog^);
  4507                 RenderHealth(resgear^.Hedgehog^);
  4508                 RecountTeamHealth(resgear^.Hedgehog^.Team);
  4508                 RecountTeamHealth(resgear^.Hedgehog^.Team);
  4509                 resgear^.Hedgehog^.Effects[heResurrected]:= true;
  4509                 resgear^.Hedgehog^.Effects[heResurrected]:= true;
       
  4510                 // only make hat-less hedgehogs look like zombies, preserve existing hats
  4510                 if resgear^.Hedgehog^.Hat = 'NoHat' then
  4511                 if resgear^.Hedgehog^.Hat = 'NoHat' then
  4511                     begin
  4512                     LoadHedgehogHat(resgear, 'Reserved/Zombie');
  4512                     FreeTexture(resgear^.Hedgehog^.HatTex);
       
  4513                     resgear^.Hedgehog^.HatTex := Surface2Tex(
       
  4514                         LoadImage(Pathz[ptHats] + '/Reserved/Zombie', ifNone),
       
  4515                         True)
       
  4516                     end
       
  4517                 end;
  4513                 end;
  4518 
  4514 
  4519         hh^.Gear^.dY := _0;
  4515         hh^.Gear^.dY := _0;
  4520         hh^.Gear^.dX := _0;
  4516         hh^.Gear^.dX := _0;
  4521         doStepHedgehogMoving(hh^.Gear);
  4517         doStepHedgehogMoving(hh^.Gear);