hedgewars/GSHandlers.inc
changeset 3954 ae3583ad6ea9
parent 3953 fd7ced2071a1
child 3959 e7ea30323993
equal deleted inserted replaced
3953:fd7ced2071a1 3954:ae3583ad6ea9
   857        0) then
   857        0) then
   858     begin
   858     begin
   859         StopSound(Gear^.SoundChannel);
   859         StopSound(Gear^.SoundChannel);
   860         DeleteGear(Gear);
   860         DeleteGear(Gear);
   861         AfterAttack;
   861         AfterAttack;
       
   862         doStepHedgehogMoving(HHGear);  // for gfInfAttack
   862         exit
   863         exit
   863     end;
   864     end;
   864 
   865 
   865     if (Gear^.Timer mod 33) = 0 then
   866     if (Gear^.Timer mod 33) = 0 then
   866     begin
   867     begin
  2931             DeleteGear(Gear)
  2932             DeleteGear(Gear)
  2932         end;
  2933         end;
  2933 
  2934 
  2934         AfterAttack;
  2935         AfterAttack;
  2935         CurAmmoGear := nil;
  2936         CurAmmoGear := nil;
  2936         TurnTimeLeft := 14 * 125;
  2937         if (GameFlags and gfInfAttack) = 0 then TurnTimeLeft := 14 * 125;
  2937 
  2938 
  2938         if (TrainingFlags and tfRCPlane) <> 0 then
  2939         if (TrainingFlags and tfRCPlane) <> 0 then
  2939             TurnTimeLeft := 0;
  2940             TurnTimeLeft := 0;
  2940         // HACK: RCPlane training allows unlimited plane starts in last 2 seconds
  2941         // HACK: RCPlane training allows unlimited plane starts in last 2 seconds
  2941 
  2942 
  3693             begin
  3694             begin
  3694                 // Drown the hedgehog.  Could also just delete it, but hey, this gets a caption
  3695                 // Drown the hedgehog.  Could also just delete it, but hey, this gets a caption
  3695                 CurrentHedgehog^.Gear^.Active := true;
  3696                 CurrentHedgehog^.Gear^.Active := true;
  3696                 CurrentHedgehog^.Gear^.X := Gear^.X;
  3697                 CurrentHedgehog^.Gear^.X := Gear^.X;
  3697                 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
  3698                 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
  3698                 CurrentHedgehog^.Unplaced := false
  3699                 CurrentHedgehog^.Unplaced := false;
       
  3700                 TurnTimeLeft:= 0
  3699             end;
  3701             end;
  3700             ResumeMusic
  3702             ResumeMusic
  3701         end;
  3703         end;
  3702         exit
  3704         exit
  3703     end;
  3705     end;
  3711         begin
  3713         begin
  3712             // Drown the hedgehog.  Could also just delete it, but hey, this gets a caption
  3714             // Drown the hedgehog.  Could also just delete it, but hey, this gets a caption
  3713             CurrentHedgehog^.Gear^.Active := true;
  3715             CurrentHedgehog^.Gear^.Active := true;
  3714             CurrentHedgehog^.Gear^.X := Gear^.X;
  3716             CurrentHedgehog^.Gear^.X := Gear^.X;
  3715             CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
  3717             CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
  3716             CurrentHedgehog^.Unplaced := false
  3718             CurrentHedgehog^.Unplaced := false;
       
  3719             TurnTimeLeft:= 0
  3717         end;
  3720         end;
  3718         ResumeMusic
  3721         ResumeMusic
  3719     end
  3722     end
  3720     else if (Gear^.State and gstCollision) <> 0 then
  3723     else if (Gear^.State and gstCollision) <> 0 then
  3721         begin
  3724         begin