int sound_num, vol, atten;
cls.protocol->ReadVector(&cl_message, org);
- if (large || cls.protocol == &protocol_nehahrabjp2)
+ if (large)
sound_num = (unsigned short) MSG_ReadShort(&cl_message);
else
sound_num = MSG_ReadByte(&cl_message);
static void Netmsg_svc_sound (protocol_t *protocol) // <see code>
{
- CL_ParseStartSoundPacket(false);
+ CL_ParseStartSoundPacket(protocol == &protocol_nehahrabjp2 || protocol == &protocol_nehahrabjp3 ? true : false);
}
static void Netmsg_svc_time (protocol_t *protocol) // [float] server time
static void Netmsg_svc_spawnstaticsound (protocol_t *protocol)
{
- CL_ParseStaticSound (false);
+ CL_ParseStaticSound (protocol == &protocol_nehahrabjp2 || protocol == &protocol_nehahrabjp3 ? true : false);
}
static void Netmsg_svc_intermission (protocol_t *protocol)
}
else
MSG_WriteShort (dest, (ent<<3) | channel);
- if ((field_mask & SND_LARGESOUND) || sv.protocol == &protocol_nehahrabjp2)
+ if ((field_mask & SND_LARGESOUND) || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3)
MSG_WriteShort (dest, sound_num);
else
MSG_WriteByte (dest, sound_num);
*/
int SV_ModelIndex(const char *s, int precachemode)
{
- int i, limit = ((sv.protocol == &protocol_netquake || sv.protocol == &protocol_quakedp || sv.protocol == &protocol_nehahramovie || sv.protocol == &protocol_nehahrabjp || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3) ? 256 : MAX_MODELS);
+ int i, limit = ((sv.protocol == &protocol_netquake || sv.protocol == &protocol_quakedp || sv.protocol == &protocol_nehahramovie) ? 256 : MAX_MODELS);
char filename[MAX_QPATH];
if (!s || !*s)
return 0;
*/
int SV_SoundIndex(const char *s, int precachemode)
{
- int i, limit = ((sv.protocol == &protocol_netquake || sv.protocol == &protocol_quakedp || sv.protocol == &protocol_nehahramovie || sv.protocol == &protocol_nehahrabjp || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3) ? 256 : MAX_SOUNDS);
+ int i, limit = ((sv.protocol == &protocol_netquake || sv.protocol == &protocol_quakedp || sv.protocol == &protocol_nehahramovie || sv.protocol == &protocol_nehahrabjp) ? 256 : MAX_SOUNDS);
char filename[MAX_QPATH];
if (!s || !*s)
return 0;
if (soundnum >= 256)
large = true;
+ if(sv.protocol == &protocol_nehahrabjp)
+ large = false;
+
// add an svc_spawnambient command to the level signon packet
if (large)
sv.protocol->WriteVector(&sv.signon, pos);
- if (large || sv.protocol == &protocol_nehahrabjp || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3)
+ if (large || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3)
MSG_WriteShort (&sv.signon, soundnum);
else
MSG_WriteByte (&sv.signon, soundnum);
if (PRVM_serveredictfloat(ent, modelindex) >= 256 || PRVM_serveredictfloat(ent, frame) >= 256)
large = true;
- if (large)
+ if (sv.protocol == &protocol_nehahrabjp || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3)
{
- MSG_WriteByte (&sv.signon,svc_spawnstatic2);
+ MSG_WriteByte (&sv.signon,svc_spawnstatic);
MSG_WriteShort (&sv.signon, (int)PRVM_serveredictfloat(ent, modelindex));
- MSG_WriteShort (&sv.signon, (int)PRVM_serveredictfloat(ent, frame));
+ MSG_WriteByte (&sv.signon, (int)PRVM_serveredictfloat(ent, frame));
}
- else if (sv.protocol == &protocol_nehahrabjp || sv.protocol == &protocol_nehahrabjp2 || sv.protocol == &protocol_nehahrabjp3)
+ else if (large)
{
- MSG_WriteByte (&sv.signon,svc_spawnstatic);
+ MSG_WriteByte (&sv.signon,svc_spawnstatic2);
MSG_WriteShort (&sv.signon, (int)PRVM_serveredictfloat(ent, modelindex));
- MSG_WriteByte (&sv.signon, (int)PRVM_serveredictfloat(ent, frame));
+ MSG_WriteShort (&sv.signon, (int)PRVM_serveredictfloat(ent, frame));
}
else
{