// do trails
if (e->render.flags & RENDER_GLOWTRAIL)
trailtype = EFFECT_TR_GLOWTRAIL;
+ if (e->state_current.traileffectnum)
+ trailtype = e->state_current.traileffectnum;
// check if a trail is allowed (it is not after a teleport for example)
if (trailtype && e->persistent.trail_allowed)
{
// do trail light
if (e->render.flags & RENDER_GLOWTRAIL)
trailtype = EFFECT_TR_GLOWTRAIL;
+ if (e->state_current.traileffectnum)
+ trailtype = e->state_current.traileffectnum;
if (trailtype)
CL_ParticleTrail(trailtype, 1, origin, origin, vec3_origin, vec3_origin, NULL, e->state_current.glowcolor, true, false, NULL, NULL);
//description:
//controls rendering scale of the object, 0 is forced to be 1, darkplaces uses 1/16th accuracy and a limit of 15.9375, can be used to make an object larger or smaller.
+//DP_ENT_TRAILEFFECTNUM
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//field definitions:
+.float traileffectnum;
+//description:
+//use a custom effectinfo.txt effect on this entity, assign it like this:
+//self.traileffectnum = particleeffectnum("mycustomeffect");
+//this will do both the dlight and particle trail as described in the effect, basically equivalent to trailparticles() in CSQC but performed on a server entity.
+
//DP_ENT_VIEWMODEL
//idea: LordHavoc
//darkplaces implementation: LordHavoc
0,//unsigned short exteriormodelforclient; // ! not shown if first person viewing from this entity, shown in all other cases
0,//unsigned short nodrawtoclient; // !
0,//unsigned short drawonlytoclient; // !
+ 0,//unsigned short traileffectnum;
{0,0,0,0},//unsigned short light[4]; // color*256 (0.00 to 255.996), and radius*1
ACTIVE_NOT,//unsigned char active; // true if a valid state
0,//unsigned char lightstyle;
MSG_WriteShort(msg, (int)((sv.time - s->framegroupblend[0].start) * 1000.0));
}
}
+ if (bits & E5_TRAILEFFECTNUM)
+ MSG_WriteShort(msg, s->traileffectnum);
}
ENTITYSIZEPROFILING_END(msg, s->number);
break;
}
}
+ if (bits & E5_TRAILEFFECTNUM)
+ s->traileffectnum = (unsigned short) MSG_ReadShort();
if (developer_networkentities.integer >= 2)
bits |= E5_GLOWMOD;
if (n->flags & RENDER_COMPLEXANIMATION)
bits |= E5_COMPLEXANIMATION;
+ if (o->traileffectnum != n->traileffectnum)
+ bits |= E5_TRAILEFFECTNUM;
}
else
if (o->active == ACTIVE_NETWORK)
unsigned short exteriormodelforclient; // ! not shown if first person viewing from this entity, shown in all other cases
unsigned short nodrawtoclient; // !
unsigned short drawonlytoclient; // !
+ unsigned short traileffectnum;
unsigned short light[4]; // color*256 (0.00 to 255.996), and radius*1
unsigned char active; // true if a valid state
unsigned char lightstyle;
// byte type=4 short modelindex byte numbones {short pose6s[6]}
// see also RENDER_COMPLEXANIMATION
#define E5_COMPLEXANIMATION (1<<25)
-// unused
-#define E5_UNUSED26 (1<<26)
+// ushort traileffectnum
+#define E5_TRAILEFFECTNUM (1<<26)
// unused
#define E5_UNUSED27 (1<<27)
// unused
PRVM_DECLARE_field(teleport_time)
PRVM_DECLARE_field(think)
PRVM_DECLARE_field(touch)
+PRVM_DECLARE_field(traileffectnum)
PRVM_DECLARE_field(use)
PRVM_DECLARE_field(userwavefunc_param0)
PRVM_DECLARE_field(userwavefunc_param1)
PRVM_DECLARE_serverfieldfloat(takedamage)
PRVM_DECLARE_serverfieldfloat(team)
PRVM_DECLARE_serverfieldfloat(teleport_time)
+PRVM_DECLARE_serverfieldfloat(traileffectnum)
PRVM_DECLARE_serverfieldfloat(viewzoom)
PRVM_DECLARE_serverfieldfloat(waterlevel)
PRVM_DECLARE_serverfieldfloat(watertype)
cs->tagentity = PRVM_serveredictedict(ent, tag_entity);
cs->tagindex = (unsigned char)PRVM_serveredictfloat(ent, tag_index);
cs->glowsize = glowsize;
+ cs->traileffectnum = PRVM_serveredictfloat(ent, traileffectnum);
// don't need to init cs->colormod because the defaultstate did that for us
//cs->colormod[0] = cs->colormod[1] = cs->colormod[2] = 32;
"DP_ENT_GLOWMOD "
"DP_ENT_LOWPRECISION "
"DP_ENT_SCALE "
+"DP_ENT_TRAILEFFECTNUM "
"DP_ENT_VIEWMODEL "
"DP_GECKO_SUPPORT "
"DP_GFX_EXTERNALTEXTURES "