summaryrefslogtreecommitdiff
path: root/src/game/g_misc.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2015-02-02 17:06:50 +0100
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:14 +0100
commit572719119e7f727d8eb91ed50fec15b71ea4117d (patch)
treeeb3c7b779ca639a12a01729dc10b2474a9252d3a /src/game/g_misc.c
parente52255589bcd37a841cf275e13ae1abf427c7c79 (diff)
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
Diffstat (limited to 'src/game/g_misc.c')
-rw-r--r--src/game/g_misc.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/game/g_misc.c b/src/game/g_misc.c
index 3f7b132b..87b13c7a 100644
--- a/src/game/g_misc.c
+++ b/src/game/g_misc.c
@@ -44,7 +44,7 @@ target_position does the same thing
*/
void SP_info_notnull( gentity_t *self )
{
- G_SetOrigin( self, self->s.origin );
+ G_SetOrigin( self, self->r.currentOrigin );
}
@@ -136,8 +136,7 @@ void SP_misc_model( gentity_t *ent )
VectorSet (ent->maxs, 16, 16, 16);
trap_LinkEntity (ent);
- G_SetOrigin( ent, ent->s.origin );
- VectorCopy( ent->s.angles, ent->s.apos.trBase );
+ G_SetOrigin( ent, ent->r.currentOrigin );
#else
G_FreeEntity( ent );
#endif
@@ -178,17 +177,17 @@ void locateCamera( gentity_t *ent )
// clientNum holds the rotate offset
ent->s.clientNum = owner->s.clientNum;
- VectorCopy( owner->s.origin, ent->s.origin2 );
+ VectorCopy( owner->r.currentOrigin, ent->s.origin2 );
// see if the portal_camera has a target
target = G_PickTarget( owner->target );
if( target )
{
- VectorSubtract( target->s.origin, owner->s.origin, dir );
+ VectorSubtract( target->r.currentOrigin, owner->r.currentOrigin, dir );
VectorNormalize( dir );
}
else
- G_SetMovedir( owner->s.angles, dir );
+ G_SetMovedir( owner->r.currentAngles, dir );
ent->s.eventParm = DirToByte( dir );
}
@@ -208,7 +207,7 @@ void SP_misc_portal_surface( gentity_t *ent )
if( !ent->target )
{
- VectorCopy( ent->s.origin, ent->s.origin2 );
+ VectorCopy( ent->r.currentOrigin, ent->s.origin2 );
}
else
{
@@ -280,8 +279,7 @@ void SP_misc_particle_system( gentity_t *self )
{
char *s;
- G_SetOrigin( self, self->s.origin );
- VectorCopy( self->s.angles, self->s.apos.trBase );
+ G_SetOrigin( self, self->r.currentOrigin );
G_SpawnString( "psName", "", &s );
G_SpawnFloat( "wait", "0", &self->wait );
@@ -428,7 +426,7 @@ void SP_misc_light_flare( gentity_t *self )
//try to find a spot near to the flare which is empty. This
//is used to facilitate visibility testing
- findEmptySpot( self->s.origin, 8.0f, self->s.angles2 );
+ findEmptySpot( self->r.currentOrigin, 8.0f, self->s.angles2 );
self->use = SP_use_light_flare;