- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
- make
- - EXPECT=6e591fe90a6b90e62fdfd531636dd6eb
+ - EXPECT=ce60a57e67f899e8b748c1b644082c74
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
-Sun Jun 30 07:25:26 CEST 2019
+Mon Jul 15 07:24:31 CEST 2019
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-06-19 07:16+0000\n"
+"PO-Revision-Date: 2019-07-14 15:44+0000\n"
"Last-Translator: Yannick Le Guen <leguen.yannick@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/team-xonotic/xonotic/"
"language/fr/)\n"
#: qcsrc/common/minigames/minigame/bd.qc:1095
msgid "Well done! Click 'Next Level' to continue"
-msgstr "Bien joué ! Cliquez sur « Niveau suivant » pour continuer !"
+msgstr "Bien joué ! Cliquez sur « Niveau suivant » pour continuer"
#: qcsrc/common/minigames/minigame/bd.qc:1162
msgid "Better luck next time!"
#: qcsrc/common/notifications/all.qh:450
msgid "TRIPLE FRAG! "
-msgstr "TRIPLE FRAG !"
+msgstr "TRIPLE FRAG ! "
#: qcsrc/common/notifications/all.qh:451
#, c-format
#: qcsrc/common/notifications/all.qh:451
msgid "RAGE! "
-msgstr "RAGE !"
+msgstr "RAGE ! "
#: qcsrc/common/notifications/all.qh:452
#, c-format
#: qcsrc/common/notifications/all.qh:452
msgid "MASSACRE! "
-msgstr "MASSACRE !"
+msgstr "MASSACRE ! "
#: qcsrc/common/notifications/all.qh:453
#, c-format
#: qcsrc/common/notifications/all.qh:453
msgid "MAYHEM! "
-msgstr "GRABUGE !"
+msgstr "GRABUGE ! "
#: qcsrc/common/notifications/all.qh:454
#, c-format
#: qcsrc/common/notifications/all.qh:454
msgid "BERSERKER! "
-msgstr "FOU FURIEUX !"
+msgstr "FOU FURIEUX ! "
#: qcsrc/common/notifications/all.qh:455
#, c-format
#: qcsrc/common/notifications/all.qh:455
msgid "CARNAGE! "
-msgstr "CARNAGE !"
+msgstr "CARNAGE ! "
#: qcsrc/common/notifications/all.qh:456
#, c-format
#: qcsrc/common/notifications/all.qh:456
msgid "ARMAGEDDON! "
-msgstr "ARMAGEDDON !"
+msgstr "ARMAGEDDON ! "
#: qcsrc/common/notifications/all.qh:463
#, c-format
#: qcsrc/common/notifications/all.qh:507
#, c-format
msgid "%d frag spree! "
-msgstr "%d frags d'affilée !"
+msgstr "%d frags d'affilée ! "
#: qcsrc/common/notifications/all.qh:520
msgid "First blood! "
-msgstr "Premier sang !"
+msgstr "Premier sang ! "
#: qcsrc/common/notifications/all.qh:520
msgid "First score! "
-msgstr "Premier point !"
+msgstr "Premier point ! "
#: qcsrc/common/notifications/all.qh:524
msgid "First casualty! "
#: qcsrc/common/notifications/all.qh:524
msgid "First victim! "
-msgstr "Première victime !"
+msgstr "Première victime ! "
#: qcsrc/common/notifications/all.qh:565
#, c-format
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
+# 62197a8afd75a0a64478212fcb55f596, 2017
# Contijn Buijs <contijn.buijs@gmail.com>, 2017
-# Joeke de Graaf <mappack@null.net>, 2017
+# 62197a8afd75a0a64478212fcb55f596, 2017
# Jonathan van der Steege <jonakeys@hotmail.com>, 2016
# Jonathan van der Steege <jonakeys@hotmail.com>, 2016
msgid ""
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-06-29 18:20+0000\n"
+"PO-Revision-Date: 2019-07-07 02:23+0000\n"
"Last-Translator: Jean Trindade Pereira <jean_trindade2@hotmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/team-xonotic/"
"xonotic/language/pt_BR/)\n"
#: qcsrc/common/minigames/cl_minigames_hud.qc:390
msgid "Current Game"
-msgstr "Jogo Atual"
+msgstr "Jogo atual"
#: qcsrc/common/minigames/cl_minigames_hud.qc:415
msgid "Exit Menu"
-msgstr "Sair do Menu"
+msgstr "Sair do menu"
#: qcsrc/common/minigames/cl_minigames_hud.qc:427
#: qcsrc/menu/xonotic/dialog_multiplayer.qc:16
#: qcsrc/common/minigames/minigame/bd.qc:2
msgid "Bulldozer"
-msgstr ""
+msgstr "Buldôzer"
#: qcsrc/common/minigames/minigame/bd.qc:1092
#: qcsrc/common/minigames/minigame/ps.qc:421
#: qcsrc/common/minigames/minigame/c4.qc:2
msgid "Connect Four"
-msgstr ""
+msgstr "Lig 4"
#: qcsrc/common/minigames/minigame/c4.qc:311
#: qcsrc/common/minigames/minigame/c4.qc:317
#: qcsrc/common/minigames/minigame/nmm.qc:7
msgid "Nine Men's Morris"
-msgstr ""
+msgstr "Trilha"
#: qcsrc/common/minigames/minigame/nmm.qc:615
msgid ""
#: qcsrc/common/minigames/minigame/pong.qc:606
msgid "Press ^1Start Match^7 to start the match with the current players"
msgstr ""
-"Aperte ^1Iniciar Partida^7 para iniciar a partida com os jogadores atuais"
+"Aperte ^1Iniciar partida^7 para iniciar a partida com os jogadores atuais"
#: qcsrc/common/minigames/minigame/pong.qc:674
msgid "Start Match"
-msgstr "Iniciar Partida"
+msgstr "Iniciar partida"
#: qcsrc/common/minigames/minigame/pong.qc:675
msgid "Add AI player"
#: qcsrc/common/minigames/minigame/pp.qc:2
msgid "Push-Pull"
-msgstr ""
+msgstr "Empurrar e Puxar"
#: qcsrc/common/minigames/minigame/pp.qc:443
#: qcsrc/common/minigames/minigame/ttt.qc:324
#: qcsrc/common/minigames/minigame/ps.qc:2
msgid "Peg Solitaire"
-msgstr ""
+msgstr "Resta Um"
#: qcsrc/common/minigames/minigame/ps.qc:414
msgid "All pieces cleared!"
-msgstr ""
+msgstr "Todas as peças removidas!"
#: qcsrc/common/minigames/minigame/ps.qc:416
msgid "Remaining pieces:"
#: qcsrc/common/minigames/minigame/ttt.qc:2
msgid "Tic Tac Toe"
-msgstr ""
+msgstr "Jogo-da-velha"
#: qcsrc/common/minigames/minigame/ttt.qc:665
msgid "Single Player"
-msgstr "Um Jogador"
+msgstr "Um jogador"
#: qcsrc/common/monsters/monster/mage.qh:17
#: qcsrc/menu/xonotic/dialog_monstertools.qc:18
#: qcsrc/common/monsters/monster/mage.qh:29
msgid "Mage spike"
-msgstr "Prego de mago"
+msgstr "Espinho de mago"
#: qcsrc/common/monsters/monster/shambler.qh:17
#: qcsrc/menu/xonotic/dialog_monstertools.qc:17
#: qcsrc/common/mutators/mutator/waypoints/all.inc:3
msgid "Waypoint"
-msgstr "Ponto de passagem"
+msgstr "Ponto de interesse"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:4
msgid "Help me!"
#: qcsrc/common/util.qc:1488
msgid "BACKQUOTE"
-msgstr ""
+msgstr "APÓSTROFO"
#: qcsrc/common/util.qc:1489
msgid "QUOTE"
#: qcsrc/common/util.qc:1490
msgid "APOSTROPHE"
-msgstr "APÓSTROFO"
+msgstr "~"
#: qcsrc/common/util.qc:1491
msgid "BACKSLASH"
"to find some or if he fails to do so, face death. The secondary fire mode "
"does not inflict any damage but is good for doing trickjumps."
msgstr ""
-"Os jogadores terão uma arma, a qual pode instantaneamente matar o oponente "
-"com um único disparo. Se o jogador ficar sem munição, ele terá 10 segundos "
-"para encontrar alguma e se não conseguir fazer isso, irá morrer. O modo de "
-"disparo secundário não causa nenhum dano, mas é útil para executar truques "
-"de movimento."
+"Os jogadores terão uma arma que pode instantaneamente matar o oponente com "
+"um único disparo. Se o jogador ficar sem munição, ele terá 10 segundos para "
+"encontrar alguma e, se não conseguir fazer isso, morrerá. O modo de disparo "
+"secundário não causa nenhum dano, mas é útil para executar truques de "
+"movimento."
#: qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc:284
msgid ""
"switch to another weapon."
msgstr ""
"Sem itens Xonotic - em vez de pegar itens espalhados pelo mapa, todo mundo "
-"joga com a mesma arma. Depois de um certo tempo, uma contagem regressiva irá "
-"iniciar, e depois disso todos irão trocar para uma outra arma."
+"joga com a mesma arma. Após um certo tempo, inciará uma contagem regressiva "
+"e, depois disso, todos trocarão para outra arma."
#: qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc:288
msgid "with blaster"
#: qcsrc/menu/xonotic/dialog_multiplayer_join.qc:48
msgid "Show full servers that have no slots available"
-msgstr "Exibir servidores cheios que não contêm vagas disponíveis"
+msgstr "Exibir servidores cheios que não têm vagas disponíveis"
#: qcsrc/menu/xonotic/dialog_multiplayer_join.qc:52
msgid "Pause"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:64
msgid "Waypoints"
-msgstr "Caminhos"
+msgstr "Pontos de interesse"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:66
msgid "Display waypoint markers for objectives on the map"
-msgstr "Mostra os marcadores de caminhos para objetivos no mapa"
+msgstr "Exibe os marcadores de ponto de interesse para objetivos no mapa"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:67
msgid "Show various gametype specific waypoints"
-msgstr "Mostra diversos caminhos específicos de modos de jogo"
+msgstr "Exibe diversos pontos de interesse específicos de modos de jogo"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:73
msgid "Control transparency of the waypoints"
-msgstr "Transparência dos caminhos"
+msgstr "Transparência dos pontos de interesse"
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:77
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:130
# Adrian-Ciprian Tînjală <adrian.tinjala@gmail.com>, 2015-2016
# busterdbk <busterdbk@gmail.com>, 2013
# busterdbk <busterdbk@gmail.com>, 2013
+# Cuzenco Andrei Robert <cuzencoandreirobert2008@gmail.com>, 2019
# MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>, 2011
# Sorin Botirla <sorin.botirla@gmail.com>, 2015
# Tudor Ionel <tropiko.matrox@gmail.com>, 2015
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-05-19 05:23+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2019-07-02 21:28+0000\n"
+"Last-Translator: Cuzenco Andrei Robert <cuzencoandreirobert2008@gmail.com>\n"
"Language-Team: Romanian (http://www.transifex.com/team-xonotic/xonotic/"
"language/ro/)\n"
"Language: ro\n"
#, c-format
msgid "^2Successfully exported to %s! (Note: It's saved in data/data/)"
msgstr ""
+"^2Exportat cu succes către %s! (Notă: Fisierul este salvat in data/data)"
#: qcsrc/client/hud/hud_config.qc:247
#, c-format
msgid "^1Couldn't write to %s"
-msgstr ""
+msgstr "^1Nu s-a putut scrie către %s"
#: qcsrc/client/hud/panel/centerprint.qc:140
#, c-format
msgid "^3Countdown message at time %s, seconds left: ^COUNT"
msgstr ""
+"^3Mesajul cu numărătoare inversă este la %s, mai sunt doar ^COUNT secunde "
+"ramase."
#: qcsrc/client/hud/panel/centerprint.qc:142
#, c-format
"^1Multiline message at time %s that\n"
"^1lasts longer than normal"
msgstr ""
+"^1Mesaj pe mai multe linii la %s care\n"
+"^1durează mai mult decât de obicei"
#: qcsrc/client/hud/panel/centerprint.qc:144
#, c-format
msgid "Message at time %s"
-msgstr ""
+msgstr "Mesaj la %s"
#: qcsrc/client/hud/panel/centerprint.qc:149
msgid "Generic message"
-msgstr ""
+msgstr "Mesaj generic"
#: qcsrc/client/hud/panel/chat.qc:84
msgid "^3Player^7: This is the chat area."
#: qcsrc/client/hud/panel/infomessages.qc:102
#: qcsrc/menu/xonotic/keybinder.qc:47
msgid "primary fire"
-msgstr ""
+msgstr "Mod principal de tragere"
#: qcsrc/client/hud/panel/infomessages.qc:104
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:104
#: qcsrc/client/hud/panel/infomessages.qc:108
msgid "next weapon"
-msgstr ""
+msgstr "Următoarea armă"
#: qcsrc/client/hud/panel/infomessages.qc:104
#: qcsrc/client/hud/panel/infomessages.qc:108
msgid "previous weapon"
-msgstr ""
+msgstr "Anterioara armă"
#: qcsrc/client/hud/panel/infomessages.qc:108
#, c-format
#, c-format
msgid "^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"
msgstr ""
+"^1Apasă ^3%s^1 pentru a observa, ^3%s^1 pentru a schimba in modul camera"
#: qcsrc/client/hud/panel/infomessages.qc:110
#: qcsrc/common/vehicles/cl_vehicles.qc:190
msgid "drop weapon"
-msgstr ""
+msgstr "Aruncă arma"
#: qcsrc/client/hud/panel/infomessages.qc:110
#: qcsrc/menu/xonotic/keybinder.qc:48
msgid "secondary fire"
-msgstr ""
+msgstr "Mod secundar de tragere"
#: qcsrc/client/hud/panel/infomessages.qc:113
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:113
#: qcsrc/menu/xonotic/keybinder.qc:105
msgid "server info"
-msgstr ""
+msgstr "Informații despre server"
#: qcsrc/client/hud/panel/infomessages.qc:126
msgid "^1Match has already begun"
#: qcsrc/client/hud/panel/infomessages.qc:130
#: qcsrc/client/hud/panel/infomessages.qc:133
msgid "jump"
-msgstr ""
+msgstr "Sari"
#: qcsrc/client/hud/panel/infomessages.qc:141
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:177
#: qcsrc/menu/xonotic/keybinder.qc:101
msgid "ready"
-msgstr ""
+msgstr "Pregătit"
#: qcsrc/client/hud/panel/infomessages.qc:164
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:201
#: qcsrc/menu/xonotic/keybinder.qc:117
msgid "team menu"
-msgstr ""
+msgstr "Meniul echipei"
#: qcsrc/client/hud/panel/infomessages.qc:211
msgid "^1Spectating this player:"
-msgstr ""
+msgstr "^1Urmărește acest jucător:"
#: qcsrc/client/hud/panel/infomessages.qc:211
msgid "^1Spectating you:"
-msgstr ""
+msgstr "^1Te urmărește pe tine:"
#: qcsrc/client/hud/panel/infomessages.qc:227
msgid "^7Press ^3ESC ^7to show HUD options."
#: qcsrc/client/hud/panel/quickmenu.qc:781
#: qcsrc/client/hud/panel/quickmenu.qc:788
msgid "Chat"
-msgstr ""
+msgstr "Convorbire"
#: qcsrc/client/hud/panel/quickmenu.qc:782
msgid "QMCMD^Send public message to"
#
# Translators:
# Arm Coon <armcoon@gmail.com>, 2016-2017
-# Jeff Huang <s8321414@gmail.com>, 2015
+# 黃柏諺 <s8321414@gmail.com>, 2015
# msn1018927464 <msn1018927464@hotmail.com>, 2015
# msn1018927464 <msn1018927464@hotmail.com>, 2015
+# 黃柏諺 <s8321414@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: Xonotic\n"
nl "Dutch" "Nederlands" 63%
pl "Polish" "Polski" 72%
pt "Portuguese" "Português" 86%
-pt_BR "Portuguese (Brazil)" "Português (Brasil)" 99%
-ro "Romanian" "Romana" 74%
+pt_BR "Portuguese (Brazil)" "Português (Brasil)" 100%
+ro "Romanian" "Romana" 75%
fi "Finnish" "Suomi" 30%
el "Greek" "Ελληνική" 47%
be "Belarusian" "Беларуская" 55%
// vampire
// =========
set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
+set g_vampire_factor 1.0 "Multiply damage done by this factor before adding it to the player's health"
+set g_vampire_use_total_damage 0 "If 1 then add combined damage (health + armor) to attackers health. If 0 add only health damage."
// ========
.bool ready;
.bool eliminated;
-.void(entity) draw;
IntrusiveList g_drawables;
-STATIC_INIT(g_drawables) { g_drawables = IL_NEW(); }
-.void(entity) draw2d;
IntrusiveList g_drawables_2d;
-STATIC_INIT(g_drawables_2d) { g_drawables_2d = IL_NEW(); }
+IntrusiveList g_radarlinks;
+IntrusiveList g_radaricons;
+STATIC_INIT(main)
+{
+ g_drawables = IL_NEW();
+ g_drawables_2d = IL_NEW();
+ g_radarlinks = IL_NEW();
+ g_radaricons = IL_NEW();
+}
+
+.void(entity) draw;
+.void(entity) draw2d;
.void(entity) entremove;
float drawframetime;
vector view_origin, view_forward, view_right, view_up;
-IntrusiveList g_radarlinks;
-STATIC_INIT(g_radarlinks) { g_radarlinks = IL_NEW(); }
-IntrusiveList g_radaricons;
-STATIC_INIT(g_radaricons) { g_radaricons = IL_NEW(); }
bool button_zoom;
bool spectatorbutton_zoom;
showfps_prevfps_time = currentTime; // we must initialize it to avoid an instant low frame sending
}
-STATIC_INIT(Porto)
-{
- entity e = new_pure(porto);
- e.draw = Porto_Draw;
- IL_PUSH(g_drawables, e);
- e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
-}
-
-const int polyline_length = 16;
-.vector polyline[polyline_length];
-void Porto_Draw(entity this)
-{
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- entity wepent = viewmodels[slot];
-
- if (wepent.activeweapon != WEP_PORTO) continue;
- if (spectatee_status) continue;
- if (WEP_CVAR(porto, secondary)) continue;
- if (intermission == 1) continue;
- if (intermission == 2) continue;
- if (STAT(HEALTH) <= 0) continue;
-
- vector pos = view_origin;
- vector dir = view_forward;
- vector forward, right, up;
- MAKE_VECTORS(autocvar_chase_active ? warpzone_save_view_angles : view_angles, forward, right, up);
- pos += right * -wepent.movedir.y
- + up * wepent.movedir.z;
-
- if (wepent.angles_held_status)
- {
- MAKE_VECTORS(wepent.angles_held, forward, right, up);
- dir = forward;
- }
-
- wepent.polyline[0] = pos;
-
- int portal_number = 0, portal1_idx = 1, portal_max = 2;
- int n = 1 + 2; // 2 lines == 3 points
- for (int idx = 0; idx < n && idx < polyline_length - 1; )
- {
- traceline(pos, pos + 65536 * dir, true, this);
- dir = reflect(dir, trace_plane_normal);
- pos = trace_endpos;
- wepent.polyline[++idx] = pos;
- if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
- {
- n += 1;
- continue;
- }
- if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
- {
- n = max(2, idx);
- break;
- }
- // check size
- {
- vector ang = vectoangles2(trace_plane_normal, dir);
- ang.x = -ang.x;
- MAKE_VECTORS(ang, forward, right, up);
- if (!CheckWireframeBox(this, pos - 48 * right - 48 * up + 16 * forward, 96 * right, 96 * up, 96 * forward))
- {
- n = max(2, idx);
- break;
- }
- }
- portal_number += 1;
- if (portal_number >= portal_max) break;
- if (portal_number == 1) portal1_idx = idx;
- }
- for (int idx = 0; idx < n - 1; ++idx)
- {
- vector p = wepent.polyline[idx], q = wepent.polyline[idx + 1];
- if (idx == 0) p -= view_up * 16; // line from player
- vector rgb = (idx < portal1_idx) ? '1 0 0' : '0 0 1';
- Draw_CylindricLine(p, q, 4, "", 1, 0, rgb, 0.5, DRAWFLAG_NORMAL, view_origin);
- }
- }
-}
-
float drawtime;
float avgspeed;
vector GetCurrentFov(float fov)
float TrueAimCheck(entity wepent)
{
+ if(wepent.activeweapon.spawnflags & WEP_FLAG_NOTRUEAIM)
+ return SHOTTYPE_HITWORLD;
+
float nudge = 1; // added to traceline target and subtracted from result TOOD(divVerent): do we still need this? Doesn't the engine do this now for us?
vector vecs, trueaimpoint, w_shotorg;
vector mi, ma, dv;
switch(wepent.activeweapon) // WEAPONTODO
{
- case WEP_TUBA: // no aim
- case WEP_PORTO: // shoots from eye
- case WEP_NEXBALL: // shoots from eye
- case WEP_HOOK: // no trueaim
- case WEP_MORTAR: // toss curve
- return SHOTTYPE_HITWORLD;
case WEP_VORTEX:
case WEP_OVERKILL_NEX:
case WEP_VAPORIZER:
void calc_followmodel_ofs(entity view);
-void Porto_Draw(entity this);
-
void CSQC_Demo_Camera();
void TrueAim_Init();
const int HITTYPE_SPLASH = BITS(1) << 9;
const int HITTYPE_BOUNCE = BITS(1) << 10;
const int HITTYPE_ARMORPIERCE = BITS(1) << 11;
-// unused yet
-const int HITTYPE_RESERVED = BITS(1) << 12;
-const int DEATH_HITTYPEMASK = HITTYPE_SECONDARY | HITTYPE_SPLASH | HITTYPE_BOUNCE | HITTYPE_ARMORPIERCE | HITTYPE_RESERVED;
+const int HITTYPE_SOUND = BITS(1) << 12;
+const int DEATH_HITTYPEMASK = HITTYPE_SECONDARY | HITTYPE_SPLASH | HITTYPE_BOUNCE | HITTYPE_ARMORPIERCE | HITTYPE_SOUND;
// normal deaths begin
const int DT_FIRST = BIT(13);
NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
{
- const float ATTEN_LOW = 0.2;
float thedamage, rad, edge, thisdmg;
bool hitplayer = false;
int species, forcemul;
w_random = prandom();
traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
- if(trace_fraction < 1 && hitwep != WEP_VORTEX && hitwep != WEP_VAPORIZER)
+ if(trace_fraction < 1 && !(hitwep.spawnflags & WEP_TYPE_HITSCAN))
w_backoff = trace_plane_normal;
else
w_backoff = -1 * normalize(force);
ATTRIB(Flag, m_mins, vector, (PL_MIN_CONST + '0 0 -13') * 1.4); // scaling be damned
ATTRIB(Flag, m_maxs, vector, (PL_MAX_CONST + '0 0 -13') * 1.4);
ENDCLASS(Flag)
-Flag CTF_FLAG; STATIC_INIT(Flag) { CTF_FLAG = NEW(Flag); }
+Flag CTF_FLAG;
+STATIC_INIT(Flag) { CTF_FLAG = NEW(Flag); }
void ctf_FlagTouch(entity this, entity toucher) { ITEM_HANDLE(Pickup, CTF_FLAG, this, toucher); }
// flag constants // for most of these, there is just one question to be asked: WHYYYYY?
#pragma once
CLASS(BallStealer, PortoLaunch)
-/* flags */ ATTRIB(BallStealer, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(BallStealer, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_NOTRUEAIM);
/* impulse */ ATTRIB(BallStealer, impulse, int, 0);
/* refname */ ATTRIB(BallStealer, netname, string, "ballstealer");
/* wepname */ ATTRIB(BallStealer, m_name, string, _("Ball Stealer"));
{
case "activate":
{
- minigame.message = bd_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, bd_turn_to_string(minigame.minigame_flags));
bd_set_curr_pos("");
bd_curr_tile = BD_TILE_BRICK1;
return false;
}
+ case "deactivate":
+ {
+ strfree(minigame.message);
+ return false;
+ }
case "key_pressed":
{
if(minigame.minigame_flags & BD_TURN_MOVE)
{
if ( sf & MINIG_SF_UPDATE )
{
- sent.message = bd_turn_to_string(sent.minigame_flags);
+ strcpy(sent.message, bd_turn_to_string(sent.minigame_flags));
//if ( sent.minigame_flags & minigame_self.team )
//minigame_prompt();
}
case "activate":
{
c4_set_curr_pos("");
- minigame.message = c4_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, c4_turn_to_string(minigame.minigame_flags));
+ return false;
+ }
+ case "deactivate":
+ {
+ strfree(minigame.message);
return false;
}
case "key_pressed":
{
if ( sf & MINIG_SF_UPDATE )
{
- sent.message = c4_turn_to_string(sent.minigame_flags);
+ strcpy(sent.message, c4_turn_to_string(sent.minigame_flags));
if ( sent.minigame_flags & minigame_self.team )
minigame_prompt();
}
{
nmm_fromtile = NULL;
nmm_init_tiles(minigame);
- minigame.message = nmm_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, nmm_turn_to_string(minigame.minigame_flags));
}
else if ( event == "deactivate" )
{
nmm_fromtile = NULL;
nmm_kill_tiles(minigame);
+ strfree(minigame.message);
}
else if ( event == "key_pressed" && (minigame.minigame_flags&NMM_TURN_TEAM) == minigame_self.team )
{
}
else if ( sent.classname == "minigame" && ( ...(1,int) & MINIG_SF_UPDATE ) )
{
- sent.message = nmm_turn_to_string(sent.minigame_flags);
+ strcpy(sent.message, nmm_turn_to_string(sent.minigame_flags));
if ( sent.minigame_flags & minigame_self.team )
minigame_prompt();
}
{
case "activate":
return false;
+ case "deactivate":
+ {
+ strfree(minigame.message);
+ return false;
+ }
case "key_pressed":
switch ( ...(0,int) )
{
{
if ( sf & MINIG_SF_UPDATE )
{
- sent.message = pong_message(sent.minigame_flags);
+ strcpy(sent.message, pong_message(sent.minigame_flags));
}
}
return false;
if ( turnflags & PP_TURN_WIN )
{
+ // translator-friendly messages composed of 2 existing messages
if ( (turnflags&PP_TURN_TEAM) != minigame_self.team )
return strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!"));
return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!"));
case "activate":
{
pp_set_curr_pos("");
- minigame.message = pp_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, pp_turn_to_string(minigame.minigame_flags));
+ return false;
+ }
+ case "deactivate":
+ {
+ strfree(minigame.message);
return false;
}
case "key_pressed":
{
if ( sf & MINIG_SF_UPDATE )
{
- sent.message = pp_turn_to_string(sent.minigame_flags);
+ strcpy(sent.message, pp_turn_to_string(sent.minigame_flags));
if ( sent.minigame_flags & minigame_self.team )
minigame_prompt();
sent.pp_team1_score = ReadByte();
{
ps_set_curr_pos("");
ps_curr_piece = NULL;
- minigame.message = ps_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, ps_turn_to_string(minigame.minigame_flags));
+ return false;
+ }
+ case "deactivate":
+ {
+ strfree(minigame.message);
return false;
}
case "key_pressed":
{
if ( sf & MINIG_SF_UPDATE )
{
- sent.message = ps_turn_to_string(sent.minigame_flags);
+ strcpy(sent.message, ps_turn_to_string(sent.minigame_flags));
//if ( sent.minigame_flags & minigame_self.team )
//minigame_prompt();
}
if ( turnflags & TTT_TURN_WIN )
{
+ // translator-friendly messages composed of 2 existing messages
+ // TODO: proper "you win" banner instead of hijacking the help message
if ( (turnflags&TTT_TURN_TEAM) != minigame_self.team )
strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!"));
return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!"));
else
ttt_move(minigame,aiplayer,pos);
}
- minigame.message = ttt_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, ttt_turn_to_string(minigame.minigame_flags));
}
// Make the correct move
case "activate":
{
ttt_set_curr_pos("");
- minigame.message = ttt_turn_to_string(minigame.minigame_flags);
+ strcpy(minigame.message, ttt_turn_to_string(minigame.minigame_flags));
+ return false;
+ }
+ case "deactivate":
+ {
+ strfree(minigame.message);
return false;
}
case "key_pressed":
{
if ( sf & MINIG_SF_UPDATE )
{
- sent.message = ttt_turn_to_string(sent.minigame_flags);
+ strcpy(sent.message, ttt_turn_to_string(sent.minigame_flags));
if ( sent.minigame_flags & minigame_self.team )
minigame_prompt();
}
player.OffhandMageTeleport_key_pressed = key_pressed;
}
ENDCLASS(OffhandMageTeleport)
-OffhandMageTeleport OFFHAND_MAGE_TELEPORT; STATIC_INIT(OFFHAND_MAGE_TELEPORT) { OFFHAND_MAGE_TELEPORT = NEW(OffhandMageTeleport); }
+OffhandMageTeleport OFFHAND_MAGE_TELEPORT;
+STATIC_INIT(OFFHAND_MAGE_TELEPORT) { OFFHAND_MAGE_TELEPORT = NEW(OffhandMageTeleport); }
float autocvar_g_monster_mage_health;
float autocvar_g_monster_mage_damageforcescale = 0.5;
float autocvar_g_instagib_speed_highspeed;
IntrusiveList g_instagib_items;
-STATIC_INIT()
+STATIC_INIT(instagib)
{
g_instagib_items = IL_NEW();
IL_PUSH(g_instagib_items, ITEM_VaporizerCells);
#endif
#ifdef CSQC
-void Item_ItemsTime_Init()
-{
- FOREACH(Items, true, {
- ItemsTime_time[it.m_id] = -1;
- });
- ItemsTime_time[Items_MAX] = -1;
-}
STATIC_INIT(ItemsTime_Init) {
- Item_ItemsTime_Init();
+ FOREACH(Items, true, {
+ ItemsTime_time[it.m_id] = -1;
+ });
+ ItemsTime_time[Items_MAX] = -1;
}
int autocvar_hud_panel_itemstime = 2;
// reserve one more spot for superweapons time
float it_times[Items_MAX + 1];
-void Item_ItemsTime_Init()
-{
- FOREACH(Items, Item_ItemsTime_Allow(it), {
- it_times[it.m_id] = -1;
- });
- it_times[Items_MAX] = -1;
-}
-
STATIC_INIT(ItemsTime_Init) {
- // items time
- Item_ItemsTime_Init();
+ FOREACH(Items, Item_ItemsTime_Allow(it), {
+ it_times[it.m_id] = -1;
+ });
+ it_times[Items_MAX] = -1;
}
void Item_ItemsTime_ResetTimes()
damage = this.max_health * 0.1;
else if(DEATH_ISWEAPON(deathtype, WEP_SHOCKWAVE) || DEATH_ISWEAPON(deathtype, WEP_SHOTGUN)) // WEAPONTODO
{
- if(deathtype & HITTYPE_SECONDARY)
- {
- damage = this.max_health * 0.1;
- force *= 10;
- }
- else
+ if(!(deathtype & HITTYPE_SECONDARY))
damage = this.max_health * 1.15;
}
+ // melee slaps
+ entity death_weapon = DEATH_WEAPONOF(deathtype);
+ if(((deathtype & HITTYPE_SECONDARY) ? (death_weapon.spawnflags & WEP_TYPE_MELEE_SEC) : (death_weapon.spawnflags & WEP_TYPE_MELEE_PRI)))
+ {
+ damage = this.max_health * 0.1;
+ force *= 10;
+ }
+
this.velocity += force;
UpdateCSQCProjectile(this);
}
}
ENDCLASS(NadeOffhand)
-NadeOffhand OFFHAND_NADE; STATIC_INIT(OFFHAND_NADE) { OFFHAND_NADE = NEW(NadeOffhand); }
+NadeOffhand OFFHAND_NADE;
+STATIC_INIT(OFFHAND_NADE) { OFFHAND_NADE = NEW(NadeOffhand); }
MUTATOR_HOOKFUNCTION(nades, ForbidThrowCurrentWeapon, CBC_ORDER_LAST)
{
if(IS_PLAYER(frag_attacker))
{
- float killcount_bonus = ((CS(frag_attacker).killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * CS(frag_attacker).killcount, autocvar_g_nades_bonus_score_medium) : autocvar_g_nades_bonus_score_minor);
+ float killcount_bonus = ((CS(frag_attacker).killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * CS(frag_attacker).killcount, autocvar_g_nades_bonus_score_medium)
+ : autocvar_g_nades_bonus_score_minor);
if (SAME_TEAM(frag_attacker, frag_target) || frag_attacker == frag_target)
nades_RemoveBonus(frag_attacker);
.Weapon ok_lastwep[MAX_WEAPONSLOTS];
IntrusiveList g_overkill_items;
-STATIC_INIT()
+STATIC_INIT(overkill)
{
g_overkill_items = IL_NEW();
IL_PUSH(g_overkill_items, ITEM_HealthMega);
#include "sv_vampire.qh"
string autocvar_g_vampire;
+float autocvar_g_vampire_factor = 1.0;
+bool autocvar_g_vampire_use_total_damage = false;
+
REGISTER_MUTATOR(vampire, expr_evaluate(autocvar_g_vampire) && !MUTATOR_IS_ENABLED(mutator_instagib));
MUTATOR_HOOKFUNCTION(vampire, PlayerDamage_SplitHealthArmor)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
- float damage_take = M_ARGV(4, float);
+ float health_take = bound(0, M_ARGV(4, float), GetResource(frag_target, RES_HEALTH));
+ float armor_take = bound(0, M_ARGV(5, float), GetResource(frag_target, RES_ARMOR));
+ float damage_take = (autocvar_g_vampire_use_total_damage) ? health_take + armor_take : health_take;
- if(time >= frag_target.spawnshieldtime)
- if(frag_target != frag_attacker)
- if(!IS_DEAD(frag_target))
+ if(time >= frag_target.spawnshieldtime &&
+ frag_target != frag_attacker &&
+ IS_PLAYER(frag_attacker) &&
+ !IS_DEAD(frag_target))
{
GiveResource(frag_attacker, RES_HEALTH,
- bound(0, damage_take, GetResource(frag_target, RES_HEALTH)));
+ autocvar_g_vampire_factor * damage_take);
}
}
const float ATTEN_NONE = 0;
const float ATTEN_MIN = 0.015625;
+const float ATTEN_LOW = 0.2;
const float ATTEN_NORM = 0.5;
const float ATTEN_LARGE = 1;
const float ATTEN_IDLE = 2;
return;
}
+ precache_model(this.model);
+ precache_sound(this.item_pickupsound);
+
if (Item_IsLoot(this))
{
this.reset = SUB_Remove;
weaponsInMap |= WepSet_FromWeapon(Weapons_from(weaponid));
- precache_model(this.model);
- precache_sound(this.item_pickupsound);
-
if ( def.instanceOfPowerup
|| def.instanceOfWeaponPickup
|| (def.instanceOfHealth && def != ITEM_HealthSmall)
this.ItemStatus |= ITS_ANIMATE2;
}
+ if(Item_IsLoot(this))
+ this.gravity = 1;
+
if(def.instanceOfWeaponPickup)
{
if (!Item_IsLoot(this)) // if dropped, colormap is already set up nicely
this.colormap = 1024; // color shirt=0 pants=0 grey
- else
- this.gravity = 1;
if (!(this.spawnflags & 1024))
this.ItemStatus |= ITS_ANIMATE1;
this.SendFlags |= ISF_COLORMAP;
if (e_turret.team != e_target.owner.team)
return -12;
+
+ if (e_turret.team != e_target.aiment.team)
+ return -12; // portals
}
else
{
if (e_turret.team == e_target.owner.team)
return -14;
+
+ if (e_turret.team == e_target.aiment.team)
+ return -14; // portals
}
}
if(!PHYS_INPUT_BUTTON_ATCK2(this.owner))
return;
- if(!weaponLocked(this.owner) && !weaponUseForbidden(this.owner))
+ if(weaponLocked(this.owner) || weaponUseForbidden(this.owner))
return;
v = gettaginfo(this.tur_head,gettagindex(this.tur_head,"tag_fire"));
const int WEP_FLAG_NODUAL = BIT(12); // weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything
const int WEP_FLAG_PENETRATEWALLS = BIT(13); // weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
const int WEP_FLAG_BLEED = BIT(14); // weapon pierces and causes bleeding (used for damage effects)
+const int WEP_FLAG_NOTRUEAIM = BIT(15); // weapon doesn't aim directly at targets
// variables:
string weaponorder_byid;
CLASS(OffhandBlaster, OffhandWeapon)
ENDCLASS(OffhandBlaster)
-OffhandBlaster OFFHAND_BLASTER; STATIC_INIT(OFFHAND_BLASTER) { OFFHAND_BLASTER = NEW(OffhandBlaster); }
+OffhandBlaster OFFHAND_BLASTER;
+STATIC_INIT(OFFHAND_BLASTER) { OFFHAND_BLASTER = NEW(OffhandBlaster); }
#ifdef SVQC
.float blaster_damage;
/* spawnfunc */ ATTRIB(Hook, m_canonical_spawnfunc, string, "weapon_hook");
/* ammotype */ ATTRIB(Hook, ammo_type, int, RES_FUEL);
/* impulse */ ATTRIB(Hook, impulse, int, 0);
-/* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NOTRUEAIM);
/* rating */ ATTRIB(Hook, bot_pickupbasevalue, float, 0);
/* color */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0');
/* modelname */ ATTRIB(Hook, mdl, string, "hookgun");
}
#endif
ENDCLASS(OffhandHook)
-OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
+OffhandHook OFFHAND_HOOK;
+STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
#ifdef SVQC
/* spawnfunc */ ATTRIB(Mortar, m_canonical_spawnfunc, string, "weapon_mortar");
/* ammotype */ ATTRIB(Mortar, ammo_type, int, RES_ROCKETS);
/* impulse */ ATTRIB(Mortar, impulse, int, 4);
-/* flags */ ATTRIB(Mortar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* flags */ ATTRIB(Mortar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NOTRUEAIM);
/* rating */ ATTRIB(Mortar, bot_pickupbasevalue, float, 7000);
/* color */ ATTRIB(Mortar, wpcolor, vector, '1 0 0');
/* modelname */ ATTRIB(Mortar, mdl, string, "gl");
#include "porto.qh"
+#ifdef CSQC
+STATIC_INIT(Porto)
+{
+ entity e = new_pure(porto);
+ e.draw = Porto_Draw;
+ IL_PUSH(g_drawables, e);
+ e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
+}
+
+const int polyline_length = 16;
+.vector polyline[polyline_length];
+void Porto_Draw(entity this)
+{
+ if (spectatee_status || intermission == 1 || intermission == 2 || STAT(HEALTH) <= 0 || WEP_CVAR(porto, secondary)) return;
+
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ entity wepent = viewmodels[slot];
+
+ if (wepent.activeweapon != WEP_PORTO) continue;
+
+ vector pos = view_origin;
+ vector dir = view_forward;
+ makevectors(((autocvar_chase_active) ? warpzone_save_view_angles : view_angles));
+ pos += v_right * -wepent.movedir.y
+ + v_up * wepent.movedir.z;
+
+ if (wepent.angles_held_status)
+ {
+ makevectors(wepent.angles_held);
+ dir = v_forward;
+ }
+
+ wepent.polyline[0] = pos;
+
+ int portal_number = 0, portal1_idx = 1, portal_max = 2;
+ int n = 1 + 2; // 2 lines == 3 points
+ for (int idx = 0; idx < n && idx < polyline_length - 1; )
+ {
+ traceline(pos, pos + 65536 * dir, true, this);
+ dir = reflect(dir, trace_plane_normal);
+ pos = trace_endpos;
+ wepent.polyline[++idx] = pos;
+ if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
+ {
+ n += 1;
+ continue;
+ }
+ if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+ {
+ n = max(2, idx);
+ break;
+ }
+ // check size
+ {
+ vector ang = vectoangles2(trace_plane_normal, dir);
+ ang.x = -ang.x;
+ makevectors(ang);
+ if (!CheckWireframeBox(this, pos - 48 * v_right - 48 * v_up + 16 * v_forward, 96 * v_right, 96 * v_up, 96 * v_forward))
+ {
+ n = max(2, idx);
+ break;
+ }
+ }
+ portal_number += 1;
+ if (portal_number >= portal_max) break;
+ if (portal_number == 1) portal1_idx = idx;
+ }
+ for (int idx = 0; idx < n - 1; ++idx)
+ {
+ vector p = wepent.polyline[idx], q = wepent.polyline[idx + 1];
+ if (idx == 0) p -= view_up * 16; // line from player
+ vector rgb = (idx < portal1_idx) ? '1 0 0' : '0 0 1';
+ Draw_CylindricLine(p, q, 4, "", 1, 0, rgb, 0.5, DRAWFLAG_NORMAL, view_origin);
+ }
+ }
+}
+#endif
+
#ifdef SVQC
#include <common/mapobjects/trigger/jumppads.qh>
#include <server/weapons/throwing.qh>
/* spawnfunc */ ATTRIB(PortoLaunch, m_canonical_spawnfunc, string, "weapon_porto");
/* ammotype */ ATTRIB(PortoLaunch, ammo_type, int, RES_NONE);
/* impulse */ ATTRIB(PortoLaunch, impulse, int, 0);
-/* flags */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON | WEP_FLAG_NODUAL);
+/* flags */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON | WEP_FLAG_NODUAL | WEP_FLAG_NOTRUEAIM);
/* rating */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
/* color */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
/* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
SPAWNFUNC_WEAPON(weapon_porto, WEP_PORTO)
+#ifdef CSQC
+void Porto_Draw(entity this);
+#endif
+
#ifdef SVQC
.entity porto_current;
.vector porto_v_angle; // holds "held" view angles
vector o;
float n = W_Tuba_GetNote(actor, hittype);
- hittype = 0;
+ hittype = HITTYPE_SOUND;
if(actor.(weaponentity).tuba_instrument & 1)
hittype |= HITTYPE_SECONDARY;
if(actor.(weaponentity).tuba_instrument & 2)
CLASS(Tuba, Weapon)
/* spawnfunc */ ATTRIB(Tuba, m_canonical_spawnfunc, string, "weapon_tuba");
/* impulse */ ATTRIB(Tuba, impulse, int, 1);
-/* flags */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* flags */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL | WEP_FLAG_NOTRUEAIM);
/* rating */ ATTRIB(Tuba, bot_pickupbasevalue, float, 2000);
/* color */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
\
PROP(false, porto_v_angle_held, WEPENT_SET_NORMAL, \
{ WriteByte(chan, this.porto_v_angle_held); if(this.porto_v_angle_held) { \
- WriteAngle(chan, this.porto_v_angle.x); WriteAngle(chan, this.porto_v_angle.y); \
+ WriteAngle(chan, this.owner.porto_v_angle.x); WriteAngle(chan, this.owner.porto_v_angle.y); \
} }, \
{ (viewmodels[this.m_wepent_slot]).angles_held_status = ReadByte(); if((viewmodels[this.m_wepent_slot]).angles_held_status) { \
- (viewmodels[this.m_wepent_slot]).angles_held_x = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_y = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_z = 0; } \
+ (viewmodels[this.m_wepent_slot]).angles_held = vec2(ReadAngle(), ReadAngle()); } \
else { (viewmodels[this.m_wepent_slot]).angles_held = '0 0 0'; } }) \
\
PROP(false, tuba_instrument, WEPENT_SET_NORMAL, \
#define REGISTRY_HASH(id) Registry_hash_##id
ERASEABLE
-ACCUMULATE void Registry_check(string r, string server) { }
+ACCUMULATE void Registry_check(string r, string sv) { }
ERASEABLE
ACCUMULATE void Registry_send_all() { }
STATIC_INIT(Registry_check_##id) \
{ \
/* Note: SHA256 isn't always available, use MD4 instead */ \
- string s = "", join = ":"; \
- FOREACH(id, true, s = strcat(s, join, it.registered_id)); \
- s = substring(s, strlen(join), -1); \
+ string s = ""; \
+ FOREACH(id, true, s = strcat(s, ":", it.registered_id)); \
+ s = substring(s, 1, -1); /* remove initial ":" */ \
string h = REGISTRY_HASH(id) = strzone(digest_hex("MD4", s)); \
LOG_DEBUGF(#id ": %s\n[%s]", h, s); \
} \
bool autocvar_g_maplist_votable_suggestions;
bool autocvar_g_maplist_votable_suggestions_override_mostrecent;
float autocvar_g_maplist_votable_timeout;
+bool autocvar_g_maplist_ignore_sizes;
int autocvar_g_maxplayers;
float autocvar_g_maxplayers_spectator_blocktime;
float autocvar_g_maxpushtime;
if(skill+this.bot_moveskill >= autocvar_bot_ai_bunnyhop_skilloffset)
havocbot_bunnyhop(this, dir);
- if ((dir * v_up) >= autocvar_sv_jumpvelocity*0.5 && (IS_ONGROUND(this))) PHYS_INPUT_BUTTON_JUMP(this) = true;
- if (((dodge * v_up) > 0) && random()*frametime >= 0.2*bound(0,(10-skill-this.bot_dodgeskill)*0.1,1)) PHYS_INPUT_BUTTON_JUMP(this) = true;
- if (((dodge * v_up) < 0) && random()*frametime >= 0.5*bound(0,(10-skill-this.bot_dodgeskill)*0.1,1)) this.havocbot_ducktime=time+0.3/bound(0.1,skill+this.bot_dodgeskill,10);
+ if (dir * v_up >= autocvar_sv_jumpvelocity * 0.5 && IS_ONGROUND(this))
+ PHYS_INPUT_BUTTON_JUMP(this) = true;
+ if (dodge)
+ {
+ if (dodge * v_up > 0 && random() * frametime >= 0.2 * bound(0, (10 - skill - this.bot_dodgeskill) * 0.1, 1))
+ PHYS_INPUT_BUTTON_JUMP(this) = true;
+ if (dodge * v_up < 0 && random() * frametime >= 0.5 * bound(0, (10 - skill - this.bot_dodgeskill) * 0.1, 1))
+ this.havocbot_ducktime = time + 0.3 / bound(0.1, skill + this.bot_dodgeskill, 10);
+ }
}
entity havocbot_gettarget(entity this, bool secondary)
}
// automatically create missing waypoints
-.entity botframe_autowaypoints_lastwp0, botframe_autowaypoints_lastwp1;
void botframe_autowaypoints_fix(entity p, float walkfromwp, .entity fld)
{
float r = botframe_autowaypoints_fix_from(p, walkfromwp, p.(fld), fld);
});
}
+//.entity botframe_autowaypoints_lastwp0;
+.entity botframe_autowaypoints_lastwp1;
void botframe_autowaypoints()
{
FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && !IS_DEAD(it), {
CS(this).motd_actived_time = -2; // wait until BUTTON_INFO gets released
else if(CS(this).motd_actived_time == -2 || IS_PLAYER(this) || IS_SPEC(this))
{
- // instanctly hide MOTD
+ // instantly hide MOTD
CS(this).motd_actived_time = 0;
Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_MOTD);
}
LOG_TRACE(checkwp_msg, ": has waypoints");
}
+ if(autocvar_g_maplist_ignore_sizes)
+ return true;
+
// open map size restriction file
string opensize_msg = strcat("opensize ", map);
float fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
g_weaponarena = 1;
g_weaponarena_list = "Most Weapons";
FOREACH(Weapons, it != WEP_Null, {
- if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
- if(it.spawnflags & WEP_FLAG_NORMAL)
- g_weaponarena_weapons |= (it.m_wepset);
+ if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_FLAG_NORMAL) && !(it.spawnflags & WEP_FLAG_HIDDEN))
+ g_weaponarena_weapons |= (it.m_wepset);
});
}
else if (s == "none")
warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
}
- WepSet precache_weapons = start_weapons;
- if (g_warmup_allguns != 1)
- precache_weapons |= warmup_start_weapons;
- FOREACH(Weapons, it != WEP_Null, {
- if(precache_weapons & (it.m_wepset))
- it.wr_init(it);
- });
-
start_ammo_shells = max(0, start_ammo_shells);
start_ammo_nails = max(0, start_ammo_nails);
start_ammo_rockets = max(0, start_ammo_rockets);
if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)
damage *= 1 - max(0, autocvar_g_spawnshield_blockdamage);
- if(DEATH_ISWEAPON(deathtype, WEP_TUBA))
+ if(deathtype & HITTYPE_SOUND) // sound based attacks cause bleeding from the ears
{
- // tuba causes blood to come out of the ears
vector ear1, ear2;
vector d;
float f;
#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
IntrusiveList g_race_targets;
-STATIC_INIT(g_race_targets) { g_race_targets = IL_NEW(); }
+IntrusiveList g_racecheckpoints;
+STATIC_INIT(g_race)
+{
+ g_race_targets = IL_NEW();
+ g_racecheckpoints = IL_NEW();
+}
void race_InitSpectator()
{
.float race_respawn_checkpoint;
.entity race_respawn_spotref; // try THIS spawn in case you respawn
-IntrusiveList g_racecheckpoints;
-STATIC_INIT(g_racecheckpoints) { g_racecheckpoints = IL_NEW(); }
-
// definitions for functions used outside race.qc
float race_PreviousCheckpoint(float f);
float race_NextCheckpoint(float f);
void TeamBalance_AutoBalanceBots()
{
- if (!autocvar_g_balance_teams ||
- !autocvar_g_balance_teams_prevent_imbalance)
- {
- return;
- }
- //PrintToChatAll("TeamBalance_AutoBalanceBots");
+ // checks disabled because we always want auto-balanced bots
+ //if (!(autocvar_g_balance_teams && autocvar_g_balance_teams_prevent_imbalance))
+ // return;
+
entity balance = TeamBalance_CheckAllowedTeams(NULL);
TeamBalance_GetTeamCounts(balance, NULL);
int smallest_team_index = 0;
entity pseudoprojectile = NULL;
vector dir = normalize(end - start);
- float length = vlen(end - start);
+ //float max_length = vlen(end - start);
vector force = dir * bforce;
// go a little bit into the wall because we need to hit this wall later
//explosion = spawn();
// Find all non-hit players the beam passed close by
+ float length = vlen(trace_endpos - start);
if(deathtype == WEP_VAPORIZER.m_id || deathtype == WEP_VORTEX.m_id) // WEAPONTODO
{
FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this, {
- if(!it.railgunhit)
- if(!(IS_SPEC(it) && it.enemy == this))
+ if (!it.railgunhit && !(IS_SPEC(it) && it.enemy == this))
{
- msg_entity = it;
// nearest point on the beam
- vector beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length);
+ vector beampos = start + dir * bound(0, (it.origin - start) * dir, length);
- float f = bound(0, 1 - vlen(beampos - msg_entity.origin) / 512, 1);
+ float f = bound(0, 1 - vlen(beampos - it.origin) / 512, 1);
if(f <= 0)
continue;
if(!pseudoprojectile)
pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume
+ msg_entity = it;
soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, SND(NEXWHOOSH_RANDOM()), VOL_BASE * f, ATTEN_NONE);
}
});
set g_maplist_selectrandom 0 "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
set g_maplist_shuffle 1 "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list"
set g_maplist_check_waypoints 0 "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
+set g_maplist_ignore_sizes 0 "when 1, all maps are shown in the map list regardless of player count"
set g_items_mindist 4000 "starting distance for the fading of items"
set g_items_maxdist 4500 "maximum distance at which an item can be viewed, after which it will be invisible"