]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
indicate mod in menu HUD if sent by the server; detect minstagib and CTS and send...
authorRudolf Polzer <divverent@xonotic.org>
Sun, 19 Feb 2012 15:03:55 +0000 (16:03 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 19 Feb 2012 15:03:55 +0000 (16:03 +0100)
42 files changed:
balance25.cfg
balanceFruitieX.cfg
balanceXPM.cfg
balanceXonotic.cfg
defaultXonotic.cfg
physicsCPMA.cfg
physicsFruit.cfg
physicsHavoc.cfg
physicsLeeStricklin-ModdedFruit.cfg
physicsLeeStricklin.cfg
physicsLeeStricklinOld.cfg
physicsLzd.cfg
physicsNexuiz10.cfg
physicsNexuiz11.cfg
physicsNexuiz151.cfg
physicsNexuiz151b.cfg
physicsNexuiz16rc1.cfg
physicsNexuiz20.cfg
physicsNexuiz25.cfg
physicsNexuiz26.cfg
physicsNoQWBunny-nexbased.cfg
physicsQ.cfg
physicsQ2.cfg
physicsQ2a.cfg
physicsQ3.cfg
physicsQBF.cfg
physicsQBFplus.cfg
physicsSamual.cfg
physicsWarsow.cfg
physicsWarsowClassicBunny.cfg
physicsWarsowDev.cfg
physicsX.cfg
physicsX010.cfg
physicsXPM.cfg
physicsXPMLight.cfg
qcsrc/common/util-pre.qh
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/scores.qc

index 420020622c5c7b3f124370841597d0b4cf800bec..51bb152ddeb3fb85c9ede4a2f29dff3c4043eb94 100644 (file)
@@ -1,3 +1,5 @@
+g_mod_balance Nexuiz25
+
 // {{{ starting gear
 set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
index 221f725a5284cb855e060f3c863f9e8c8c1250a2..ced09e7d1047a65a80167ef2ebff8c9615cabb3e 100644 (file)
@@ -1,3 +1,5 @@
+g_mod_balance FruitieX
+
 // {{{ starting gear
 set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
index 574af5b2fc9f6ff611725dc5483f4eadf5b67b2f..c439c3218fc28da5ad96d37c230865ca8a2aef9b 100644 (file)
@@ -1,3 +1,5 @@
+g_mod_balance XPM
+
 // {{{ starting gear
 set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
index c411b883db431bf31f0c2e701fcff2bd8c0be7b4..4648f4ac40be2efdd4201c04e42feb96b8c5f617 100644 (file)
@@ -1,3 +1,5 @@
+g_mod_balance Xonotic
+
 // {{{ starting gear
 set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
index 30c70dd0b111e6fa9ac99c54fa0f1a32eb8eb6d2..bd85db3350a62fb2d681ca6d8da1ca1fe3f7a0d4 100644 (file)
@@ -1858,6 +1858,12 @@ set g_playerstats_debug 0 "when 1, player stats are dumped to the console too"
 // autoscreenshots
 set g_max_info_autoscreenshot 3 "how many info_autoscreenshot entities are allowed"
 
+// mod names for server browser
+// note: the lowest of these that mismatches default is used
+set g_mod_physics "" "Current physics config name"
+set g_mod_balance "" "Current balance config name"
+set g_mod_config  "" "Current config mod name"
+
 // session locking
 locksession 1
 
index 620ec882e54d1f2b1d8108df6edf2d18afe5c8f3..9734cfc6f6ccc1180a9925105814321f1d5ed69f 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics CPMA
 // these values match CPMA
+
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 320
index 1afb26330c643725fee6695071bb881eaaddb625..5f65d66d8ab36e6b6e2349174c15431ea20e6e3f 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Fruit
 // physicsNoQWBunny.cfg vs physicsXPM.cfg
+
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 320
index d78346e1b604f870bf9cacce45171215285fd1bf..f107158720dc50d26d0dcc014a5a4eb23ae8ddbe 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Havoc
 // Xonotic Havoc physics (work in progress)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 21bafef57c523cbbc9d08c579c618f83ca55e5d5..3553a94a7e587a415a24613aaf735392622e6a53 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics LeeStricklin-ModdedFruit
 // "NoQWBunny" physics based on XPM
+
 sv_gravity 800
 sv_maxspeed 424
 sv_maxairspeed 400
index 3c740da33733257b50e8a46af2167714c3dcf815..e4aef4440d6b5b173e141962d3e429077216ab31 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics LeeStricklin
 // "NoQWBunny" physics based on XPM
+
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 424
index d240d991b3f55a812ab5bce0bda2c53f9942fa7e..eda92ac6930431893efd7865b83f26d45efecffc 100644 (file)
@@ -1,5 +1,7 @@
+g_mod_physics LeeStricklinOld
 // These have been modified from Nexuiz 2.4.2's physicsQBR.cfg file and a bunch of other crap div0 threw on here :P
 // DO NOT SCREW WITH friction on land, edge friction, step height, or sv_airaccel_qw
+
 sv_gravity 819
 sv_maxspeed 420
 sv_maxairspeed 283
index 86b4bdcf024617699c1a7c8818349378e3e5b6e7..cd76c2fe39f557fd6bb50133fddc8dad880dc1e6 100644 (file)
@@ -1,5 +1,7 @@
+g_mod_physics Lzd
 //LZD Physics Config v0.1
 //By PCLizard and Oh Hai :)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 300
index a6673a28e248cef489dcbc8bbfacefa2d1aeef12..6c99b307f00f74d41e90e6d95b5db96dcacb2e20 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz10
 // Xonotic 1.0 physics
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 100
index 60459c37474067be06d5a1aed7c23cfd57df1ff5..65a6a4b6fc40b9a67fc91d4936cee4095e32ebd2 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz11
 // Xonotic 1.5 physics
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
index b099d4cf34935bea0c778605abdb4f4b89e335b6..833a67dce383f608a8051938cdffa905d55f3d4d 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz151
 // experimental post-Xonotic 1.5 physics (never released)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
index 8821b5a319082f63b7f86150ebbde7f2d1385e1f..31380c973828580dc2fe523cac5715e59e8ab020 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz151b
 // experimental post-Xonotic 1.5 physics (never released)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 25
index ff6343f781a3d72fea86a6a92466ecd6d1f3dbfd..f3a85e50b7cf4d03556fd315f7b731b5d4125ec6 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz16rc1
 // experimental post-Xonotic 1.5 physics (never released)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
index 0834bb5aa60c439bbd03a93420835934db5468a2..60071e1844026fb1bb9fb04e695d19247295f33b 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz20
 // Quake, Bunny Reintroduced (Xonotic 2.0 to 2.4.2 physics)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 8c5ab5e851342b87146a95334ddf08dbc2c762ff..dd984bb310c1a8c2299df157edc8b751e20d05d5 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz25
 // Xonotic 2.5 physics
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 4e104d1aa99f2d71e76acc12bf5bb4f6fff618e6..827bbc55c16501e6ee64e509b4313f8612a0d3c4 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Nexuiz26
 // Xonotic 2.6 physics
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index e74b332ede27e84f582a158e35a49bf1a61acbc2..f8d43c4f2ece249c7fe52776ce6bae5c7577a535 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics NoQWBunny-nexbased
 // "NoQWBunny" physics based on Nexuiz 2.0-2.4.2
+
 sv_gravity 800
 sv_maxspeed 360
 sv_maxairspeed 400
index 1eb53ab38321b709375486f6d3a8307323275901..c26745629677cf209b65c223eb60d5abfd6a9436 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Q
 // Quake 1
+
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 30
index 2e3c0af6f310e4c6e5dfa3d94bccb02688782ab7..05e2f1456cdd5152935fe084e730f717069dc4cd 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Q2
 // Quake 2
+
 sv_gravity 800
 sv_maxspeed 300
 sv_maxairspeed 300
index 2d223a2051ea58977e84391c7d8f20059b3dba38..9b953e32e8b78b8852f663ed4e55668da55a1b1a 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Q2a
 // Quake 2 if pm_airaccelerate were set to 10 and not 0 (Q1-like)
+
 sv_gravity 800
 sv_maxspeed 300
 sv_maxairspeed 30
index b3fdf41a82982855ae253933cbae7982d7906b9c..eed1c7409008447be660d6b84b73e57da536d11f 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Q3
 // these values match Quake3
+
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 320
index 390cb968ad31ed8867763a41830aa302e0d5f238..8dff0edd9df5d208440a721a04fce1e236a5722a 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics QBF
 // Quake, Bunny Fixed (feels very slow)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 250
index 8c1a78f3b9f80d4b613361f8503813a95c266b07..634b6083ee6c910a69442de8430c8251e2781bb7 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics QBFplus
 // Quake, Bunny Fixed Plus (faster using forward hopping)
+
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 178eed0aedfa79ffc9f58dca509387eaad43bbde..8019089bf216f7eb5749c8d12064a494ca0f7edd 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Samual
 // Mix of 2.3 physics and NANL physics, goal of going for faster movement
+
 sv_gravity 800
 sv_maxspeed 420
 sv_maxairspeed 235
index 6cae75a7977759b1510ecec9ec60fb8ae321100d..7d66b3716d987f96d48687973d7c09cfc7f1011d 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Warsow
 // these values match Warsow 0.42
+
 sv_gravity 850
 sv_maxspeed 320
 sv_maxairspeed 320
index 5c0c81c8fb8408593b6e12170d366b1a9631b771..1dbb14a90fb4f87d31359ee48ee84ea32ae11231 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics WarsowClassicBunny
 // these values match Warsow 0.42 GS_CLASSICBUNNY
+
 sv_gravity 850
 sv_maxspeed 320
 sv_maxairspeed 320
index 0c30fcd9a0de82ada7acb5a922cc8097c5ab1b5d..f2f989d7580295a9ea237701d240ab7084dc7bb0 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics WarsowDev
 // these values match Warsow 0.42
+
 sv_gravity 850
 sv_maxspeed 320
 sv_maxairspeed 320
index 7a78d3726b4cb8f9b9ba79f9c24417557e0eceb8..e2a3ef648087b64716ae7b5a7153a9663995ec67 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Xonotic
 // current Xonotic physics
+
 sv_gravity 800
 sv_maxspeed 360
 sv_maxairspeed 360
index bda6272711dab78a84c029b8fdfc73a76fdb944c..77926d05f7bf99a21aba09dee93c8ce864c974bb 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics Xonotic010
 // Xonotic 0.1.0preview physics
+
 sv_gravity 800
 sv_maxspeed 360
 sv_maxairspeed 400
index f781539485bc37246caaa6d8392d14abb8e360ef..55e2ef01d32f41c15e71141881250af0c649ae9f 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics XPM
 // Nexrun tweaked to suit CPM
+
 sv_gravity 800
 sv_maxspeed 320
 // CPMA: 320
index 3a8b8e1503f7e2819d434becb7d55b0c826da051..d0f31c2c0bd8f6f039b1134de117c190b8a72b43 100644 (file)
@@ -1,4 +1,6 @@
+g_mod_physics XPMLight
 // Nexrun tweaked to suit CPM
+
 sv_gravity 800
 sv_maxspeed 320
 // CPMA: 320
index 5a22d3612d21bcf881ccc880357bf26ffe4a4193..518a5698d3aead0d6b4fe0a98bce583e89f7f92d 100644 (file)
@@ -5,4 +5,5 @@
 //# define WORKAROUND_XON010
 //# define COMPAT_XON010_CHANNELS
 # define COMPAT_XON050_ENGINE
+# define COMPAT_NO_MOD_IS_XONOTIC
 #endif
index 3eb91ee9d4038ec1c21d1b2f13453ff184c75670..bfbe8021fed5fbb1afc3677e37f37b8b896560df 100644 (file)
@@ -230,6 +230,7 @@ SKINBEGIN
        SKINFLOAT(ALPHA_SERVERLIST_IMPOSSIBLE, 0.7);
        SKINVECTOR(COLOR_SERVERLIST_IMPOSSIBLE, '0.3 0.3 0.3');
        SKINSTRING(GFX_SERVERLIST_ICON, "icon");
+       SKINFLOAT(ALPHA_SERVERLIST_ICON_NONPURE, 0.5);
 
        // item: server info
        SKINVECTOR(COLOR_SERVERINFO_NAME, '1 1 1');
index 3687857056e98bd899b6068f47f8a97d9f38b915..33a06b7bc98d4c3ba8ce08fcc12efd91cf46148a 100644 (file)
@@ -40,15 +40,6 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticServerInfoDialog, pureLabel, entity, NULL)
 ENDCLASS(XonoticServerInfoDialog)
 
