// list of entities to test for collisions
int numtouchedicts;
static prvm_edict_t *touchedicts[MAX_EDICTS];
+ int clipgroup;
//return SV_TraceBox(start, vec3_origin, vec3_origin, end, type, passedict, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask);
// precalculate passedict's owner edict pointer for comparisons
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_serveredictedict(passedict, owner)) : 0;
+ clipgroup = passedict ? (int)PRVM_serveredictfloat(passedict, clipgroup) : 0;
+
// clip to entities
// because this uses World_EntitiestoBox, we know all entity boxes overlap
// the clip region, so we can skip culling checks in the loop below
// don't clip owner against owned entities
if (passedictprog == PRVM_serveredictedict(touch, owner))
continue;
+ // don't clip against any entities in the same clipgroup (DP_RM_CLIPGROUP)
+ if (clipgroup && clipgroup == (int)PRVM_serveredictfloat(touch, clipgroup))
+ continue;
// don't clip points against points (they can't collide)
if (VectorCompare(PRVM_serveredictvector(touch, mins), PRVM_serveredictvector(touch, maxs)) && (type != MOVE_MISSILE || !((int)PRVM_serveredictfloat(touch, flags) & FL_MONSTER)))
continue;
// list of entities to test for collisions
int numtouchedicts;
static prvm_edict_t *touchedicts[MAX_EDICTS];
+ int clipgroup;
if (VectorCompare(start, end))
return SV_TracePoint(start, type, passedict, hitsupercontentsmask, skipsupercontentsmask, skipmaterialflagsmask);
// precalculate passedict's owner edict pointer for comparisons
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_serveredictedict(passedict, owner)) : 0;
+ clipgroup = passedict ? (int)PRVM_serveredictfloat(passedict, clipgroup) : 0;
+
// clip to entities
// because this uses World_EntitiestoBox, we know all entity boxes overlap
// the clip region, so we can skip culling checks in the loop below
// don't clip owner against owned entities
if (passedictprog == PRVM_serveredictedict(touch, owner))
continue;
+ // don't clip against any entities in the same clipgroup (DP_RM_CLIPGROUP)
+ if (clipgroup && clipgroup == (int)PRVM_serveredictfloat(touch, clipgroup))
+ continue;
// don't clip points against points (they can't collide)
if (VectorCompare(PRVM_serveredictvector(touch, mins), PRVM_serveredictvector(touch, maxs)) && (type != MOVE_MISSILE || !((int)PRVM_serveredictfloat(touch, flags) & FL_MONSTER)))
continue;
// list of entities to test for collisions
int numtouchedicts;
static prvm_edict_t *touchedicts[MAX_EDICTS];
+ int clipgroup;
if (VectorCompare(mins, maxs))
{
vec3_t shiftstart, shiftend;
// precalculate passedict's owner edict pointer for comparisons
traceowner = passedict ? PRVM_PROG_TO_EDICT(PRVM_serveredictedict(passedict, owner)) : 0;
+ clipgroup = passedict ? (int)PRVM_serveredictfloat(passedict, clipgroup) : 0;
+
// clip to entities
// because this uses World_EntitiestoBox, we know all entity boxes overlap
// the clip region, so we can skip culling checks in the loop below
// don't clip owner against owned entities
if (passedictprog == PRVM_serveredictedict(touch, owner))
continue;
+ // don't clip against any entities in the same clipgroup (DP_RM_CLIPGROUP)
+ if (clipgroup && clipgroup == (int)PRVM_serveredictfloat(touch, clipgroup))
+ continue;
// don't clip points against points (they can't collide)
if (pointtrace && VectorCompare(PRVM_serveredictvector(touch, mins), PRVM_serveredictvector(touch, maxs)) && (type != MOVE_MISSILE || !((int)PRVM_serveredictfloat(touch, flags) & FL_MONSTER)))
continue;
static void SV_Physics_Pusher (prvm_edict_t *ent)
{
prvm_prog_t *prog = SVVM_prog;
- float thinktime, oldltime, movetime;
+ double thinktime, oldltime, movetime;
oldltime = PRVM_serveredictfloat(ent, ltime);
// angle fixing was requested by physics code...
// so store the current angles for later use
VectorCopy(PRVM_serveredictvector(ent, angles), host_client->fixangle_angles);
- host_client->fixangle_angles_set = TRUE;
+ host_client->fixangle_angles_set = true;
// and clear fixangle for the next frame
PRVM_serveredictfloat(ent, fixangle) = 0;
// angle fixing was requested by physics code...
// so store the current angles for later use
VectorCopy(PRVM_serveredictvector(ent, angles), host_client->fixangle_angles);
- host_client->fixangle_angles_set = TRUE;
+ host_client->fixangle_angles_set = true;
// and clear fixangle for the next frame
PRVM_serveredictfloat(ent, fixangle) = 0;