hedgewars/uGears.pas
changeset 11921 b1782491f19c
parent 11918 9da78300c5d0
child 12181 c6984784c9fb
equal deleted inserted replaced
11920:d7d7f3a07db9 11921:b1782491f19c
   447 if TurnTimeLeft > 0 then
   447 if TurnTimeLeft > 0 then
   448     if IsClockRunning() then
   448     if IsClockRunning() then
   449         //(CurrentHedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])
   449         //(CurrentHedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])
   450         begin
   450         begin
   451         if (cHedgehogTurnTime >= 10000)
   451         if (cHedgehogTurnTime >= 10000)
   452         and (not PlacingHogs)
       
   453         and (CurrentHedgehog^.Gear <> nil)
   452         and (CurrentHedgehog^.Gear <> nil)
   454         and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then
   453         and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then
   455             if TurnTimeLeft = 5000 then
   454             if TurnTimeLeft = 5000 then
   456                 PlaySoundV(sndHurry, CurrentTeam^.voicepack)
   455                 PlaySoundV(sndHurry, CurrentTeam^.voicepack)
   457             else if TurnTimeLeft = 4000 then
   456             else if TurnTimeLeft = 4000 then
   462                 PlaySound(sndCountdown2)
   461                 PlaySound(sndCountdown2)
   463             else if TurnTimeLeft = 1000 then
   462             else if TurnTimeLeft = 1000 then
   464                 PlaySound(sndCountdown1);
   463                 PlaySound(sndCountdown1);
   465         if ReadyTimeLeft > 0 then
   464         if ReadyTimeLeft > 0 then
   466             begin
   465             begin
   467             if (ReadyTimeLeft = 2000) and (LastVoice.snd = sndNone) then
   466             if (ReadyTimeLeft = 2000) and (LastVoice.snd = sndNone) and (not PlacingHogs) then
   468                 AddVoice(sndComeonthen, CurrentTeam^.voicepack);
   467                 AddVoice(sndComeonthen, CurrentTeam^.voicepack);
   469             dec(ReadyTimeLeft)
   468             dec(ReadyTimeLeft)
   470             end
   469             end
   471         else
   470         else
   472             dec(TurnTimeLeft)
   471             dec(TurnTimeLeft)