void CL_LinkEdict(prvm_edict_t *ent);
int CL_GenericHitSuperContentsMask(const prvm_edict_t *edict);
trace_t CL_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, qboolean hitnetworkbrushmodels, qboolean hitnetworkplayers, int *hitnetworkentity, qboolean hitcsqcentities);
-#define CL_PointSuperContents(point) (CL_Move((point), vec3_origin, vec3_origin, (point), sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL, 0, true, false, NULL, true).startsupercontents)
+#define CL_PointSuperContents(point) (CL_Move((point), vec3_origin, vec3_origin, (point), sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL, 0, true, false, NULL, false).startsupercontents)
#endif
VectorSubtract(originmaxs, originmins, dir);
len = VectorNormalizeLength(dir);
- dec = -ent->persistent.trail_time;
- ent->persistent.trail_time += len;
- if (ent->persistent.trail_time < 0.01f)
- return;
+ if (ent)
+ {
+ dec = -ent->persistent.trail_time;
+ ent->persistent.trail_time += len;
+ if (ent->persistent.trail_time < 0.01f)
+ return;
- // if we skip out, leave it reset
- ent->persistent.trail_time = 0.0f;
+ // if we skip out, leave it reset
+ ent->persistent.trail_time = 0.0f;
+ }
+ else
+ dec = 0;
// advance into this frame to reach the first puff location
VectorMA(originmins, dec, dir, pos);
len -= dec;
VectorMA (pos, dec, dir, pos);
}
- ent->persistent.trail_time = len;
+ if (ent)
+ ent->persistent.trail_time = len;
}
else if (developer.integer >= 1)
Con_Printf("CL_ParticleEffect_Fallback: no fallback found for effect %s\n", particleeffectname[effectnameindex]);