]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into divVerent/4team_ctf
authorMario <mario.mario@y7mail.com>
Tue, 24 Sep 2013 11:10:06 +0000 (04:10 -0700)
committerMario <mario.mario@y7mail.com>
Tue, 24 Sep 2013 11:10:06 +0000 (04:10 -0700)
41 files changed:
balanceXPM.cfg
balanceXonotic.cfg
defaultXonotic.cfg
qcsrc/client/hud.qc
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/item/dialog.c
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/dialog_hudpanel_ammo.c
qcsrc/menu/xonotic/dialog_hudpanel_centerprint.c
qcsrc/menu/xonotic/dialog_hudpanel_chat.c
qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.c
qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c
qcsrc/menu/xonotic/dialog_hudpanel_infomessages.c
qcsrc/menu/xonotic/dialog_hudpanel_modicons.c
qcsrc/menu/xonotic/dialog_hudpanel_notification.c
qcsrc/menu/xonotic/dialog_hudpanel_physics.c
qcsrc/menu/xonotic/dialog_hudpanel_powerups.c
qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.c
qcsrc/menu/xonotic/dialog_hudpanel_racetimer.c
qcsrc/menu/xonotic/dialog_hudpanel_radar.c
qcsrc/menu/xonotic/dialog_hudpanel_score.c
qcsrc/menu/xonotic/dialog_hudpanel_timer.c
qcsrc/menu/xonotic/dialog_hudpanel_vote.c
qcsrc/menu/xonotic/dialog_hudpanel_weapons.c
qcsrc/menu/xonotic/dialog_hudsetup_exit.c
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/menu/xonotic/dialog_sandboxtools.c
qcsrc/menu/xonotic/dialog_teamselect.c
qcsrc/menu/xonotic/slider_resolution.c
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/csqcprojectile.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/t_items.qc
qcsrc/server/waypointsprites.qc

index 9d27ac66c9988af575a770ec3685fb1e52b22331..8c171476a1e126114ea1df373d399fe125741c21 100644 (file)
@@ -586,21 +586,21 @@ set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
 // }}}
 // {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
-set g_balance_rocketlauncher_edgedamage 40
+set g_balance_rocketlauncher_damage 70
+set g_balance_rocketlauncher_edgedamage 35
 set g_balance_rocketlauncher_force 450
 set g_balance_rocketlauncher_radius 110
 set g_balance_rocketlauncher_speed 1300
 set g_balance_rocketlauncher_speedaccel 1300
 set g_balance_rocketlauncher_speedstart 1000
 set g_balance_rocketlauncher_lifetime 10
-set g_balance_rocketlauncher_refire 1.1
+set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 4
 set g_balance_rocketlauncher_health 30 // 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
 set g_balance_rocketlauncher_damageforcescale 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
 set g_balance_rocketlauncher_detonatedelay 0.02 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 70 // max degrees per second
 set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.2 // delay before guiding kicks in
@@ -609,7 +609,7 @@ set g_balance_rocketlauncher_remote_damage 70
 set g_balance_rocketlauncher_remote_edgedamage 35
 set g_balance_rocketlauncher_remote_radius 110
 set g_balance_rocketlauncher_remote_force 400
-set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_drop 0.3
 set g_balance_rocketlauncher_switchdelay_raise 0.2
 set g_balance_rocketlauncher_reload_ammo 0 //default: 25
 set g_balance_rocketlauncher_reload_time 2
index 6deba7604231d0244c560f7d84ae22e5de948f43..cdf3f201354aaebeb4351ee1d83f4af9f6d44490 100644 (file)
@@ -586,21 +586,21 @@ set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
 // }}}
 // {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
-set g_balance_rocketlauncher_edgedamage 40
+set g_balance_rocketlauncher_damage 70
+set g_balance_rocketlauncher_edgedamage 35
 set g_balance_rocketlauncher_force 450
 set g_balance_rocketlauncher_radius 110
 set g_balance_rocketlauncher_speed 1300
 set g_balance_rocketlauncher_speedaccel 1300
 set g_balance_rocketlauncher_speedstart 1000
 set g_balance_rocketlauncher_lifetime 10
