summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-08-25 00:10:19 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-08-25 00:12:43 +0200
commit9792c9f07296521a881800d12bf4d8deccefc30e (patch)
treeff77452a44548305cc9e0b7584c96280d3f2d6c1
parent8bc5b6fdd9424823a0c46b961f4a4d12b2a8692c (diff)
Handle movers in CG_PointContents.fix/cg_pointcontents
This fixes the massive prediction errors that happen on maps where water or lava can move.
-rw-r--r--src/cgame/cg_predict.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c
index 0f95ea2..3324a9e 100644
--- a/src/cgame/cg_predict.c
+++ b/src/cgame/cg_predict.c
@@ -253,6 +253,7 @@ int CG_PointContents( const vec3_t point, int passEntityNum )
centity_t *cent;
clipHandle_t cmodel;
int contents;
+ vec3_t origin, angles;
contents = trap_CM_PointContents (point, 0);
@@ -273,7 +274,9 @@ int CG_PointContents( const vec3_t point, int passEntityNum )
if( !cmodel )
continue;
- contents |= trap_CM_TransformedPointContents( point, cmodel, ent->origin, ent->angles );
+ VectorCopy( cent->lerpAngles, angles );
+ BG_EvaluateTrajectory( &ent->pos, cg.physicsTime, origin );
+ contents |= trap_CM_TransformedPointContents( point, cmodel, origin, angles );
}
return contents;