alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
// detect dedicated server or client
-alias "_detect_dedicated_$qport" "$*"
+alias "_detect_dedicated_$qport" "${* asis}"
alias "_detect_dedicated_0" ""
-alias if_dedicated "_detect_dedicated_$qport ${* asis}"
+alias _if_dedicated "_detect_dedicated_$qport ${* asis}"
alias if_client "${* asis}"
-if_dedicated alias if_client ""
+alias if_dedicated "${* asis}"
+_if_dedicated alias if_client ""
+if_client alias if_dedicated ""
seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
locs_enable 0
pausable 0
-seta g_spawnshieldtime 0.3 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
+seta g_spawnshieldtime 0.300000 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
seta g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
set g_antilag_nudge 0 "don't touch"
set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
seta teamplay_default 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
-seta g_mirrordamage 0.3 "for teamplay 4: mirror damage factor"
-seta g_friendlyfire 0.1 "for teamplay 4: fiendly fire factor"
+seta g_mirrordamage 0.300000 "for teamplay 4: mirror damage factor"
+seta g_friendlyfire 0.100000 "for teamplay 4: fiendly fire factor"
seta g_teamdamage_threshold 50 "for teamplay 4: threshold over which to apply mirror damage"
seta g_teamdamage_resetspeed 30 "for teamplay 4: how fast player's teamdamage count decreases"
alias +userbind "_userbind_call userbind${1}_press"
alias -userbind "_userbind_call userbind${1}_release"
+// we must change its default from 1.0 to 1 to be consistent with menuqc
+seta slowmo 1
+
seta menu_skin "luminos"
set menu_slowmo 1
seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
set g_maplist_allow_hidden 0 "allow hidden maps to be, e.g., voted for and in the maplist"
set g_maplist_allow_frustrating 0 "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
-seta g_start_delay 0 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
- if_dedicated set g_start_delay 15
+if_client set g_start_delay 0 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
+if_dedicated set g_start_delay 15 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
alias ons_map "cl_cmd radar" // legacy alias
alias radar "cl_cmd radar"
}
if(fh < 0)
return 0;
- print("Analyzing ", fn, " to generate initial mapinfo; please edit that file later\n");
+ print("Analyzing ", fn, " to generate initial mapinfo\n");
inWorldspawn = 2;
MapInfo_Map_flags = 0;
fh = fopen(fn, FILE_READ);
if(fh < 0)
{
- if(!pAllowGenerate)
- return 0;
- _MapInfo_Map_Reset();
- r = _MapInfo_Generate(pFilename);
- if(!r)
- return 0;
- fh = fopen(fn, FILE_WRITE);
- fputs(fh, strcat("title ", MapInfo_Map_title, "\n"));
- fputs(fh, strcat("description ", MapInfo_Map_description, "\n"));
- fputs(fh, strcat("author ", MapInfo_Map_author, "\n"));
- if(_MapInfo_Map_worldspawn_music != "")
+ fn = strcat("maps/autogenerated/", pFilename, ".mapinfo");
+ fh = fopen(fn, FILE_READ);
+ if(fh < 0)
{
- if(
- substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".wav"
- ||
- substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".ogg"
- )
- fputs(fh, strcat("cdtrack ", substring(_MapInfo_Map_worldspawn_music, 0, strlen(_MapInfo_Map_worldspawn_music) - 4), "\n"));
+ if(!pAllowGenerate)
+ return 0;
+ _MapInfo_Map_Reset();
+ r = _MapInfo_Generate(pFilename);
+ if(!r)
+ return 0;
+ fh = fopen(fn, FILE_WRITE);
+ fputs(fh, strcat("title ", MapInfo_Map_title, "\n"));
+ fputs(fh, strcat("description ", MapInfo_Map_description, "\n"));
+ fputs(fh, strcat("author ", MapInfo_Map_author, "\n"));
+ if(_MapInfo_Map_worldspawn_music != "")
+ {
+ if(
+ substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".wav"
+ ||
+ substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".ogg"
+ )
+ fputs(fh, strcat("cdtrack ", substring(_MapInfo_Map_worldspawn_music, 0, strlen(_MapInfo_Map_worldspawn_music) - 4), "\n"));
+ else
+ fputs(fh, strcat("cdtrack ", _MapInfo_Map_worldspawn_music, "\n"));
+ }
else
- fputs(fh, strcat("cdtrack ", _MapInfo_Map_worldspawn_music, "\n"));
- }
- else
- {
- n = tokenize_console(cvar_string("g_cdtracks_remaplist"));
- s = strcat(" ", cvar_string("g_cdtracks_dontusebydefault"), " ");
- for(;;)
{
- i = floor(random() * n);
- if(strstrofs(s, strcat(" ", argv(i), " "), 0) < 0)
- break;
+ n = tokenize_console(cvar_string("g_cdtracks_remaplist"));
+ s = strcat(" ", cvar_string("g_cdtracks_dontusebydefault"), " ");
+ for(;;)
+ {
+ i = floor(random() * n);
+ if(strstrofs(s, strcat(" ", argv(i), " "), 0) < 0)
+ break;
+ }
+ fputs(fh, strcat("cdtrack ", ftos(i + 1), "\n"));
}
- fputs(fh, strcat("cdtrack ", ftos(i + 1), "\n"));
- }
- if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS)
- fputs(fh, "has weapons\n");
- else
- fputs(fh, "// uncomment this if you added weapon pickups: has weapons\n");
- if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
- fputs(fh, "frustrating\n");
+ if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS)
+ fputs(fh, "has weapons\n");
+ else
+ fputs(fh, "// uncomment this if you added weapon pickups: has weapons\n");
+ if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
+ fputs(fh, "frustrating\n");
- for(i = 1; i <= MapInfo_Map_supportedGametypes; i *= 2)
- if(MapInfo_Map_supportedGametypes & i)
- fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(i), _MapInfo_GetDefaultEx(i)));
+ for(i = 1; i <= MapInfo_Map_supportedGametypes; i *= 2)
+ if(MapInfo_Map_supportedGametypes & i)
+ fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(i), _MapInfo_GetDefaultEx(i)));
- fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
- if(fh2 >= 0)
- {
- fclose(fh2);
- fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n");
- }
+ fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
+ if(fh2 >= 0)
+ {
+ fclose(fh2);
+ fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n");
+ }
- fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n");
- fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
- fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n");
- fputs(fh, "// optional: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
- fputs(fh, "// optional: hidden\n");
+ fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n");
+ fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
+ fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n");
+ fputs(fh, "// optional: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+ fputs(fh, "// optional: hidden\n");
- fclose(fh);
- r = 2;
- // return r;
- fh = fopen(fn, FILE_READ);
- if(fh < 0)
- error("... but I just wrote it!");
+ fclose(fh);
+ r = 2;
+ // return r;
+ fh = fopen(fn, FILE_READ);
+ if(fh < 0)
+ error("... but I just wrote it!");
+ }
+
+ print("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
}
_MapInfo_Map_Reset();
SKINVECTOR(COLOR_SERVERLIST_FAVORITE, '1 1 1');
SKINFLOAT(ALPHA_SERVERLIST_IMPOSSIBLE, 0.7);
SKINVECTOR(COLOR_SERVERLIST_IMPOSSIBLE, '0.3 0.3 0.3');
+ SKINSTRING(GFX_SERVERLIST_ICON, "icon");
// item: server info
SKINVECTOR(COLOR_SERVERINFO_NAME, '1 1 1');
ATTRIB(XonoticAdvancedDialog, title, string, "Advanced server settings")
ATTRIB(XonoticAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
ATTRIB(XonoticAdvancedDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticAdvancedDialog, rows, float, 14)
+ ATTRIB(XonoticAdvancedDialog, rows, float, 13)
ATTRIB(XonoticAdvancedDialog, columns, float, 3)
ATTRIB(XonoticAdvancedDialog, refilterEntity, entity, NULL)
ENDCLASS(XonoticAdvancedDialog)
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Spawn shield:"));
me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Start delay:"));
- me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 30, 0.5, "g_start_delay"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
ATTRIB(XonoticServerInfoDialog, title, string, "Server Information")
ATTRIB(XonoticServerInfoDialog, color, vector, SKINCOLOR_DIALOG_SERVERINFO)
ATTRIB(XonoticServerInfoDialog, intendedWidth, float, 0.68)
- ATTRIB(XonoticServerInfoDialog, rows, float, 14)
+ ATTRIB(XonoticServerInfoDialog, rows, float, 15)
ATTRIB(XonoticServerInfoDialog, columns, float, 12)
ATTRIB(XonoticServerInfoDialog, currentServerName, string, string_null)
ATTRIB(XonoticServerInfoDialog, currentServerID, string, string_null)
ATTRIB(XonoticServerInfoDialog, currentServerEncrypt, string, string_null)
ATTRIB(XonoticServerInfoDialog, currentServerCanConnect, string, string_null)
+ ATTRIB(XonoticServerInfoDialog, currentServerPure, string, string_null)
ATTRIB(XonoticServerInfoDialog, nameLabel, entity, NULL)
ATTRIB(XonoticServerInfoDialog, cnameLabel, entity, NULL)
ATTRIB(XonoticServerInfoDialog, idLabel, entity, NULL)
ATTRIB(XonoticServerInfoDialog, encryptLabel, entity, NULL)
ATTRIB(XonoticServerInfoDialog, canConnectLabel, entity, NULL)
+ ATTRIB(XonoticServerInfoDialog, pureLabel, entity, NULL)
ENDCLASS(XonoticServerInfoDialog)
float SLIST_FIELD_NAME;
#ifdef IMPLEMENTATION
void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
{
- float m;
- string s, typestr, versionstr, numh, maxp;
+ float m, pure, j;
+ string s, typestr, versionstr, numh, maxp, k, v;
SLIST_FIELD_NAME = gethostcacheindexforkey("name");
me.currentServerName = strzone(gethostcachestring(SLIST_FIELD_NAME, i));
me.currentServerCName = strzone(gethostcachestring(SLIST_FIELD_CNAME, i));
me.cnameLabel.setText(me.cnameLabel, me.currentServerCName);
+ pure = -1;
+ typestr = "N/A";
+ versionstr = "N/A";
+
SLIST_FIELD_QCSTATUS = gethostcacheindexforkey("qcstatus");
s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
m = tokenizebyseparator(s, ":");
- if(m > 1)
+ if(m >= 2)
{
- typestr = argv (0);
+ typestr = argv(0);
versionstr = argv(1);
}
- else
+ for(j = 2; j < m; ++j)
{
- typestr = "N/A";
- versionstr = "N/A";
+ if(argv(j) == "")
+ break;
+ k = substring(argv(j), 0, 1);
+ v = substring(argv(j), 1, -1);
+ if(k == "P")
+ pure = stof(v);
}
+
me.currentServerType = strzone(typestr);
me.typeLabel.setText(me.typeLabel, me.currentServerType);
me.currentServerVersion = strzone(versionstr);
me.versionLabel.setText(me.versionLabel, me.currentServerVersion);
+ me.currentServerPure = ((pure < 0) ? "N/A" : (pure == 0) ? "Official settings" : sprintf("%d modified settings", pure));
+ me.pureLabel.setText(me.pureLabel, me.currentServerPure);
+
SLIST_FIELD_PING = gethostcacheindexforkey("ping");
s = ftos(gethostcachenumber(SLIST_FIELD_PING, i));
me.currentServerPing = strzone(s);
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.mapLabel = e;
+ me.TR(me);
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Gameplay:"));
+ me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+ e.allowCut = 1;
+ me.pureLabel = e;
me.TR(me);
me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Players:"));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
ATTRIB(XonoticServerList, realFontSize, vector, '0 0 0')
ATTRIB(XonoticServerList, realUpperMargin, float, 0)
+ ATTRIB(XonoticServerList, columnIconsOrigin, float, 0)
+ ATTRIB(XonoticServerList, columnIconsSize, float, 0)
ATTRIB(XonoticServerList, columnPingOrigin, float, 0)
ATTRIB(XonoticServerList, columnPingSize, float, 0)
ATTRIB(XonoticServerList, columnNameOrigin, float, 0)
me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
- me.columnPingOrigin = 0;
+ me.columnIconsOrigin = 0;
+ me.columnIconsSize = me.realFontSize_x * 2;
me.columnPingSize = me.realFontSize_x * 4;
me.columnMapSize = me.realFontSize_x * 12;
me.columnTypeSize = me.realFontSize_x * 4;
me.columnPlayersSize = me.realFontSize_x * 6;
- me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnTypeSize - 4 * me.realFontSize_x;
+ me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnIconsSize - me.columnTypeSize - 5 * me.realFontSize_x;
+ me.columnPingOrigin = me.columnIconsOrigin + me.columnIconsSize + me.realFontSize_x;
me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
me.columnMapOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
me.columnTypeOrigin = me.columnMapOrigin + me.columnMapSize + me.realFontSize_x;
theColor = SKINCOLOR_SERVERLIST_IMPOSSIBLE;
theAlpha = SKINALPHA_SERVERLIST_IMPOSSIBLE;
}
- // TODO show an icon for encryption status
+
+ if(q == 1)
+ {
+ if(cvar("crypto_aeslevel") >= 2)
+ q |= 4;
+ }
+ if(q == 2)
+ {
+ if(cvar("crypto_aeslevel") >= 1)
+ q |= 4;
+ }
+ if(q == 3)
+ q = 5;
+ if(q >= 3)
+ q -= 2;
+ // possible status:
+ // 0: crypto off
+ // 1: AES possible
+ // 2: AES recommended but not available
+ // 3: AES possible and will be used
+ // 4: AES recommended and will be used
+ // 5: AES required
+
+ s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
+ {
+ vector iconSize;
+ iconSize_y = 1;
+ iconSize_x = iconSize_y * (absSize_y / absSize_x);
+
+ vector iconPos;
+ iconPos_x = (me.columnIconsSize - 2 * iconSize_x) * 0.5;
+ iconPos_y = (1 - iconSize_y) * 0.5;
+
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure", ftos(strstrofs(s, ":P0:", 0) >= 0)), iconSize, '1 1 1', 1);
+
+ iconPos_x += iconSize_x;
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
+ }
s = ftos(p);
draw_Text(me.realUpperMargin * eY + (me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
Score_NicePrint(self);
} else if(cmd == "cvar_changes") {
sprint(self, cvar_changes);
+ } else if(cmd == "cvar_purechanges") {
+ sprint(self, cvar_purechanges);
} else if(CheatCommand(tokens)) {
} else {
//if(ctf_clientcommand())
.string fog;
string cvar_changes;
+string cvar_purechanges;
+float cvar_purechanges_count;
float game_starttime; //point in time when the countdown is over
.float stat_game_starttime;
{
float h;
string k, v, d;
- float n, i;
+ float n, i, adding, pureadding;
if(cvar_changes)
strunzone(cvar_changes);
cvar_changes = string_null;
+ if(cvar_purechanges)
+ strunzone(cvar_purechanges);
+ cvar_purechanges = string_null;
+ cvar_purechanges_count = 0;
h = buf_create();
buf_cvarlist(h, "", "_"); // exclude all _ cvars as they are temporary
n = buf_getsize(h);
+ adding = TRUE;
+ pureadding = TRUE;
+
for(i = 0; i < n; ++i)
{
k = bufstr_get(h, i);
BADPREFIX("sv_world");
// client
+ BADPREFIX("chase_");
BADPREFIX("cl_");
BADPREFIX("con_");
+ BADPREFIX("scoreboard_");
BADPREFIX("g_campaign");
BADPREFIX("gl_");
BADPREFIX("joy");
+ BADPREFIX("hud_");
BADPREFIX("menu_");
BADPREFIX("net_slist_");
BADPREFIX("r_");
BADPREFIX("sbar_");
BADPREFIX("scr_");
+ BADPREFIX("snd_");
BADPREFIX("userbind");
BADPREFIX("v_");
BADPREFIX("vid_");
BADPREFIX("crosshair");
BADCVAR("mod_q3bsp_lightmapmergepower");
BADCVAR("mod_q3bsp_nolightmaps");
+ BADCVAR("fov");
+ BADCVAR("mastervolume");
+ BADCVAR("volume");
+ BADCVAR("bgmvolume");
// private
BADCVAR("serverconfig");
BADCVAR("timestamps");
BADCVAR("net_address");
BADCVAR("net_address_ipv6");
+ BADPREFIX("sv_weaponstats_");
+ BADCVAR("developer");
+ BADPREFIX("developer_");
// mapinfo
BADCVAR("timelimit");
BADCVAR("g_maplist");
BADCVAR("g_maplist_mostrecent");
BADCVAR("sv_motd");
-#undef BADPREFIX
-#undef BADCVAR
v = cvar_string(k);
d = cvar_defstring(k);
- if(v != d)
+ if(v == d)
+ continue;
+
+ if(adding)
{
cvar_changes = strcat(cvar_changes, k, " \"", v, "\" // \"", d, "\"\n");
if(strlen(cvar_changes) > 16384)
{
cvar_changes = "// too many settings have been changed to show them here\n";
- break;
+ adding = 0;
}
}
+
+ // now check if the changes are actually gameplay relevant
+
+ // does nothing visible
+ BADPREFIX("prvm_");
+ BADPREFIX("crypto_");
+
+ // allowed changes to server admins (please sync this to server.cfg)
+ // vi commands:
+ // :/"impure"/,$d
+ // :g!,^\/\/[^ /],d
+ // :%s,//\([^ ]*\).*,BADCVAR("\1");,
+ // :%!sort
+ // yes, this does contain some redundant stuff, don't really care
+ BADCVAR("bot_number");
+ BADCVAR("bot_prefix");
+ BADCVAR("bot_suffix");
+ BADCVAR("capturelimit_override");
+ BADCVAR("fraglimit_override");
+ BADCVAR("gametype");
+ BADCVAR("g_antilag");
+ BADCVAR("g_balance_teams");
+ BADCVAR("g_balance_teams_force");
+ BADCVAR("g_ban_sync_trusted_servers");
+ BADCVAR("g_ban_sync_uri");
+ BADCVAR("g_ctf_capture_limit");
+ BADCVAR("g_ctf_ignore_frags");
+ BADCVAR("g_ctf_win_mode");
+ BADCVAR("g_domination_point_limit");
+ BADCVAR("g_fullbrightitems");
+ BADCVAR("g_fullbrightplayers");
+ BADCVAR("g_keyhunt_point_limit");
+ BADCVAR("g_keyhunt_teams_override");
+ BADCVAR("g_lms_lives_override");
+ BADCVAR("g_maplist");
+ BADCVAR("g_maplist_check_waypoints");
+ BADCVAR("g_maplist_mostrecent_count");
+ BADCVAR("g_maplist_shuffle");
+ BADCVAR("g_maplist_votable");
+ BADCVAR("g_maplist_votable_abstain");
+ BADCVAR("g_maplist_votable_nodetail");
+ BADCVAR("g_maplist_votable_suggestions");
+ BADCVAR("g_nexball_goallimit");
+ BADCVAR("g_runematch_point_limit");
+ BADCVAR("g_start_delay");
+ BADCVAR("hostname");
+ BADCVAR("log_file");
+ BADCVAR("maxplayers");
+ BADCVAR("minplayers");
+ BADCVAR("net_address");
+ BADCVAR("port");
+ BADCVAR("rcon_password");
+ BADCVAR("rcon_restricted_commands");
+ BADCVAR("rcon_restricted_password");
+ BADCVAR("skill");
+ BADCVAR("sv_autoscreenshot");
+ BADCVAR("sv_curl_defaulturl");
+ BADCVAR("sv_defaultcharacter");
+ BADCVAR("sv_defaultplayermodel");
+ BADCVAR("sv_defaultplayerskin");
+ BADCVAR("sv_maxrate");
+ BADCVAR("sv_maxidle");
+ BADCVAR("sv_motd");
+ BADCVAR("sv_public");
+ BADCVAR("sv_ready_restart");
+ BADCVAR("sv_status_privacy");
+ BADCVAR("sv_vote_call");
+ BADCVAR("sv_vote_commands");
+ BADCVAR("sv_vote_majority_factor");
+ BADCVAR("sv_vote_master");
+ BADCVAR("sv_vote_master_commands");
+ BADCVAR("sv_vote_master_password");
+ BADCVAR("sv_vote_simple_majority_factor");
+ BADCVAR("timelimit_override");
+#undef BADPREFIX
+#undef BADCVAR
+
+ if(pureadding)
+ {
+ cvar_purechanges = strcat(cvar_purechanges, k, " \"", v, "\" // \"", d, "\"\n");
+ if(strlen(cvar_purechanges) > 16384)
+ {
+ cvar_purechanges = "// too many settings have been changed to show them here\n";
+ pureadding = 0;
+ }
+ }
+ ++cvar_purechanges_count;
}
buf_del(h);
if(cvar_changes == "")
- cvar_changes = "// this server runs at default settings\n";
+ cvar_changes = "// this server runs at default server settings\n";
else
- cvar_changes = strcat("// this server runs at modified settings:\n", cvar_changes);
+ cvar_changes = strcat("// this server runs at modified server settings:\n", cvar_changes);
cvar_changes = strzone(cvar_changes);
+ if(cvar_purechanges == "")
+ cvar_purechanges = "// this server runs at default gameplay settings\n";
+ else
+ cvar_purechanges = strcat("// this server runs at modified gameplay settings:\n", cvar_purechanges);
+ cvar_purechanges = strzone(cvar_purechanges);
}
void detect_maptype()
check_unacceptable_compiler_bugs();
+ cvar_changes_init(); // do this very early now so it REALLY matches the server config
+
compressShortVector_init();
allowed_to_spawn = TRUE;
addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
next_pingtime = time + 5;
- InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS);
detect_maptype();
print(" radarmap [--force] [--quit | --loop] [sharpness]\n");
print(" bbox\n");
print(" cvar_changes\n");
+ print(" cvar_purechanges\n");
print(" find classname\n");
GameCommand_Vote("help", world);
GameCommand_Ban("help");
print(cvar_changes);
return;
}
+ if (argv(0) == "cvar_purechanges")
+ {
+ print(cvar_purechanges);
+ return;
+ }
if (argv(0) == "find") if(argc == 2)
{
for(client = world; (client = find(client, classname, argv(1))); )
#define INITPRIO_FIRST 0
#define INITPRIO_GAMETYPE 0
#define INITPRIO_GAMETYPE_FALLBACK 1
-#define INITPRIO_CVARS 5
#define INITPRIO_FINDTARGET 10
#define INITPRIO_DROPTOFLOOR 20
#define INITPRIO_SETLOCATION 90
s = GetGametype();
s = strcat(s, ":", cvar_string("g_xonoticversion"));
- s = strcat(s, "::", GetPlayerScoreString(world, 2)); // make this 1 once we can
+ s = strcat(s, ":P", ftos(cvar_purechanges_count));
+ s = strcat(s, "::", GetPlayerScoreString(world, 1)); // make this 1 once we can, note: this doesn't contain any :<letter>
fullstatus = cvar("g_full_getstatus_responses");