[quake3-commits] r2010 - trunk/code/cgame
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jun 6 11:05:10 EDT 2011
Author: thilo
Date: 2011-06-06 11:05:10 -0400 (Mon, 06 Jun 2011)
New Revision: 2010
Modified:
trunk/code/cgame/cg_draw.c
trunk/code/cgame/cg_localents.c
trunk/code/cgame/cg_players.c
trunk/code/cgame/cg_predict.c
trunk/code/cgame/cg_weapons.c
Log:
(#5016) - Calls to trap_CM_PointContents don't update their origins based on moving entities (water). Patch by Ensiform
Modified: trunk/code/cgame/cg_draw.c
===================================================================
--- trunk/code/cgame/cg_draw.c 2011-06-06 15:03:27 UTC (rev 2009)
+++ trunk/code/cgame/cg_draw.c 2011-06-06 15:05:10 UTC (rev 2010)
@@ -2015,7 +2015,7 @@
}
// 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;
}
Modified: trunk/code/cgame/cg_localents.c
===================================================================
--- trunk/code/cgame/cg_localents.c 2011-06-06 15:03:27 UTC (rev 2009)
+++ trunk/code/cgame/cg_localents.c 2011-06-06 15:05:10 UTC (rev 2010)
@@ -298,7 +298,7 @@
// 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;
}
Modified: trunk/code/cgame/cg_players.c
===================================================================
--- trunk/code/cgame/cg_players.c 2011-06-06 15:03:27 UTC (rev 2009)
+++ trunk/code/cgame/cg_players.c 2011-06-06 15:05:10 UTC (rev 2010)
@@ -1543,7 +1543,7 @@
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 @@
// 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 @@
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;
}
Modified: trunk/code/cgame/cg_predict.c
===================================================================
--- trunk/code/cgame/cg_predict.c 2011-06-06 15:03:27 UTC (rev 2009)
+++ trunk/code/cgame/cg_predict.c 2011-06-06 15:05:10 UTC (rev 2010)
@@ -186,7 +186,8 @@
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;
Modified: trunk/code/cgame/cg_weapons.c
===================================================================
--- trunk/code/cgame/cg_weapons.c 2011-06-06 15:03:27 UTC (rev 2009)
+++ trunk/code/cgame/cg_weapons.c 2011-06-06 15:05:10 UTC (rev 2010)
@@ -2027,8 +2027,8 @@
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 @@
// 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 @@
// 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 ) ) {
More information about the quake3-commits
mailing list