-set g_balance_rocketlauncher_refire 1.1
+set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 4
 set g_balance_rocketlauncher_health 30 // 30 // 5 hitpoints above maximum laser value -- this way lasers can't blow it up, but grenadelauncher still can most the time.
 set g_balance_rocketlauncher_damageforcescale 1 // low damage force scale so that it can still be affected by other hits, but not so much that it does a 90 degree turn
 set g_balance_rocketlauncher_detonatedelay 0.02 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 70 // max degrees per second
 set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.2 // delay before guiding kicks in
@@ -609,7 +609,7 @@ set g_balance_rocketlauncher_remote_damage 70
 set g_balance_rocketlauncher_remote_edgedamage 35
 set g_balance_rocketlauncher_remote_radius 110
 set g_balance_rocketlauncher_remote_force 400
-set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_drop 0.3
 set g_balance_rocketlauncher_switchdelay_raise 0.2
 set g_balance_rocketlauncher_reload_ammo 0 //default: 25
 set g_balance_rocketlauncher_reload_time 2
index 30a03a15a1ba68a0003e36b2753a6d1c2e9fa025..6cd876b4b59f19c21af33cc30d50759401411b5c 100644 (file)
@@ -99,6 +99,7 @@ set _menu_vid_width "$vid_width"
 set _menu_vid_height "$vid_height"
 set _menu_vid_pixelheight "$vid_pixelheight"
 seta menu_vid_scale 0
+seta menu_vid_allowdualscreenresolution 0
 // 2D resolution 800x600
 vid_conwidth 800
 vid_conheight 600
@@ -427,8 +428,6 @@ bind f7 menu_showsandboxtools
 set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
 set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
 
-set welcome_message_time 8
-
 set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
 
 set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
index d4de8f9d12b834a4fa20350eb340a4d176e05190..6c94a102439d5e2db6d96d17458f6006f52202b8 100644 (file)
@@ -1416,7 +1416,7 @@ void HUD_HealthArmor(void)
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
-               v = healtharmor_maxdamage(health, armor, armorblockpercent);
+               v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON);
 
                float x;
                x = floor(v_x + 1);
index 16e572615b1ca4899f9a1fbfc13261339c34f267..7949b4c2257e840cd9ee6d1831bf6634f8cda50a 100644 (file)
@@ -992,6 +992,10 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                {
                        MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
                }
+               else if(t == "noautomaplist")
+               {
+                       MapInfo_Map_flags |= MAPINFO_FLAG_NOAUTOMAPLIST;
+               }
                else if(t == "type")
                {
                        t = car(s); s = cdr(s);
index db08fdf07c6a71116099cfa384d325ba19230ac6..c288b008eab8adf8af07cb4fac07241cfadc461a 100644 (file)
@@ -85,6 +85,7 @@ const float MAPINFO_FEATURE_TURRETS       = 4;
 const float MAPINFO_FLAG_HIDDEN           = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
 const float MAPINFO_FLAG_FORBIDDEN        = 2; // don't even allow the map by a cvar setting that allows hidden maps
 const float MAPINFO_FLAG_FRUSTRATING      = 4; // this map is near impossible to play, enable at your own risk
+const float MAPINFO_FLAG_NOAUTOMAPLIST    = 8; // do not include when automatically building maplist (counts as hidden for maplist building purposes)
 
 float MapInfo_count;
 
index afd5b3bcd12e3b5971125b2783e0016c95fd16cd..965431773e3d572162192da7b5ce2a2076c133c8 100644 (file)
@@ -1831,10 +1831,13 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
        }
 }
 
