From 950552fcdf86618b97a5af141b11a709b4111e31 Mon Sep 17 00:00:00 2001 From: thilo Date: Thu, 8 Oct 2009 23:01:39 +0000 Subject: Add guid to userinfo string, thanks Guillaume Bougard. https://bugzilla.icculus.org/show_bug.cgi?id=3570 git-svn-id: svn://svn.icculus.org/quake3/trunk@1653 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/game/g_client.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'code/game') diff --git a/code/game/g_client.c b/code/game/g_client.c index 68ad987..7160e31 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -687,6 +687,7 @@ void ClientUserinfoChanged( int clientNum ) { char redTeam[MAX_INFO_STRING]; char blueTeam[MAX_INFO_STRING]; char userinfo[MAX_INFO_STRING]; + char guid[MAX_INFO_STRING]; ent = g_entities + clientNum; client = ent->client; @@ -837,17 +838,21 @@ void ClientUserinfoChanged( int clientNum ) { strcpy(redTeam, Info_ValueForKey( userinfo, "g_redteam" )); strcpy(blueTeam, Info_ValueForKey( userinfo, "g_blueteam" )); - + strcpy(guid, Info_ValueForKey(userinfo, "cl_guid")); + // send over a subset of the userinfo keys so other clients can // print scoreboards, display models, and play custom sounds - if ( ent->r.svFlags & SVF_BOT ) { + if (ent->r.svFlags & SVF_BOT) + { s = va("n\\%s\\t\\%i\\model\\%s\\hmodel\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\skill\\%s\\tt\\%d\\tl\\%d", client->pers.netname, team, model, headModel, c1, c2, client->pers.maxHealth, client->sess.wins, client->sess.losses, Info_ValueForKey( userinfo, "skill" ), teamTask, teamLeader ); - } else { - s = va("n\\%s\\t\\%i\\model\\%s\\hmodel\\%s\\g_redteam\\%s\\g_blueteam\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\tt\\%d\\tl\\%d", - client->pers.netname, client->sess.sessionTeam, model, headModel, redTeam, blueTeam, c1, c2, + } + else + { + s = va("n\\%s\\guid\\%s\\t\\%i\\model\\%s\\hmodel\\%s\\g_redteam\\%s\\g_blueteam\\%s\\c1\\%s\\c2\\%s\\hc\\%i\\w\\%i\\l\\%i\\tt\\%d\\tl\\%d", + client->pers.netname, guid, client->sess.sessionTeam, model, headModel, redTeam, blueTeam, c1, c2, client->pers.maxHealth, client->sess.wins, client->sess.losses, teamTask, teamLeader); } -- cgit v1.2.3