mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
Einen üblen Soundcrash entfernt
This commit is contained in:
parent
674b138af9
commit
327c0352d2
3 changed files with 12 additions and 1 deletions
|
@ -116,6 +116,7 @@ S_Init
|
|||
void S_Init (void)
|
||||
{
|
||||
cvar_t *cv;
|
||||
s_pendingplays.next = NULL;
|
||||
|
||||
Com_Printf("\n------- sound initialization -------\n");
|
||||
|
||||
|
@ -716,6 +717,12 @@ void S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx, float f
|
|||
else
|
||||
ps->begin = (int)(start + timeofs * dma.speed);
|
||||
|
||||
if(s_pendingplays.next == NULL)
|
||||
{
|
||||
s_pendingplays = *ps;
|
||||
return;
|
||||
}
|
||||
|
||||
// sort into the pending sound list
|
||||
for (sort = s_pendingplays.next ;
|
||||
sort != &s_pendingplays && sort->begin < ps->begin ;
|
||||
|
|
|
@ -199,6 +199,10 @@ void S_PaintChannels(int endtime)
|
|||
while (1)
|
||||
{
|
||||
ps = s_pendingplays.next;
|
||||
|
||||
if (ps == NULL)
|
||||
break;
|
||||
|
||||
if (ps == &s_pendingplays)
|
||||
break; // no more pending sounds
|
||||
if (ps->begin <= paintedtime)
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "../game/quake2/q_shared.h"
|
||||
|
||||
#define VERSION 1.02
|
||||
#define VERSION 1.03
|
||||
#define BASEDIRNAME "baseq2"
|
||||
|
||||
#if defined __linux__
|
||||
|
|
Loading…
Reference in a new issue