From f09294cc07011035a476fab85f1d7447b93976ae Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 17 Jan 2005 17:46:49 +0000 Subject: [PATCH] A fix so *spectator via forceinfokey works properly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@806 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/pr_cmds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 126fcd4fb..7a50a048f 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -7313,7 +7313,7 @@ void PF_ForceInfoKey(progfuncs_t *prinst, struct globalvars_s *pr_globals) } else if (e1 <= sv.allocated_client_slots) { //woo. we found a client. - Info_SetValueForKey(svs.clients[e1-1].userinfo, key, value, MAX_INFO_STRING); + Info_SetValueForStarKey(svs.clients[e1-1].userinfo, key, value, MAX_INFO_STRING); SV_ExtractFromUserinfo (&svs.clients[e1-1]); @@ -7323,6 +7323,9 @@ void PF_ForceInfoKey(progfuncs_t *prinst, struct globalvars_s *pr_globals) MSG_WriteString (&sv.reliable_datagram, key); MSG_WriteString (&sv.reliable_datagram, Info_ValueForKey(svs.clients[e1-1].userinfo, key)); + if (!strcmp(key, "*spectator")) + svs.clients[e1-1].spectator = !!atoi(value); + G_FLOAT(OFS_RETURN) = 1; } else