hedgewars/GSHandlers.inc
changeset 7394 789d7831ec53
parent 7393 3f203c62353b
child 7395 d0d38cd0d27c
equal deleted inserted replaced
7393:3f203c62353b 7394:789d7831ec53
   731 end;
   731 end;
   732 
   732 
   733 ////////////////////////////////////////////////////////////////////////////////
   733 ////////////////////////////////////////////////////////////////////////////////
   734 procedure doStepGrave(Gear: PGear);
   734 procedure doStepGrave(Gear: PGear);
   735 begin
   735 begin
   736     if Gear^.Timer = 0 then
   736     if (Gear^.Message and gmDestroy) <> 0 then
   737         begin
   737         begin
   738         DeleteGear(Gear);
   738         DeleteGear(Gear);
   739         exit
   739         exit
   740         end;
   740         end;
       
   741 
   741     AllInactive := false;
   742     AllInactive := false;
       
   743 
   742     if Gear^.dY.isNegative then
   744     if Gear^.dY.isNegative then
   743         if TestCollisionY(Gear, -1) then
   745         if TestCollisionY(Gear, -1) then
   744             Gear^.dY := _0;
   746             Gear^.dY := _0;
   745 
   747 
   746     if not Gear^.dY.isNegative then
   748     if not Gear^.dY.isNegative then
  5093                 begin
  5095                 begin
  5094                 resgear := AddGear(hwRound(graves.ar^[i]^.X), hwRound(graves.ar^[i]^.Y), gtHedgehog, gstWait, _0, _0, 0);
  5096                 resgear := AddGear(hwRound(graves.ar^[i]^.X), hwRound(graves.ar^[i]^.Y), gtHedgehog, gstWait, _0, _0, 0);
  5095                 resgear^.Hedgehog := graves.ar^[i]^.Hedgehog;
  5097                 resgear^.Hedgehog := graves.ar^[i]^.Hedgehog;
  5096                 resgear^.Health := graves.ar^[i]^.Health;
  5098                 resgear^.Health := graves.ar^[i]^.Health;
  5097                 PHedgehog(graves.ar^[i]^.Hedgehog)^.Gear := resgear;
  5099                 PHedgehog(graves.ar^[i]^.Hedgehog)^.Gear := resgear;
  5098                 graves.ar^[i]^.Timer:= 0;
  5100                 graves.ar^[i]^.Message:= graves.ar^[i]^.Message or gmDestroy;
  5099                 RenderHealth(resgear^.Hedgehog^);
  5101                 RenderHealth(resgear^.Hedgehog^);
  5100                 RecountTeamHealth(resgear^.Hedgehog^.Team);
  5102                 RecountTeamHealth(resgear^.Hedgehog^.Team);
  5101                 resgear^.Hedgehog^.Effects[heResurrected]:= 1;
  5103                 resgear^.Hedgehog^.Effects[heResurrected]:= 1;
  5102                 // only make hat-less hedgehogs look like zombies, preserve existing hats
  5104                 // only make hat-less hedgehogs look like zombies, preserve existing hats
  5103                 
  5105 
  5104                 if resgear^.Hedgehog^.Hat = 'NoHat' then
  5106                 if resgear^.Hedgehog^.Hat = 'NoHat' then
  5105                     LoadHedgehogHat(resgear, 'Reserved/Zombie');
  5107                     LoadHedgehogHat(resgear, 'Reserved/Zombie');
  5106                 end;
  5108                 end;
  5107 
  5109 
  5108         hh^.Gear^.dY := _0;
  5110         hh^.Gear^.dY := _0;