]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'refs/remotes/origin/terencehill/crosshair_fix'
authorRudolf Polzer <divverent@alientrap.org>
Wed, 3 Nov 2010 09:28:41 +0000 (10:28 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 3 Nov 2010 09:40:26 +0000 (10:40 +0100)
36 files changed:
defaultXonotic.cfg
gfx/menu/default/icon_aeslevel0.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel1.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel2.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel3.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel4.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel5.tga [new file with mode: 0644]
gfx/menu/default/icon_pure0.tga [new file with mode: 0644]
gfx/menu/default/icon_pure1.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel0.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel1.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel2.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel3.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel4.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel5.tga [new file with mode: 0644]
gfx/menu/luminos/icon_pure0.tga [new file with mode: 0644]
gfx/menu/luminos/icon_pure1.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel0.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel1.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel2.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel3.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel4.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel5.tga [new file with mode: 0644]
gfx/menu/xaw/icon_pure0.tga [new file with mode: 0644]
gfx/menu/xaw/icon_pure1.tga [new file with mode: 0644]
qcsrc/common/mapinfo.qc
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/server/clientcommands.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/gamecommand.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/scores.qc

index 5d16591000a0b0f7e40a0b87080d4b17571a6a35..84157c2bf78089c1f3f9ac64adfc08f2ff012029 100644 (file)
@@ -26,11 +26,13 @@ gameversion_max 65535 // git builds see all versions
 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"
 
@@ -489,7 +491,7 @@ alias g_waypointeditor_unreachable "impulse 107"
 
 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)"
@@ -640,8 +642,8 @@ seta timelimit_suddendeath 5 "number of minutes suddendeath mode lasts after all
 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"
 
@@ -1339,6 +1341,9 @@ alias _userbind_call "${$1}"
 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"
@@ -1592,8 +1597,8 @@ seta sv_status_privacy 1  "hide IP addresses from \"status\" replies shown to cli
 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"
diff --git a/gfx/menu/default/icon_aeslevel0.tga b/gfx/menu/default/icon_aeslevel0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel0.tga differ
diff --git a/gfx/menu/default/icon_aeslevel1.tga b/gfx/menu/default/icon_aeslevel1.tga
new file mode 100644 (file)
index 0000000..f1e9273
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel1.tga differ
diff --git a/gfx/menu/default/icon_aeslevel2.tga b/gfx/menu/default/icon_aeslevel2.tga
new file mode 100644 (file)
index 0000000..7153820
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel2.tga differ
diff --git a/gfx/menu/default/icon_aeslevel3.tga b/gfx/menu/default/icon_aeslevel3.tga
new file mode 100644 (file)
index 0000000..c31bfe8
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel3.tga differ
diff --git a/gfx/menu/default/icon_aeslevel4.tga b/gfx/menu/default/icon_aeslevel4.tga
new file mode 100644 (file)
index 0000000..88963f8
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel4.tga differ
diff --git a/gfx/menu/default/icon_aeslevel5.tga b/gfx/menu/default/icon_aeslevel5.tga
new file mode 100644 (file)
index 0000000..0ed332d
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel5.tga differ
diff --git a/gfx/menu/default/icon_pure0.tga b/gfx/menu/default/icon_pure0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/default/icon_pure0.tga differ
diff --git a/gfx/menu/default/icon_pure1.tga b/gfx/menu/default/icon_pure1.tga
new file mode 100644 (file)
index 0000000..62980d2
Binary files /dev/null and b/gfx/menu/default/icon_pure1.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel0.tga b/gfx/menu/luminos/icon_aeslevel0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel0.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel1.tga b/gfx/menu/luminos/icon_aeslevel1.tga
new file mode 100644 (file)
index 0000000..f1e9273
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel1.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel2.tga b/gfx/menu/luminos/icon_aeslevel2.tga
new file mode 100644 (file)
index 0000000..7153820
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel2.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel3.tga b/gfx/menu/luminos/icon_aeslevel3.tga
new file mode 100644 (file)
index 0000000..c31bfe8
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel3.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel4.tga b/gfx/menu/luminos/icon_aeslevel4.tga
new file mode 100644 (file)
index 0000000..88963f8
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel4.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel5.tga b/gfx/menu/luminos/icon_aeslevel5.tga
new file mode 100644 (file)
index 0000000..0ed332d
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel5.tga differ
diff --git a/gfx/menu/luminos/icon_pure0.tga b/gfx/menu/luminos/icon_pure0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/luminos/icon_pure0.tga differ
diff --git a/gfx/menu/luminos/icon_pure1.tga b/gfx/menu/luminos/icon_pure1.tga
new file mode 100644 (file)
index 0000000..62980d2
Binary files /dev/null and b/gfx/menu/luminos/icon_pure1.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel0.tga b/gfx/menu/xaw/icon_aeslevel0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel0.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel1.tga b/gfx/menu/xaw/icon_aeslevel1.tga
new file mode 100644 (file)
index 0000000..f1e9273
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel1.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel2.tga b/gfx/menu/xaw/icon_aeslevel2.tga
new file mode 100644 (file)
index 0000000..7153820
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel2.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel3.tga b/gfx/menu/xaw/icon_aeslevel3.tga
new file mode 100644 (file)
index 0000000..c31bfe8
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel3.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel4.tga b/gfx/menu/xaw/icon_aeslevel4.tga
new file mode 100644 (file)
index 0000000..88963f8
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel4.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel5.tga b/gfx/menu/xaw/icon_aeslevel5.tga
new file mode 100644 (file)
index 0000000..0ed332d
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel5.tga differ
diff --git a/gfx/menu/xaw/icon_pure0.tga b/gfx/menu/xaw/icon_pure0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/xaw/icon_pure0.tga differ
diff --git a/gfx/menu/xaw/icon_pure1.tga b/gfx/menu/xaw/icon_pure1.tga
new file mode 100644 (file)
index 0000000..62980d2
Binary files /dev/null and b/gfx/menu/xaw/icon_pure1.tga differ
index 43a05b1c0a77bdbcb7dc0a3e424ac687e7d1b482..33889827e36deebad5975fc15b7cc171b79ff708 100644 (file)
@@ -231,7 +231,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        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;
@@ -804,69 +804,76 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
        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();
