Page 1 of 1

playerstate and stopfollow

Posted: Fri Nov 26, 2010 5:47 am
by UNI
I'm sure this has been posted before but my search didn't come up with anything...
Anyway
When a spectator is following a client that clients playerstate overwrites the spectators.
I have noticed in a lot of quake 3 engine games that when the spectator calls stopfollow some of the previous spectated clients playerstate remains. Is there anyway to clear the previous playerstate?

Re: playerstate and stopfollow

Posted: Fri Nov 26, 2010 7:30 am
by ^misantropia^
Sure. Is your question "where should I do that"?

Re: playerstate and stopfollow

Posted: Fri Nov 26, 2010 6:21 pm
by UNI
Sure. Is your question "where should I do that"?
Yes.
I'd like to do something universal across the couple q3 engine games I play.
I don't want any of those old entity numbers or or 2d images staying behind.

Re: playerstate and stopfollow

Posted: Fri Nov 26, 2010 7:50 pm
by ^misantropia^
StopFollow() in game/g_cmds.c is probaby the place. Might not be applicable to all Q3A games.

Re: playerstate and stopfollow

Posted: Fri Nov 26, 2010 8:56 pm
by UNI
Thanks sorry 1 more question.
Where is the followed playerstate copied to the spectator

Re: playerstate and stopfollow

Posted: Fri Nov 26, 2010 8:59 pm
by ^misantropia^
In SpectatorClientEndFrame() in game/g_active.c.

Re: playerstate and stopfollow

Posted: Sat Nov 27, 2010 12:52 am
by UNI
Thanks again <3