+ // update the host_client fields we care about according to the entity fields
+ sv_player = host_client->edict;
+ s = PR_GetString(sv_player->v->netname);
+ if (s != host_client->name)
+ {
+ 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, client = svs.clients ; j<svs.maxclients ; j++, client++)
+ {
+ if (!client->active || !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, client = svs.clients ; j<svs.maxclients ; j++, client++)
+ {
+ if (!client->active || !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)