hedgewars/uSound.pas
changeset 5653 fa58dea8a9ad
parent 5652 28a8e14a4b8d
child 5655 44c2d19f79e2
child 5673 85336f377479
equal deleted inserted replaced
5652:28a8e14a4b8d 5653:fa58dea8a9ad
   288 end;
   288 end;
   289 
   289 
   290 procedure AddVoice(snd: TSound; voicepack: PVoicepack);
   290 procedure AddVoice(snd: TSound; voicepack: PVoicepack);
   291 var i : LongInt;
   291 var i : LongInt;
   292 begin
   292 begin
       
   293     if (not isSoundEnabled) or fastUntilLag then exit;
   293     i:= 0;
   294     i:= 0;
   294     while (i<8) and (VoiceList[i].snd <> sndNone) do inc(i);
   295     while (i<8) and (VoiceList[i].snd <> sndNone) do inc(i);
   295 
   296 
   296     VoiceList[i].snd:= snd;
   297     VoiceList[i].snd:= snd;
   297     VoiceList[i].voicepack:= voicepack;
   298     VoiceList[i].voicepack:= voicepack;