+ if (s == NULL)
+ s = "";
+ // point the string back at host_client->name to keep it safe
+ strncpy(host_client->name, s, sizeof(host_client->name) - 1);
+ sv_player->v->netname = PR_SetString(host_client->name);
+ }
+ if ((val = GETEDICTFIELDVALUE(sv_player, eval_clientcolors)) && host_client->colors != val->_float)
+ host_client->colors = val->_float;
+ host_client->frags = sv_player->v->frags;
+ if (gamemode == GAME_NEHAHRA)
+ if ((val = GETEDICTFIELDVALUE(sv_player, eval_pmodel)) && host_client->pmodel != val->_float)
+ host_client->pmodel = val->_float;
+
+ // if the fields changed, send messages about the changes
+ if (strcmp(host_client->old_name, host_client->name))
+ {
+ strcpy(host_client->old_name, host_client->name);
+ for (j = 0;j < MAX_SCOREBOARD;j++)
+ {
+ if (!(client = svs.connectedclients[j]) || !client->spawned)
+ continue;
+ MSG_WriteByte (&client->message, svc_updatename);
+ MSG_WriteByte (&client->message, i);
+ MSG_WriteString (&client->message, host_client->name);
+ }
+ }
+ if (host_client->old_colors != host_client->colors)
+ {
+ host_client->old_colors = host_client->colors;
+ for (j = 0;j < MAX_SCOREBOARD;j++)
+ {
+ if (!(client = svs.connectedclients[j]) || !client->spawned)
+ continue;
+ MSG_WriteByte (&client->message, svc_updatecolors);
+ MSG_WriteByte (&client->message, i);
+ MSG_WriteByte (&client->message, host_client->colors);
+ }
+ }
+ if (host_client->old_frags != host_client->frags)
+ {
+ host_client->old_frags = host_client->frags;
+ for (j = 0;j < MAX_SCOREBOARD;j++)
+ {
+ if (!(client = svs.connectedclients[j]) || !client->spawned)
+ continue;
+ MSG_WriteByte (&client->message, svc_updatefrags);
+ MSG_WriteByte (&client->message, i);
+ MSG_WriteShort (&client->message, host_client->frags);
+ }