hedgewars/uGearsHandlersMess.pas
changeset 14019 1effb8b72b11
parent 14014 f09276eb0c27
child 14040 128fbd36eee4
equal deleted inserted replaced
14018:039a9a6d68eb 14019:1effb8b72b11
   214             begin
   214             begin
   215             d := r - hwRound(Distance(gi^.X - x, gi^.Y - y));
   215             d := r - hwRound(Distance(gi^.X - x, gi^.Y - y));
   216             if (d > 1) and (gi^.Hedgehog^.Effects[heInvulnerable] = 0) and (GetRandom(2) = 0) then
   216             if (d > 1) and (gi^.Hedgehog^.Effects[heInvulnerable] = 0) and (GetRandom(2) = 0) then
   217                 begin
   217                 begin
   218                 if (CurrentHedgehog^.Gear = gi) then
   218                 if (CurrentHedgehog^.Gear = gi) then
   219                     if random(4) = 0 then
   219                     if (CurrentHedgehog^.Gear^.FlightTime = 0) then
   220                         PlaySoundV(sndWhatThe, gi^.Hedgehog^.Team^.voicepack)
   220                         case random(4) of
       
   221                         0: PlaySoundV(sndWhatThe, gi^.Hedgehog^.Team^.voicepack);
       
   222                         1: PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack);
       
   223                         2: PlaySoundV(sndRunAway, gi^.Hedgehog^.Team^.voicepack);
       
   224                         3: PlaySoundV(sndRunAway, gi^.Hedgehog^.Team^.voicepack);
       
   225                         end
   221                     else
   226                     else
   222                         PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack)
   227                         if random(4) = 0 then
       
   228                            PlaySoundV(sndWhatThe, gi^.Hedgehog^.Team^.voicepack)
       
   229                         else
       
   230                            PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack)
   223 
   231 
   224                 else
   232                 else
   225                     begin
   233                     begin
   226                     if ((gi^.State and gstMoving) = 0) and (gi^.Hedgehog^.Effects[heFrozen] = 0) then
   234                     if ((gi^.State and gstMoving) = 0) and (gi^.Hedgehog^.Effects[heFrozen] = 0) then
   227                         begin
   235                         begin