]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/freezetag_updates 896/head
authorterencehill <piuntn@gmail.com>
Wed, 5 May 2021 13:14:59 +0000 (15:14 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 5 May 2021 13:14:59 +0000 (15:14 +0200)
# Conflicts:
# gamemodes-server.cfg

18 files changed:
.tx/merge-base
_hud_common.cfg
common.de.po
common.de_CH.po
common.pt.po
gamemodes-server.cfg
languages.txt
qcsrc/client/hud/panel/ammo.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/items/inventory.qh
qcsrc/common/mutators/mutator/campcheck/sv_campcheck.qc
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc
qcsrc/menu/xonotic/dialog_singleplayer.qc
qcsrc/server/command/vote.qc
qcsrc/server/damage.qc

index 0a448742decc3f0211e9cd5a03db4d537d0e1ae1..e3d0c795dcb8c1f1f23afb07a1254ef8d6a77e76 100644 (file)
@@ -1 +1 @@
-Tue Apr 20 07:23:45 CEST 2021
+Sun May  2 07:24:54 CEST 2021
index a62837f5f8b4f0881871938eb9246a8aaa534eb8..c622cca34ca126756b3753bb937e32160cbeaea0 100644 (file)
@@ -129,7 +129,8 @@ seta hud_panel_scoreboard_playerid_suffix " " "player id suffix"
 seta hud_panel_scoreboard_accuracy_showdelay 2 "how long to delay displaying accuracy below the scoreboard if it's too far down"
 seta hud_panel_scoreboard_accuracy_showdelay_minpos 0.75 "delay displaying the accuracy panel only if its position is lower than this percentage of the screen height from the top"
 
-seta hud_panel_scoreboard_itemstats_filter 1 "filter out less interesting items (ammo and smaller health/armor)"
+seta hud_panel_scoreboard_itemstats_filter 1 "filter out less interesting items (according to hud_panel_scoreboard_itemstats_filter_mask)"
+seta hud_panel_scoreboard_itemstats_filter_mask 12 "[0-1][0-4]: the tens digit filters out all ammo items if set to 1, the units digit filters out health/armor items (1 small, 2 medium too, 3 big too, 4 mega too)"
 seta hud_panel_scoreboard_itemstats_showdelay 2.2 "how long to delay displaying item stats below the scoreboard if it's too far down"
 seta hud_panel_scoreboard_itemstats_showdelay_minpos 0.75 "delay displaying the item stats panel only if its position is lower than this percentage of the screen height from the top"
 
index e60bd736867b1338cace58f1b942819ece13781e..38bb66331ceb473716aed26e874e2efab32f8e74 100644 (file)
@@ -28,8 +28,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-04-18 07:23+0200\n"
-"PO-Revision-Date: 2021-04-18 05:23+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2021-04-23 21:09+0000\n"
+"Last-Translator: Mirio <opivy@hotmail.de>\n"
 "Language-Team: German (http://www.transifex.com/team-xonotic/xonotic/"
 "language/de/)\n"
 "Language: de\n"
@@ -3053,7 +3053,7 @@ msgstr "^BG%s^F3 wurde aufgrund von Inaktivität gekickt"
 #: qcsrc/common/notifications/all.inc:418
 #, c-format
 msgid "^BG%s^F3 was moved to spectator for idling"
-msgstr ""
+msgstr "^BG%s^F3 wurde aufgrund von Inaktivität zum Zuschauen verschoben"
 
 #: qcsrc/common/notifications/all.inc:419
 msgid ""
@@ -4044,6 +4044,8 @@ msgid ""
 "^K1Stop idling!\n"
 "^BGMoving to spectator in ^COUNT..."
 msgstr ""
+"^K1Steh nicht herum!\n"
+"^BGVerschieben zum Zuschauen in ^COUNT..."
 
 #: qcsrc/common/notifications/all.inc:663
 #, c-format
index fea3e05977f99a17d493d8293709398af3ecc980..310c7582a6e319f133529eb17835dd94616fce69 100644 (file)
@@ -28,8 +28,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-04-18 07:23+0200\n"
-"PO-Revision-Date: 2021-04-18 05:23+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2021-04-23 21:09+0000\n"
+"Last-Translator: Mirio <opivy@hotmail.de>\n"
 "Language-Team: German (http://www.transifex.com/team-xonotic/xonotic/"
 "language/de/)\n"
 "Language: de\n"
@@ -3053,7 +3053,7 @@ msgstr "^BG%s^F3 wurde aufgrund von Inaktivität gekickt"
 #: qcsrc/common/notifications/all.inc:418
 #, c-format
 msgid "^BG%s^F3 was moved to spectator for idling"
-msgstr ""
+msgstr "^BG%s^F3 wurde aufgrund von Inaktivität zum Zuschauen verschoben"
 
 #: qcsrc/common/notifications/all.inc:419
 msgid ""
@@ -4045,6 +4045,8 @@ msgid ""
 "^K1Stop idling!\n"
 "^BGMoving to spectator in ^COUNT..."
 msgstr ""
+"^K1Steh nicht herum!\n"
+"^BGVerschieben zum Zuschauen in ^COUNT..."
 
 #: qcsrc/common/notifications/all.inc:663
 #, c-format
index 38d9786689fbfd7224fd98ad87e89dce98e8cffb..f5c46eb12ba7caf35aa4747c64b651adb961b482 100644 (file)
@@ -5,6 +5,7 @@
 # Translators:
 # Ivan Paulos Tomé <greylica@gmail.com>, 2016
 # Jean Trindade Pereira <jean_trindade2@hotmail.com>, 2015-2018
+# lecalam, 2021
 # Mirio <opivy@hotmail.de>, 2017
 # NotThatPrivate Yes <henriqueferreira2009@gmail.com>, 2015
 # Ricardo Manuel da Cruz Coelho da Silva <ricardo.mccs@gmail.com>, 2015
@@ -14,8 +15,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-04-18 07:23+0200\n"
-"PO-Revision-Date: 2021-04-18 05:23+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2021-04-26 17:25+0000\n"
+"Last-Translator: lecalam\n"
 "Language-Team: Portuguese (http://www.transifex.com/team-xonotic/xonotic/"
 "language/pt/)\n"
 "Language: pt\n"
@@ -27,12 +28,12 @@ msgstr ""
 #: qcsrc/client/hud/hud_config.qc:80
 #, c-format
 msgid "^2Successfully exported to %s! (Note: It's saved in data/data/)"
-msgstr ""
+msgstr "^2Exportado com sucesso para %s! (Nota: foi gravado em data/data/)"
 
 #: qcsrc/client/hud/hud_config.qc:84
 #, c-format
 msgid "^1Couldn't write to %s"
-msgstr ""
+msgstr "^1Não foi possível gravar para %s"
 
 #: qcsrc/client/hud/panel/centerprint.qc:173
 #, c-format
@@ -53,7 +54,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/centerprint.qc:182
 msgid "Generic message"
-msgstr ""
+msgstr "Mensagem genérica"
 
 #: qcsrc/client/hud/panel/chat.qc:95
 msgid "^3Player^7: This is the chat area."
@@ -570,7 +571,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:120
 msgid "Number of deaths"
-msgstr ""
+msgstr "Número de mortes"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:120
 msgid "SCO^deaths"
@@ -590,7 +591,7 @@ msgstr "dano"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:122
 msgid "The total damage done"
-msgstr ""
+msgstr "O dano total causado"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:123
 msgid "SCO^dmgtaken"
@@ -598,7 +599,7 @@ msgstr "dano recebido"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:123
 msgid "The total damage taken"
-msgstr ""
+msgstr "O dano total recebido"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:124
 msgid "Number of flag drops"
@@ -626,7 +627,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:127
 msgid "Number of faults committed"
-msgstr ""
+msgstr "Faltas cometidas"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:127
 msgid "SCO^faults"
@@ -642,11 +643,11 @@ msgstr "pbndvítimas"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:129
 msgid "FPS"
-msgstr ""
+msgstr "FPS"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:129
 msgid "SCO^fps"
-msgstr ""
+msgstr "fps"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:130
 msgid "Number of kills minus suicides"
@@ -654,7 +655,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:130
 msgid "SCO^frags"
-msgstr ""
+msgstr "execuções"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:131
 msgid "Number of goals scored"
@@ -725,7 +726,7 @@ msgstr "derrotas"
 #: qcsrc/client/hud/panel/scoreboard.qc:140
 #: qcsrc/client/hud/panel/scoreboard.qc:141
 msgid "Player name"
-msgstr ""
+msgstr "Nome do jogador"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:140
 msgid "SCO^name"
@@ -737,7 +738,7 @@ msgstr "apelido"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:142
 msgid "Number of objectives destroyed"
-msgstr ""
+msgstr "Objetivos destruídos"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:142
 msgid "SCO^objectives"
index bb17922f82afbfac06d1f4c252d9ba8625f3e4c7..77a6d735dc80c97fff785a4ffdbf9ecabc7d1fca 100644 (file)
@@ -222,8 +222,8 @@ set g_assault 0 "Assault: attack the enemy base as fast as you can, then defend
 set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round"
 set g_ca_point_limit -1 "Clan Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set g_ca_point_leadlimit -1 "Clan Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-set g_ca_spectate_enemies 0 "Allow spectating enemy player by dead player during clan arena games"
-set g_ca_warmup 10 "how long the players will have time to run around the map before the round starts"
+set g_ca_spectate_enemies 0 "allow eliminated players to spectate enemy players during Clan Arena games"
+set g_ca_warmup 10 "time players get to run around before the round starts"
 set g_ca_damage2score_multiplier 0.01
 set g_ca_round_timelimit 180 "round time limit in seconds"
 set g_ca_teams_override 0
@@ -354,8 +354,8 @@ set g_domination_point_rate         0 "override: how often to give those points"
 set g_domination_point_glow            0 "domination point glow (warning, slow)"
 set g_domination_roundbased 0 "enable round-based domination (capture all control points to win the round)"
 set g_domination_roundbased_point_limit 5 "capture limit in round-based domination mode"
-set g_domination_round_timelimit 120
-set g_domination_warmup 5
+set g_domination_round_timelimit 120 "round time limit in seconds"
+set g_domination_warmup 5 "time players have to wait before the round starts"
 //set g_domination_balance_team_points 1 "# of points received is based on team sizes"
 
 
@@ -363,7 +363,7 @@ set g_domination_warmup 5
 //  freezetag
 // ===========
 set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze teammates by standing next to them"
-set g_freezetag_warmup 10 "Time players get to run around before the round starts"
+set g_freezetag_warmup 10 "time players get to run around before the round starts"
 set g_freezetag_point_limit -1 "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set g_freezetag_point_leadlimit -1     "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set g_freezetag_revive_speed 0.4 "Speed for reviving a frozen teammate"
@@ -505,8 +505,8 @@ set g_nexball_tackling 1 "Allow ball theft?"
 // ===========
 set g_onslaught 0 "Onslaught: take control points towards the enemy generator and then destroy it"
 set g_onslaught_point_limit 1 "Onslaught point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-set g_onslaught_warmup 5
-set g_onslaught_round_timelimit 500
+set g_onslaught_warmup 5 "time players have to wait before the round starts"
+set g_onslaught_round_timelimit 500 "round time limit in seconds"
 set g_onslaught_teleport_radius 200 "Allows teleporting from a control point to another"
 set g_onslaught_teleport_wait 5 "Time before player can teleport again"
 set g_onslaught_spawn_choose 1 "Allow players to choose the control point to be spawned at"
index 9c5898e181abdd9080e6bdf1cabcff4f5d915f0b..68e2f2bacd0b6b8b30df04cae2cea79a5e4d9166 100644 (file)
@@ -1,6 +1,6 @@
 ast   "Asturian" "Asturianu" 76%
-de    "German" "Deutsch" 99%
-de_CH "German (Switzerland)" "Deutsch (Schweiz)" 99%
+de    "German" "Deutsch" 100%
+de_CH "German (Switzerland)" "Deutsch (Schweiz)" 100%
 en    "English" "English" 100%
 en_AU "English (Australia)" "English (Australia)" 74%
 es    "Spanish" "Español" 99%
index ed2b6e033a29aeba7b4848e38fae1687d88d274a..b4a7b6040a92cd5f980253d8a4f51858c5df2662 100644 (file)
@@ -115,7 +115,7 @@ void HUD_Ammo()
        {
                if((!autocvar_hud_panel_ammo) || (spectatee_status == -1))
                        return;
-               if(STAT(HEALTH) < 1 && autocvar_hud_panel_ammo_hide_ondeath)
+               if(STAT(HEALTH) <= 0 && autocvar_hud_panel_ammo_hide_ondeath)
                        return;
        }
 
index 9857960440fd79f7da6361eb7ccdd1822890cff9..2f756e4ae190bbca581d0403001db6c9ac6d46cb 100644 (file)
@@ -89,7 +89,8 @@ float autocvar_hud_panel_scoreboard_accuracy_showdelay_minpos = 0.75;
 
 bool autocvar_hud_panel_scoreboard_itemstats = true;
 bool autocvar_hud_panel_scoreboard_itemstats_doublerows = false;
-bool autocvar_hud_panel_scoreboard_itemstats_filter = true;
+int autocvar_hud_panel_scoreboard_itemstats_filter = 1;
+int autocvar_hud_panel_scoreboard_itemstats_filter_mask = 12;
 float autocvar_hud_panel_scoreboard_itemstats_showdelay = 2.2; // slightly more delayed than accuracy
 float autocvar_hud_panel_scoreboard_itemstats_showdelay_minpos = 0.75;
 
@@ -1351,18 +1352,31 @@ vector Scoreboard_AccuracyStats_Draw(vector pos, vector rgb, vector bg_size)
        return end_pos;
 }
 
