playerstate and stopfollow

Locked
UNI
Posts: 7
Joined: Fri Nov 26, 2010 5:22 am

playerstate and stopfollow

Post 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?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: playerstate and stopfollow

Post by ^misantropia^ »

Sure. Is your question "where should I do that"?
UNI
Posts: 7
Joined: Fri Nov 26, 2010 5:22 am

Re: playerstate and stopfollow

Post 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.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: playerstate and stopfollow

Post by ^misantropia^ »

StopFollow() in game/g_cmds.c is probaby the place. Might not be applicable to all Q3A games.
UNI
Posts: 7
Joined: Fri Nov 26, 2010 5:22 am

Re: playerstate and stopfollow

Post by UNI »

Thanks sorry 1 more question.
Where is the followed playerstate copied to the spectator
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: playerstate and stopfollow

Post by ^misantropia^ »

In SpectatorClientEndFrame() in game/g_active.c.
UNI
Posts: 7
Joined: Fri Nov 26, 2010 5:22 am

Re: playerstate and stopfollow

Post by UNI »

Thanks again <3
Locked