From 572719119e7f727d8eb91ed50fec15b71ea4117d Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Mon, 2 Feb 2015 17:06:50 +0100 Subject: drop the use of the origin and angles fields of entityState_t in the game module clear the r.currentAngles field for brushmodel-related entities using the ''angle'' spawn var --- src/game/g_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/game/g_utils.c') diff --git a/src/game/g_utils.c b/src/game/g_utils.c index 8bce5a41..71cf52e4 100644 --- a/src/game/g_utils.c +++ b/src/game/g_utils.c @@ -716,7 +716,6 @@ void G_SetOrigin( gentity_t *ent, const vec3_t origin ) VectorClear( ent->s.pos.trDelta ); VectorCopy( origin, ent->r.currentOrigin ); - VectorCopy( origin, ent->s.origin ); } // from quakestyle.telefragged.com @@ -783,13 +782,13 @@ gentity_t *G_ClosestEnt( vec3_t origin, gentity_t **entities, int numEntities ) return NULL; closestEnt = entities[ 0 ]; - d = DistanceSquared( origin, closestEnt->s.origin ); + d = DistanceSquared( origin, closestEnt->r.currentOrigin ); for( i = 1; i < numEntities; i++ ) { gentity_t *ent = entities[ i ]; - nd = DistanceSquared( origin, ent->s.origin ); + nd = DistanceSquared( origin, ent->r.currentOrigin ); if( nd < d ) { d = nd; -- cgit