-.bool uninteresting;
-STATIC_INIT(default_order_items_label)
+bool is_item_filtered(entity it)
 {
-       IL_EACH(default_order_items, true, {
-               if(!(it.instanceOfPowerup
-                       || it == ITEM_HealthMega || it == ITEM_HealthBig
-                       || it == ITEM_ArmorMega || it == ITEM_ArmorBig
-                       ))
+       if (!autocvar_hud_panel_scoreboard_itemstats_filter)
+               return false;
+       int mask = autocvar_hud_panel_scoreboard_itemstats_filter_mask;
+       if (mask <= 0)
+               return false;
+       if (it.instanceOfArmor || it.instanceOfHealth)
+       {
+               int ha_mask = floor(mask) % 10;
+               switch (ha_mask)
                {
-                       it.uninteresting = true;
+                       default: return false;
+                       case 4: if (it == ITEM_HealthMega || it == ITEM_ArmorMega) return true; // else fallthrough
+                       case 3: if (it == ITEM_HealthBig || it == ITEM_ArmorBig) return true; // else fallthrough
+                       case 2: if (it == ITEM_HealthMedium || it == ITEM_ArmorMedium) return true; // else fallthrough
+                       case 1: if (it == ITEM_HealthSmall || it == ITEM_ArmorSmall) return true; // else fallthrough
                }
-       });
+       }
+       if (it.instanceOfAmmo)
+       {
+               int ammo_mask = floor(mask / 10) % 10;
+               return (ammo_mask == 1);
+       }
+       return false;
 }
 
 vector Scoreboard_ItemStats_Draw(vector pos, vector rgb, vector bg_size)
