-Tue Apr 20 07:23:45 CEST 2021
+Sun May 2 07:24:54 CEST 2021
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"
"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"
#: 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 ""
"^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
"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"
#: 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 ""
"^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
# 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
"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"
#: 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
#: 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."
#: 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"
#: 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"
#: 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"
#: 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"
#: 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"
#: 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"
#: 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"
#: 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"
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
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"
// 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"
// ===========
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"
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%
{
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;
}
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;
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)
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;
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;
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
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;
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
{
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; }
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;
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"), "")
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"), "")
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)
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 "";
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); }
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;
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)
{
pmax = 16;
pstep = 2;
break;
- // CA, Freezetag: bot AI does not work, add them once it does
}
}
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
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");
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;
}
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;
}
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);