float i;
WriteHeader(MSG_ENTITY, ENT_CLIENT_SCORES_INFO);
WriteRegistered(Gametypes, MSG_ENTITY, MapInfo_LoadedGametype);
+ string gt_name = "";
+ if (loaded_gametype_custom_string != "")
+ gt_name = cvar_string(strcat("sv_vote_gametype_", loaded_gametype_custom_string, "_name"));
+ WriteString(MSG_ENTITY, gt_name);
FOREACH(Scores, true, {
WriteString(MSG_ENTITY, scores_label(it));
WriteByte(MSG_ENTITY, scores_flags(it));
{
float c;
string s;
- float fullstatus;
entity winnerscorekeeper;
entity secondscorekeeper;
entity sk;
// so to match pure, match for :P0:
// to match full, match for :S0:
- fullstatus = autocvar_g_full_getstatus_responses;
-
- s = GetGametype();
- s = strcat(s, ":", autocvar_g_xonoticversion);
- s = strcat(s, ":P", ftos(cvar_purechanges_count));
- s = strcat(s, ":S", ftos(nJoinAllowed(this, NULL)));
- s = strcat(s, ":F", ftos(serverflags));
- s = strcat(s, ":T", sv_termsofservice_url_escaped);
- s = strcat(s, ":M", modname);
- s = strcat(s, "::", GetPlayerScoreString(NULL, (fullstatus ? 1 : 2)));
+ // NOTE can't use a single strcat because strcat concatenates max 8 strings
+ s = strcat(GetGametype(),
+ ":", autocvar_g_xonoticversion,
+ ":P", ftos(cvar_purechanges_count),
+ ":S", ftos(nJoinAllowed(this, NULL)));
+ s = strcat(s,
+ ":F", ftos(serverflags),
+ ":T", sv_termsofservice_url_escaped,
+ ":M", modname);
+ s = strcat(s,
+ "::", GetPlayerScoreString(NULL, (autocvar_g_full_getstatus_responses ? 1 : 2)));
if(teamscores_entities_count)
{
}
}
- strcpy(worldstatus, s);
+ if (s != worldstatus)
+ strcpy(worldstatus, s);
FOREACH_CLIENT(true, {
string s = "";
- if(fullstatus)
+ if(autocvar_g_full_getstatus_responses)
{
s = GetPlayerScoreString(it, 1);
s = strcat(s, IS_REAL_CLIENT(it) ? ":human" : ":bot");
s = "-666";
}
- strcpy(it.clientstatus, s);
+ if (s != it.clientstatus)
+ strcpy(it.clientstatus, s);
});
}