@@ -1374,7 +1388,7 @@ vector Scoreboard_ItemStats_Draw(vector pos, vector rgb, vector bg_size)
        IL_EACH(default_order_items, true, {
                int q = g_inventory.inv_items[it.m_id];
                //q = 1; // debug: display all items
-               if (autocvar_hud_panel_scoreboard_itemstats_filter && it.uninteresting)
+               if (is_item_filtered(it))
                        ++uninteresting_cnt;
                else if (!q)
                        ++disowned_cnt;
@@ -1441,7 +1455,7 @@ vector Scoreboard_ItemStats_Draw(vector pos, vector rgb, vector bg_size)
        vector tmpos = pos;
 
        int column = 0;
-       IL_EACH(default_order_items, !(autocvar_hud_panel_scoreboard_itemstats_filter && it.uninteresting), {
+       IL_EACH(default_order_items, !is_item_filtered(it), {
                int n = g_inventory.inv_items[it.m_id];
                //n = 1 + floor(i * 3 + 4.8) % 7; // debug: display a value for each item
                if (n <= 0) continue;
@@ -1703,7 +1717,7 @@ bool Scoreboard_ItemStats_WouldDraw(float ypos)
        if (!have_item_stats)
        {
                IL_EACH(default_order_items, true, {
-                       if (!(autocvar_hud_panel_scoreboard_itemstats_filter && it.uninteresting))
+                       if (!is_item_filtered(it))
                        {
                                int q = g_inventory.inv_items[it.m_id];
                                //q = 1; // debug: display all items
index 4e457dabab9bcf24f2dbe4338b29d9e8c0e5e6bc..5132b4998916f9e9a60f6bb86c6523560b0e2149 100644 (file)
@@ -88,17 +88,14 @@ void Projectile_Draw(entity this)
                drawn = (this.iflags & IFLAG_VALID);
                t = time;
        }
+       bool is_nade = Projectile_isnade(this.cnt);
 
        if (!(f & FL_ONGROUND))
        {
                rot = '0 0 0';
-               switch (this.cnt)
+               if (is_nade) rot = this.avelocity;
+               else switch (this.cnt)
                {
-                       /*
-                       case PROJECTILE_GRENADE:
-                           rot = '-2000 0 0'; // forward
-                           break;
-                       */
                        case PROJECTILE_GRENADE_BOUNCING:
                                rot = '0 -1000 0'; // sideways
                                break;
@@ -108,41 +105,45 @@ void Projectile_Draw(entity this)
                        case PROJECTILE_ROCKET:
                                rot = '0 0 720'; // spinning
                                break;
-                       default:
-                               break;
                }
 
-               if (Projectile_isnade(this.cnt))
-                       rot = this.avelocity;
-
-               this.angles = AnglesTransform_ToAngles(AnglesTransform_Multiply(AnglesTransform_FromAngles(this.angles), rot * (t - this.spawntime)));
+               if (rot)
+               {
+                       if (!rot.x && !rot.y)
+                       {
+                               // cheaper z-only rotation formula
+                               this.angles.z = (rot.z * (t - this.spawntime)) % 360;
+                               if (this.angles.z < 0)
+                                       this.angles.z += 360;
+                       }
+                       else
+                               this.angles = AnglesTransform_ToAngles(AnglesTransform_Multiply(AnglesTransform_FromAngles(this.angles), rot * (t - this.spawntime)));
+               }
        }
 
-       vector ang;
-       ang = this.angles;
-       ang.x = -ang.x;
-       makevectors(ang);
-
        a = 1 - (time - this.fade_time) * this.fade_rate;
        this.alpha = bound(0, this.alphamod * a, 1);
        if (this.alpha <= 0)
                drawn = 0;
        this.renderflags = 0;
 
+       vector ang = this.angles;
+       ang.x = -ang.x;
        trailorigin = this.origin;
-       switch (this.cnt)
+       if (is_nade)
+       {
+               makevectors(ang);
+               trailorigin += v_up * 4;
+       }
+       else switch (this.cnt)
        {
                case PROJECTILE_GRENADE:
                case PROJECTILE_GRENADE_BOUNCING:
+                       makevectors(ang);
                        trailorigin += v_right * 1 + v_forward * -10;
                        break;
-               default:
-                       break;
        }
 
-       if (Projectile_isnade(this.cnt))
-               trailorigin += v_up * 4;
-
        if (drawn)
                Projectile_DrawTrail(this, trailorigin);
        else
index abc367d51389615815274c79100f7a462e208e31..22a4d94c387335f833d0867f2acb1df01e776663 100644 (file)
@@ -138,7 +138,9 @@ void Inventory_new(PlayerState this)
 {
     Inventory inv = NEW(Inventory);
     setcefc(inv, Inventory_customize);
-    Net_LinkEntity((inv.owner = this).inventory = inv, false, 0, Inventory_Send);
+       this.inventory = inv;
+       inv.owner = this;
+       Net_LinkEntity(inv, false, 0, Inventory_Send);
 }
 void Inventory_delete(entity e) { delete(e.inventory); }
 void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
index f53d8c356a5bac8c59f0f2e5682c65fb0d5b00cc..0cce4e443e76c08df38b2fa3419a3c42d86ba94d 100644 (file)
@@ -62,7 +62,10 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
                                if(player.vehicle)
                                        Damage(player.vehicle, NULL, NULL, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, DMG_NOWEP, player.vehicle.origin, '0 0 0');
                                else
-                                       Damage(player, NULL, NULL, bound(0, autocvar_g_campcheck_damage, GetResource(player, RES_HEALTH) + GetResource(player, RES_ARMOR) * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, DMG_NOWEP, player.origin, '0 0 0');
+                               {
+                                       float max_dmg = GetResource(player, RES_HEALTH) + GetResource(player, RES_ARMOR) * autocvar_g_balance_armor_blockpercent + 5;
+                                       Damage(player, NULL, NULL, bound(0, autocvar_g_campcheck_damage, max_dmg), DEATH_CAMP.m_id, DMG_NOWEP, player.origin, '0 0 0');
+                               }
                        }
                        player.campcheck_nextcheck = time + autocvar_g_campcheck_interval;
                        player.campcheck_traveled_distance = 0;
index fd3f7ae07b3d77a83f2924ac72bf1c05e29467fa..9edfcad60a713bfd98a322d41a6f32ddc58922e7 100644 (file)
@@ -295,7 +295,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
     MSG_INFO_NOTIF(DEATH_MURDER_VH_WAKI_ROCKET,             N_CONSOLE,  3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_death",         _("^BG%s%s^K1 couldn't find shelter from ^BG%s^K1's Racer%s%s"), "")
     MSG_INFO_NOTIF(DEATH_MURDER_VOID,                       N_CONSOLE,  3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",               "notify_void",          _("^BG%s%s^K1 was thrown into a world of hurt by ^BG%s^K1%s%s"), "")
 
-    MSG_INFO_NOTIF(DEATH_SELF_AUTOTEAMCHANGE,               N_CONSOLE,  2, 1, "s1 s2loc death_team", "",        "",                     _("^BG%s^K1 was moved into the %s%s"), "")
+    MSG_INFO_NOTIF(DEATH_SELF_AUTOTEAMCHANGE,               N_CONSOLE,  2, 1, "s1 death_team s2loc", "",        "",                     _("^BG%s^K1 was moved into the %s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_BETRAYAL,                     N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_teamkill_red",  _("^BG%s^K1 became enemies with the Lord of Teamplay%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_CAMP,                         N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_camping",       _("^BG%s^K1 thought they found a nice camping ground%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_CHEAT,                        N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_selfkill",      _("^BG%s^K1 unfairly eliminated themself%s%s"), "")
@@ -324,7 +324,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
     MSG_INFO_NOTIF(DEATH_SELF_SLIME,                        N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_slime",         _("^BG%s^K1 was slimed%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_SUICIDE,                      N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_selfkill",      _("^BG%s^K1 couldn't take it anymore%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_SWAMP,                        N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_slime",         _("^BG%s^K1 is now preserved for centuries to come%s%s"), "")
-    MSG_INFO_NOTIF(DEATH_SELF_TEAMCHANGE,                   N_CONSOLE,  2, 1, "s1 s2loc death_team", "",        "",                     _("^BG%s^K1 switched to the %s%s"), "")
+    MSG_INFO_NOTIF(DEATH_SELF_TEAMCHANGE,                   N_CONSOLE,  2, 1, "s1 death_team s2loc", "",        "",                     _("^BG%s^K1 switched to the %s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_TOUCHEXPLODE,                 N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 died in an accident%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_TURRET,                       N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 ran into a turret%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_TURRET_EWHEEL,                N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was blasted away by an eWheel turret%s%s"), "")
@@ -347,7 +347,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
     MSG_INFO_NOTIF(DEATH_SELF_VH_SPID_ROCKET,               N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was blasted to bits by a Spiderbot rocket%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_VH_WAKI_DEATH,                N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 got caught in the blast of a Racer explosion%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_VH_WAKI_ROCKET,               N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 couldn't find shelter from a Racer rocket%s%s"), "")
-    MSG_INFO_NOTIF(DEATH_SELF_VOID,                         N_CONSOLE,  3, 1, "s1 s2 s2loc spree_lost", "s1",   "notify_void",            "^BG%s^K1 %s^K1%s%s", "")
+    MSG_INFO_NOTIF(DEATH_SELF_VOID,                         N_CONSOLE,  3, 1, "s1 s2 s3loc spree_lost", "s1",   "notify_void",            "^BG%s^K1 %s^K1%s%s", "")
 
     MULTITEAM_INFO(DEATH_TEAMKILL,                          N_CONSOLE,  3, 1, "s1 s2 s3loc spree_end", "s2 s1",     "notify_teamkill_%s",   _("^BG%s^K1 was betrayed by ^BG%s^K1%s%s"), "", NAME)
 
index 5a7b0af0f3f76c356c8ae37a5ce94e113f771497..babadf8c873272fb7a7e847e31cf2cf41a438fc1 100644 (file)
@@ -36,6 +36,7 @@ string Get_Notif_TypeName(MSG net_type)
                case MSG_CENTER: return "MSG_CENTER";
                case MSG_MULTI: return "MSG_MULTI";
                case MSG_CHOICE: return "MSG_CHOICE";
+               case MSG_CENTER_KILL: return "MSG_CENTER_KILL";
        }
        LOG_WARNF("Get_Notif_TypeName(%d): Improper net type!", ORDINAL(net_type));
        return "";
index 6ba33e2a710128ce86bb03c1369ea84883901771..66019c4bf41a6958f144cc01ffa340403488cb8f 100644 (file)
@@ -10,7 +10,7 @@ const float DMO_PLAY = 1;
 const float DMO_TIME = 2;
 void DemoConfirm_Check_Gamestatus(entity btn, entity me)
 {
-       if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) // we're not in a match, lets watch the demo
+       if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) || isdemo()) // we're not in a match, lets watch the demo
        {
                if(btn.democlicktype == DMO_PLAY)
                        { demolist.startDemo(demolist); }
index 717fe524bbe98aa3f33376dfe3b05d16f60285c0..a223f5807b318dd645f8441628a1b1e30bd50721 100644 (file)
@@ -12,28 +12,49 @@ void InstantAction_LoadMap(entity btn, entity dummy)
 
        cvar_set("timelimit_override", "10");
 
-       if(random() < 0.4) // 40% are DM
+       bool check_probability_distribution = true;
+       float r = 1;
+
+       LABEL(doit);
+       if (!check_probability_distribution)
+               r = random();
+
+       if((r -= 0.30) < 0)
        {
                MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
                pmin = 2;
                pmax = 8;
                pstep = 1;
        }
-       else if(random() < 0.5) // half of the remaining 60%, i.e. 30%, are CTF
+       else if((r -= 0.25) < 0)
        {
                MapInfo_SwitchGameType(MAPINFO_TYPE_CTF);
                pmin = 4;
                pmax = 12;
                pstep = 2;
        }
-       else if(random() < 0.5) // half of the remaining 30%, i.e. 15%, are TDM
+       else if((r -= 0.15) < 0)
        {
                MapInfo_SwitchGameType(MAPINFO_TYPE_TEAM_DEATHMATCH);
                pmin = 4;
                pmax = 8;
                pstep = 2;
        }
-       else if(random() < 0.666) // 2/3 of the remaining 15%, i.e. 10%, are KH
+       else if((r -= 0.10) < 0)
+       {
+               MapInfo_SwitchGameType(MAPINFO_TYPE_CA);
+               pmin = 4;
+               pmax = 8;
+               pstep = 2;
+       }
+       else if((r -= 0.10) < 0)
+       {
+               MapInfo_SwitchGameType(MAPINFO_TYPE_FREEZETAG);
+               pmin = 4;
+               pmax = 8;
+               pstep = 2;
+       }
+       else if((r -= 0.05) < 0)
        {
                MapInfo_SwitchGameType(MAPINFO_TYPE_KEYHUNT);
                pmin = 6;
@@ -41,9 +62,16 @@ void InstantAction_LoadMap(entity btn, entity dummy)
                pstep = 6; // works both for 2 and 3 teams
                // TODO find team count of map, set pstep=2 or 3, and use 2v2(v2) games at least
        }
-       else // somehow distribute the remaining 5%
+       else
        {
-               float r;
+               r -= 0.05;
+               if (check_probability_distribution)
+               {
+                       if(fabs(r) > 0.001)
+                               error("Incorrect probability distribution.");
+                       check_probability_distribution = false;
+                       goto doit;
+               }
                r = floor(random() * 4);
                switch(r)
                {
@@ -73,7 +101,6 @@ void InstantAction_LoadMap(entity btn, entity dummy)
                                pmax = 16;
                                pstep = 2;
                                break;
-                       // CA, Freezetag: bot AI does not work, add them once it does
                }
        }
 
@@ -87,6 +114,12 @@ void InstantAction_LoadMap(entity btn, entity dummy)
                s = MapInfo_BSPName_ByID(m);
        }
        while(!fexists(sprintf("maps/%s.waypoints", s)));
+
+       // these commands are also executed when starting a map from Multiplayer / Create
+       // in the menu_loadmap_prepare alias
+       localcmd("disconnect\n");
+       localcmd("g_campaign 0\n");
+
        MapInfo_LoadMap(s, 1);
 
        // configure bots
@@ -94,7 +127,10 @@ void InstantAction_LoadMap(entity btn, entity dummy)
        pmin = pstep * ceil(pmin / pstep);
        pmax = pstep * floor(pmax / pstep);
        p = pmin + pstep * floor(random() * ((pmax - pmin) / pstep + 1));
-       cvar_set("bot_number", ftos(p - 1));
+
+       // cvar_set doesn't always work starting an InstantAction game while playing the campaign
+       //cvar_set("bot_number", ftos(p - 1));
+       localcmd(strcat("bot_number ", ftos(p - 1), "\n"));
 
        // make sure we go back to menu
        cvar_set("lastlevel", "1");
index 9f8ef342f2e27d44a6eae906a0b0ff0d87ea5f4a..ffc81c4685794480cf749cea7b87129134b8de71 100644 (file)
@@ -715,7 +715,11 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
                                vote_parsed_command = strcat(first_command, " # ", ftos(etof(victim)), " ", command_arguments);
                                vote_parsed_display = sprintf("^1%s #%d ^7%s^1 %s", first_command, etof(victim), victim.netname, reason);
                        }
-                       else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return 0; }
+                       else
+                       {
+                               print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n"));
+                               return 0;
+                       }
 
                        break;
                }
@@ -803,7 +807,9 @@ void VoteCommand_abstain(int request, entity caller)  // CLIENT ONLY
                                print_to(caller, "^1You abstained from your vote.");
                                caller.vote_selection = VOTE_SELECT_ABSTAIN;
                                msg_entity = caller;
-                               if (!autocvar_sv_vote_singlecount)   VoteCount(false); }
+                               if (!autocvar_sv_vote_singlecount)
+                                       VoteCount(false);
+                       }
 
                        return;
                }
index ff234ab902323792c4150fd3ce858d3cbc160150..7e052de046ebbbd5f93dc6ef2f071b306f85623f 100644 (file)
@@ -283,7 +283,9 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en
                                                Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);
                                                break;
                                        }
-
+                                       case DEATH_HURTTRIGGER:
+                                               Obituary_SpecialDeath(targ, false, deathtype, targ.netname, inflictor.message, deathlocation, CS(targ).killcount, 0, 0);
+                                               break;
                                        default:
                                        {
                                                Obituary_SpecialDeath(targ, false, deathtype, targ.netname, deathlocation, "", CS(targ).killcount, 0, 0);