diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index 554f4f16..0c0a965c 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -2015,7 +2015,7 @@ static void CG_ScanForCrosshairEntity( void ) { } // if the player is in fog, don't show it - content = trap_CM_PointContents( trace.endpos, 0 ); + content = CG_PointContents( trace.endpos, 0 ); if ( content & CONTENTS_FOG ) { return; } diff --git a/code/cgame/cg_localents.c b/code/cgame/cg_localents.c index 8077cbdd..83ba49de 100644 --- a/code/cgame/cg_localents.c +++ b/code/cgame/cg_localents.c @@ -298,7 +298,7 @@ void CG_AddFragment( localEntity_t *le ) { // if it is in a nodrop zone, remove it // this keeps gibs from waiting at the bottom of pits of death // and floating levels - if ( trap_CM_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) { + if ( CG_PointContents( trace.endpos, 0 ) & CONTENTS_NODROP ) { CG_FreeLocalEntity( le ); return; } diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index 580154cb..5e4409ca 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -1543,7 +1543,7 @@ static void CG_BreathPuffs( centity_t *cent, refEntity_t *head) { if ( cent->currentState.eFlags & EF_DEAD ) { return; } - contents = trap_CM_PointContents( head->origin, 0 ); + contents = CG_PointContents( head->origin, 0 ); if ( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) { return; } @@ -2059,7 +2059,7 @@ static void CG_PlayerSplash( centity_t *cent ) { // if the feet aren't in liquid, don't make a mark // this won't handle moving water brushes, but they wouldn't draw right anyway... - contents = trap_CM_PointContents( end, 0 ); + contents = CG_PointContents( end, 0 ); if ( !( contents & ( CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) ) { return; } @@ -2068,7 +2068,7 @@ static void CG_PlayerSplash( centity_t *cent ) { start[2] += 32; // if the head isn't out of liquid, don't make a mark - contents = trap_CM_PointContents( start, 0 ); + contents = CG_PointContents( start, 0 ); if ( contents & ( CONTENTS_SOLID | CONTENTS_WATER | CONTENTS_SLIME | CONTENTS_LAVA ) ) { return; } diff --git a/code/cgame/cg_predict.c b/code/cgame/cg_predict.c index 4df947d0..22ea78b5 100644 --- a/code/cgame/cg_predict.c +++ b/code/cgame/cg_predict.c @@ -186,7 +186,8 @@ int CG_PointContents( const vec3_t point, int passEntityNum ) { continue; } - contents |= trap_CM_TransformedPointContents( point, cmodel, ent->origin, ent->angles ); + // Ensiform : Trivial change to use the projected origin & angles of moving water based entities. + contents |= trap_CM_TransformedPointContents( point, cmodel, cent->lerpOrigin, cent->lerpAngles ); } return contents; diff --git a/code/cgame/cg_weapons.c b/code/cgame/cg_weapons.c index 9494e28c..fff4197b 100644 --- a/code/cgame/cg_weapons.c +++ b/code/cgame/cg_weapons.c @@ -2027,8 +2027,8 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum ) { CG_Trace( &tr, start, NULL, NULL, end, skipNum, MASK_SHOT ); - sourceContentType = trap_CM_PointContents( start, 0 ); - destContentType = trap_CM_PointContents( tr.endpos, 0 ); + sourceContentType = CG_PointContents( start, 0 ); + destContentType = CG_PointContents( tr.endpos, 0 ); // FIXME: should probably move this cruft into CG_BubbleTrail if ( sourceContentType == destContentType ) { @@ -2115,7 +2115,7 @@ void CG_ShotgunFire( entityState_t *es ) { // ragepro can't alpha fade, so don't even bother with smoke vec3_t up; - contents = trap_CM_PointContents( es->pos.trBase, 0 ); + contents = CG_PointContents( es->pos.trBase, 0 ); if ( !( contents & CONTENTS_WATER ) ) { VectorSet( up, 0, 0, 8 ); CG_SmokePuff( v, up, 32, 1, 1, 1, 0.33f, 900, cg.time, 0, LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader ); @@ -2268,8 +2268,8 @@ void CG_Bullet( vec3_t end, int sourceEntityNum, vec3_t normal, qboolean flesh, // do trail effects if ( sourceEntityNum >= 0 && cg_tracerChance.value > 0 ) { if ( CG_CalcMuzzlePoint( sourceEntityNum, start ) ) { - sourceContentType = trap_CM_PointContents( start, 0 ); - destContentType = trap_CM_PointContents( end, 0 ); + sourceContentType = CG_PointContents( start, 0 ); + destContentType = CG_PointContents( end, 0 ); // do a complete bubble trail if necessary if ( ( sourceContentType == destContentType ) && ( sourceContentType & CONTENTS_WATER ) ) {