-float SLIST_FIELD_NAME;
-float SLIST_FIELD_CNAME;
-float SLIST_FIELD_QCSTATUS;
-float SLIST_FIELD_MAP;
-float SLIST_FIELD_PLAYERS;
-float SLIST_FIELD_NUMHUMANS;
-float SLIST_FIELD_MAXPLAYERS;
-float SLIST_FIELD_NUMBOTS;
-float SLIST_FIELD_MOD;
 void Join_Click(entity btn, entity me);
 #endif
 
@@ -56,7 +47,7 @@ void Join_Click(entity btn, entity me);
 void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
 {
        float m, pure, freeslots, j, numh, maxp, numb, sflags;
-       string s, typestr, versionstr, k, v;
+       string s, typestr, versionstr, k, v, modname;
 
        // ====================================
        //  First clear and unzone the strings
@@ -120,11 +111,9 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        // ==========================
        //  Now, fill in the strings
        // ==========================
-       SLIST_FIELD_NAME = gethostcacheindexforkey("name");
        me.currentServerName = strzone(gethostcachestring(SLIST_FIELD_NAME, i));
        me.nameLabel.setText(me.nameLabel, me.currentServerName);
 
-       SLIST_FIELD_CNAME = gethostcacheindexforkey("cname");
        me.currentServerCName = strzone(gethostcachestring(SLIST_FIELD_CNAME, i));
        me.cnameLabel.setText(me.cnameLabel, me.currentServerCName);
 
@@ -132,7 +121,6 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        typestr = _("N/A");
        versionstr = _("N/A");
 
-       SLIST_FIELD_QCSTATUS = gethostcacheindexforkey("qcstatus");
        s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
        m = tokenizebyseparator(s, ":");
        if(m >= 2)
@@ -142,6 +130,7 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        }
        freeslots = -1;
        sflags = -1;