-vector healtharmor_maxdamage(float h, float a, float armorblock)
+#ifndef MENUQC
+vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype)
 {
        // NOTE: we'll always choose the SMALLER value...
        float healthdamage, armordamage, armorideal;
+       if (deathtype == DEATH_DROWN)  // Why should armor help here...
+               armorblock = 0;
        vector v;
        healthdamage = (h - 1) / (1 - armorblock); // damage we can take if we could use more health
        armordamage = a + (h - 1); // damage we can take if we could use more armor
@@ -1853,14 +1856,17 @@ vector healtharmor_maxdamage(float h, float a, float armorblock)
        return v;
 }
 
-vector healtharmor_applydamage(float a, float armorblock, float damage)
+vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage)
 {
        vector v;
+       if (deathtype == DEATH_DROWN)  // Why should armor help here...
+               armorblock = 0;
        v_y = bound(0, damage * armorblock, a); // save
        v_x = bound(0, damage - v_y, damage); // take
        v_z = 0;
        return v;
 }
+#endif
 
 string getcurrentmod()
 {
index 47865428c18f5a8869e295f42a0e99eebfda886f..1150dbbaac07cc9b34c7b0e3303cb24b1122fabe 100644 (file)
@@ -220,8 +220,10 @@ string RandomSelection_chosen_string;
 void RandomSelection_Init();
 void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
 
-vector healtharmor_maxdamage(float h, float a, float armorblock); // returns vector: maxdamage, armorideal, 1 if fully armored
-vector healtharmor_applydamage(float a, float armorblock, float damage); // returns vector: take, save, 0
+#ifndef MENUQC
+vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
+vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage); // returns vector: take, save, 0
+#endif
 
 string getcurrentmod();
 
index ed73be09501a6a81db14751e73d824b5cd1a618e..5fa0103532ca74369d74bca47051f27f85c6aa25 100644 (file)
@@ -58,6 +58,8 @@ CLASS(Dialog) EXTENDS(InputContainer)
        ATTRIB(Dialog, zoomedOutTitleBarPosition, float, 0)
        ATTRIB(Dialog, zoomedOutTitleBar, float, 0)
 
+       ATTRIB(Dialog, requiresConnection, float, 0) // set to TRUE if the dialog requires a connection to be opened
+
        ATTRIB(Dialog, backgroundImage, string, string_null)
        ATTRIB(Dialog, borderLines, float, 1)
        ATTRIB(Dialog, closeButtonImage, string, string_null)
index 7339e696950abb7a5de944a12eeca1acaa43a681..1afc9f85d935c3e5958a31ba9cdd206fbf56afc0 100644 (file)
@@ -991,7 +991,8 @@ void m_goto(string itemname)
                for(e = NULL; (e = find(e, name, itemname)); )
                        if(e.classname != "vtbl")
                                break;
-               if(e)
+                               
+               if((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
                {
                        m_hide();
                        m_activate_window(e);
index 07257696436525b2bbc90cfc84561731da15f1ec..3c89d0a03ba08c63b1162fe79f422b65ac89a381 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDAmmoDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDAmmoDialog, rows, float, 15)
        ATTRIB(XonoticHUDAmmoDialog, columns, float, 4)
        ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo")
+       ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDAmmoDialog)
 #endif
 
index 9628783b146b48c3be261fa2eee1e4d78d3bd1e5..c4eea2eea643f97661d7eb0348089dc995eaf82f 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDCenterprintDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15)
        ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4)
        ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint")
+       ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDCenterprintDialog)
 #endif
 
index ba3f0d0090ec31755414b5991dbc0ed75f808550..eb6ced2c49aff44e5f786b23214a4e6775e441f6 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDChatDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDChatDialog, rows, float, 15)
        ATTRIB(XonoticHUDChatDialog, columns, float, 4)
        ATTRIB(XonoticHUDChatDialog, name, string, "HUDchat")
+       ATTRIB(XonoticHUDChatDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDChatDialog)
 #endif
 
