From bf8e553ffb8665b1b5a8289de3276f39d6abff04 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Tue, 4 Apr 2017 21:10:33 +0200 Subject: import icculus.org/tremulous/trunk r1044 this FIX(TM)s the bug where alien melee attacks pass through humans standing on top of the attacking aliens this patch ended up not being in the latest version of Tremulous on icculus.org, likely because it was forgotten, as at one point, the repository's trunk branch was reverted and rewritten to be a continuation from an earlier revision; but also, this modification is, strictly speaking, WRONG this change should be analyzed and improved --- src/cgame/cg_predict.c | 3 +++ src/server/sv_world.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index af48bf96..b268431f 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -176,7 +176,10 @@ static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t mins, *tr = trace; } else if( trace.startsolid ) + { tr->startsolid = qtrue; + tr->entityNum = ent->number; + } if( tr->allsolid ) return; diff --git a/src/server/sv_world.c b/src/server/sv_world.c index c10f1e92..f1ca74e0 100644 --- a/src/server/sv_world.c +++ b/src/server/sv_world.c @@ -566,10 +566,10 @@ static void SV_ClipMoveToEntities( moveclip_t *clip ) { if ( trace.allsolid ) { clip->trace.allsolid = qtrue; - trace.entityNum = touch->s.number; + clip->trace.entityNum = touch->s.number; } else if ( trace.startsolid ) { clip->trace.startsolid = qtrue; - trace.entityNum = touch->s.number; + clip->trace.entityNum = touch->s.number; } if ( trace.fraction < clip->trace.fraction ) { -- cgit