From ee8098839e8a2a79485408703ba0ba22e8d797e7 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Wed, 26 Oct 2022 20:13:29 +0400 Subject: [PATCH] engine: common: pm_trace: fixed non portable code in PM_ConvertTrace --- engine/common/pm_trace.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/engine/common/pm_trace.c b/engine/common/pm_trace.c index 0e1ce7c6..968cb23e 100644 --- a/engine/common/pm_trace.c +++ b/engine/common/pm_trace.c @@ -111,9 +111,17 @@ hull_t *PM_HullForBox( const vec3_t mins, const vec3_t maxs ) void PM_ConvertTrace( trace_t *out, pmtrace_t *in, edict_t *ent ) { - memcpy( out, in, 48 ); // matched + out->allsolid = in->allsolid; + out->startsolid = in->startsolid; + out->inopen = in->inopen; + out->inwater = in->inwater; + out->fraction = in->fraction; + out->plane.dist = in->plane.dist; out->hitgroup = in->hitgroup; out->ent = ent; + + VectorCopy( in->endpos, out->endpos ); + VectorCopy( in->plane.normal, out->plane.normal ); } /*