index b93ecaa7ce84d5f4cc63dd9099c78e1963b0e3f9..afea3e752fd871c079df07fd8cc013995297894c 100644 (file)
@@ -222,6 +222,7 @@ SKINBEGIN
        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');
index 2d75d43652512e6cdcf2dac5b010de2bf13f320f..a49e3529c0cbcc099a78094f1e68e690fc01ce86 100644 (file)
@@ -6,7 +6,7 @@ CLASS(XonoticAdvancedDialog) EXTENDS(XonoticDialog)
        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)
@@ -30,10 +30,6 @@ void XonoticAdvancedDialog_fill(entity me)
                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);
index 21eefeae6d72ef0ea83f5878215f6b85c7276321..4824331a0305dab6fe3a7d2a7a6c48cf36b917cb 100644 (file)
@@ -5,7 +5,7 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        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)
@@ -22,6 +22,7 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        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)
@@ -37,6 +38,7 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        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;
@@ -55,8 +57,8 @@ void Join_Click(entity btn, entity me);
 #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));
@@ -66,19 +68,28 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float 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);
 
@@ -109,6 +120,9 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        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);
@@ -192,6 +206,11 @@ void XonoticServerInfoDialog_fill(entity me)
                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, ""));
index 95e1f80b81d2971d37658f40ae85da4c1e7448b5..ce9676f3781dbafaf81d8f267917d4ebcbfdbbfa 100644 (file)
@@ -10,6 +10,8 @@ CLASS(XonoticServerList) EXTENDS(XonoticListBox)
 
        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)
@@ -490,12 +492,14 @@ void XonoticServerList_resizeNotify(entity me, vector relOrigin, vector relSize,
        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;
@@ -598,7 +602,44 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                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);
index b705e9c09ce18a1877a3e9889e2130c06a53daa9..0216757e9ccc99e358195b5f0426d1ab67ff6620 100644 (file)
@@ -362,6 +362,8 @@ void SV_ParseClientCommand(string s) {
                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())
index aaddcbb2888504ae0cde64a1a02228a0292ab133..ecca4ac431250e1aba349da70b3d5a02dc7ba988 100644 (file)
@@ -523,6 +523,8 @@ string clientstuff;
 .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;
index d55b7f6fab6497375c7aea6ef219aeabfd22f488..b4bb3100a228bad5cf48c31ca70b674ef6b85c03 100644 (file)
@@ -213,16 +213,23 @@ void cvar_changes_init()
 {
        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);
@@ -239,22 +246,30 @@ void cvar_changes_init()
                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");
@@ -282,6 +297,9 @@ void cvar_changes_init()
                BADCVAR("timestamps");
                BADCVAR("net_address");
                BADCVAR("net_address_ipv6");
+               BADPREFIX("sv_weaponstats_");
+               BADCVAR("developer");
+               BADPREFIX("developer_");
 
                // mapinfo
                BADCVAR("timelimit");
@@ -307,27 +325,120 @@ void cvar_changes_init()
                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()
@@ -438,6 +549,8 @@ void spawnfunc_worldspawn (void)
 
        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;
@@ -656,7 +769,6 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
 
        next_pingtime = time + 5;
-       InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS);
 
        detect_maptype();
 
index b5c68ca79bcbb84f2ce8aa11bb8627d26e9106ec..9dd7e8784845b615cea2f87ab34f512643c5012d 100644 (file)
@@ -651,6 +651,7 @@ void GameCommand(string command)
                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");
@@ -912,6 +913,11 @@ void GameCommand(string command)
                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))); )
index f8f5ebe2304275b4b220e4d7d4c59f5824876b43..668e86f8984003f6096b2f58e36e8086608d3928 100644 (file)
@@ -1732,7 +1732,6 @@ void precache()
 #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
index 59480ab656db12c789baf9852b8a52ad5e41f4d8..fbddca71df4438742f9e125f57bc458e2cf42173 100644 (file)
@@ -369,7 +369,8 @@ void WinningConditionHelper()
 
        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");