index b3cc7b423a4eec2fabb41eb12663a5d79453fa37..bbc3f8cf3e31a3c967f336d686b915c3a1d4f305 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDEngineInfoDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15)
        ATTRIB(XonoticHUDEngineInfoDialog, columns, float, 4)
        ATTRIB(XonoticHUDEngineInfoDialog, name, string, "HUDengineinfo")
+       ATTRIB(XonoticHUDEngineInfoDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDEngineInfoDialog)
 #endif
 
index 5eaf1d94059cd47d99972421f5c58ae18c3d42e2..976139c8e47c8c0046d57b34fa699e03018954c2 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDHealthArmorDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 15)
        ATTRIB(XonoticHUDHealthArmorDialog, columns, float, 4)
        ATTRIB(XonoticHUDHealthArmorDialog, name, string, "HUDhealtharmor")
+       ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDHealthArmorDialog)
 #endif
 
index da63a1e163af6ca130d3fe9a455f89ed631b09d8..5bd8846c5734bf4de3ee9ff2ade53bb3e7a8940f 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDInfoMessagesDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15)
        ATTRIB(XonoticHUDInfoMessagesDialog, columns, float, 4)
        ATTRIB(XonoticHUDInfoMessagesDialog, name, string, "HUDinfomessages")
+       ATTRIB(XonoticHUDInfoMessagesDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDInfoMessagesDialog)
 #endif
 
index fd5d233dcf63b0acd5229864aaa5fe7e71b719da..4c9e64c2ac919db14b6957b76d726fab05ef0c2b 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDModIconsDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDModIconsDialog, rows, float, 15)
        ATTRIB(XonoticHUDModIconsDialog, columns, float, 4)
        ATTRIB(XonoticHUDModIconsDialog, name, string, "HUDmodicons")
+       ATTRIB(XonoticHUDModIconsDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDModIconsDialog)
 #endif
 
index 936a0fcb5983ddac9e97f65325b59872caaf47f8..1239bd316250fc3b340b20c81cca918999512563 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDNotificationDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDNotificationDialog, rows, float, 15)
        ATTRIB(XonoticHUDNotificationDialog, columns, float, 4)
        ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify")
+       ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDNotificationDialog)
 #endif
 
index aeedc492df6dea50d26b1ada2f553baad827e8ba..0144d6649bb5c0c4ecc831440a76a999bc2eea39 100644 (file)
@@ -8,6 +8,7 @@ CLASS(XonoticHUDPhysicsDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4)
        ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics")
        ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity, NULL)
+       ATTRIB(XonoticHUDPhysicsDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDPhysicsDialog)
 #endif
 
index abab5d1f0d07758cc3e00f3c1f647f5d00354bd3..17bfe04aa4294db76d037d5eb81744606fe10ccf 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDPowerupsDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15)
        ATTRIB(XonoticHUDPowerupsDialog, columns, float, 4)
        ATTRIB(XonoticHUDPowerupsDialog, name, string, "HUDpowerups")
+       ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDPowerupsDialog)
 #endif
 
index b01ec1c9807620fd25deffc169c11aa55be765af..2e301cc37bb36b568691f1b4cdfafc7da1958e35 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDPressedKeysDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15)
        ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4)
        ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys")
+       ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDPressedKeysDialog)
 #endif
 
index 015979b21e72157675fb963f4c19e6208fa7eb9f..6b2badf1cb2423d5380e8905bfeec1a21bd51ef1 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDRaceTimerDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15)
        ATTRIB(XonoticHUDRaceTimerDialog, columns, float, 4)
        ATTRIB(XonoticHUDRaceTimerDialog, name, string, "HUDracetimer")
+       ATTRIB(XonoticHUDRaceTimerDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDRaceTimerDialog)
 #endif
 
index 3e72acc8b0ee737558ee8319bf7b14f56e8dbecf..6ad57fa1369ddb95c1a7421872608cb3f0f17b21 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDRadarDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDRadarDialog, rows, float, 15)
        ATTRIB(XonoticHUDRadarDialog, columns, float, 4)
        ATTRIB(XonoticHUDRadarDialog, name, string, "HUDradar")
