View Single Post
Old 09-13-2006, 03:00 PM   #129
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Quote:
Originally Posted by razorace
Also, the bug fix for item 1 in Enisform's first post doesn't fully work. It looks like currentOrigin doesn't work for spectators so you gotta do a spectator check and then return values based on that. As such, the proper fix should be....

g_cmd.c
Code:
void Cmd_Where_f( gentity_t *ent ) {
	trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) );
}
to

g_cmd.c
Code:
void Cmd_Where_f( gentity_t *ent ) {
	if(ent->client && ent->client->sess.sessionTeam != TEAM_SPECTATOR )
	{//active players use currentOrigin
		trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->r.currentOrigin ) ) );
	}
	else
	{
		trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) );
	}
}
fix? spectators don't really have an origin. try playing a map with location entities in them, it doesn't update and is not supposed to.


iojamp project lead / coder

Last edited by ensiform; 09-13-2006 at 03:22 PM.
ensiform is offline   you may: quote & reply,