int sound_num, vol, atten;
MSG_ReadVector(&cl_message, org, cls.protocol);
- if (large || cls.protocol == PROTOCOL_NEHAHRABJP2)
+ if (large)
sound_num = (unsigned short) MSG_ReadShort(&cl_message);
else
sound_num = MSG_ReadByte(&cl_message);
break;
case svc_sound:
- CL_ParseStartSoundPacket(false);
+ CL_ParseStartSoundPacket(cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 ? true : false);
break;
case svc_precache:
break;
case svc_spawnstaticsound:
- CL_ParseStaticSound (false);
+ CL_ParseStaticSound (cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 ? true : false);
break;
case svc_spawnstaticsound2:
*/
int SV_ModelIndex(const char *s, int precachemode)
{
- int i, limit = ((sv.protocol == PROTOCOL_QUAKE || 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_QUAKE || 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_QUAKE || 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_QUAKE || sv.protocol == PROTOCOL_QUAKEDP || sv.protocol == PROTOCOL_NEHAHRAMOVIE || sv.protocol == PROTOCOL_NEHAHRABJP) ? 256 : MAX_SOUNDS);
char filename[MAX_QPATH];
if (!s || !*s)
return 0;
}
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);
if (soundnum >= 256)
large = true;
+ if(sv.protocol == PROTOCOL_NEHAHRABJP)
+ large = false;
+
// add an svc_spawnambient command to the level signon packet
if (large)
MSG_WriteVector(&sv.signon, pos, sv.protocol);
- 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
{