+       ATTRIB(XonoticHUDRadarDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDRadarDialog)
 #endif
 
index 778172aa1404f8a68ed5a6d582248021d683a193..676830f80c23df75107b1544bfafdd81b92a6882 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDScoreDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDScoreDialog, rows, float, 15)
        ATTRIB(XonoticHUDScoreDialog, columns, float, 4)
        ATTRIB(XonoticHUDScoreDialog, name, string, "HUDscore")
+       ATTRIB(XonoticHUDScoreDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDScoreDialog)
 #endif
 
index c1e9626dd983618f188d83a9b952601ace69e905..2624a7ecd136a2419e80af1662dea5c52f9c8644 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDTimerDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDTimerDialog, rows, float, 15)
        ATTRIB(XonoticHUDTimerDialog, columns, float, 4)
        ATTRIB(XonoticHUDTimerDialog, name, string, "HUDtimer")
+       ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDTimerDialog)
 #endif
 
index 0b2c0ac07836656411e488b57797bdc7dad91bc9..4e4931e15bafb7d28fc2dbf3aa2965bc911979e3 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDVoteDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDVoteDialog, rows, float, 15)
        ATTRIB(XonoticHUDVoteDialog, columns, float, 4)
        ATTRIB(XonoticHUDVoteDialog, name, string, "HUDvote")
+       ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDVoteDialog)
 #endif
 
index e3cd78eb6a56ba17f982a9c24456176f724c4502..07026be69f8fba06495b8d94dcb4658ac3e55dc5 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDWeaponsDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDWeaponsDialog, rows, float, 18)
        ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4)
        ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons")
+       ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDWeaponsDialog)
 #endif
 
index 0fde6e0bd55f1c5b10cc119513bea2cf9870cccc..25eddc8a13316208327bc1c3654cc3060cf58ef5 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticHUDExitDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticHUDExitDialog, rows, float, 18)
        ATTRIB(XonoticHUDExitDialog, columns, float, 4)
        ATTRIB(XonoticHUDExitDialog, name, string, "HUDExit")
+       ATTRIB(XonoticHUDExitDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticHUDExitDialog)
 
 #endif
index 5ba3733f012f4bcfb3d39dd3c9ee169d0da25ae3..18c376b503dda2463b9b3f776de54e66048ad2ed 100644 (file)
@@ -80,7 +80,7 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", ", WeaponArenaString());
        if(cvar("g_start_weapon_laser") == 0)
                s = strcat(s, ", ", _("No start weapons"));
-       if(cvar("sv_gravity") < 800)
+       if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity")))
                s = strcat(s, ", ", _("Low gravity"));
        if(cvar("g_cloaked"))
                s = strcat(s, ", ", _("Cloaked"));
index 9e8cb5fae637528d8596428fbe218652d16cd22c..033336dc9f7eadd2c534ff5a7a9caae1b26166b4 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticSandboxToolsDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticSandboxToolsDialog, rows, float, 16)
        ATTRIB(XonoticSandboxToolsDialog, columns, float, 4)
        ATTRIB(XonoticSandboxToolsDialog, name, string, "SandboxTools")
+       ATTRIB(XonoticSandboxToolsDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticSandboxToolsDialog)
 #endif
 
index 7fb154c8a29ba3d4193e375626ec9ee57edfbe89..10efc3c252ea3bd3a130acc4354c96861e17c238 100644 (file)
@@ -12,6 +12,7 @@ CLASS(XonoticTeamSelectDialog) EXTENDS(XonoticRootDialog)
        ATTRIB(XonoticTeamSelectDialog, team2, entity, NULL)
        ATTRIB(XonoticTeamSelectDialog, team3, entity, NULL)
        ATTRIB(XonoticTeamSelectDialog, team4, entity, NULL)
