summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-04 21:10:33 +0200
committer/dev/humancontroller <devhc@example.com>2017-04-06 20:36:00 +0200
commitbf8e553ffb8665b1b5a8289de3276f39d6abff04 (patch)
tree2a0f10a431c0466b58fa8bf466cbc05a11022cbc
parent6746eb87f6893045e5dd6951094d219df9f0ddac (diff)
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
-rw-r--r--src/cgame/cg_predict.c3
-rw-r--r--src/server/sv_world.c4
2 files changed, 5 insertions, 2 deletions
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 ) {