hedgewars/GSHandlers.inc
changeset 3768 39947624dabb
parent 3763 2396a2731054
child 3802 2ccfc93c6b5e
equal deleted inserted replaced
3767:2416a3f51c77 3768:39947624dabb
   123         begin
   123         begin
   124             CheckGearDrowning := true;
   124             CheckGearDrowning := true;
   125             Gear^.State := gstDrowning;
   125             Gear^.State := gstDrowning;
   126             Gear^.RenderTimer := false;
   126             Gear^.RenderTimer := false;
   127             if (Gear^.Kind <> gtSniperRifleShot) and (Gear^.Kind <> gtShotgunShot) and (Gear^.Kind <> gtDEagleShot) and (Gear^.Kind <> gtSineGunShot) then
   127             if (Gear^.Kind <> gtSniperRifleShot) and (Gear^.Kind <> gtShotgunShot) and (Gear^.Kind <> gtDEagleShot) and (Gear^.Kind <> gtSineGunShot) then
   128                 Gear^.doStep := @doStepDrowningGear;
   128                 if Gear^.Kind = gtHedgehog then begin
   129             if Gear^.Kind = gtHedgehog then
   129                     if PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] then begin
   130             begin
   130                         ResurrectHedgehog(Gear); 
   131                 Gear^.State := Gear^.State and (not gstHHDriven);
   131                     end else begin
   132                 AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name),
   132                         Gear^.doStep := @doStepDrowningGear;
   133                 cWhiteColor, capgrpMessage);
   133                         Gear^.State := Gear^.State and (not gstHHDriven);
   134             end;
   134                         AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage);
       
   135                     end;
       
   136                 end else begin
       
   137                     Gear^.doStep := @doStepDrowningGear;
       
   138                 end;
   135             if hwRound(Gear^.Y) < cWaterLine + 64 + Gear^.Radius then
   139             if hwRound(Gear^.Y) < cWaterLine + 64 + Gear^.Radius then
   136                 // don't play splash if they are already way past the surface
   140                 // don't play splash if they are already way past the surface
   137                 PlaySound(sndSplash)
   141                 PlaySound(sndSplash)
   138         end;
   142         end;
   139 
   143