+       modname = "";
        for(j = 2; j < m; ++j)
        {
                if(argv(j) == "")
@@ -154,27 +143,34 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
                        freeslots = stof(v);
                else if(k == "F")
                        sflags = stof(v);
+               else if(k == "M")
+                       modname = v;
        }
 
+#ifdef COMPAT_NO_MOD_IS_XONOTIC
+       if(modname == "")
+               modname = "Xonotic";
+#endif
+
+       s = gethostcachestring(SLIST_FIELD_MOD, i);
+       if(s != "data")
+               if(modname == "Xonotic")
+                       modname = s;
+
        j = MapInfo_Type_FromString(typestr); // try and get the real name of the game type
        if(j) { typestr = MapInfo_Type_ToText(j); } // only set it if we actually found it
        
        me.currentServerType = strzone(typestr);
        me.typeLabel.setText(me.typeLabel, me.currentServerType);
 
-       SLIST_FIELD_MAP = gethostcacheindexforkey("map");
        me.currentServerMap = strzone(gethostcachestring(SLIST_FIELD_MAP, i));
        me.mapLabel.setText(me.mapLabel, me.currentServerMap);
 
-       SLIST_FIELD_PLAYERS = gethostcacheindexforkey("players");
        me.currentServerPlayers = strzone(gethostcachestring(SLIST_FIELD_PLAYERS, i));
        me.rawPlayerList.setPlayerList(me.rawPlayerList, me.currentServerPlayers);
 
