mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 13:41:33 +01:00
lowmemory: fix sentences
This commit is contained in:
parent
ba1347a8ce
commit
37cba10c14
@ -92,7 +92,7 @@ void CL_ParseSoundPacket( sizebuf_t *msg )
|
||||
char sentenceName[32];
|
||||
|
||||
if( FBitSet( flags, SND_SEQUENCE ))
|
||||
Q_snprintf( sentenceName, sizeof( sentenceName ), "!#%i", sound + MAX_SOUNDS );
|
||||
Q_snprintf( sentenceName, sizeof( sentenceName ), "!#%i", sound + MAX_SOUNDS_NONSENTENCE );
|
||||
else Q_snprintf( sentenceName, sizeof( sentenceName ), "!%i", sound );
|
||||
|
||||
handle = S_RegisterSound( sentenceName );
|
||||
@ -156,7 +156,7 @@ void CL_ParseRestoreSoundPacket( sizebuf_t *msg )
|
||||
char sentenceName[32];
|
||||
|
||||
if( flags & SND_SEQUENCE )
|
||||
Q_snprintf( sentenceName, sizeof( sentenceName ), "!%i", sound + MAX_SOUNDS );
|
||||
Q_snprintf( sentenceName, sizeof( sentenceName ), "!%i", sound + MAX_SOUNDS_NONSENTENCE );
|
||||
else Q_snprintf( sentenceName, sizeof( sentenceName ), "!%i", sound );
|
||||
|
||||
handle = S_RegisterSound( sentenceName );
|
||||
|
@ -119,6 +119,7 @@ GNU General Public License for more details.
|
||||
|
||||
#define MAX_SOUND_BITS 11
|
||||
#define MAX_SOUNDS (1<<MAX_SOUND_BITS) // 11 bits == 2048 sounds
|
||||
#define MAX_SOUNDS_NONSENTENCE MAX_SOUNDS
|
||||
|
||||
#define MAX_ENTITY_BITS 13 // 13 bits = 8192 edicts
|
||||
#define MAX_EDICTS (1<<MAX_ENTITY_BITS)
|
||||
@ -147,8 +148,9 @@ GNU General Public License for more details.
|
||||
|
||||
#define MAX_MODELS 256
|
||||
|
||||
#define MAX_SOUND_BITS 8
|
||||
#define MAX_SOUNDS (1<<MAX_SOUND_BITS) // 11 bits == 2048 sounds
|
||||
|
||||
#define MAX_SOUNDS 512 // do not change MAX_SOUND_BITS
|
||||
#define MAX_SOUNDS_NONSENTENCE 2048
|
||||
|
||||
#define MAX_CUSTOM_BITS 4
|
||||
#define MAX_CUSTOM (1<<MAX_CUSTOM_BITS)// 10 bits == 1024 generic file
|
||||
|
@ -2042,10 +2042,10 @@ int SV_BuildSoundMsg( sizebuf_t *msg, edict_t *ent, int chan, const char *sample
|
||||
{
|
||||
sound_idx = Q_atoi( sample + 1 );
|
||||
|
||||
if( sound_idx >= MAX_SOUNDS )
|
||||
if( sound_idx >= MAX_SOUNDS_NONSENTENCE )
|
||||
{
|
||||
SetBits( flags, SND_SENTENCE|SND_SEQUENCE );
|
||||
sound_idx -= MAX_SOUNDS;
|
||||
sound_idx -= MAX_SOUNDS_NONSENTENCE;
|
||||
}
|
||||
else SetBits( flags, SND_SENTENCE );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user