sv_gameplayfix_q1bsptracelinereportstexture is on, because in one of
negke's maps a set of items are crushed by a pusher and are expected to
fall through the sky brush they are sitting on, which does not happen if
the sky surface is considered solid, but in any other situation this
should be reported as solid
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11897
d7cf8633-e32d-0410-b094-
e92efae38249
Mod_Q1BSP_RecursiveHullCheckPoint(&rhc, rhc.hull->firstclipnode);
}
Mod_Q1BSP_RecursiveHullCheckPoint(&rhc, rhc.hull->firstclipnode);
}
+static void Mod_Q1BSP_TraceLineAgainstSurfaces(struct model_s *model, const frameblend_t *frameblend, const skeleton_t *skeleton, trace_t *trace, const vec3_t start, const vec3_t end, int hitsupercontentsmask);
+
static void Mod_Q1BSP_TraceLine(struct model_s *model, const frameblend_t *frameblend, const skeleton_t *skeleton, trace_t *trace, const vec3_t start, const vec3_t end, int hitsupercontentsmask)
{
RecursiveHullCheckTraceInfo_t rhc;
static void Mod_Q1BSP_TraceLine(struct model_s *model, const frameblend_t *frameblend, const skeleton_t *skeleton, trace_t *trace, const vec3_t start, const vec3_t end, int hitsupercontentsmask)
{
RecursiveHullCheckTraceInfo_t rhc;
+ // sometimes we want to traceline against polygons so we can report the texture that was hit rather than merely a contents, but using this method breaks one of negke's maps so it must be a cvar check...
+ if (sv_gameplayfix_q1bsptracelinereportstexture.integer)
+ {
+ Mod_Q1BSP_TraceLineAgainstSurfaces(model, frameblend, skeleton, trace, start, end, hitsupercontentsmask);
+ return;
+ }
+
memset(&rhc, 0, sizeof(rhc));
memset(trace, 0, sizeof(trace_t));
rhc.trace = trace;
memset(&rhc, 0, sizeof(rhc));
memset(trace, 0, sizeof(trace_t));
rhc.trace = trace;
{
tx->supercontents = mod_q1bsp_texture_sky.supercontents;
tx->surfaceflags = mod_q1bsp_texture_sky.surfaceflags;
{
tx->supercontents = mod_q1bsp_texture_sky.supercontents;
tx->surfaceflags = mod_q1bsp_texture_sky.surfaceflags;
- tx->supercontents |= SUPERCONTENTS_SOLID; // for the surface traceline we need to hit this surface as a solid...
+ // for the surface traceline we need to hit this surface as a solid...
+ tx->supercontents |= SUPERCONTENTS_SOLID;
mod->soundfromcenter = true;
mod->TraceBox = Mod_Q1BSP_TraceBox;
mod->soundfromcenter = true;
mod->TraceBox = Mod_Q1BSP_TraceBox;
- if (sv_gameplayfix_q1bsptracelinereportstexture.integer)
- mod->TraceLine = Mod_Q1BSP_TraceLineAgainstSurfaces; // LordHavoc: use the surface-hitting version of TraceLine in all cases
- else
- mod->TraceLine = Mod_Q1BSP_TraceLine;
+ mod->TraceLine = Mod_Q1BSP_TraceLine;
mod->TracePoint = Mod_Q1BSP_TracePoint;
mod->PointSuperContents = Mod_Q1BSP_PointSuperContents;
mod->TraceLineAgainstSurfaces = Mod_Q1BSP_TraceLineAgainstSurfaces;
mod->TracePoint = Mod_Q1BSP_TracePoint;
mod->PointSuperContents = Mod_Q1BSP_PointSuperContents;
mod->TraceLineAgainstSurfaces = Mod_Q1BSP_TraceLineAgainstSurfaces;