}
}
+void CL_ParseTrailParticles(void)
+{
+ int entityindex;
+ int effectindex;
+ vec3_t start, end;
+ entityindex = (unsigned short)MSG_ReadShort();
+ if (entityindex >= MAX_EDICTS)
+ entityindex = 0;
+ if (entityindex >= cl.max_entities)
+ CL_ExpandEntities(entityindex);
+ effectindex = (unsigned short)MSG_ReadShort();
+ MSG_ReadVector(start, cls.protocol);
+ MSG_ReadVector(end, cls.protocol);
+ CL_ParticleEffect(effectindex, VectorDistance(start, end), start, end, vec3_origin, vec3_origin, entityindex > 0 ? cl.entities + entityindex : NULL, 0);
+}
+
+void CL_ParsePointParticles(void)
+{
+ int effectindex, count;
+ vec3_t origin, velocity;
+ effectindex = (unsigned short)MSG_ReadShort();
+ MSG_ReadVector(origin, cls.protocol);
+ MSG_ReadVector(velocity, cls.protocol);
+ count = (unsigned short)MSG_ReadShort();
+ CL_ParticleEffect(effectindex, count, origin, origin, velocity, velocity, NULL, 0);
+}
+
// look for anything interesting like player IP addresses or ping reports
qboolean CL_ExaminePrintString(const char *text)
{
case svc_downloaddata:
CL_ParseDownload();
break;
+ case svc_trailparticles:
+ CL_ParseTrailParticles();
+ break;
+ case svc_pointparticles:
+ CL_ParsePointParticles();
+ break;
}
}
}
#define svc_hidelmp 36 // [string] slotname
#define svc_skybox 37 // [string] skyname
-// LordHavoc: my svc_ range, 50-59
+// LordHavoc: my svc_ range, 50-69
#define svc_downloaddata 50 // [int] start [short] size
#define svc_updatestatubyte 51 // [byte] stat [byte] value
#define svc_effect 52 // [vector] org [byte] modelindex [byte] startframe [byte] framecount [byte] framerate
#define svc_entities 57 // [int] deltaframe [int] thisframe [float vector] eye [variable length] entitydata
#define svc_csqcentities 58 // [short] entnum [variable length] entitydata ... [short] 0x0000
#define svc_spawnstaticsound2 59 // [coord3] [short] samp [byte] vol [byte] aten
+#define svc_trailparticles 60 // [short] entnum [short] effectnum [vector] start [vector] end
+#define svc_pointparticles 61 // [short] effectnum [vector] start [vector] end [short] count
//
// client to server
char *vm_sv_extensions =
"BX_WAL_SUPPORT "
-"DP_CON_EXPANDCVAR "
-"DP_CON_ALIASPARAMETERS "
"DP_BUTTONCHAT "
"DP_BUTTONUSE "
"DP_CL_LOADSKY "
+"DP_CON_ALIASPARAMETERS "
+"DP_CON_EXPANDCVAR "
"DP_CON_SET "
"DP_CON_SETA "
"DP_CON_STARTMAP "
"DP_EF_ADDITIVE "
"DP_EF_BLUE "
+"DP_EF_DOUBLESIDED "
"DP_EF_FLAME "
"DP_EF_FULLBRIGHT "
-"DP_EF_DOUBLESIDED "
"DP_EF_NODEPTHTEST "
"DP_EF_NODRAW "
"DP_EF_NOSHADOW "
"DP_QC_FINDCHAINFLOAT "
"DP_QC_FINDFLAGS "
"DP_QC_FINDFLOAT "
-"DP_QC_FS_SEARCH " // Black: same as in the menu qc
+"DP_QC_FS_SEARCH "
"DP_QC_GETLIGHT "
"DP_QC_GETSURFACE "
"DP_QC_GETTAGINFO "
"DP_QC_STRFTIME "
"DP_QC_STRINGBUFFERS "
"DP_QC_STRINGCOLORFUNCTIONS "
-"DP_QC_UNLIMITEDTEMPSTRINGS "
"DP_QC_TRACEBOX "
"DP_QC_TRACETOSS "
"DP_QC_TRACE_MOVETYPE_HITMODEL "
"DP_QC_TRACE_MOVETYPE_WORLDONLY "
+"DP_QC_UNLIMITEDTEMPSTRINGS "
"DP_QC_VECTORVECTORS "
"DP_QUAKE2_MODEL "
"DP_QUAKE2_SPRITE "
"KRIMZON_SV_PARSECLIENTCOMMAND "
"NEH_CMD_PLAY2 "
"NEH_RESTOREGAME "
+"NEXUIZ_PLAYERMODEL "
"NXQ_GFX_LETTERBOX "
"PRYDON_CLIENTCURSOR "
"TENEBRAE_GFX_DLIGHTS "
"TW_SV_STEPCONTROL "
-"NEXUIZ_PLAYERMODEL "
;
/*
VM_RETURN_EDICT(PRVM_EDICT_NUM((int)PRVM_G_FLOAT(OFS_PARM0)));
}
+// #336 void(entity ent, float effectnum, vector start, vector end) trailparticles (EXT_CSQC)
+static void VM_SV_trailparticles (void)
+{
+ VM_SAFEPARMCOUNT(4, VM_SV_trailparticles);
+
+ MSG_WriteByte(&sv.datagram, svc_trailparticles);
+ MSG_WriteShort(&sv.datagram, PRVM_G_EDICTNUM(OFS_PARM0));
+ MSG_WriteShort(&sv.datagram, (int)PRVM_G_FLOAT(OFS_PARM1));
+ MSG_WriteVector(&sv.datagram, PRVM_G_VECTOR(OFS_PARM2), sv.protocol);
+ MSG_WriteVector(&sv.datagram, PRVM_G_VECTOR(OFS_PARM3), sv.protocol);
+}
+
+//#337 void(float effectnum, vector origin, vector dir, float count) pointparticles (EXT_CSQC)
+static void VM_SV_pointparticles (void)
+{
+ VM_SAFEPARMCOUNT(4, VM_SV_pointparticles);
+
+ MSG_WriteByte(&sv.datagram, svc_pointparticles);
+ MSG_WriteShort(&sv.datagram, (int)PRVM_G_FLOAT(OFS_PARM0));
+ MSG_WriteVector(&sv.datagram, PRVM_G_VECTOR(OFS_PARM1), sv.protocol);
+ MSG_WriteVector(&sv.datagram, PRVM_G_VECTOR(OFS_PARM2), sv.protocol);
+ MSG_WriteShort(&sv.datagram, bound(0, (int)PRVM_G_FLOAT(OFS_PARM3), 65535));
+}
+
prvm_builtin_t vm_sv_builtins[] = {
NULL, // #0
PF_makevectors, // #1 void(vector ang) makevectors
NULL, // #333
NULL, // #334
NULL, // #335
-NULL, // #336
-NULL, // #337
+VM_SV_trailparticles, // #336 void(entity ent, float effectnum, vector start, vector end) trailparticles (EXT_CSQC)
+VM_SV_pointparticles, // #337 void(float effectnum, vector origin [, vector dir, float count]) pointparticles (EXT_CSQC)
NULL, // #338
VM_print, // #339 void(string, ...) print (DP_SV_PRINT)
e10, // #340-349