-       SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey("numhumans");
        numh = gethostcachenumber(SLIST_FIELD_NUMHUMANS, i);
-       SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey("maxplayers");
        maxp = gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i);
-       SLIST_FIELD_NUMBOTS = gethostcacheindexforkey("numbots");
        numb = gethostcachenumber(SLIST_FIELD_NUMBOTS, i);
        me.currentServerNumPlayers = strzone(sprintf(_("%d/%d"), numh, maxp));
        me.numPlayersLabel.setText(me.numPlayersLabel, me.currentServerNumPlayers);
@@ -188,10 +184,8 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        me.currentServerNumFreeSlots = strzone(s);
        me.numFreeSlotsLabel.setText(me.numFreeSlotsLabel, me.currentServerNumFreeSlots);
 
-       SLIST_FIELD_MOD = gethostcacheindexforkey("mod");
-       s = gethostcachestring(SLIST_FIELD_MOD, i);
-       s = ((s == "data") ? _("Default") : s);
-       me.currentServerMod = strzone(s);
+       me.currentServerMod = ((modname == "Xonotic") ? _("Default") : modname);
+       me.currentServerMod = strzone(modname);
        me.modLabel.setText(me.modLabel, me.currentServerMod);
 
        me.currentServerVersion = strzone(versionstr);
