server: extend count of sound indexes

This commit is contained in:
Denis Pauk 2024-03-24 14:18:26 +02:00
parent 6aa0b2a92b
commit cc2f531faa
3 changed files with 17 additions and 3 deletions

View File

@ -1228,7 +1228,14 @@ CL_ParseStartSoundPacket(void)
float ofs;
flags = MSG_ReadByte(&net_message);
if (IS_QII97_PROTOCOL(cls.serverProtocol))
{
sound_num = MSG_ReadByte(&net_message);
}
else
{
sound_num = MSG_ReadShort(&net_message);
}
if (flags & SND_VOLUME)
{

View File

@ -174,7 +174,7 @@ typedef unsigned char byte;
#define MAX_EDICTS 1024 /* must change protocol to increase more */
#define MAX_LIGHTSTYLES 256
#define MAX_MODELS 512 /* these are sent over the net as bytes */
#define MAX_SOUNDS 256 /* so they cannot be blindly increased */
#define MAX_SOUNDS 512 /* so they cannot be blindly increased */
#define MAX_IMAGES 256
#define MAX_ITEMS 256
#define MAX_GENERAL (MAX_CLIENTS * 2) /* general config strings */

View File

@ -370,7 +370,14 @@ SV_StartSound(vec3_t origin, edict_t *entity, int channel, int soundindex,
MSG_WriteByte(&sv.multicast, svc_sound);
MSG_WriteByte(&sv.multicast, flags);
if (IS_QII97_PROTOCOL(sv_client->protocol))
{
MSG_WriteByte(&sv.multicast, soundindex);
}
else
{
MSG_WriteShort(&sv.multicast, soundindex);
}
if (flags & SND_VOLUME)
{