+       ATTRIB(XonoticTeamSelectDialog, requiresConnection, float, TRUE)
 ENDCLASS(XonoticTeamSelectDialog)
 #endif
 
index 8bd47e799983abe4207446224c390a6441e4d1bc..01fd64e1022eb5d74524db0184dd80830d605f55 100644 (file)
@@ -72,6 +72,7 @@ void XonoticResolutionSlider_addResolution(entity me, float w, float h, float pi
        me.addValue(me, strzone(sprintf(_("%dx%d"), w, h)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
        // FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
 }
+float autocvar_menu_vid_allowdualscreenresolution;
 void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
 {
        float i;
@@ -93,7 +94,9 @@ void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
                if(r_x < 640 || r_y < 480)
                        continue;
                if(r_x > 2 * r_y) // likely dualscreen resolution, skip this one
-                       continue;
+                       if(autocvar_menu_vid_allowdualscreenresolution <= 0)
+                               continue;
+                       
                me.addResolution(me, r_x, r_y, r_z);
        }
 
index bd339bd87a138b68232dd2d612429d260fa228f5..f50aed591cb33ab91c2b09095f242bac10dd7005 100644 (file)
@@ -1200,7 +1200,6 @@ float autocvar_timelimit_overtimes;
 float autocvar_timelimit_suddendeath;
 #define autocvar_utf8_enable cvar("utf8_enable")
 float autocvar_waypoint_benchmark;
-float autocvar_welcome_message_time;
 float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
 float autocvar_g_trueaim_minrange;
 float autocvar_g_debug_defaultsounds;
index baf696f6ef60804bbce60aa81aeaf8dffc173cd0..fac4314ca6e7b53c577b1182228f3ca612bc614e 100644 (file)
@@ -297,7 +297,13 @@ void FixPlayermodel()
 
                n = tokenize_console(defaultmodel);
                if(n > 0)
+               {
                        defaultmodel = argv(floor(n * self.model_randomizer));
+                       // However, do NOT randomize if the player-selected model is in the list.
+                       for (i = 0; i < n; ++i)
+                               if ((argv(i) == self.playermodel && defaultskin == stof(self.playerskin)) || argv(i) == strcat(self.playermodel, ":", self.playerskin))
+                                       defaultmodel = argv(i);
+               }
 
                i = strstrofs(defaultmodel, ":", 0);
                if(i >= 0)
@@ -2039,7 +2045,7 @@ void PrintWelcomeMessage()
        {
                if(self.BUTTON_INFO) // BUTTON_INFO hides initial MOTD
                        self.motd_actived_time = -2; // wait until BUTTON_INFO gets released
-               else if(self.motd_actived_time == -2 || IS_PLAYER(self) || time - self.jointime > autocvar_welcome_message_time)
+               else if(self.motd_actived_time == -2 || IS_PLAYER(self))
                {
                        // instanctly hide MOTD
                        self.motd_actived_time = 0;
@@ -2591,7 +2597,7 @@ void PlayerPostThink (void)
        //pointparticles(particleeffectnum("machinegun_impact"), self.origin + self.view_ofs + '0 0 7', '0 0 0', 1);
 
        if(self.waypointsprite_attachedforcarrier)
-               WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
+               WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
 
        playerdemo_write();
 
index e5e0c1dda5516b22ce098311cdc239db3369899f..1c5daa19f1eb7999d4541a8f586c2de5332e9834 100644 (file)
@@ -276,7 +276,7 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float
        // damage resistance (ignore most of the damage from a bullet or similar)
        damage = max(damage - 5, 1);
 
-       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
        take = v_x;
        save = v_y;
 
@@ -372,7 +372,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
 
 
-       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
        take = v_x;
        save = v_y;
 
index 3554f1ff67235142f837507183b772c41c841c09..ac58a90c3e36715d3c020156d3a5dab3c9d69f47 100644 (file)
@@ -85,6 +85,10 @@ void CSQCProjectile(entity e, float clientanimate, float type, float docull)
        e.csqcprojectile_type = type;
 }
 
+// FIXME HACK
+float ItemSend(entity to, float sf);
+void ItemUpdate(entity item);
+// END HACK
 void UpdateCSQCProjectile(entity e)
 {
        if(e.SendEntity == CSQCProjectile_SendEntity)
@@ -92,6 +96,12 @@ void UpdateCSQCProjectile(entity e)
                // send new origin data
                e.SendFlags |= 0x01;
        }
+// FIXME HACK
+       else if(e.SendEntity == ItemSend)
+       {
+               ItemUpdate(e);
+       }
+// END HACK
 }
 
 void UpdateCSQCProjectileAfterTeleport(entity e)
index 8c275822481d1a30ad13ac8020de9921389398c3..c01cddd216a45bbdee98ba5c4c7e57767aaacd29 100644 (file)
@@ -593,6 +593,10 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
        if(deathtype == DEATH_KILL || deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE)
        {
+               // exit the vehicle before killing (fixes a crash)
+               if(IS_PLAYER(targ) && targ.vehicle)
+                       vehicles_exit(VHEF_RELESE);
+       
                // These are ALWAYS lethal
                // No damage modification here
                // Instead, prepare the victim for his death...
@@ -639,7 +643,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                                                        if(autocvar_g_mirrordamage_virtual)
                                                        {
-                                                               vector v  = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+                                                               vector v  = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, mirrordamage);
                                                                attacker.dmg_take += v_x;
                                                                attacker.dmg_save += v_y;
                                                                attacker.dmg_inflictor = inflictor;
@@ -649,7 +653,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
                                                        if(autocvar_g_friendlyfire_virtual)
                                                        {
-                                                               vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+                                                               vector v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, deathtype, damage);
                                                                targ.dmg_take += v_x;
                                                                targ.dmg_save += v_y;
                                                                targ.dmg_inflictor = inflictor;
index d654b91d53f0405ab82f58cf7da6a070a512a9ca..520b87c47ff95c4c8eb2d73956aa2d70f9347a41 100644 (file)
@@ -323,7 +323,6 @@ void cvar_changes_init()
                BADCVAR("sv_fraginfo");
                BADCVAR("sv_timeout");
                BADPREFIX("sv_timeout_");
-               BADCVAR("welcome_message_time");
                BADPREFIX("crypto_");
                BADPREFIX("g_chat_");
                BADPREFIX("g_ctf_captimerecord_");
@@ -1049,6 +1048,8 @@ float() MaplistMethod_Iterate = // usual method
 {
        float pass, i;
 
+       dprint("Trying MaplistMethod_Iterate\n");
+
        for(pass = 1; pass <= 2; ++pass)
        {
                for(i = 1; i < Map_Count; ++i)
@@ -1064,6 +1065,8 @@ float() MaplistMethod_Iterate = // usual method
 
 float() MaplistMethod_Repeat = // fallback method
 {
+       dprint("Trying MaplistMethod_Repeat\n");
+
        if(Map_Check(Map_Current, 2))
                return Map_Current;
        return -2;
@@ -1073,6 +1076,8 @@ float() MaplistMethod_Random = // random map selection
 {
        float i, imax;
 
+       dprint("Trying MaplistMethod_Random\n");
+
        imax = 42;
 
        for(i = 0; i <= imax; ++i)
@@ -1091,6 +1096,8 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
 {
        float i, j, imax, insertpos;
 
+       dprint("Trying MaplistMethod_Shuffle\n");
+
        imax = 42;
 
        for(i = 0; i <= imax; ++i)
@@ -1125,10 +1132,14 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
 void Maplist_Init()
 {
        Map_Count = tokenizebyseparator(autocvar_g_maplist, " ");
-       if(Map_Count == 0)
+       float i;
+       for (i = 0; i < Map_Count; ++i)
+               if (Map_Check(i, 2))
+                       break;
+       if (i == Map_Count)
        {
-               bprint( "Maplist is empty!  Resetting it to default map list.\n" );
-               cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+               bprint( "Maplist contains no usable maps!  Resetting it to default map list.\n" );
+               cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags() | MAPINFO_FLAG_NOAUTOMAPLIST));
                if(autocvar_g_maplist_shuffle)
                        ShuffleMaplist();
                localcmd("\nmenu_cmd sync\n");
@@ -1231,31 +1242,11 @@ void GotoNextMap(float reinit)
                return;
        alreadychangedlevel = TRUE;
 
-       {
-               string nextMap;
-               float allowReset;
+       string nextMap;
 
-               for(allowReset = 1; allowReset >= 0; --allowReset)
-               {
-                       nextMap = GetNextMap();
-                       if(nextMap != "")
-                               break;
-
-                       if(allowReset)
-                       {
-                               bprint( "Maplist contains no single playable map!  Resetting it to default map list.\n" );
-                               cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
-                               if(autocvar_g_maplist_shuffle)
-                                       ShuffleMaplist();
-                               localcmd("\nmenu_cmd sync\n");
-                       }
-                       else
-                       {
-                               error("Everything is broken - not even the default map list works. Please report this to the developers.");
-                       }
-               }
-               Map_Goto(reinit);
-       }
+       nextMap = GetNextMap();
+       if(nextMap == "")
+               error("Everything is broken - cannot find a next map. Please report this to the developers.");
 }
 
 
index af9055e34fe3b56307224b4462bc6e201daf0322..0184995fd21e77488bfd2024526a1f02ee503624 100644 (file)
@@ -44,8 +44,8 @@ void ctf_CaptureRecord(entity flag, entity player)
 void ctf_FlagcarrierWaypoints(entity player)
 {
        WaypointSprite_Spawn("flagcarrier", 0, 0, player, FLAG_WAYPOINT_OFFSET, world, player.team, player, wps_flagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_FLAGCARRIER(player.team));
-       WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent) * 2);
-       WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent));
+       WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
+       WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
        WaypointSprite_UpdateTeamRadar(player.wps_flagcarrier, RADARICON_FLAGCARRIER, WPCOLOR_FLAGCARRIER(player.team));
 }
 
@@ -1786,7 +1786,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink)
        
        // update the health of the flag carrier waypointsprite
        if(self.wps_flagcarrier) 
-               WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
+               WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
        
        return FALSE;
 }
@@ -1808,7 +1808,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values t
        }
        else if(frag_target.flagcarried && (frag_target.deadflag == DEAD_NO) && CTF_DIFFTEAM(frag_target, frag_attacker)) // if the target is a flagcarrier
        {
-               if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent)))
+               if(autocvar_g_ctf_flagcarrier_auto_helpme_damage > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON)))
                if(time > frag_target.wps_helpme_time + autocvar_g_ctf_flagcarrier_auto_helpme_time)
                {
                        frag_target.wps_helpme_time = time;
index 31aa5caf791b29bbe8fb69e489aa935e167bb4d9..fcc8c0cf30d5d6b9c955b47618909592deaa7a45 100644 (file)
@@ -268,6 +268,10 @@ float ItemSend(entity to, float sf)
     return TRUE;
 }
 
+void ItemUpdate(entity item)
+{
+       item.SendFlags |= ISF_LOCATION;
+}
 
 float have_pickup_item(void)
 {
index a5817fa502addef565a946eaaa55a7bd544f60ff..6454838ebdd68a674b3e541945612b874f2b2768 100644 (file)
@@ -462,8 +462,8 @@ entity WaypointSprite_AttachCarrier(
        e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, FALSE, icon, rgb);
        if(e)
        {
-               WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent) * 2);
-               WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent));
+               WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
+               WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
        }
        return e;
 }