index 82fdbfb5eb40d4bcfcefb45cd47c383a5421710c..8c003b9007bb8592b7d896814598bfed37b0d552 100644 (file)
@@ -64,9 +64,7 @@ void ServerList_Filter_Change(entity box, entity me);
 void ServerList_Favorite_Click(entity btn, entity me);
 void ServerList_Info_Click(entity btn, entity me);
 void ServerList_Update_favoriteButton(entity btn, entity me);
-#endif
 
-#ifdef IMPLEMENTATION
 float SLIST_FIELD_CNAME;
 float SLIST_FIELD_PING;
 float SLIST_FIELD_GAME;
@@ -82,6 +80,9 @@ float SLIST_FIELD_FREESLOTS;
 float SLIST_FIELD_PLAYERS;
 float SLIST_FIELD_QCSTATUS;
 float SLIST_FIELD_ISFAVORITE;
+#endif
+
+#ifdef IMPLEMENTATION
 void ServerList_UpdateFieldIDs()
 {
        SLIST_FIELD_CNAME = gethostcacheindexforkey( "cname" );
@@ -600,7 +601,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        vector theColor;
        float theAlpha;
        float m, pure, freeslots, j, sflags;
-       string s, typestr, versionstr, k, v;
+       string s, typestr, versionstr, k, v, modname;
 
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
@@ -614,6 +615,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        }
        freeslots = -1;
        sflags = -1;
+       modname = "";
        for(j = 2; j < m; ++j)
        {
                if(argv(j) == "")
@@ -626,8 +628,27 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                        freeslots = stof(v);
                else if(k == "F")
                        sflags = stof(v);
+               else if(k == "M")
+                       modname = v;
        }
 
