From 075988465bdf108d71799e01b4be86737f89f8e4 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 12 Feb 2006 04:46:16 +0000 Subject: [PATCH] Whoops, lets fix that bug. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1957 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/pr_csqc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index 1ae730b8d..354d12c54 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -1214,8 +1214,10 @@ static void cs_settracevars(trace_t *tr) VectorCopy (tr->endpos, csqcg.trace_endpos); VectorCopy (tr->plane.normal, csqcg.trace_plane_normal); *csqcg.trace_plane_dist = tr->plane.dist; - *csqcg.trace_surfaceflags = tr->surface?tr->surface->flags:0; - *csqcg.trace_endcontents = tr->contents; + if (csqcg.trace_surfaceflags) + *csqcg.trace_surfaceflags = tr->surface?tr->surface->flags:0; + if (csqcg.trace_endcontents) + *csqcg.trace_endcontents = tr->contents; if (tr->ent) *csqcg.trace_ent = EDICT_TO_PROG(csqcprogs, (void*)tr->ent); else