From 9792c9f07296521a881800d12bf4d8deccefc30e Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 25 Aug 2017 00:10:19 +0200 Subject: Handle movers in CG_PointContents. This fixes the massive prediction errors that happen on maps where water or lava can move. --- src/cgame/cg_predict.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/cgame') 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; -- cgit