+#ifdef COMPAT_NO_MOD_IS_XONOTIC
+       if(modname == "")
+               modname = "Xonotic";
+#endif
+
+       SLIST_FIELD_MOD = gethostcacheindexforkey("mod");
+       s = gethostcachestring(SLIST_FIELD_MOD, i);
+       if(s != "data")
+               if(modname == "Xonotic")
+                       modname = s;
+
+       // list the mods here on which the pure server check actually works
+       if(modname != "Xonotic")
+       if(modname != "MinstaGib")
+       if(modname != "CTS")
+               pure = 0;
+
        if(gethostcachenumber(SLIST_FIELD_FREESLOTS, i) <= 0)
                theAlpha = SKINALPHA_SERVERLIST_FULL;
        else if(freeslots == 0)
@@ -731,8 +752,23 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                        draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
                iconPos_x += iconSize_x;
 
-               if(pure == 0)
-                       draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), iconSize, '1 1 1', 1);
+               if(modname == "Xonotic")
+               {
+                       if(pure == 0)
+                               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), iconSize, '1 1 1', 1);
+               }
+               else
+               {
+                       string n;
+                       n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_", modname);
+                       if(draw_PictureSize(n) != '0 0 0')
+                       {
+                               if(pure == 0)
+                                       draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
+                               else
+                                       draw_Picture(iconPos, n, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE);
+                       }
+               }
                iconPos_x += iconSize_x;
 
                if(sflags >= 0 && (sflags & SERVERFLAG_PLAYERSTATS))
index 22d9e54d6c71d4c8ea4a007a157354eb23b7e6d4..61e3215e124bf867dfe044d33e7296b33cb6002d 100644 (file)
@@ -654,3 +654,5 @@ typedef vector(entity player, entity spot, vector current) spawn_evalfunc_t;
 .spawn_evalfunc_t spawn_evalfunc;
 
 .entity conveyor;
+
+string modname;
index f699ababc19af8f4e8bd324574a7b386b6b2c769..acf820803c36d502299e43659e78da0574565ac4 100644 (file)
@@ -301,6 +301,7 @@ void cvar_changes_init()
                BADCVAR("g_domination_point_leadlimit");
                BADCVAR("g_forced_respawn");
                BADCVAR("g_keyhunt_point_leadlimit");
+               BADPREFIX("g_mod_");
                BADCVAR("g_nexball_goalleadlimit");
                BADCVAR("g_runematch_point_leadlimit");
                BADCVAR("leadlimit_and_fraglimit");
@@ -908,6 +909,22 @@ void spawnfunc_worldspawn (void)
 
        PlayerStats_Init();
 
+       modname = "Xonotic";
+       // weird mutators that deserve to count as mod
+       if(autocvar_g_minstagib)
+               modname = "MinstaGib";
+       // weird game types that deserve to count as mod
+       if(g_cts)
+               modname = "CTS";
+       // physics/balance/config changes that count as mod
+       if(cvar_string("g_mod_physics") != cvar_defstring("g_mod_physics"))
+               modname = cvar_string("g_mod_physics");
+       if(cvar_string("g_mod_balance") != cvar_defstring("g_mod_balance"))
+               modname = cvar_string("g_mod_balance");
+       if(cvar_string("g_mod_config") != cvar_defstring("g_mod_config"))
+               modname = cvar_string("g_mod_config");
+       modname = strzone(modname);
+
        world_initialized = 1;
 }
 
index b56065deda01461475cc383317f147b8d4ef9dd7..3a9a7ada36963cc6551ab92cdcc5d72c32f49ca6 100644 (file)
@@ -387,6 +387,7 @@ void WinningConditionHelper()
        s = strcat(s, ":P", ftos(cvar_purechanges_count));
        s = strcat(s, ":S", ftos(nJoinAllowed(0)));
        s = strcat(s, ":F", ftos(serverflags));
+       s = strcat(s, ":M", modname);
        s = strcat(s, "::", GetPlayerScoreString(world, 1)); // make this 1 once we can, note: this doesn't contain any :<letter>
 
        fullstatus = autocvar_g_full_getstatus_responses;