-// touch linked edicts
- for (l = node->solid_edicts.next ; l != &node->solid_edicts ; l = next)
- {
- next = l->next;
- touch = EDICT_FROM_AREA(l);
- if (touch->v.solid == SOLID_NOT)
- continue;
- if (touch == clip->passedict)
- continue;
- if (touch->v.solid == SOLID_TRIGGER)
- Host_Error ("Trigger in clipping list");
-
- if (clip->type == MOVE_NOMONSTERS && touch->v.solid != SOLID_BSP)
- continue;
-
- if (clip->boxmins[0] > touch->v.absmax[0]
- || clip->boxmaxs[0] < touch->v.absmin[0]
- || clip->boxmins[1] > touch->v.absmax[1]
- || clip->boxmaxs[1] < touch->v.absmin[1]
- || clip->boxmins[2] > touch->v.absmax[2]
- || clip->boxmaxs[2] < touch->v.absmin[2])
- continue;
-
- if (clip->passedict)
- {
- if (clip->passedict->v.size[0] && !touch->v.size[0])
- continue; // points never interact
- if (PROG_TO_EDICT(touch->v.owner) == clip->passedict)
- continue; // don't clip against own missiles
- if (PROG_TO_EDICT(clip->passedict->v.owner) == touch)
- continue; // don't clip against owner
- // LordHavoc: corpse code
- if (clip->passedict->v.solid == SOLID_CORPSE && (touch->v.solid == SOLID_SLIDEBOX || touch->v.solid == SOLID_CORPSE))
- continue;
- if (clip->passedict->v.solid == SOLID_SLIDEBOX && touch->v.solid == SOLID_CORPSE)
- continue;
- }
-
- // might interact, so do an exact clip
- if ((int)touch->v.flags & FL_MONSTER)
- trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins2, clip->maxs2, clip->end);
- else if (touch->v.solid == SOLID_BSP)
- trace = SV_ClipMoveToEntity (touch, clip->start, clip->hullmins, clip->hullmaxs, clip->end);
- else
- trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins, clip->maxs, clip->end);
- // LordHavoc: take the 'best' answers from the new trace and combine with existing data
- if (trace.allsolid)
- clip->trace.allsolid = true;
- if (trace.startsolid)
- {
- clip->trace.startsolid = true;
- if (!clip->trace.ent)
- clip->trace.ent = trace.ent;
- }
- if (trace.inopen)
- clip->trace.inopen = true;
- if (trace.inwater)
- clip->trace.inwater = true;
- if (trace.fraction < clip->trace.fraction)
- {
- clip->trace.fraction = trace.fraction;
- VectorCopy(trace.endpos, clip->trace.endpos);
- clip->trace.plane = trace.plane;
- clip->trace.endcontents = trace.endcontents;
- clip->trace.ent = trace.ent;
- }