hedgewars/uGearsHandlersMess.pas
changeset 14014 f09276eb0c27
parent 14011 3c40754f6cfe
child 14019 1effb8b72b11
equal deleted inserted replaced
14013:caf7a86214bd 14014:f09276eb0c27
   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                     PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack)
   219                     if random(4) = 0 then
       
   220                         PlaySoundV(sndWhatThe, gi^.Hedgehog^.Team^.voicepack)
       
   221                     else
       
   222                         PlaySoundV(sndOops, gi^.Hedgehog^.Team^.voicepack)
   220 
   223 
   221                 else
   224                 else
   222                     begin
   225                     begin
   223                     if ((gi^.State and gstMoving) = 0) and (gi^.Hedgehog^.Effects[heFrozen] = 0) then
   226                     if ((gi^.State and gstMoving) = 0) and (gi^.Hedgehog^.Effects[heFrozen] = 0) then
   224                         begin
   227                         begin
   232 
   235 
   233                     if grenadeTaunt then
   236                     if grenadeTaunt then
   234                         PlaySoundV(sndGrenade, gi^.Hedgehog^.Team^.voicepack)
   237                         PlaySoundV(sndGrenade, gi^.Hedgehog^.Team^.voicepack)
   235                     else
   238                     else
   236                         if d > r div 2 then
   239                         if d > r div 2 then
   237                             PlaySoundV(sndNooo, gi^.Hedgehog^.Team^.voicepack)
   240                             if random(3) = 0 then
       
   241                                 PlaySoundV(sndWhatThe, gi^.Hedgehog^.Team^.voicepack)
       
   242                             else
       
   243                                 PlaySoundV(sndNooo, gi^.Hedgehog^.Team^.voicepack)
   238                         else
   244                         else
   239                             PlaySoundV(sndUhOh, gi^.Hedgehog^.Team^.voicepack);
   245                             PlaySoundV(sndUhOh, gi^.Hedgehog^.Team^.voicepack);
   240 
   246 
   241                     end;
   247                     end;
   242                 end;
   248                 end;