Add guid to userinfo string, thanks Guillaume Bougard. https://bugzilla.icculus.org/show_bug.cgi?id=3570

This commit is contained in:
Thilo Schulz 2009-10-08 23:01:39 +00:00
parent 2d344eb82e
commit a97ab9f2fe

View file

@ -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);
}