*.inc linguist-language=C
* -crlf
-*.0 -diff -crlf
+*.0 -crlf
*.1 crlf=input
*.3 crlf=input
-*.7z -diff -crlf
+*.7z -crlf
*.ac crlf=input
-*.a -diff -crlf
+*.a -crlf
*.afm crlf=input
*.aft crlf=input
-*.ai -diff -crlf
+*.ai -crlf
*.aliases crlf=input
all crlf=input
*.am crlf=input
*.animinfo crlf=input
-*.aps -diff -crlf
-*.asc -diff -crlf
+*.aps -crlf
+*.asc -crlf
*.ase -crlf
*.bat -crlf
*.bgs crlf=input
-*.blend1 -diff -crlf
-*.blend -diff -crlf
-blind_id -diff -crlf
-*.bmp -diff -crlf
+*.blend1 -crlf
+*.blend -crlf
+blind_id -crlf
+*.bmp -crlf
branch-manager crlf=input
*.brand crlf=input
BSDmakefile crlf=input
bsp2ent crlf=input
-*.bsp -diff -crlf
+*.bsp -crlf
*.cache crlf=input
*.cbp -crlf
-*.cbp -diff -crlf
+*.cbp -crlf
*.c crlf=input
*.cfg crlf=input
*.cg crlf=input
ChangeLog crlf=input
CHANGES crlf=input
-cjpeg -diff -crlf
+cjpeg -crlf
COMPILING crlf=input
compress-texture crlf=input
*.conf crlf=input
*.cpp crlf=input
create crlf=input
*.cron crlf=input
-crypto-keygen-standalone -diff -crlf
+crypto-keygen-standalone -crlf
*.css crlf=input
*.cvswrappers crlf=input
*.d0ir crlf=input
-*.d0pk -diff -crlf
+*.d0pk -crlf
*.db crlf=input
*.db.* crlf=input
*.def2ent crlf=input
*.default crlf=input
*.def crlf=input
-*.dem -diff -crlf
+*.dem -crlf
*.dev -crlf
-dir -diff -crlf
+dir -crlf
*.directory crlf=input
-djpeg -diff -crlf
-*.dll -diff -crlf
-DOCS -diff -crlf
+djpeg -crlf
+*.dll -crlf
+DOCS -crlf
*.dot crlf=input
DoxyConfig crlf=input
doxyfile crlf=input
Doxyfile crlf=input
*.doxygen crlf=input
-*.dpm -diff -crlf
+*.dpm -crlf
*.dsp -crlf
*.dsw -crlf
*.dtd crlf=input
-*.dylib -diff -crlf
-empty -diff -crlf
+*.dylib -crlf
+empty -crlf
*.EncoderPlugin crlf=input
*.ent crlf=input
etc_svc_git-daemon_run crlf=input
-*.flac -diff -crlf
-*.flp -diff -crlf
+*.flac -crlf
+*.flp -crlf
*.form crlf=input
*.framegroups crlf=input
-*.fteqccfail -diff -crlf
+*.fteqccfail -crlf
*.game crlf=input
*.gdb crlf=input
gendox crlf=input
gendoxfunctions crlf=input
genDoxyfile crlf=input
-*.gif -diff -crlf
+*.gif -crlf
*.gitattributes crlf=input
git-branch-manager crlf=input
git-filter-index crlf=input
*.htaccess crlf=input
*.html crlf=input
*.html-part crlf=input
-*.icns -diff -crlf
-*.ico -diff -crlf
+*.icns -crlf
+*.ico -crlf
*.idl crlf=input
*.idsoftware crlf=input
*.inc crlf=input
*.in crlf=input
-*.info-1 -diff -crlf
-*.info-2 -diff -crlf
-*.info -diff -crlf
+*.info-1 -crlf
+*.info-2 -crlf
+*.info -crlf
*.inl crlf=input
*.iOS crlf=input
-*.iqm -diff -crlf
+*.iqm -crlf
*.java crlf=input
*.jhm crlf=input
*.jnlp crlf=input
-jpegtran -diff -crlf
-*.jpg -diff -crlf
+jpegtran -crlf
+*.jpg -crlf
*.jsmooth crlf=input
*.la crlf=input
LGPL crlf=input
LICENSE crlf=input
-*.lmp -diff -crlf
+*.lmp -crlf
*.loaders crlf=input
-*.lso -diff -crlf
+*.lso -crlf
*.m4 crlf=input
makefile crlf=input
Makefile crlf=input
*.map -crlf filter=mapclean
*.mapinfo crlf=input
*.m crlf=input
-*.md3 -diff -crlf
+*.md3 -crlf
*.md5anim -crlf
*.md5mesh -crlf
-*.mdl -diff -crlf
+*.mdl -crlf
*.med crlf=input
*.mf crlf=input
-*.mid -diff -crlf
+*.mid -crlf
*.mk crlf=input
-*.mkdir -diff -crlf
-*.mmpz -diff -crlf
+*.mkdir -crlf
+*.mmpz -crlf
*.modules crlf=input
-*.mp3 -diff -crlf
+*.mp3 -crlf
*.nib -crlf
*.obj -crlf
-OFFSETS -diff -crlf
-*.ogg -diff -crlf
+OFFSETS -crlf
+*.ogg -crlf
*.options crlf=input
-*.otf -diff -crlf
+*.otf -crlf
pangorc crlf=input
*.part crlf=input
*.patch crlf=input
*.patchsets crlf=input
*.pbxproj crlf=input
*.pc crlf=input
-*.pfb -diff -crlf
-*.pfm -diff -crlf
+*.pfb -crlf
+*.pfm -crlf
*.php crlf=input
-*.pk3 -diff -crlf
+*.pk3 -crlf
PkgInfo crlf=input
*.pl crlf=input
*.plist crlf=input
*.pm crlf=input
-*.png -diff -crlf
+*.png -crlf
*.po crlf=input
-POSITIONS -diff -crlf
+POSITIONS -crlf
*.pot crlf=input
*.proj -crlf
*.properties crlf=input
-*.psd -diff -crlf
+*.psd -crlf
*.py crlf=input
*.q3map1 crlf=input
*.qc crlf=input
*.qdt crlf=input
*.qh crlf=input
-*.rar -diff -crlf
+*.rar -crlf
*.rb crlf=input
*.rc2 crlf=input
*.rc -crlf
-rdjpgcom -diff -crlf
+rdjpgcom -crlf
*.readme crlf=input
README crlf=input
*.rtlights crlf=input
SCHEMA crlf=input
*.scm crlf=input
sdl-config crlf=input
-SDL -diff -crlf
-*.sfd -diff -crlf
+SDL -crlf
+*.sfd -crlf
*.shader crlf=input
*.sh crlf=input
*.skin crlf=input
*.sln -crlf
*.sounds crlf=input
-*.sp2 -diff -crlf
-*.spr32 -diff -crlf
-*.spr -diff -crlf
+*.sp2 -crlf
+*.spr32 -crlf
+*.spr -crlf
*.src crlf=input
*.strings crlf=input
strip crlf=input
-*.svg -diff -crlf
-*.TAB -diff -crlf
-*.tga -diff -crlf
-TMAP -diff -crlf
+*.svg -crlf
+*.TAB -crlf
+*.tga -crlf
+TMAP -crlf
todo crlf=input
TODO crlf=input
-*.ttf -diff -crlf
+*.ttf -crlf
*.txt crlf=input
*.txt.* crlf=input
update-shaderlists crlf=input
*.vcxproj crlf=input
versionbuilder crlf=input
*.vhost crlf=input
-*.wav -diff -crlf
+*.wav -crlf
*.waypoints crlf=input
*.width crlf=input
*.workspace -crlf
-wrjpgcom -diff -crlf
-*.xcf -diff -crlf
+wrjpgcom -crlf
+*.xcf -crlf
*.xlink crlf=input
*.xml crlf=input
xonotic-map-compiler-autobuild crlf=input
xonotic-map-screenshot crlf=input
xonotic-osx-sdl crlf=input
*.xpm crlf=input
-*.xrns -diff -crlf
-*.zip -diff -crlf
+*.xrns -crlf
+*.zip -crlf
zipdiff crlf=input
-*.zym -diff -crlf
+*.zym -crlf
- 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=29a3c5d84ed37810d674c2c176b21e04
+ - EXPECT=d1a65371174a5210320fa85b3f059d0f
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
-Sat Feb 3 07:24:42 CET 2018
+Wed Feb 14 07:23:42 CET 2018
set g_pickup_respawntime_weapon 10
set g_pickup_respawntime_superweapon 120
set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 2
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken
+set g_balance_powerup_invincible_takeforce 1
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
set g_pickup_respawntime_weapon 15
set g_pickup_respawntime_superweapon 120
set g_pickup_respawntime_ammo 15
+set g_pickup_respawntime_initial_random 2
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.2
+set g_balance_powerup_invincible_takeforce 1
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 4
set g_pickup_respawntime_weapon 10
set g_pickup_respawntime_superweapon 120
set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 0
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken
+set g_balance_powerup_invincible_takeforce 0.33
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
set g_pickup_respawntime_weapon 10
set g_pickup_respawntime_superweapon 120
set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 2
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.25 // only 1/4th damage is taken
+set g_balance_powerup_invincible_takeforce 1
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
set g_pickup_respawntime_weapon 0.1
set g_pickup_respawntime_superweapon 0.1
set g_pickup_respawntime_ammo 0.1
+set g_pickup_respawntime_initial_random 2
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken
+set g_balance_powerup_invincible_takeforce 0.33
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
set g_pickup_respawntime_weapon 10
set g_pickup_respawntime_superweapon 120
set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 1
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken
+set g_balance_powerup_invincible_takeforce 0.33
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
set g_pickup_respawntime_weapon 10
set g_pickup_respawntime_superweapon 120
set g_pickup_respawntime_ammo 10
+set g_pickup_respawntime_initial_random 1
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
// {{{ powerups
set g_balance_powerup_invincible_takedamage 0.33 // only 1/3rd damage is taken
+set g_balance_powerup_invincible_takeforce 0.33
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Чат"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "Уключыць панэль"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Чат"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Panel aktivieren"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Chat"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 kam ^BG%s^K1s Rakete zu nahe%s%s"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Panel aktivieren"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Chat"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 kam ^BG%s^K1s Rakete zu nahe%s%s"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Enable panel"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Chat"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
# Rodrigo Mouton Laudin <ratogenesis@gmail.com>, 2011
# Simon <inactive+0000simon@transifex.com>, 2014-2015
# starfire24680 <starfire24680@gmail.com>, 2017
+# starfire24680 <starfire24680@gmail.com>, 2017
# Vitama Piru Leta <vitamanrules@gmail.com>, 2017
# Ari_tent <xonotic@outlook.com>, 2014
# Yllelder, 2016
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Activar panel"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Chat"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 se acercó demasiado al misil de ^BG%s^K1%s%s"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Spanish (Mexico) (http://www.transifex.com/team-xonotic/"
"xonotic/language/es_MX/)\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Tchat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Afficher le tableau de bord"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Tchat"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 s'est approché trop près de la roquette de ^BG%s^K1%s%s"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Comhrá"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "Cumasaigh an painéal"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Comhrá"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Cabadaich"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr ""
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Cabadaich"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Hebrew (http://www.transifex.com/team-xonotic/xonotic/"
"language/he/)\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Abilita pannello"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Chat"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 si è avvicinato troppo al razzo di ^BG%s^K1%s%s"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Lojban (http://www.transifex.com/team-xonotic/xonotic/"
"language/jbo/)\n"
# Jisoo Lim <liminj0719@gmail.com>, 2017
# Kyf Lee (coughingmouse) <coughingmouse@gmail.com>, 2016
# Kyf Lee (coughingmouse) <coughingmouse@gmail.com>, 2016-2017
-# Kyf Lee (coughingmouse) <coughingmouse@gmail.com>, 2017
+# Kyf Lee (coughingmouse) <coughingmouse@gmail.com>, 2016-2017
msgid ""
msgstr ""
"Project-Id-Version: Xonotic\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "채팅"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "제어반 활성화"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^채팅"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Keskows"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr ""
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Keskows"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Macedonian (http://www.transifex.com/team-xonotic/xonotic/"
"language/mk/)\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "Activeer paneel"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Chat"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Norwegian (http://www.transifex.com/team-xonotic/xonotic/"
"language/no/)\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Czat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "Włącz panel"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "Czat"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Chat"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Conversație"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
msgid "Enable panel"
msgstr "Activare panou"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Conversație"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 s-a apropiat prea mult de racheta%s%s lui ^BG%s^K1"
# adem4ik, 2014
# Alex Talker <alextalker7@gmail.com>, 2014-2015
# Andrei Stepanov, 2014
-# Andrei Stepanov, 2014-2017
+# Andrei Stepanov, 2014-2018
# Andrey P <andrey.pyntikov@gmail.com>, 2016
# Artem Vorotnikov <artem@vorotnikov.me>, 2015
# Lord Canistra <lordcanistra@gmail.com>, 2011
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-09-19 19:55+0000\n"
+"PO-Revision-Date: 2018-02-13 16:58+0000\n"
"Last-Translator: Andrei Stepanov\n"
"Language-Team: Russian (http://www.transifex.com/team-xonotic/xonotic/"
"language/ru/)\n"
#: qcsrc/client/hud/panel/infomessages.qc:102
#: qcsrc/client/hud/panel/infomessages.qc:106
msgid "next weapon"
-msgstr "следующее оружие"
+msgstr "след. оружие"
#: qcsrc/client/hud/panel/infomessages.qc:102
#: qcsrc/client/hud/panel/infomessages.qc:106
msgid "previous weapon"
-msgstr "предыдущее оружие"
+msgstr "пред. оружие"
#: qcsrc/client/hud/panel/infomessages.qc:106
#, c-format
#: qcsrc/client/hud/panel/infomessages.qc:108
#: qcsrc/menu/xonotic/keybinder.qc:41
msgid "secondary fire"
-msgstr "дополниÑ\82елÑ\8cный огонь"
+msgstr "вÑ\82оÑ\80иÑ\87ный огонь"
#: qcsrc/client/hud/panel/infomessages.qc:111
#, c-format
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Чат"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/client/hud/panel/scoreboard.qc:1354
msgid "Rankings"
-msgstr "Ранг"
+msgstr "РейÑ\82инг"
#: qcsrc/client/hud/panel/scoreboard.qc:1519
#: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:43
"Find and bring the enemy flag to your base to capture it, defend your base "
"from the other team"
msgstr ""
-"Найдите и принесите флаг противника на свою базу для захвата, защищайте вашу "
-"базÑ\83 оÑ\82 командÑ\8b пÑ\80оÑ\82ивника"
+"Найдите и принесите флаг противника на свою базу, защищайте свой флаг от "
+"команды противника"
#: qcsrc/common/mapinfo.qh:249
msgid "Clan Arena"
"Kill enemies to freeze them, stand next to frozen teammates to revive them; "
"freeze all enemies to win"
msgstr ""
-"Поражайте врагов, чтобы заморозить их всех и выиграть раунд, и "
-"Ñ\80азмоÑ\80аживайÑ\82е Ñ\81оÑ\8eзников, Ñ\81Ñ\82оÑ\8f Ñ\80Ñ\8fдом Ñ\81 ними"
+"Поражайте врагов, чтобы заморозить их всех и выиграть раунд. Размораживайте "
+"союзников, стоя рядом с ними"
#: qcsrc/common/mapinfo.qh:446
msgid "Hold the ball to get points for kills"
#: qcsrc/common/mutators/mutator/damagetext/ui_damagetext.qc:20
msgid "Font size minimum:"
-msgstr "Минимальный размер шрифта:"
+msgstr "Мин. размер шрифта:"
#: qcsrc/common/mutators/mutator/damagetext/ui_damagetext.qc:25
msgid "Font size maximum:"
-msgstr "Максимальный размер шрифта:"
+msgstr "Макс. размер шрифта:"
#: qcsrc/common/mutators/mutator/damagetext/ui_damagetext.qc:30
msgid "Accumulate range:"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:21
msgid "Flag carrier"
-msgstr "Ð\97наменосец"
+msgstr "Флагоносец"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:22
msgid "Enemy carrier"
-msgstr "Вражеский знаменосец"
+msgstr "Вражеский флагоносец"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:23
msgid "Dropped flag"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:29
msgid "Return flag here"
-msgstr "Ð\92еÑ\80нÑ\83Ñ\82Ñ\8c Ñ\84лаг здеÑ\81Ñ\8c"
+msgstr "Ð\92еÑ\80нÑ\83Ñ\82Ñ\8c Ñ\84лаг оÑ\82Ñ\81Ñ\8eда"
#: qcsrc/common/mutators/mutator/waypoints/all.inc:31
#: qcsrc/common/mutators/mutator/waypoints/all.inc:32
#: qcsrc/common/notifications/all.inc:287
#, c-format
msgid "^BG%s%s^K1 was slimed by ^BG%s^K1%s%s"
-msgstr "^BG%s%s^K1 был утоплен в слизи ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 утоплен в слизи ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:288
#, c-format
#: qcsrc/common/notifications/all.inc:298
#, c-format
msgid "^BG%s%s^K1 got shredded by ^BG%s^K1's Spiderbot%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл измелÑ\8cÑ\87Ñ\91н Spiderbot'ом, Ñ\83пÑ\80авлÑ\8fемÑ\8bм ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 измельчён Spiderbot'ом, управляемым ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:299
#, c-format
#: qcsrc/common/notifications/all.inc:316
#, c-format
msgid "^BG%s^K1's innards became outwards by a Shambler%s%s"
-msgstr "^BG%s^K1's бÑ\8bл вÑ\8bвеÑ\80нÑ\83Ñ\82 наизнанкÑ\83 ШамблеÑ\80ом%s%s"
+msgstr "^BG%s^K1's вывернут наизнанку Шамблером%s%s"
#: qcsrc/common/notifications/all.inc:317
#, c-format
#: qcsrc/common/notifications/all.inc:341
#, c-format
msgid "^BG%s^K1 was riddled full of holes by a Machinegun turret%s%s"
-msgstr "^BG%s^K1 бÑ\8bл изÑ\80еÑ\88еÑ\87Ñ\91н Ð\9fÑ\83лемÑ\91Ñ\82ной баÑ\88ней%s%s"
+msgstr "^BG%s^K1 изрешечён Пулемётной башней%s%s"
#: qcsrc/common/notifications/all.inc:342
#, c-format
#: qcsrc/common/notifications/all.inc:346
#, c-format
msgid "^BG%s^K1 got served a lead enrichment by a Walker turret%s%s"
-msgstr "^BG%s^K1 бÑ\8bл обогаÑ\89Ñ\91н Ñ\81винÑ\86ом из Ñ\82Ñ\83Ñ\80ели Walker'a%s%s"
+msgstr "^BG%s^K1 обогащён свинцом из турели Walker'a%s%s"
#: qcsrc/common/notifications/all.inc:347
#, c-format
#: qcsrc/common/notifications/all.inc:370
#: qcsrc/common/notifications/all.inc:684
msgid "^TC^TT^BG team wins the round"
-msgstr "^TC^TT^BG команда выиграла этот раунд"
+msgstr "^BGКоманда ^TC^TT^BG выиграла этот раунд"
#: qcsrc/common/notifications/all.inc:371
#: qcsrc/common/notifications/all.inc:685
#: qcsrc/common/notifications/all.inc:439
msgid "^TC^TT ^BGteam scores!"
-msgstr "^TC^TT ^BG команда увеличивает счет!"
+msgstr "^BGКоманда ^TC^TT^BG увеличивает счёт!"
#: qcsrc/common/notifications/all.inc:441
#, c-format
#: qcsrc/common/notifications/all.inc:458
#, c-format
msgid "^BG%s%s^K1 was shot to death by ^BG%s^K1's Blaster%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл заÑ\81Ñ\82Ñ\80елен из Ð\91лаÑ\81Ñ\82еÑ\80а ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 застрелен из Бластера ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:459
#, c-format
#: qcsrc/common/notifications/all.inc:474
#, c-format
msgid "^BG%s%s^K1 was pummeled by a burst of ^BG%s^K1's Hagar rockets%s%s"
-msgstr "^BG%s%s^K1 был утрамбован очередью из Hagar'а от ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 утрамбован очередью из Hagar'а от ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:475
#, c-format
msgid "^BG%s%s^K1 was pummeled by ^BG%s^K1's Hagar rockets%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл обÑ\81Ñ\82Ñ\80елÑ\8fн из Hagar'а Ñ\81о Ñ\81Ñ\82оÑ\80онÑ\8b ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 обстрелян из Hagar'а со стороны ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:476
#, c-format
#: qcsrc/common/notifications/all.inc:479
#, c-format
msgid "^BG%s%s^K1 was sniped by ^BG%s^K1's Heavy Machine Gun%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл заÑ\81Ñ\82Ñ\80елен из ТÑ\8fжÑ\91лого пÑ\83лемÑ\91Ñ\82а ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 застрелен из Тяжёлого пулемёта ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:480
#, c-format
msgid "^BG%s%s^K1 was torn to bits by ^BG%s^K1's Heavy Machine Gun%s%s"
-msgstr "^BG%s%s^K1 был разорван на куски из Тяжёлого пулемёта ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 разорван на куски из Тяжёлого пулемёта ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:481
#, c-format
#: qcsrc/common/notifications/all.inc:484
#, c-format
msgid "^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"
-msgstr "^BG%s%s^K1 был расстрелян из Пулемёта ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 расстрелян из Пулемёта ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:485
#, c-format
msgid "^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл изÑ\80еÑ\88еÑ\87ен Пулемётом ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 изÑ\80еÑ\88еÑ\87Ñ\91н Пулемётом ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:486
#: qcsrc/common/notifications/all.inc:790
#: qcsrc/common/notifications/all.inc:493
#, c-format
msgid "^BG%s%s^K1 was sniped with a Rifle by ^BG%s^K1%s%s"
-msgstr "^BG%s%s^K1 был расстрелян из Rifle ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 расстрелян из Rifle ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:494
#, c-format
#: qcsrc/common/notifications/all.inc:504
#, c-format
msgid "^BG%s%s^K1 was gunned down by ^BG%s^K1's Shockwave%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл Ñ\80аÑ\81Ñ\82Ñ\80елÑ\8fн из Шоковой Волны ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 заÑ\81Ñ\82Ñ\80елен из Шоковой Волны ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:505
#, c-format
#: qcsrc/common/notifications/all.inc:506
#, c-format
msgid "^BG%s%s^K1 was gunned down by ^BG%s^K1's Shotgun%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл пÑ\80иÑ\81Ñ\82Ñ\80елен из Shotgun'a ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 пристрелен из Shotgun'a ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:507
#, c-format
#: qcsrc/common/notifications/all.inc:512
#, c-format
msgid "^BG%s%s^K1 has been vaporized by ^BG%s^K1's Vortex%s%s"
-msgstr "^BG%s%s^K1 бÑ\8bл иÑ\81паÑ\80Ñ\91н Ñ\81 помоÑ\89Ñ\8cÑ\8e Ð\92иÑ\85Ñ\80Ñ\8f ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 испарён с помощью Вихря ^BG%s^K1%s%s"
#: qcsrc/common/notifications/all.inc:537
msgid "^F4You are now alone!"
#: qcsrc/common/notifications/all.inc:573
#, c-format
msgid "^BGThe %senemy^BG got your flag! Retrieve it!"
-msgstr "^BG%sпротивник^BG забрал ваш флаг! Верните его!"
+msgstr "^BG%sÐ\9fротивник^BG забрал ваш флаг! Верните его!"
#: qcsrc/common/notifications/all.inc:574
#, c-format
msgid "^BGThe %senemy (^BG%s%s)^BG got your flag! Retrieve it!"
-msgstr "^BG%sпротивник (^BG%s%s)^BG забрал ваш флаг! Верните его!"
+msgstr "^BG%sÐ\9fротивник (^BG%s%s)^BG забрал ваш флаг! Верните его!"
#: qcsrc/common/notifications/all.inc:575
#, c-format
msgid "^BGThe %senemy^BG got the flag! Retrieve it!"
-msgstr "^BG%sпротивник^BG забрал флаг! Верните его!"
+msgstr "^BG%sÐ\9fротивник^BG забрал флаг! Верните его!"
#: qcsrc/common/notifications/all.inc:576
#, c-format
msgid "^BGThe %senemy (^BG%s%s)^BG got the flag! Retrieve it!"
-msgstr "^BG%sпротивник (^BG%s%s)^BG забрал флаг! Верните его!"
+msgstr "^BG%sÐ\9fротивник (^BG%s%s)^BG забрал флаг! Верните его!"
#: qcsrc/common/notifications/all.inc:577
#, c-format
msgid "^BGThe %senemy^BG got their flag! Retrieve it!"
-msgstr "^BG%sпротивник^BG забрал свой флаг! Верните его!"
+msgstr "^BG%sÐ\9fротивник^BG забрал свой флаг! Верните его!"
#: qcsrc/common/notifications/all.inc:578
#, c-format
msgid "^BGThe %senemy (^BG%s%s)^BG got their flag! Retrieve it!"
-msgstr "^BG%sпротивник (^BG%s%s)^BG забрал свой флаг! Верните его!"
+msgstr "^BG%sÐ\9fротивник (^BG%s%s)^BG забрал свой флаг! Верните его!"
#: qcsrc/common/notifications/all.inc:579
#, c-format
"^BGAll keys are in ^TC^TT team^BG's hands!\n"
"Interfere ^F4NOW^BG!"
msgstr ""
-"^BG^TC^TT команда^BG собрала все ключи!\n"
+"^BGКоманда ^TC^TT^BG собрала все ключи!\n"
"Помешайте им встретиться. ^F4БЫСТРО^BG!"
#: qcsrc/common/notifications/all.inc:713
#: qcsrc/common/notifications/all.inc:725
msgid "^BGGet some ammo or you'll be dead in ^F4^COUNT^BG!"
-msgstr "^BGНайдите патронов, иначе вы умрёте через ^F4^COUNT^BG!"
+msgstr "^BGНайдите патроны, иначе вы погибните через ^F4^COUNT^BG!"
#: qcsrc/common/notifications/all.inc:725
msgid "^BGGet some ammo! ^F4^COUNT^BG left!"
#: qcsrc/common/notifications/all.inc:734
#, c-format
msgid "^TC^TT^BG team captured %s^BG control point"
-msgstr "Команда ^TC^TT^BG захватила контрольную точку %s^BG"
+msgstr "^BGКоманда ^TC^TT^BG захватила контрольную точку %s^BG"
#: qcsrc/common/notifications/all.inc:735
msgid "^BGThis control point currently cannot be captured"
#: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:16
msgid "Ammunition display:"
-msgstr "Ð\9fоказ патронов:"
+msgstr "Ð\9eÑ\82обÑ\80ажение патронов:"
#: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:19
msgid "Show only current ammo type"
#: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:22
#: qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc:44
msgid "Noncurrent alpha:"
-msgstr "Ð\94Ñ\80Ñ\83гаÑ\8f пÑ\80озÑ\80аноÑ\87ть:"
+msgstr "Ð\9dеакÑ\82ивнаÑ\8f пÑ\80озÑ\80аÑ\87ноÑ\81ть:"
#: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:26
#: qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc:48
msgid "Noncurrent scale:"
-msgstr "Ð\94Ñ\80Ñ\83гой размер:"
+msgstr "Ð\9dеакÑ\82ивнÑ\8bй размер:"
#: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:30
#: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc:24
msgid "Align icon:"
-msgstr "Ð\92Ñ\8bÑ\80овнÑ\8fÑ\82Ñ\8c знаÑ\87ок:"
+msgstr "Ð\92Ñ\8bÑ\80овнÑ\8fÑ\82Ñ\8c знаÑ\87ки:"
#: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:31
#: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc:30
#: qcsrc/menu/xonotic/dialog_settings_effects.qc:65
msgid "Geometry detail:"
-msgstr "Детали геометрии:"
+msgstr "Детализация геометрии:"
#: qcsrc/menu/xonotic/dialog_settings_effects.qc:67
msgid "Change the smoothness of the curves on the map (default: normal)"
#: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:62
msgid "Add frag location to death messages when available"
-msgstr "Ð\94обавлÑ\8fÑ\82Ñ\8c Ñ\81ведениÑ\8f о меÑ\81Ñ\82е Ñ\84Ñ\80ага в Ñ\81ообÑ\89ениÑ\8f о Ñ\81меÑ\80Ñ\82и когда возможно"
+msgstr "УказÑ\8bваÑ\82Ñ\8c меÑ\81Ñ\82о Ñ\84Ñ\80ага в Ñ\81ообÑ\89ениÑ\8f о Ñ\81меÑ\80Ñ\82и, еÑ\81ли возможно"
#: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:65
msgid "Gamemode Settings"
#: qcsrc/menu/xonotic/dialog_settings_game_model.qc:56
msgid "In non teamplay modes only"
-msgstr "ТолÑ\8cко в некомандных режимах"
+msgstr "Ð\92 некомандных режимах"
#: qcsrc/menu/xonotic/dialog_settings_game_model.qc:60
msgid "Body fading:"
msgid "Enable panel"
msgstr "Включить панель"
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Чат"
+
#~ msgid "^BG%s%s^K1 got too close ^BG%s^K1's rocket%s%s"
#~ msgstr "^BG%s%s^K1 оказался слишком близко к ракете ^BG%s^K1%s%s"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Albanian (http://www.transifex.com/team-xonotic/xonotic/"
"language/sq/)\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "Ћаскање"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "Омогући плочу"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^Ћаскање"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Turkish (http://www.transifex.com/team-xonotic/xonotic/"
"language/tr/)\n"
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2017-07-09 23:06+0000\n"
+"PO-Revision-Date: 2017-07-05 15:06+0000\n"
"Last-Translator: divVerent <divVerent@xonotic.org>\n"
"Language-Team: Uzbek (Latin) (http://www.transifex.com/team-xonotic/xonotic/"
"language/uz%40Latn/)\n"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "对话"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/dialog_credits.qh:7
msgid "Credits"
-msgstr "制作人员"
+msgstr ""
#: qcsrc/menu/xonotic/dialog_credits.qh:8
msgid "The Xonotic credits"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "启用面板"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^对话"
#: qcsrc/client/hud/panel/quickmenu.qc:794
#: qcsrc/client/hud/panel/quickmenu.qc:798
msgid "Chat"
-msgstr "對話"
+msgstr ""
#: qcsrc/client/hud/panel/quickmenu.qc:795
msgid "QMCMD^:-) / nice one"
#: qcsrc/menu/xonotic/util.qh:44
msgid "Enable panel"
msgstr "開啟板面"
+
+#~ msgid "QMCMD^Chat"
+#~ msgstr "QMCMD^對話"
// per-weapon crosshairs
seta crosshair_per_weapon 1 "when 1, each gun will display a different crosshair"
+// side-scrolling crosshair
+seta crosshair_2d 54 "selects crosshair to use in side-scrolling mode (\"\" uses regular crosshair and 0 is none)"
+
// =========================
// Crosshair ring settings
-exec defaultXonotic.cfg
+exec xonotic-common.cfg
+++ /dev/null
-// this resets most client cvars and aliases to their defaults
-// if you want to reset your client to defaults, it's probably a better idea to delete (parts of) config.cfg and restart
-
-
-// changes a cvar and reports it to the server (for the menu to notify the
-// server about changes)
-alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
-
-seta cl_firststart "" "how many times the client has been run"
-seta cl_startcount 0 "how many times the client has been run"
-
-// other aliases
-alias +hook +button6
-alias -hook -button6
-alias +jetpack +button10
-alias -jetpack -button10
-alias +dodge +button11
-alias -dodge -button11
-alias use "impulse 21"
-
-// for backwards compatibility
-// TODO Remove after 0.8 release!
-cl_particles_forcetraileffects 1
-
-alias dropweapon "impulse 17"
-alias +show_info +button7
-alias -show_info -button7
-
-// merge lightmaps up to 2048x2048 textures
-mod_q3bsp_lightmapmergepower 4
-
-// player defaults
-_cl_color "112.211" // same effect as 112, but menuqc can detect this as the default and not intentionally set
-_cl_name ""
-seta _cl_gender 0 "storage cvar for current player gender (0 = undisclosed, 1 = male, 2 = female)"
-_cl_playerskin 0
-
-seta cl_reticle 1 "enable zoom reticles"
-seta cl_reticle_stretch 0 "stretch reticles so they fit the screen (breaks image proportions)"
-seta cl_reticle_normal 1 "draw an aiming reticle when zooming with the zoom button"
-seta cl_reticle_normal_alpha 1 "alpha of the normal reticle"
-seta cl_reticle_weapon 1 "draw custom aiming reticle when zooming with certain weapons"
-seta cl_reticle_weapon_alpha 1 "alpha of the custom reticle"
-
-fov 100
-seta cl_velocityzoom_enabled 0 "velocity based zooming of fov"
-seta cl_velocityzoom_factor 0 "factor of fov zooming (negative values zoom out)"
-seta cl_velocityzoom_type 3 "how to factor in speed, 1 = all velocity in all directions, 2 = velocity only in forward direction (can be negative), 3 = velocity only in forward direction (limited to forward only)"
-seta cl_velocityzoom_speed 1000 "target speed for fov factoring"
-seta cl_velocityzoom_time 0.2 "time value for averaging speed values"
-seta cl_spawnzoom 1 "zoom effect immediately when a player spawns"
-seta cl_spawnzoom_speed 1 "speed at which zooming occurs while spawning"
-seta cl_spawnzoom_factor 2 "factor of zoom while spawning"
-seta cl_zoomfactor 5 "how much +zoom will zoom (1-30)"
-seta cl_zoomspeed 8 "how fast it will zoom (0.5-16), negative values mean instant zoom"
-seta cl_zoomsensitivity 0 "how zoom changes sensitivity (0 = weakest, 1 = strongest)"
-
-seta cl_unpress_zoom_on_spawn 1 "automatically unpress zoom when you spawn"
-seta cl_unpress_zoom_on_death 1 "automatically unpress zoom when you die (and don't allow zoom again while dead)"
-seta cl_unpress_zoom_on_weapon_switch 1 "automatically unpress zoom when you switch a weapon"
-seta cl_unpress_attack_on_weapon_switch 0 "automatically unpress fire and fire1 attack buttons when you switch a weapon"
-
-seta cl_spawn_event_particles 1 "pointparticles effect whenever a player spawns"
-seta cl_spawn_event_sound 1 "sound effect whenever a player spawns"
-//seta cl_spawn_point_model 0 "place a model at all spawn points" // still needs a model
-seta cl_spawn_point_particles 1 "pointparticles effect at all spawn points" // managed by effects-.cfg files
-seta cl_spawn_point_dist_min 1200
-seta cl_spawn_point_dist_max 1600
-
-freelook 1
-sensitivity 6
-v_gamma 1
-viewsize 100
-bgmvolume 1
-volume 0.5
-// fullscreen 1024x768x32bit
-vid_bitsperpixel 32
-vid_fullscreen 1
-vid_width 1024
-vid_height 768
-vid_pixelheight 1
-vid_resizable 0 // cannot be turned on before it is sure it cannot cause a r_restart
-vid_desktopfullscreen 1
-prvm_language en
-set _menu_prvm_language ""
-set _menu_vid_width "$vid_width"
-set _menu_vid_height "$vid_height"
-set _menu_vid_pixelheight "$vid_pixelheight"
-set _menu_vid_desktopfullscreen "$vid_desktopfullscreen"
-seta menu_vid_scale 0
-seta menu_vid_allowdualscreenresolution 0
-// 2D resolution 800x600
-vid_conwidth 800
-vid_conheight 600
-// menu_conwidth, menu_conheight are set inside quake.rc
-v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
-
-// create a temporary empty alias for menu_sync so that execution of effects-normal.cfg, hud_luma.cfg
-// and sRGB-{disable,enable}.cfg on game start doesn't show an error message in the console
-alias menu_sync "" // will be re-aliased later
-
-// we want to use sRGB for our maps!
-exec sRGB-disable.cfg
-vid_sRGB_fallback 2
-r_hdr_glowintensity 1
-// #define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
-set rpn_sRGB_to_linear "dup 0.055 add 1.055 div 2.4 pow exch 12.92 div dup 0.0031308 gt when"
-// #define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
-set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul dup 0.04045 ge when"
-
-// -nosRGB to -sRGB sky shader conversion:
-//
-// q3map_sunExt 1 0.6875 0.375 340 25 47 0 16
-// ^^ elevation
-// ^^^ sunlight
-// q3map_skylight 110 3
-// ^^^ skylight
-//
-// With that, do (the last parameter is the ratio of skylight you assume hits
-// the surfaces, about 0.25 for inner surfaces near sky, about 1.00 on
-// terrain):
-// ]skybox_nosRGB_to_sRGB 340 47 110 0.25
-// rpn: still on stack: new_sunlight:
-// rpn: still on stack: 380.464142
-// rpn: still on stack: new_skylight:
-// rpn: still on stack: 9.32523632
-//
-// The equivalent -sRGB shader then will have:
-//
-// q3map_sunExt 1 0.6875 0.375 380.464142 25 47 0 16
-// q3map_skylight 9.32523632 3
-alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.123 $4 div mul /new_skylight: $3 402.123 $4 div div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 $4 div div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
-
-set cl_orthoview 0 "enable top-down view of the map- meant to be used for radar map images (note: orthoview sets cvars temporarily, requires restart to return them to normal)"
-set cl_orthoview_nofog 1 "disable fog while in orthoview-- note, should not be enabled on ALL maps, i.e. oilrig works fine with this disabled"
-
-// these settings determine how much the view is affected by movement/damage
-cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
-cl_deathfade 0 // fade screen to dark red when dead, value represents how fast the fade is (higher is faster)
-cl_bobcycle 0.5 // how long the cycle of up/down view movement takes (only works if cl_bob is not 0), default is 0.6
-cl_bob 0 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
-cl_bob2cycle 1 // how long the cycle of left/right view movement takes (only works if cl_bob2 is not 0), default is 0.6
-cl_bob2 0 // how much view moves left/right when moving (does not move if cl_bob2cycle is 0), default is 0.01
-cl_bobfall 0.05 "how much the view swings down when falling (influenced by the speed you hit the ground with)"
-cl_bobfallcycle 3 "speed of the bobfall swing"
-cl_bobfallspeed 200 "necessary amount of speed for bob-falling to occur"
-cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
-cl_bobmodel_side 0.2 // amount the gun sways to the sides
-cl_bobmodel_speed 10 // rate at which the gun sways
-cl_bobmodel_up 0.1 // amount the gun sways up and down
-
-cl_followmodel 1 // enables weapon pushing / pulling effect when walking
-seta cl_followmodel_speed 0.3 "gun following speed"
-seta cl_followmodel_limit 135 "gun following limit"
-seta cl_followmodel_velocity_absolute 0 "make the effect ignore velocity direction changes (side effect: it causes a glitch when teleporting / passing through a warpzone)"
-seta cl_followmodel_velocity_lowpass 0.05 "gun following velocity lowpass averaging time"
-seta cl_followmodel_highpass 0.05 "gun following highpass averaging time"
-seta cl_followmodel_lowpass 0.03 "gun following lowpass averaging time"
-
-cl_leanmodel 1 // enables weapon leaning effect when looking around
-seta cl_leanmodel_speed 0.3 "gun leaning speed"
-seta cl_leanmodel_limit 30 "gun leaning limit"
-seta cl_leanmodel_highpass1 0.2 "gun leaning pre-highpass averaging time"
-seta cl_leanmodel_highpass 0.2 "gun leaning highpass averaging time"
-seta cl_leanmodel_lowpass 0.05 "gun leaning lowpass averaging time"
-
-cl_rollangle 0 // amount of view tilt when strafing, default is 2.0
-v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
-gl_polyblend 0 // whether to use screen tints, this has now been replaced by a better system in CSQC
-r_motionblur 0 // motion blur value, default is 0
-r_damageblur 0 // motion blur when damaged, default is 0 (removed in Xonotic)
-
-r_bloom_blur 4
-r_bloom_brighten 2
-r_bloom_colorexponent 1
-r_bloom_colorscale 1
-r_bloom_colorsubtract 0.125
-r_bloom_resolution 320
-r_bloom_scenebrightness 0.85
-
-seta vid_x11_display "" "xonotic-linux-*.sh will use this to start xonotic on an other/new X display"
-// This can have three possible settings:
-// "" run as usual
-// ":n" use DISPLAY=:n, create it if needed
-// ":n/layout" use DISPLAY=:n, create it if needed with ServerLayout layout
-
-cl_autodemo_nameformat demos/%Y-%m-%d_%H-%M
-
-// taunts and voices
-seta cl_autotaunt 0 "automatically taunt enemies when fragging them"
-seta cl_voice_directional 1 "0 = all voices are non-directional, 1 = all voices are directional, 2 = only taunts are directional"
-seta cl_voice_directional_taunt_attenuation 0.5 "this defines the distance from which taunts can be heard"
-
-seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy, 1: same pitch 2: increase pitch with more damage 3: decrease pitch with more damage"
-set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
-seta cl_hitsound_min_pitch 0.75 "minimum pitch of hit sound"
-seta cl_hitsound_max_pitch 1.5 "maximum pitch of hit sound"
-seta cl_hitsound_nom_damage 25 "damage amount at which hitsound bases pitch off"
-
-seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
-seta cl_eventchase_frozen 0 "camera goes into 3rd person mode when the player is frozen"
-seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
-seta cl_eventchase_distance 140 "final camera distance"
-seta cl_eventchase_generator_distance 400 "final camera distance while viewing generator explosion"
-seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
-seta cl_eventchase_maxs "12 12 8" "max size of eventchase camera bbox"
-seta cl_eventchase_mins "-12 -12 -8" "min size of eventchase camera bbox"
-seta cl_eventchase_viewoffset "0 0 20" "viewoffset of eventchase camera"
-seta cl_eventchase_generator_viewoffset "0 0 80" "viewoffset of eventchase camera while viewing generator explosion"
-seta cl_eventchase_vehicle 1 "camera goes into 3rd person mode when inside a vehicle"
-seta cl_eventchase_vehicle_viewoffset "0 0 80"
-seta cl_eventchase_vehicle_distance 250
-
-set _vehicles_shownchasemessage 0
-
-seta cl_particles_oldvortexbeam 0 "Uses the old v2.3 Vortex beam instead of the new beam, only works if server allows it (g_allow_oldvortexbeam 1)"
-
-seta cl_damageeffect 1 "enable weapon damage effects: 1 enables the feature on skeletal models, 2 on any model"
-seta cl_damageeffect_ticrate 0.1 "particle spawn rate"
-seta cl_damageeffect_bones 5 "how many damages to allow on a rigged mesh at once (non-skeletal objects are limited to one)"
-seta cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present"
-seta cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, based on damage amount"
-seta cl_damageeffect_lifetime_min 3 "minimum lifetime a damage effect may have"
-seta cl_damageeffect_lifetime_max 6 "maximum lifetime a damage effect may have"
-
-set cl_deathglow 0.8 "number of seconds during which dead bodies glow out"
-
-cl_movement 1
-cl_movement_track_canjump 0
-cl_stairsmoothspeed 200
-
-alias g_waypointeditor_spawn "impulse 103"
-alias g_waypointeditor_remove "impulse 104"
-alias g_waypointeditor_relinkall "impulse 105"
-alias g_waypointeditor_saveall "impulse 106"
-alias g_waypointeditor_unreachable "impulse 107"
-
-seta menu_sandbox_spawn_model ""
-seta menu_sandbox_attach_bone ""
-seta menu_sandbox_edit_skin 0
-seta menu_sandbox_edit_alpha 1
-seta menu_sandbox_edit_color_main "1 1 1"
-seta menu_sandbox_edit_color_glow "1 1 1"
-seta menu_sandbox_edit_frame 0
-seta menu_sandbox_edit_scale 1
-seta menu_sandbox_edit_solidity 1
-seta menu_sandbox_edit_physics 1
-seta menu_sandbox_edit_force 1
-seta menu_sandbox_edit_material ""
-
-seta menu_monsters_edit_spawn ""
-seta menu_monsters_edit_skin 0
-seta menu_monsters_edit_movetarget 1
-
-// effects
-r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture
-mod_q3shader_force_terrain_alphaflag 1 // supposedly now required for r_glsl_vertextextureblend_usebothalphas to work
-r_glsl_postprocess 0 // but note, hud_postprocessing enables this
-r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
-r_picmipworld 1
-gl_picmip_world 0
-gl_picmip_sprites 0
-gl_picmip_other 1 // so, picmip -1 is best possible quality
-r_mipsprites 1
-r_mipskins 1
-gl_max_lightmapsize 4096
-r_shadow_realtime_world_lightmaps 1
-r_shadow_realtime_world_importlightentitiesfrommap 0 // Whether build process uses keepLights is nontransparent and may change, so better make keepLights not matter.
-cl_decals_fadetime 5
-cl_decals_time 1
-seta cl_gunalign 3 "Gun alignment; 1 = center, 3 = right, 4 = left; requires reconnect"
-seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
-seta cl_particlegibs 0 "simpler gibs"
-seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
-seta cl_gibs_lifetime 2.5 "average lifetime of gibs"
-seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
-seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
-seta cl_gibs_velocity_up 1 "extra z velocity for gibs"
-seta cl_gibs_ticrate 0.1 "ticrate for gibs"
-seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
-seta cl_gibs_avelocity_scale 1 "how much angular velocity to use on gibs"
-seta cl_casings 1 "enable or disable bullet casings"
-seta cl_casings_shell_time 30 "shell casing lifetime"
-seta cl_casings_bronze_time 10 "bullet casings lifetime"
-seta cl_casings_ticrate 0.1 "ticrate for casings"
-seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"
-seta cl_projectiles_sloppy 1 "sloppy projectiles, may temporarily penetrate walls"
-cl_stainmaps 0
-cl_particles_smoke 1
-vid_gl20 1
-r_glsl_deluxemapping 1
-r_glsl_offsetmapping 0
-r_glsl_offsetmapping_lod 1
-r_glsl_offsetmapping_reliefmapping 0
-r_glsl_offsetmapping_scale 0.02
-
-scr_conalpha 1
-scr_conbrightness 0.2
-scr_screenshot_jpeg 1
-scr_screenshot_jpeg_quality 0.9
-
-cl_sound_wizardhit ""
-cl_sound_hknighthit ""
-cl_sound_tink1 weapons/tink1.wav
-cl_sound_ric1 weapons/ric1.wav
-cl_sound_ric2 weapons/ric2.wav
-cl_sound_ric3 weapons/ric3.wav
-cl_sound_r_exp3 ""
-
-seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
-seta cl_announcer_antispam 2 "number of seconds before an announcement of the same sound can be played again"
-seta cl_announcer_maptime 3 "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
-
-// aliases:
-alias +fire +attack
-alias -fire -attack
-alias +fire2 +button3
-alias -fire2 -button3
-alias +attack2 +button3 // old alias from Nexuiz
-alias -attack2 -button3 // old alias name from Nexuiz
-alias +crouch +button5
-alias -crouch -button5
-alias weapnext "_weapnext_${cl_weaponpriority_useforcycling}"
-alias _weapnext_0 "impulse 18"
-alias _weapnext_1 "impulse 15"
-alias _weapnext_2 "impulse 10"
-alias weaplast "impulse 11"
-alias weapprev "_weapprev_${cl_weaponpriority_useforcycling}"
-alias _weapprev_0 "impulse 19"
-alias _weapprev_1 "impulse 16"
-alias _weapprev_2 "impulse 12"
-alias weapbest "impulse 13"
-
-// experimental zoom toggle (can be in wrong state at start of a game, though)
-set _togglezoom +
-alias +zoom "set _togglezoom -; +button4"
-alias -zoom "set _togglezoom +; -button4"
-alias togglezoom "${_togglezoom}zoom"
-
-alias reload "impulse 20"
-
-// weapons
-alias weapon_group_1 "impulse 1"
-alias weapon_group_2 "impulse 2"
-alias weapon_group_3 "impulse 3"
-alias weapon_group_4 "impulse 4"
-alias weapon_group_5 "impulse 5"
-alias weapon_group_6 "impulse 6"
-alias weapon_group_7 "impulse 7"
-alias weapon_group_8 "impulse 8"
-alias weapon_group_9 "impulse 9"
-alias weapon_group_0 "impulse 14" // cycles the superweapons
-// TODO: remove after 0.8.2. Default impulse commands for 0.8.1 servers
-exec weapons.cfg
-
-cl_curl_enabled 1
-cl_curl_maxdownloads 3
-cl_curl_maxspeed 0
-cl_curl_useragent 1
-cl_curl_useragent_append "$g_xonoticversion"
-
-seta g_waypointsprite_alpha 1 "This allows the client to control transparency of the waypoint"
-seta g_waypointsprite_crosshairfadealpha 0.25 "alpha multiplier near crosshair"
-seta g_waypointsprite_crosshairfadescale 1 "scale multiplier near the crosshair"
-seta g_waypointsprite_crosshairfadedistance 150 "distance in virtual pixels from crosshair where to start fading"
-seta g_waypointsprite_distancefadealpha 1 "alpha multiplier near distance"
-seta g_waypointsprite_distancefadescale 0.7 "scale multiplier near the distance"
-seta g_waypointsprite_distancefadedistancemultiplier 0.5 "distance in map sizes from distance where to stop fading"
-set g_waypointsprite_distancealphaexponent 2
-seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
-seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
-seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
-seta g_waypointsprite_edgeoffset_bottom 0 "offset of how close the waypoint can be to the bottom edge of the screen"
-seta g_waypointsprite_edgeoffset_left 0 "offset of how close the waypoint can be to the left edge of the screen"
-seta g_waypointsprite_edgeoffset_right 0 "offset of how close the waypoint can be to the right edge of the screen"
-seta g_waypointsprite_edgeoffset_top 0 "offset of how close the waypoint can be to the top edge of the screen"
-seta g_waypointsprite_fontsize 12
-seta g_waypointsprite_itemstime 2 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn: 1 when spectating, 2 even playing in warmup stage"
-set g_waypointsprite_minscale 0.5
-set g_waypointsprite_minalpha 0.4
-set g_waypointsprite_normdistance 512
-seta g_waypointsprite_scale 1
-set g_waypointsprite_spam 0 "Debugging feature. Set to 10 and load courtfun in race mode to test."
-set g_waypointsprite_timealphaexponent 1
-seta g_waypointsprite_turrets 1 "disable turret waypoints"
-seta g_waypointsprite_turrets_maxdist 5000 "max distance for turret waypoints"
-seta g_waypointsprite_uppercase 1
-
-alias "g_waypointsprite_personal" "impulse 30"
-alias "g_waypointsprite_personal_p" "impulse 31"
-alias "g_waypointsprite_personal_d" "impulse 32"
-alias "g_waypointsprite_team_helpme" "impulse 33"
-alias "g_waypointsprite_team_here" "impulse 34"
-alias "g_waypointsprite_team_here_p" "impulse 35"
-alias "g_waypointsprite_team_here_d" "impulse 36"
-alias "g_waypointsprite_team_danger" "impulse 37"
-alias "g_waypointsprite_team_danger_p" "impulse 38"
-alias "g_waypointsprite_team_danger_d" "impulse 39"
-alias "g_waypointsprite_clear_personal" "impulse 47"
-alias "g_waypointsprite_clear" "impulse 48"
-alias "g_waypointsprite_toggle" "toggle cl_hidewaypoints"
-
-seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
-
-seta cl_damagetext "1" "Draw damage dealt where you hit the enemy"
-seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health"
-seta cl_damagetext_format_verbose 0 "{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ"
-seta cl_damagetext_format_hide_redundant 0 "hide {armor} if 0; hide {potential} and {potential_health} when same as actual"
-seta cl_damagetext_color "1 1 0" "Damage text color"
-seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
-seta cl_damagetext_size_min 10 "Damage text font size for small damage"
-seta cl_damagetext_size_min_damage 25 "How much damage is considered small"
-seta cl_damagetext_size_max 16 "Damage text font size for large damage"
-seta cl_damagetext_size_max_damage 140 "How much damage is considered large"
-seta cl_damagetext_alpha_start "1" "Damage text initial alpha"
-seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds"
-seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
-seta cl_damagetext_offset "0 -40 0" "Damage text offset"
-seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
-seta cl_damagetext_accumulate_alpha_rel "0.65" "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha"
-seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too"
-seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire"
-
-seta cl_damagetext_2d_pos "0.47 0.53 0" "2D damage text initial position (X and Y between 0 and 1)"
-seta cl_damagetext_2d_alpha_start 1 "2D damage text initial alpha"
-seta cl_damagetext_2d_alpha_lifetime 1.3 "2D damage text lifetime (alpha fading) in seconds"
-seta cl_damagetext_2d_size_lifetime 3 "2D damage text lifetime (size shrinking) in seconds"
-seta cl_damagetext_2d_velocity "-25 0 0" "2D damage text move direction (screen coordinates)"
-seta cl_damagetext_2d_overlap_offset "0 -15 0" "Offset 2D damage text by this much to prevent overlapping (screen coordinates)"
-seta cl_damagetext_2d_close_range 125 "Always use 2D damagetext for hits closer that this"
-seta cl_damagetext_2d_out_of_view 1 "Always use 2D damagetext for hits that occured off-screen"
-
-seta cl_vehicles_alarm 1 "Play an alarm sound when the vehicle you are driving is heavily damaged"
-seta cl_vehicles_hud_tactical 1
-seta cl_vehicles_hudscale 0.5
-seta cl_vehicles_notify_time 15
-seta cl_vehicles_crosshair_size 0.5
-seta cl_vehicles_crosshair_colorize 1
-
-r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
-
-exec binds-xonotic.cfg
-
-seta menu_skin "luma"
-set menu_slowmo 1
-seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
-seta menu_tooltips 1 "menu tooltips: 0 disabled, 1 enabled, 2 also shows cvar or console command (when available) changed or executed by the item"
-set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
-set menu_showboxes 0 "show item bounding boxes (debug)"
-set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list"
-set menu_force_on_disconnection 1 "force to show the menu this number of seconds after you get disconnected (0 to disable)"
-
-r_textbrightness 0.2
-r_textcontrast 0.8
-r_textshadow 0
-r_font_postprocess_blur 1
-r_font_postprocess_outline 1
-
-// good settings for these fonts
-con_chat 5
-con_chatpos -9
-con_chatsize 10
-con_chatwidth 0.6
-con_notify 0
-con_notifysize 10
-con_notifyalign 0
-con_textsize 10
-
-seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info prints"
-
-// scoreboard
-seta scoreboard_columns default
-
-// keep old scoreboard cvars for compatibility's sake
-// they've been replaced by hud_panel_scoreboard_* cvars
-// TODO remove them after a future release (0.8.2+)
-seta scoreboard_border_thickness 1 "scoreboard border thickness"
-seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
-seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
-seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
-seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
-seta scoreboard_color_bg_r 0.125 "red color component of the scoreboard background"
-seta scoreboard_color_bg_g 0.55 "green color component of the scoreboard background"
-seta scoreboard_color_bg_b 0.875 "blue color component of the scoreboard background"
-seta scoreboard_color_bg_team 0.6 "team color multiplier of the scoreboard background"
-seta scoreboard_alpha_bg 0.7 "scoreboard background alpha"
-seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
-seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
-seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
-seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
-seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
-seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
-seta scoreboard_highlight_alpha 0.08 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
-seta scoreboard_highlight_alpha_self 0.3 "self highlight alpha value"
-seta scoreboard_offset_left 0.15 "how far (by percent) the scoreboard is offset from the left screen edge"
-seta scoreboard_offset_right 0.15 "how far (by percent) the scoreboard is offset from the right screen edge"
-seta scoreboard_offset_vertical 0.05 "how far (by percent) the scoreboard is offset from the top and bottom of the screen"
-seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
-seta scoreboard_respawntime_decimals 1 "decimal places to show for the respawntime countdown display on the scoreboard"
-seta scoreboard_dynamichud 0 "apply the dynamic hud effects to the scoreboard"
-
-seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
-seta accuracy_color0 "1 0 0"
-seta accuracy_color1 "1 1 0"
-seta accuracy_color2 "0 1 0"
-
-// for menu server list (eventually make them have engine support?)
-seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
-seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
-seta menu_slist_modfilter "" // set to either: !modname or modname. modname of = means "same as we are running now".
-
-// other serverlist cvars
-seta menu_slist_categories 1
-seta menu_slist_categories_onlyifmultiple 1
-seta menu_slist_purethreshold 0
-seta menu_slist_modimpurity 0
-seta menu_slist_recommendations 3
-seta menu_slist_recommendations_maxping 150
-seta menu_slist_recommendations_minfreeslots 1
-seta menu_slist_recommendations_minhumans 0
-seta menu_slist_recommendations_purethreshold -1
-
-// serverlist category override cvars
-seta menu_slist_categories_CAT_FAVORITED_override ""
-seta menu_slist_categories_CAT_RECOMMENDED_override ""
-seta menu_slist_categories_CAT_NORMAL_override ""
-seta menu_slist_categories_CAT_SERVERS_override "CAT_NORMAL"
-seta menu_slist_categories_CAT_XPM_override ""
-seta menu_slist_categories_CAT_MODIFIED_override ""
-seta menu_slist_categories_CAT_OVERKILL_override ""
-seta menu_slist_categories_CAT_INSTAGIB_override ""
-seta menu_slist_categories_CAT_DEFRAG_override ""
-
-seta menu_weaponarena ""
-
-seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
-
-// useful keybind to maximize the chat area temporarily
-// HUD code takes care of many of these now...
-//set _backup_con_chatvars_set 0
-//alias _restore_con_chatvars_0 ""
-//alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites"
-//alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set"
-//alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites"
-//alias _backup_con_chatvars_1 ""
-//alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set"
-//alias +con_chat_maximize "_backup_con_chatvars; con_chatpos -9; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
-//alias -con_chat_maximize "_restore_con_chatvars"
-
-set _con_chat_maximized 0
-set _backup_con_chatvars_set 0
-alias _restore_con_chatvars_0 ""
-alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites"
-alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set"
-alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites"
-alias _backup_con_chatvars_1 ""
-alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set"
-alias +con_chat_maximize "_con_chat_maximized 1; _backup_con_chatvars; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
-alias -con_chat_maximize "_con_chat_maximized 0; _restore_con_chatvars"
-
-// tab completion
-set con_completion_playdemo *.dem
-set con_completion_timedemo *.dem
-set con_completion_ply *.dem
-set con_completion_tdem *.dem
-set con_completion_exec *.cfg
-set con_completion_chmap map
-set con_completion_devmap map
-set con_completion_gotomap map
-set con_completion_vmap map
-set con_completion_vnextmap map
-set con_completion_vdomap map
-set con_completion_playermodel "models/player/*.iqm"
-
-// helper
-// these non-saved engine cvars shall be saved
-alias makesaved "seta $1 \"${$1 ?}\""
-makesaved cl_maxfps_alwayssleep
-makesaved cl_port
-makesaved gl_finish
-makesaved net_slist_queriespersecond
-makesaved r_ambient
-makesaved r_drawviewmodel
-makesaved r_showsurfaces
-makesaved r_subdivisions_tolerance
-makesaved skill
-makesaved vid_gl13
-makesaved vid_gl20
-makesaved v_idlescale
-makesaved v_kicktime
-makesaved music_playlist_list0
-makesaved music_playlist_random0
-
-cl_netfps 60 // should match or be a multiple of sys_ticrate
-
-seta gl_texturecompression 0
-gl_texturecompression_color 1
-gl_texturecompression_gloss 1
-gl_texturecompression_glow 1
-gl_texturecompression_lightcubemaps 1
-gl_texturecompression_q3bsplightmaps 0
-gl_texturecompression_sky 1
-
-cl_maxfps 200
-
-seta menu_mouse_absolute 1 "use the OS mouse pointer motion for menu"
-seta menu_mouse_speed 1 "speed multiplier for the mouse in the menu (does not affect in-game aiming)"
-set menu_use_default_hostname 1
-alias sethostname "set menu_use_default_hostname 0; hostname $*"
-
-seta cl_weaponpriority "vaporizer hmg rpc vortex fireball mortar machinegun hagar rifle arc electro devastator crylink minelayer shotgun shockwave hlac tuba blaster porto seeker hook" "weapon priority list"
-seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
-seta cl_weaponpriority0 "rpc devastator mortar hagar seeker fireball" "use weapon_priority_0_prev for prev gun from this list, weapon_priority_0_best for best gun, weapon_priority_0_next for next gun. Default value: explosives"
-seta cl_weaponpriority1 "vaporizer vortex crylink hlac arc electro blaster shockwave" "use weapon_priority_1_prev for prev gun from this list, weapon_priority_1_best for best gun, weapon_priority_1_next for next gun. Default value: energy"
-seta cl_weaponpriority2 "vaporizer vortex rifle" "use weapon_priority_2_prev for prev gun from this list, weapon_priority_2_best for best gun, weapon_priority_2_next for next gun. Default value: hitscan exact"
-seta cl_weaponpriority3 "vaporizer hmg vortex rifle machinegun shotgun shockwave" "use weapon_priority_3_prev for prev gun from this list, weapon_priority_3_best for best gun, weapon_priority_3_next for next gun. Default value: hitscan all"
-seta cl_weaponpriority4 "mortar minelayer hlac hagar crylink seeker shotgun shockwave" "use weapon_priority_4_prev for prev gun from this list, weapon_priority_4_best for best gun, weapon_priority_4_next for next gun. Default value: spam weapons"
-seta cl_weaponpriority5 "blaster shockwave hook porto" "use weapon_priority_5_prev for prev gun from this list, weapon_priority_5_best for best gun, weapon_priority_5_next for next gun. Default value: weapons for moving"
-seta cl_weaponpriority6 "" "use weapon_priority_6_prev for prev gun from this list, weapon_priority_6_best for best gun, weapon_priority_6_next for next gun"
-seta cl_weaponpriority7 "" "use weapon_priority_7_prev for prev gun from this list, weapon_priority_7_best for best gun, weapon_priority_7_next for next gun"
-seta cl_weaponpriority8 "" "use weapon_priority_8_prev for prev gun from this list, weapon_priority_8_best for best gun, weapon_priority_8_next for next gun"
-seta cl_weaponpriority9 "" "use weapon_priority_9_prev for prev gun from this list, weapon_priority_9_best for best gun, weapon_priority_9_next for next gun"
-seta cl_weaponimpulsemode 0 "0: only cycle between currently usable weapons in weapon priority order; 1: cycle between all possible weapons on a key in weapon priority order"
-
-alias _gl_flashblend_update_00 "gl_flashblend 1"
-alias _gl_flashblend_update_10 "gl_flashblend 0"
-alias _gl_flashblend_update_01 "gl_flashblend 0"
-alias _gl_flashblend_update_11 "gl_flashblend 0"
-alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_showsurfaces"
-
-set cl_handicap 1 "multiplies damage received and divides damage dealt NOTE: reconnect or use 'sendcvar cl_handicap' to update the choice."
-
-seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
-
-seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway."
-
-seta cl_jetpack_jump 1 "Activate jetpack by pressing jump in the air. 0 = Disable, 1 = Stop when touching ground, 2 = Enable"
-
-seta cl_race_cptimes_showself 1 "Always show your own times as well as the current best on checkpoints in Race/CTS"
-seta cl_race_cptimes_onlyself 0 "Only show your own times on checkpoints in Race/CTS"
-
-set cl_stripcolorcodes 0 "experimental feature (notes: strips ALL color codes from messages!)"
-
-// Demo camera
-set camera_enable 0 "Enables the camera for demo playback"
-set camera_free 0 "Free camera instead of chasing the player"
-set camera_reset 0 "Resets the camera position and switch to chase mode"
-set camera_speed_roll 0.9 "Camera rotation speed"
-set camera_speed_chase 4 "Camera movement speed on the x/y/z axis while chasing the player"
-set camera_speed_free 8 "Camera movement speed on the x/y/z axis in free mode"
-set camera_speed_attenuation 10 "Camera movements attenuation factor. Bigger is smoother. Applies to mouse movements"
-set camera_mouse_threshold 0.5 "Use to ignore small mouse movements. This allows for smoother camera control"
-set camera_chase_smoothly 0 "Attenuate player movements (only in chase mode)"
-set camera_look_player 0 "Always look to the player. Mouse input is ignored in this mode"
-set camera_look_attenuation 8 "Attenuation of \"looking\" movements, only if camera_look_player is set. Bigger is smoother"
-set camera_forward_follows 1 "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking"
-
-// "Gentle mode": show no blood
-seta cl_gentle 0 "client side gentle mode, master switch for removing both gibs and messages"
-seta cl_gentle_gibs 0 "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
-seta cl_gentle_messages 0 "client side gentle mode (only replaces frag messages/centerprints)"
-seta cl_gentle_damage 0 "client side gentle mode (only replaces damage flash); when set to 1, a white flash replaces the blood image, when set to 2, a randomly colored flash is used instead"
-
-set cl_jetpack_attenuation 2 "jetpack sound attenuation"
-
-set cl_warpzone_usetrace 1 "do not touch"
-
-set cl_effects_lightningarc_simple 0
-set cl_effects_lightningarc_segmentlength 64
-set cl_effects_lightningarc_drift_start 0.45
-set cl_effects_lightningarc_drift_end 0.1
-set cl_effects_lightningarc_branchfactor_start 0.25
-set cl_effects_lightningarc_branchfactor_add 0.1
-
-set menu_updatecheck 1 "check for updates"
-set menu_updatecheck_getpacks 1 "get update packs from update server"
-
-set cl_loddistance1 1024
-set cl_loddistance2 3072
-seta cl_playerdetailreduction 4 "the higher, the less detailed player models are displayed (LOD)"
-seta cl_modeldetailreduction 1 "the higher, the less detailed certain map models are displayed (LOD)"
-
-seta cl_casings_maxcount 100 "maximum amount of shell casings (must be at least 1)"
-seta cl_gibs_maxcount 100 "maximum amount of gibs (must be at least 1)"
-
-//cl_gunalign calculator
-seta menu_cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only"
-alias _gunalign_01 "cl_gunalign 1"
-alias _gunalign_02 "cl_gunalign 2"
-alias _gunalign_03 "cl_gunalign 3"
-alias _gunalign_04 "cl_gunalign 4"
-alias _gunalign_11 "cl_gunalign 2"
-alias _gunalign_12 "cl_gunalign 1"
-alias _gunalign_13 "cl_gunalign 4"
-alias _gunalign_14 "cl_gunalign 3"
-alias _gunalign_update "_gunalign_$v_flipped$menu_cl_gunalign"
-
-set _menu_alpha "" // will be set by menu QC to the current fading of the menu, can be used by CSQC to fade items
-set _menu_initialized 0 "is 0 on first menu loading, 1 later"
-
-seta cl_noantilag 0 "turn this on if you believe antilag is bad"
-
-set cl_accuracy_data_share 0 "1 share my weapon accuracy data statistics with other players, 0 keep my weapon accuracy data statistics hidden"
-set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the end of the match"
-
-set developer_csqcentities 0 "csqc entity spam"
-
-seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
-seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); set it to 2 to enable it even in teamplay (only when there is exactly one enemy team)"
-seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
-seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
-seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
-seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce perceived lag"
-seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
-
-set debugdraw 0
-set debugdraw_filter ""
-set debugdraw_filterout ""
-set debugtrace 0
-
-// FIXME remove this when the engine feature FINALLY MAYBE works
-r_glsl_skeletal 0
-
-// animation tuning
-set cl_lerpanim_maxdelta_framegroups 0.05 // must be faster than fastest weapon refire
-set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server controlled anim (e.g. animinfo stuff)
-
-// autodemo deleting
-seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos"
-
-// freeze camera
-set cl_lockview 0 "when 1, the camera does not move any more"
-
-// we now use mastervolume
-volume 1
-
-// sucks less than the old one
-cl_decals_newsystem 1
-
-scr_conalpha 1
-scr_conalpha2factor 0.3
-scr_conalpha3factor 1
-scr_conalphafactor 0.8
-scr_conbrightness 0.35
-scr_conforcewhiledisconnected 1
-scr_conscroll2_x 0.11
-scr_conscroll2_y 0.2
-scr_conscroll3_x 0
-scr_conscroll3_y 0
-scr_conscroll_x -0.1
-scr_conscroll_y -0.3
-
-scr_conforcewhiledisconnected 0
-scr_infobar_height 12
-
-// DP cannot properly detect this, so rather turn off the detection
-r_texture_dds_load_alphamode 2
-r_texture_dds_swdecode 1 // SW decode to quarter res if we want to load DDS but don't support the extension for it
-r_texture_dds_load_logfailure 0 // this engine feature SUCKS
-set vid_netwmfullscreen 0 // doesn't support non-native res
-
-// particles optimization
-r_drawparticles_nearclip_min 8
-r_drawparticles_nearclip_max 16
-
-r_cullentities_trace 0
-
-// exact gloss looks better, e.g. on g-23
-r_shadow_glossexact 1
-r_shadow_glossintensity 1
-
-// use fake light if map has no lightmaps
-r_fakelight 1
-
-r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
-r_water_refractdistort 0.019
-
-set cl_rainsnow_maxdrawdist 2048
-
-// equalize looks better than fullbright
-r_equalize_entities_fullbright 1
-
-// safe font defaults
-r_font_hinting 1
-r_font_disable_freetype 0
-r_font_size_snapping 4
-
-// database management
-set cl_db_saveasdump 0 "write client.db in dump format (loads slower, easier to read/parse)"
-
-// uid2name
-seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)"
-seta cl_allow_uidtracking 1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid tracking (allows associating your data with your player ID)"
-// FIXME set to -1 before release, once we have a dialog for this!
-
-// polygonoffset for submodel SUCKS SUCKS SUCKS (only a hack for quake1, we don't need that)
-r_polygonoffset_submodel_offset 0
-r_polygonoffset_submodel_factor 0
-// decals: need a higher polygonoffset than default to not compete with _decal surfaces too much
-r_polygonoffset_decals_offset -28
-r_polygonoffset_decals_factor 0
-
-// loading screen
-scr_loadingscreen_background 0
-scr_loadingscreen_barcolor "0 0.5 1"
-scr_loadingscreen_barheight 12
-scr_loadingscreen_count 1
-scr_loadingscreen_firstforstartup 1
-scr_loadingscreen_scale 999
-scr_loadingscreen_scale_base 1
-scr_loadingscreen_scale_limit 2
-
-// other config files
-exec effects-normal.cfg
-exec crosshairs.cfg
-exec gamemodes-client.cfg
-exec notifications.cfg
-
-seta cl_physics "default" "client selected physics set"
-
-// hud cvar descriptions and common settings
-exec _hud_common.cfg
-exec _hud_descriptions.cfg
-// exec the default skin config
-// please add any new cvars into the hud_save script in qcsrc/client/hud_config.qc for consistency
-exec hud_luma.cfg
-
-// enable menu syncing - must be after files that call menu_sync on startup - see alias menu_sync ""
-alias menu_sync "menu_cmd sync"
-
-seta cl_items_nofade 0
-seta cl_animate_items 1
-seta cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
-seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
-seta cl_simple_items 0 "enable simple items (if server allows)"
-set cl_simpleitems_postfix "_luma" "posfix to add fo model name when simple items are enabled"
-set cl_fullbright_items 0 "enable fullbright items (if server allows, controlled by g_fullbrightitems)"
-set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0"
-set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
-
-seta cl_showspectators 0 "Show who's spectating you if server has sv_showspectators enabled"
-
-// Facility for config.cfg use ONLY.
-// Interpreted in post-config.cfg.
-seta menu_forced_saved_cvars "" "These cvars will always be saved, despite engine/Xonotic cvar saving status"
-set menu_reverted_nonsaved_cvars "" "These cvars are currently marked as saved in the flags, but have been reverted and won't stay saved. INTERNAL USE ONLY."
+++ /dev/null
-// ==============
-// Overkill Mod
-// ==============
-
-exec defaultServer.cfg
-exec balance-overkill.cfg
-exec physicsOverkill.cfg
-
-// general gameplay
-set g_overkill 1
-
-// hack - eventually, we should be able to choose overkill models in menu like for vanilla
-set sv_defaultcharacter 1
-set sv_defaultplayermodel "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
-set sv_defaultplayermodel_red "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
-set sv_defaultplayermodel_blue "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
-set sv_defaultplayermodel_yellow "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
-set sv_defaultplayermodel_pink "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
-
-set g_respawn_ghosts 0
-
-set g_nades 1
-set g_nades_nade_small 1
-set g_nades_spread 0
-set g_nades_nade_refire 10
-set g_nades_nade_newton_style 2
-
-set g_dodging 1
-set sv_dodging_wall_dodging 1
-
-set g_spawn_near_teammate "!g_assault !g_freezetag"
-set g_spawn_near_teammate_ignore_spawnpoint 1
-set g_spawnshieldtime 0.5
-set g_respawn_delay_forced 2
-
-set g_lms_start_armor 100
+++ /dev/null
-// this should reset most cvars and aliases affecting gameplay to their defaults
-// note that it doesn't reset all server cvars,
-// some are shared with the client and so are left in defaultXonotic.cfg
-
-
-// taunts and voices
-set sv_taunt 1 "allow taunts on the server"
-set sv_autotaunt 1 "allow autotaunts on the server"
-
-// server settings
-hostname "Xonotic $g_xonoticversion Server"
-set sv_mapchange_delay 5
-set minplayers 0 "number of players playing at the same time (if not enough real players are there the remaining slots are filled with bots)"
-
-// restart server if all players hit "ready"-button
-set sv_ready_restart 0 "allow a map to be restarted once all players pressed the \"ready\" button"
-set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
-set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
-
-//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
-set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
-
-set g_maxplayers 0 "maximum number of players allowed to play at the same time, set to 0 to allow all players to join the game"
-set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectators\" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked"
-
-// tournament mod
-set g_warmup 0 "split the game into a warmup- and match-stage"
-set g_warmup_limit 0 "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
-set g_warmup_allow_timeout 0 "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
-set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
-set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
-
-set g_chat_nospectators 0 "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
-set sv_vote_nospectators 0 "only players can call a vote (thus spectators and observers can't call a vote): 0 = all people can vote, 1 = spectators can vote in warmup stage, 2 = only players can vote (no exceptions)."
-
-alias g_tourney "g_tourney_$1"
-alias g_tourney_1 "g_warmup 1; g_chat_nospectators 2; sv_vote_nospectators 1"
-alias g_tourney_0 "g_warmup 0; g_chat_nospectators 0; sv_vote_nospectators 0"
-
-set sv_timeout 0 "allow a player to call a timeout, this will pause the game for some time"
-set sv_timeout_length 120 "how long the game will be paused at max, in seconds"
-set sv_timeout_number 2 "how many timeouts one player is allowed to call (gets reset after a restart)"
-set sv_timeout_leadtime 4 "how long the players will be informed that a timeout was called before it starts, in seconds"
-set sv_timeout_resumetime 3 "how long the remaining timeout-time will be after a player called the timein command"
-
-set g_allow_oldvortexbeam 0 "If enabled, clients are allowed to use old v2.3 Vortex beam"
-
-set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
-set g_telefrags_teamplay 1 "never telefrag team mates"
-set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
-set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
-
-set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
-set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
-set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
-
-set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
-
-// use default physics
-set sv_friction_on_land 0
-set sv_friction_slick 0.5
-
-set sv_slick_applygravity 0
-
-set sv_aircontrol_backwards 0 "apply forward aircontrol options to backward movement"
-set sv_aircontrol_sidewards 0 "apply forward aircontrol options to sideward movement"
-
-set sv_player_viewoffset "0 0 35" "view offset of the player model"
-set sv_player_mins "-16 -16 -24" "playermodel mins"
-set sv_player_maxs "16 16 45" "playermodel maxs"
-set sv_player_crouch_viewoffset "0 0 20" "view offset of the player model when crouched"
-set sv_player_crouch_mins "-16 -16 -24" "mins of a crouched playermodel"
-set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel"
-
-set sv_doublejump 0 "allow Quake 2-style double jumps"
-set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
-set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
-set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
-set sv_track_canjump 0 "track if the player released the jump key between 2 jumps to decide if they are able to jump or not"
-set sv_jumpvelocity_crouch 0 "jump height while crouching, set to 0 to use regular jump height"
-
-set sv_precacheplayermodels 1
-set sv_precacheweapons 0
-set sv_precacheitems 0
-set sv_spectator_speed_multiplier 1.5
-set sv_spectator_speed_multiplier_min 1
-set sv_spectator_speed_multiplier_max 5
-set sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
-set sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
-set sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
-set sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
-set sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overridden by :<skinnumber> suffix in sv_defaultplayermodel"
-set sv_defaultplayermodel_red "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_red 0
-set sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_blue 0
-set sv_defaultplayermodel_yellow "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_yellow 0
-set sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_pink 0
-set sv_defaultplayercolors "" "set to 16*shirt+pants to force a color, note: it does NOT depend on defaultcharacter! Set to \"\" to disable"
-set sv_autoscreenshot 0 "if set to 1, the server forces all clients to create a local screenshot once the map ended"
-net_messagetimeout 30
-net_connecttimeout 30
-sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
-
-set sv_shownames_cull_distance 2500 "distance after which to not send origin/health/armor of another player"
-
-set bot_config_file bots.txt "Name and path of the bot configuration file"
-set bot_number 0 "Minimum number of bots"
-set bot_usemodelnames 0 "Use player model names for bot names"
-set bot_nofire 0 "When set, bots never fire. Mainly for testing in g_waypointeditor mode"
-set bot_prefix [BOT] "Prefix in front of the bot names"
-set bot_suffix "" "Suffix behind the bot names"
-set skill_auto 0 "when 1, \"skill\" gets adjusted to match the best player on the map"
-set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
-set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
-set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
-// general bot AI cvars
-set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 7 "How often a new objective is chosen"
-set bot_ai_strategyinterval_movingtarget 5.5 "How often a new objective is chosen when current objective can move"
-set bot_ai_enemydetectioninterval 2 "How often bots pick a new target"
-set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
-set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
-set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
-set bot_ai_dangerdetectioninterval 0.25 "How often scan for waypoints with dangers near"
-set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
-set bot_ai_aimskill_blendrate 2 "How much correction will be applied to the aiming angle"
-set bot_ai_aimskill_fixedrate 15
-set bot_ai_aimskill_firetolerance_distdegrees 100
-set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
-set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
-set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
-set bot_ai_keyboard_distance 250 "Keyboard emulation is disabled after this distance to the goal"
-set bot_ai_keyboard_threshold 0.57
-set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
-set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
-set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far "vaporizer vortex rifle electro devastator mortar hagar hlac crylink blaster machinegun fireball seeker shotgun shockwave tuba minelayer" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid "vaporizer devastator vortex fireball seeker mortar electro machinegun arc crylink hlac hagar shotgun shockwave blaster rifle tuba minelayer" "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "vaporizer vortex shotgun shockwave machinegun arc hlac tuba seeker hagar crylink mortar electro devastator blaster fireball rifle minelayer" "Desired weapons for close distances ordered by priority"
-set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
-set bot_ai_weapon_combo_threshold 0.4 "Try to make a combo N seconds after the last attack"
-set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
-set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds"
-set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this value will perform the \"bunnyhop\" technique"
-set bot_ai_bunnyhop_startdistance 200 "Run to goals located further than this distance"
-set bot_ai_bunnyhop_stopdistance 300 "Stop jumping after reaching this distance to the goal"
-set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
-set bot_god 0 "god mode for bots"
-set bot_ai_navigation_jetpack 0 "Enable bots to navigate maps using the jetpack"
-set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
-// Better don't touch these, there are hard to tweak!
-set bot_ai_aimskill_order_mix_1st 0.01 "Amount of the 1st filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_2nd 0.1 "Amount of the 2nd filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_3th 0.01 "Amount of the 3th filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_4th 0.05 "Amount of the 4th filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_5th 0.01 "Amount of the 5th filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_filter_1st 0.4 "Position filter"
-set bot_ai_aimskill_order_filter_2nd 0.4 "Movement filter"
-set bot_ai_aimskill_order_filter_3th 0.2 "Acceleration filter"
-set bot_ai_aimskill_order_filter_4th 0.4 "Position prediction filter. Used rarely"
-set bot_ai_aimskill_order_filter_5th 0.5 "Movement prediction filter. Used rarely"
-set bot_ai_timeitems 1 "allow skilled bots to run to important items a little time before respawning"
-set bot_ai_timeitems_minrespawndelay 25 "bots run to items with this minimum respawn delay before respawning"
-
-// waypoint editor enable
-set g_waypointeditor 0
-set g_waypointeditor_auto 0 "Automatically create waypoints for bots while playing; BEWARE, this currently creates too many of them"
-set g_waypointeditor_symmetrical 0 "Enable symmetrical editing of waypoints on symmetrical CTF maps (NOTE: it assumes that the map is perfectly symmetrical). 1: automatically determine origin of symmetry; -1: use custom origin (g_waypointeditor_symmetrical_origin); 2: automatically determine axis of symmetry; -2: use custom axis (g_waypointeditor_symmetrical_axis)"
-set g_waypointeditor_symmetrical_origin "0 0" "Custom origin of symmetry (x y)"
-set g_waypointeditor_symmetrical_order 0 "if >= 2 apply rotational symmetry (around origin of symmetry) of this order, otherwise apply autodetected order of symmetry"
-set g_waypointeditor_symmetrical_axis "0 0" "Custom axis of symmetry (m q parameters of y = mx + q)"
-set bot_ignore_bots 0 "When set, bots don't shoot at other bots"
-set bot_join_empty 0 "When set, bots also play if no player has joined the server"
-set bot_vs_human 0 "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game"
-
-set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
-set g_spawnshield_blockdamage 1 "how much spawn shield protects you from damage (1 = full protection)"
-set g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
-set g_antilag_nudge 0 "don't touch"
-set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
-set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
-set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
-set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
-set g_weapon_stay 0 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
-set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
-set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
-set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
-set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
-set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"
-set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening"
-set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly"
-set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
-set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)"
-set g_weaponarena_random_with_blaster "1" "additionally, always provide the blaster in random weapon arena games"
-set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid"
-set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once <g_respawn_delay> seconds are over"
-set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)"
-set g_fullbrightitems 0 "brightens up items"
-set g_nodepthtestplayers 0 "disables depth testing on players"
-set g_nodepthtestitems 0 "disables depth testing on items"
-set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"
-set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"
-set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"
-set g_maplist_mostrecent_count 3 "number of most recent maps that are blocked from being played again"
-set g_maplist_index 0 "this is used internally for saving position in maplist cycle"
-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_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"
-
-set g_grab_range 200 "distance at which dragable objects can be grabbed"
-
-set g_cloaked 0 "display all players mostly invisible"
-set g_player_alpha 1
-set g_player_brightness 0 "set to 2 for brighter players"
-set g_balance_cloaked_alpha 0.25
-
-set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
-set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
-
-set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
-set g_grappling_hook_useammo 0 "use ammunition with the off-hand grappling hook"
-
-set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
-set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
-set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
-// respawn delay
-set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
-set g_respawn_delay_small_count 0 "Player count per team for g_respawn_delay_small. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
-set g_respawn_delay_large 2 "large game number of seconds you have to wait before you can respawn again"
-set g_respawn_delay_large_count 8 "Player count per team for g_respawn_delay_large. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
-set g_respawn_delay_max 5 "number of seconds you can wait before you're forced to respawn (only effective with g_forced_respawn 1)"
-set g_respawn_delay_forced 0 "enforce regular respawn delay (prevent gamemode specific respawn delays)"
-set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
-
-// overtime
-set timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
-set timelimit_overtimes 0 "how many overtimes to add at max"
-set timelimit_suddendeath 5 "number of minutes suddendeath mode lasts after all overtimes were added and still no winner was found"
-
-// common team values
-set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
-set g_tdm_on_dm_maps 0 "when this is set, all DM maps automatically support TDM"
-
-set teamplay_mode 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the cvars g_mirrordamage*, g_friendlyfire* and g_teamdamage*"
-set g_mirrordamage 0.7 "for teamplay_mode 4: mirror damage factor"
-set g_mirrordamage_virtual 1 "for teamplay_mode 4: do not actually apply mirror damage, just show graphics effect for it"
-set g_mirrordamage_onlyweapons 0 "for teamplay_mode 4: only apply mirror damage if the attack was from a weapon"
-set g_friendlyfire 0.5 "for teamplay_mode 4: friendly fire factor"
-set g_friendlyfire_virtual 1 "for teamplay_mode 4: do not actually apply friendly fire, just show graphics effect for it"
-set g_friendlyfire_virtual_force 1 "for teamplay_mode 4: apply force even though damage was made virtual only"
-set g_teamdamage_threshold 40 "for teamplay_mode 4: threshold over which to apply mirror damage"
-set g_teamdamage_resetspeed 20 "for teamplay_mode 4: how fast player's teamdamage count decreases"
-
-set g_balance_teams 1 "automatically balance out players entering instead of asking them for their preferred team"
-set g_balance_teams_prevent_imbalance 1 "prevent players from changing to larger teams"
-set g_balance_teams_scorefactor 0.25 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)"
-set g_changeteam_banned 0 "not allowed to change team"
-set g_changeteam_fragtransfer 0 "% of frags you get to keep when you change teams (rounded down)"
-
-set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"
-
-set g_bloodloss 0 "amount of health below which blood loss occurs"
-
-set g_footsteps 1 "serverside footstep sounds"
-
-set g_throughfloor_debug 0 "enable debugging messages for throughfloor calculations"
-set g_throughfloor_damage_max_stddev 2 "Maximum standard deviation for splash damage"
-set g_throughfloor_force_max_stddev 10 "Maximum standard deviation for splash force"
-set g_throughfloor_min_steps_player 1 "Minimum number of steps for splash damage"
-set g_throughfloor_min_steps_other 1 "Minimum number of steps for splash damage"
-set g_throughfloor_max_steps_player 100 "Maximum number of steps for splash damage"
-set g_throughfloor_max_steps_other 10 "Maximum number of steps for splash damage"
-// note: for damage X, 0.25 * ((1-g_throughfloor_damage)*X / g_throughfloor_damage_max_stddev)^2 steps are used
-// for these numbers:
-// damage 25: 3
-// damage 60: 15
-// damage 80: 25
-// damage 200: 157
-// force 250: 10
-// force 300: 15
-// force 600: 57
-
-sv_maxvelocity 1000000000
-sv_sound_land ""
-sv_sound_watersplash ""
-
-// startmap_dm is used when running with the -listen or -dedicated commandline options
-set serverconfig server.cfg
-alias loadconfig "cvar_resettodefaults_saveonly; exec ${* !}"
-set _sv_init 0
-alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
-
-// score log
-set sv_logscores_console 0 "print scores to server console"
-set sv_logscores_file 0 "print scores to file"
-set sv_logscores_filename scores.log "filename"
-set sv_logscores_bots 0 "exclude bots by default"
-
-// spam (frag/capture) log
-set sv_eventlog 0 "the master switch for efficiency reasons"
-set sv_eventlog_console 1
-set sv_eventlog_files 0
-set sv_eventlog_files_timestamps 1
-set sv_eventlog_files_counter 0
-set sv_eventlog_files_nameprefix xonotic
-set sv_eventlog_files_namesuffix .log
-
-set nextmap "" "override the maplist when switching to the next map"
-set lastlevel ""
-set quit_when_empty 0 "set to 1, then the server exits when the next level would start but is empty"
-set quit_and_redirect "" "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
-set quit_and_redirect_timer 1.5 "set to number of seconds after quit before performing the connect operation of quit_and_redirect"
-
-// Green's fullbright skins, updated by Samual
-alias sv_fbskin_unique "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors \"\""
-alias sv_fbskin_green "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 51"
-alias sv_fbskin_red "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 68"
-alias sv_fbskin_orange "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 238"
-alias sv_fbskin_rainbow "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 95"
-
-alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
-
-set sv_servermodelsonly 1
-
-sv_curl_defaulturl "http://www.xonotic.org/contentdownload/getmap.php?file="
-set sv_curl_serverpackages_auto 1 "automatically add packs with *.serverpackage files to sv_curl_serverpackages"
-
-set sv_motd ""
-
-set g_waypoints_for_items 0 "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
-
-set g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
-set g_maplist_votable_keeptwotime 15 "show only 2 options after this amount of time during map vote screen"
-set g_maplist_votable_timeout 30 "timeout for the map voting; must be below 50 seconds!"
-set g_maplist_votable_suggestions 2
-set g_maplist_votable_suggestions_override_mostrecent 0
-set g_maplist_votable_nodetail 1 "nodetail only shows total count instead of all vote counts per map, so votes don't influence others that much"
-set g_maplist_votable_abstain 0 "when 1, you can abstain from your vote"
-set g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
-
-set sv_vote_gametype 0 "show a vote screen for gametypes before map vote screen"
-set sv_vote_gametype_keeptwotime 10 "show only 2 options after this amount of time during gametype vote screen"
-set sv_vote_gametype_options "dm ctf ca lms tdm ft"
-set sv_vote_gametype_timeout 20
-set sv_vote_gametype_default_current 1 "Keep the current gametype if no one votes"
-
-set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax 2 "normal chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst 2 "normal chat: allow bursts of so many chat lines"
-set g_chat_flood_spl_team 1 "team chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax_team 2 "team chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst_team 2 "team chat: allow bursts of so many chat lines"
-set g_chat_flood_spl_tell 1 "private chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax_tell 2 "private chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst_tell 2 "private chat: allow bursts of so many chat lines"
-set g_chat_flood_notify_flooder 1 "when 0, the flooder still can see his own message"
-set g_chat_teamcolors 0 "colorize nicknames in team color for chat"
-set g_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players."
-set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
-set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
-set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking"
-set g_nick_flood_penalty_red 30 "number of changes to allow before totally disorienting the player"
-
-set sv_waypointsprite_deployed_lifetime 10
-set sv_waypointsprite_deadlifetime 1
-set sv_waypointsprite_limitedrange 5120
-
-set sv_itemstime 1 "enable networking of time left until respawn for items such as mega health/armor and powerups"
-
-set g_ban_default_bantime 5400 "90 minutes"
-set g_ban_default_masksize 3 "masksize 0 means banning by UID only, 1 means banning by /8 (IPv6: /32) network, 2 means banning by /16 (IPv6: /48) network, 3 means banning by /24 (IPv6: /56) network, 4 means banning by single IP (IPv6: /64 network)"
-set g_banned_list "" "format: IP remainingtime IP remainingtime ..."
-set g_banned_list_idmode "1" "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)"
-
-// useful vote aliases
-set timelimit_increment 5
-set timelimit_decrement 5
-set timelimit_min 5
-set timelimit_max 60
-
-sv_gameplayfix_delayprojectiles 0
-sv_gameplayfix_q2airaccelerate 1
-sv_gameplayfix_stepmultipletimes 1
-
-// delay for "kill" to prevent abuse
-set g_balance_kill_delay 2
-set g_balance_kill_antispam 5
-
-// this feature is currently buggy in the engine (it appears to PREVENT any dropping in lots of maps, leading to weirdly aligned entities, and in some cases even CAUSES them to drop through solid, like in facing worlds nex)
-sv_gameplayfix_droptofloorstartsolid 0
-
-set sv_foginterval 1 "force enable fog in regular intervals"
-
-set sv_maxidle 0 "kick players idle for more than this amount of time in seconds"
-set sv_maxidle_spectatorsareidle 0 "when sv_maxidle is not 0, assume spectators are idle too"
-set sv_maxidle_slots 0 "when not 0, only kick idlers when this many or less player slots are available"
-set sv_maxidle_slots_countbots 1 "count bots as player slots"
-
-sv_allowdownloads_inarchive 1 // for csprogs.dat
-sv_allowdownloads 0 // download protocol is evil
-
-set g_jump_grunt 0 "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
-
-set g_maplist_allow_hidden 0 "allow hidden maps to be, e.g., voted for and in the maplist"
-set g_maplist_allow_frustrating 0 "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
-
-set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
-
-set g_ban_sync_uri "" "sync using this ban list provider (empty string to disable)"
-set g_ban_sync_interval 5 "sync every 5 minutes"
-set g_ban_sync_trusted_servers "" "request ban lists from these xonotic servers (do not include your own server there, or unbanning may fail)"
-set g_ban_sync_timeout 45 "time out in seconds for the ban sync requests"
-set g_ban_sync_trusted_servers_verify 0 "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
-
-set g_showweaponspawns 1 "1: display waypoints for weapon spawns found on the map when a weapon key is pressed and the weapon is not owned; 2: for dropped weapons too; 3: for all the weapons sharing the same impulse"
-
-// ballistics use physical units, but qu based
-// Quake-Newton: 1 qN = 1 qu * 1 g / 1 s^2
-// Quake-Joule: 1 qJ = 1 qN * 1 qu
-// Quake-Pascal: 1 qPa = 1 qN / 1 qu^2
-
-set g_ballistics_mindistance 2 // enable ballistics starting from 2 qu
-set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls
-set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls
-set g_ballistics_penetrate_clips 0 "allow ballistics to pass through weapon clips"
-
-sv_status_show_qcstatus 1 "Xonotic uses this field instead of frags"
-set g_full_getstatus_responses 0 "this currently breaks qstat"
-
-// "Gentle mode": show no blood
-set sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages"
-
-set g_jetpack 0 "Jetpack mutator"
-
-set g_hitplots 0 "when set to 1, hitplots are stored by the server to provide a means of proving that a triggerbot was used"
-set g_hitplots_individuals "" "the individuals, by IP, that should have their hitplots recorded"
-
-set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
-set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
-
-set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
-
-set g_triggerimpulse_accel_power 1 "trigger_impulse accelerator power (applied BEFORE the multiplier)"
-set g_triggerimpulse_accel_multiplier 1 "trigger_impulse accelerator multiplier (applied AFTER the power)"
-set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field multiplier"
-set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
-
-set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
-
-set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
-
-set g_mapinfo_allow_unsupported_modes_and_let_stuff_break "0" "set to 1 to be able to force game types using g_ cvars even if the map does not support them"
-set g_mutatormsg "" "mutator message"
-
-set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
-set loddebug 0 "force this LOD level"
-set speedmeter 0 "print landing speeds"
-set waypoint_benchmark 0 "quit after waypoint loading to benchmark bot navigation code"
-set g_debug_bot_commands 0 "print scripted bot commands before executing"
-
-// weapon accuracy stats
-set sv_accuracy_data_share 1 "1 send weapon accuracy data statistics to spectating clients, depends on cl_accuracy_data_share"
-set sv_accuracy_data_send 1 "1 send weapon accuracy data statistics and improved score info to all the clients at the end of the match, depends on cl_accuracy_data_receive, 0 send the current 'player has won' to all the clients"
-
-// debug
-set _independent_players 0 "DO NOT TOUCH"
-set _notarget 0 "NO, REALLY, DON'T"
-
-// otherwise, antilag breaks
-sv_gameplayfix_consistentplayerprethink 1
-
-// improve some minor details
-sv_gameplayfix_gravityunaffectedbyticrate 1
-sv_gameplayfix_nogravityonground 1
-
-set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
-
-set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
-
-set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"
-
-// sv_cullentities_trace is 1, so the client doesn't have to
-sv_cullentities_trace 1
-
-// less "lagging" of other players, but also less PL tolerant... let's try this
-sv_clmovement_inputtimeout 0.066 // slightly less than 2 frames, so only one frame can be compensated
-
-// strength sound settings
-set sv_strengthsound_antispam_time 0.1 "minimum distance of strength sounds"
-set sv_strengthsound_antispam_refire_threshold 0.04 "apply minimum distance only if refire of the gun is smaller than this"
-
-// database management
-set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
-
-// allow fullbright
-set sv_allow_fullbright 1 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
-
-// auto-teams (team selection by player ID)
-// any player not listed is forced to spectate
-set g_forced_team_red "" "list of player IDs for red team"
-set g_forced_team_blue "" "list of player IDs for blue team"
-set g_forced_team_yellow "" "list of player IDs for yellow team"
-set g_forced_team_pink "" "list of player IDs for pink team"
-set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
-
-// nice alias to set up a match
-// example: g_forced_team_matchsetup stormkeep "mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM=" "BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ="
-// will set up a match on stormkeep where mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM= and BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ= play against each other
-alias g_forced_team_matchsetup "map $1; settemp g_forced_team_red \"$2\"; settemp g_forced_team_blue \"$3\"; settemp g_forced_team_yellow \"$4\"; settemp g_forced_team_pink \"$5\"; settemp g_forced_team_otherwise spectate"
-
-// frozen
-set g_frozen_revive_falldamage 0 "Enable reviving from this amount of fall damage"
-set g_frozen_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
-set g_frozen_damage_trigger 1 "if 1, frozen players falling into the void will die instead of teleporting to spawn"
-set g_frozen_force 0.6 "How much to multiply the force on a frozen player with"
-
-// player statistics
-set g_playerstats_gamereport_uri "http://stats.xonotic.org/stats/submit" "Output player statistics information to either: URL (with ://), console (with a dash like this: -), or supply a filename to output to data directory."
-set g_playerstats_gamereport_ladder ""
-set g_playerstats_playerbasic_uri "http://stats.xonotic.org"
-set g_playerstats_playerdetail_uri "http://stats.xonotic.org/player/me"
-set g_playerstats_playerdetail_autoupdatetime 1800 // automatically update every 30 minutes anyway
-
-// autoscreenshots
-set g_max_info_autoscreenshot 3 "how many info_autoscreenshot entities are allowed"
-
-// mod names for server browser
-// note: the lowest of these that mismatches default is used
-set g_mod_physics "" "Current physics config name"
-set g_mod_balance "" "Current balance config name"
-set g_mod_config "" "Current config mod name"
-
-// other config files
-exec balance-xonotic.cfg
-exec physicsX.cfg
-exec turrets.cfg
-exec gamemodes-server.cfg
-exec mutators.cfg
-exec monsters.cfg
-exec minigames.cfg
-exec physics.cfg
-
-set sv_join_notices ""
-set sv_join_notices_time 15
-
-set sv_simple_items 1 "allow or forbid client use of simple items"
-
-set sv_showspectators 1 "Show who's spectating who in the player info panel when client has cl_showspectators on. Shouldn't be used on competitive servers, also disable when watching a suspected cheater"
-
-set sv_damagetext 2 "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage"
+++ /dev/null
-// ================
-// Xonotic Defrag
-// ================
-
-exec defaultServer.cfg
-exec balance-xdf.cfg
-exec physicsXDF.cfg
-
-// general gameplay
-set g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
-set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
-set g_balance_kill_antispam 0
-set g_forced_respawn 1
-// g_playerclip_collisions 0 // do not check playerclips
-set g_powerups 0 // set to -1 or patch xonotic
-set g_spawnpoints_auto_move_out_of_solid 1
-set g_start_delay 3
-set g_use_ammunition 0 "if set to 0 all weapons have unlimited ammunition"
-set g_weapon_stay 1 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
-set teamplay_mode 2 // friendly fire and self damage
-set sv_vote_nospectators 1
-set timelimit_override 20
-set g_buffs_cooldown_respawn 0.1
-
-// game mode settings
-set g_cts_finish_kill_delay 2
-set g_cts_respawn_delay 0
-set g_cts_selfdamage 0
+++ /dev/null
-// ==================
-// Xonotic Pro-Mode
-// ==================
-
-exec defaultServer.cfg
-exec balance-xpm.cfg
-
-// general gameplay
-set g_norecoil 1
-set g_shootfromeye 1 // hit where you point at with the crosshair (promoders don't care about ugliness)
-set g_balance_kill_antispam 0
-set g_forced_respawn 1
-set teamplay_mode 2 // friendly fire and self damage
-set sv_vote_nospectators 1
-set g_chat_nospectators 2
-set g_warmup 1
-set g_balance_teams 0
-set g_spawnshieldtime 0
-set g_spawn_furthest 1
-set sv_autoscreenshot 1
-set sv_ready_restart 1
-set sv_ready_restart_after_countdown 1
-set g_monsters 0
-set g_turrets 0
-set g_vehicles 0
-set sv_showspectators 0
+++ /dev/null
-// Xonotic version (formatted for machines)
-// used to determine if a client version is compatible
-// this doesn't have to be bumped with every release
-// bump when clients become incompatible or any other perfectly good reason
-// (e.g. game data incompatibility, engine version incompatibility, etc
-// note: this automatically filters the server browser, clients of the new
-// version won't see old servers, and clients of the old version won't see new
-// servers either
-//
-// e.g. Xonotic 1.5.1 RC1 will be 15101
-set g_xonoticversion git "Xonotic version (formatted for humans)"
-
-gameversion 802 // 0.8.2
-gameversion_min 0 // git builds see all versions
-gameversion_max 65535 // git builds see all versions
-
-// compatibility guideline:
-// version a.b.c = a0b0c
-// gameversion_min = a0(b-1)00 // show servers of the previous "line"
-// gameversion_max = a0(b+1)99 // show servers of the next "line"
-// so, for a given gameversion, _min and _max calculate as follows:
-// gameversion_min = (gameversion / 100) * 100 - 100
-// gameversion_max = (gameversion / 100) * 100 + 199
-
-seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
-
-exec defaultClient.cfg
-exec defaultServer.cfg
-
-set ekg 0 "Throw huge amounts of gibs"
-
-_cl_playermodel "models/player/erebus.iqm"
-
-locs_enable 0
-pausable 0
-set samelevel 0 "when 1, always play the same level over and over again"
-
-fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
-
-// singleplayer campaign
-set g_campaign 0
-set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
-seta g_campaign_name "xonoticbeta"
-seta g_campaign_skill -1 // -2 easy -1 medium 0 hard
-
-alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
-alias singleplayer_continue "set scmenu_campaign_goto -1"
-alias singleplayer_levellist "set scmenu_campaign_dump 1; togglemenu; wait; togglemenu"
-
-// campaign internal, set when loading a campaign map1G
-set _campaign_index ""
-set _campaign_name ""
-set _campaign_testrun 0 "To verify the campaign file, set this to 1, then start the first campaign level from the menu. If you end up in the menu again, it's good, if you get a QC crash, it's bad."
-
-// used by both server and menu to maintain the available list of maps
-seta g_maplist "" "the list of maps to be cycled among (is autogenerated if empty)"
-
-// we must change its default from 1.0 to 1 to be consistent with menuqc
-set slowmo 1
-
-// ticrate
-//sys_ticrate 0.0166667 // 60fps. This would be ideal, but kills home routers.
-sys_ticrate 0.0333333 // Use 30fps instead.
-
-// Audio track names (for old-style "cd loop NUMBER" usage)
-set _cdtrack_first "1"
-alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\""
-alias _cdtrack_1 "g_cdtracks_remaplist \"$1\"; set _cdtrack_first 0"
-alias _cdtrack "_cdtrack_$_cdtrack_first $2"
-set g_cdtracks_remaplist ""
-exec cdtracks.cfg
-unset _cdtrack_first
-unalias _cdtrack_0
-unalias _cdtrack_1
-unalias _cdtrack
-
-cd remap $g_cdtracks_remaplist
-set sv_intermission_cdtrack ""
-
-set g_cdtracks_dontusebydefault "rising-of-the-phoenix"
-seta menu_cdtrack "rising-of-the-phoenix"
-
-// these entities are not referenced by anything directly, they just represent
-// teams and are found by find() when needed
-prvm_leaktest_ignore_classnames "ctf_team dom_team tdm_team"
-prvm_backtraceforwarnings 1
-
-set _urllib_nextslot 0 "temp variable"
-
-set g_debug_defaultsounds 0 "always use default sounds"
-
-// define some engine cvars that we need even on dedicated server
-set r_showbboxes 0
-
-// support Q1BSP maps
-mod_q1bsp_polygoncollisions 1
-
-// match q3map2
-mod_obj_orientation 0
-
-// UTF-8
-utf8_enable 1
-
-// this is mainly for _decal entities (their shaders should use "polygonoffset" shader parameter) - this is "good enough" as it seems, but smaller than the decals one so these don't zfight decals
-mod_q3shader_default_polygonoffset -14
-mod_q3shader_default_polygonfactor 0
-
-// random charge stuff :P
-set g_weapon_charge_colormod_hdrmultiplier 4 "how much to multiply the colors by in the colormod vector"
-set g_weapon_charge_colormod_red_half 0
-set g_weapon_charge_colormod_green_half 0.5
-set g_weapon_charge_colormod_blue_half 1
-set g_weapon_charge_colormod_red_full 1
-set g_weapon_charge_colormod_green_full -0.5
-set g_weapon_charge_colormod_blue_full -1
-
-// session locking
-locksession 1
-
-// create this cvar in case the engine did not
-set snd_soundradius 1200
-set snd_softclip 1
-set snd_maxchannelvolume 0
-set snd_streaming_length 2
-seta menu_snd_sliderscale 2 "0: decibels; 1: linear percent; 2: 0..10 scale; 3: slider size percent"
-seta menu_snd_attenuation_method 1 "Use exponential instead of linear falloff for sound attenuation"
-alias snd_attenuation_method_0 "set menu_snd_attenuation_method 0; set snd_soundradius 1200; set snd_attenuation_exponent 1; set snd_attenuation_decibel 0" // Quake default
-alias snd_attenuation_method_1 "set menu_snd_attenuation_method 1; set snd_soundradius 2400; set snd_attenuation_exponent 4; set snd_attenuation_decibel 0" // nice approximation for method 2
-alias snd_attenuation_method_2 "set menu_snd_attenuation_method 2; set snd_soundradius 1200; set snd_attenuation_exponent 0; set snd_attenuation_decibel 10" // warning: plays sounds within up to 6000qu
-snd_attenuation_method_1
-
-// declare the channels we use
-seta snd_channel8volume 1 "QuakeC controlled background music volume"
-seta snd_channel9volume 1 "QuakeC controlled ambient sound volume"
-
-// sound randomization
-snd_identicalsoundrandomization_time -0.1
-snd_identicalsoundrandomization_tics 1
-
-// load console command aliases and settings
-exec commands.cfg
-
-// ... and now that everything is configured/aliased, we can do some things:
-
-// Change g_start_delay based upon if the server is local or not.
-if_client set g_start_delay 0 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
-if_dedicated set g_start_delay 15 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
fi Finnish "Suomi" 33%
zh_TW "Chinese (Taiwan)" "國語" 68%
el Greek "Ελληνική" 33%
-be Belarusian "Беларуская" 62%
+be Belarusian "Беларуская" 61%
bg Bulgarian "Български" 68%
ru Russian "Русский" 99%
sr Serbian "Српски" 71%
--- /dev/null
+/*
+Generated framegroups file for dragon_lod1
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 101 30 1 // dragon_lod1 idle
+102 101 30 1 // dragon_lod1 glide
+203 101 30 1 // dragon_lod1 fly
+304 26 30 0 // dragon_lod1 pain1
+330 26 30 0 // dragon_lod1 pain2
+356 51 30 0 // dragon_lod1 melee
+407 51 30 0 // dragon_lod1 fireball
+458 101 30 1 // dragon_lod1 dying
+559 26 30 0 // dragon_lod1 dead
--- /dev/null
+/*
+Generated framegroups file for dragon_lod2
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 101 30 1 // dragon_lod2 idle
+102 101 30 1 // dragon_lod2 glide
+203 101 30 1 // dragon_lod2 fly
+304 26 30 0 // dragon_lod2 pain1
+330 26 30 0 // dragon_lod2 pain2
+356 51 30 0 // dragon_lod2 melee
+407 51 30 0 // dragon_lod2 fireball
+458 101 30 1 // dragon_lod2 dying
+559 26 30 0 // dragon_lod2 dead
// ==========
// overkill
// ==========
-set g_overkill 0 "internal cvar, to enable overkill, use `exec defaultOverkill.cfg`"
+set g_overkill 0 "internal cvar, to enable overkill, use `exec ruleset-overkill.cfg`"
set g_overkill_powerups_replace 1
set g_overkill_itemwaypoints 1
set g_buffs_flight_time 60 "flight buff carry time"
+// ================
+// grappling hook
+// ================
+set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
+set g_grappling_hook_useammo 0 "use ammunition with the off-hand grappling hook"
+
+
// ==============
// vampire hook
// ==============
set g_vampirehook_teamheal "1" "hooking teammates drains hooker's health"
+// =================
+// offhand blaster
+// =================
+set g_offhand_blaster 0 "whether to enable offhand blaster"
+
+
// ===============
// rocket minsta
// ===============
endif
endif
+# Set to empty string to temporarily enable warnings when debugging
+QCCFLAGS_WERROR ?= \
+ -Werror
+
# We eventually need to get rid of these
QCCFLAGS_WTFS ?= \
-Wno-field-redeclared
-std=gmqcc \
-Ooverlap-locals \
-O3 \
- -Werror -Wall \
+ $(QCCFLAGS_WERROR) \
+ -Wall \
$(QCCFLAGS_WTFS) \
-flno -futf8 -fno-bail-on-werror \
-frelaxed-switch -freturn-assignments \
float autocvar_con_notify;
float autocvar_con_notifysize;
string autocvar_crosshair;
+string autocvar_crosshair_2d = "54";
float autocvar_crosshair_alpha;
string autocvar_crosshair_color;
int autocvar_crosshair_color_special;
.int lodmodelindex0;
.int lodmodelindex1;
.int lodmodelindex2;
-void CSQCPlayer_LOD_Apply(entity this)
+void CSQCPlayer_LOD_Apply(entity this, bool isplayer)
{
+ int detailreduction = ((isplayer) ? autocvar_cl_playerdetailreduction : autocvar_cl_modeldetailreduction);
+
// LOD model loading
if(this.lodmodelindex0 != this.modelindex)
{
}
// apply LOD
- if(autocvar_cl_playerdetailreduction <= 0)
+ if(detailreduction <= 0)
{
- if(autocvar_cl_playerdetailreduction <= -2)
+ if(detailreduction <= -2)
this.modelindex = this.lodmodelindex2;
- else if(autocvar_cl_playerdetailreduction <= -1)
+ else if(detailreduction <= -1)
this.modelindex = this.lodmodelindex1;
else
this.modelindex = this.lodmodelindex0;
else
{
float distance = vlen(this.origin - view_origin);
- float f = (distance * current_viewzoom + 100.0) * autocvar_cl_playerdetailreduction;
+ float f = (distance * current_viewzoom + 100.0) * detailreduction;
f *= 1.0 / bound(0.01, view_quality, 1);
if(f > autocvar_cl_loddistance2)
this.modelindex = this.lodmodelindex2;
if(this.isplayermodel) // this checks if it's a player MODEL!
{
CSQCPlayer_ModelAppearance_Apply(this, this.entnum == player_localnum + 1);
- CSQCPlayer_LOD_Apply(this);
+ CSQCPlayer_LOD_Apply(this, true);
if(!isplayer)
{
}
}
}
+ else
+ CSQCPlayer_LOD_Apply(this, false);
CSQCModel_AutoTagIndex_Apply(this);
int weapon_stats = weapon_accuracy[i - WEP_FIRST];
WepSet set = it.m_wepset;
+ if(it.spawnflags & WEP_TYPE_OTHER)
+ {
+ ++nHidden;
+ continue;
+ }
if (weapon_stats < 0 && !((weapons_stat & set) || (weapons_inmap & set)))
{
if (((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)))
WepSet set = it.m_wepset;
if (weapon_stats < 0 && !((weapons_stat & set) || (weapons_inmap & set)))
continue;
+ if (it.spawnflags & WEP_TYPE_OTHER)
+ continue;
float weapon_alpha;
if (weapon_stats >= 0)
NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new)
{
float teamnum = (ReadByte() - 1);
- vector spn_origin;
- spn_origin.x = ReadCoord();
- spn_origin.y = ReadCoord();
- spn_origin.z = ReadCoord();
+ vector spn_origin = ReadVector();
this.team = (teamnum + 1);
if(entnum)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
if(is_new)
{
hud_panel_radar_maximized_zoommode = autocvar_hud_panel_radar_maximized_zoommode;
// others default to 0
- // match this to defaultXonotic.cfg!
+ // match this to default hud cfg file!
if(!hud_panel_radar_scale) hud_panel_radar_scale = 4096;
if(!hud_panel_radar_foreground_alpha) hud_panel_radar_foreground_alpha = 0.8 * panel_fg_alpha;
if(!hud_panel_radar_size.x) hud_panel_radar_size.x = 128;
if(sendflags & 1)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
}
if(sendflags & 2)
{
- this.velocity_x = ReadCoord();
- this.velocity_y = ReadCoord();
- this.velocity_z = ReadCoord();
+ this.velocity = ReadVector();
}
if(sendflags & 4)
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
entity wepent = viewmodels[slot];
- if(wepent.switchweapon == wepent.activeweapon)
- if((wepent.activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (wepent.activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary))) // do NOT use switchweapon here
- zoomdir += button_attack2;
+ if(wepent.switchweapon != wepent.activeweapon)
+ continue;
+ Weapon wep = wepent.activeweapon;
+ if(wep != WEP_Null && wep.wr_zoomdir)
+ {
+ bool do_zoom = wep.wr_zoomdir(wep); // TODO: merge this with wr_zoom?
+ zoomdir += do_zoom;
+ }
}
}
if(spectatee_status > 0 || isdemo())
string wcross_style;
float wcross_alpha, wcross_resolution;
wcross_style = autocvar_crosshair;
+ if (csqcplayer.viewloc && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM) && autocvar_crosshair_2d != "")
+ wcross_style = autocvar_crosshair_2d;
if (wcross_style == "0")
return;
wcross_resolution = autocvar_crosshair_size;
ring_scale = autocvar_crosshair_ring_size;
- float weapon_clipload, weapon_clipsize;
- weapon_clipload = STAT(WEAPON_CLIPLOAD);
- weapon_clipsize = STAT(WEAPON_CLIPSIZE);
+ entity wepent = viewmodels[0]; // TODO: unhardcode
- float vortex_charge, vortex_chargepool;
- vortex_charge = STAT(VORTEX_CHARGE);
- vortex_chargepool = STAT(VORTEX_CHARGEPOOL);
+ int weapon_clipload = wepent.clip_load;
+ int weapon_clipsize = wepent.clip_size;
- float arc_heat = STAT(ARC_HEAT);
+ float arc_heat = wepent.arc_heat_percent;
+ float vcharge = wepent.vortex_charge;
+ float vchargepool = wepent.vortex_chargepool_ammo;
if(vortex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
- vortex_charge_movingavg = vortex_charge;
-
- entity wepent = viewmodels[0]; // TODO: unhardcode
+ vortex_charge_movingavg = vcharge;
// handle the values
- if (autocvar_crosshair_ring && wepent.activeweapon == WEP_VORTEX && vortex_charge && autocvar_crosshair_ring_vortex) // ring around crosshair representing velocity-dependent damage for the vortex
+ if (autocvar_crosshair_ring && wepent.activeweapon == WEP_VORTEX && vcharge && autocvar_crosshair_ring_vortex) // ring around crosshair representing velocity-dependent damage for the vortex
{
- if (vortex_chargepool || use_vortex_chargepool) {
+ if (vchargepool || use_vortex_chargepool) {
use_vortex_chargepool = 1;
- ring_inner_value = vortex_chargepool;
+ ring_inner_value = vchargepool;
} else {
- vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * vortex_charge;
- ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (vortex_charge - vortex_charge_movingavg), 1);
+ vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * vcharge;
+ ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (vcharge - vortex_charge_movingavg), 1);
}
ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
ring_inner_image = "gfx/crosshair_ring_inner.tga";
// draw the outer ring to show the current charge of the weapon
- ring_value = vortex_charge;
+ ring_value = vcharge;
ring_alpha = autocvar_crosshair_ring_vortex_alpha;
ring_rgb = wcross_color;
ring_image = "gfx/crosshair_ring_nexgun.tga";
}
else if (autocvar_crosshair_ring && wepent.activeweapon == WEP_MINE_LAYER && WEP_CVAR(minelayer, limit) && autocvar_crosshair_ring_minelayer)
{
- ring_value = bound(0, STAT(LAYED_MINES) / WEP_CVAR(minelayer, limit), 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
+ ring_value = bound(0, wepent.minelayer_mines / WEP_CVAR(minelayer, limit), 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
ring_alpha = autocvar_crosshair_ring_minelayer_alpha;
ring_rgb = wcross_color;
ring_image = "gfx/crosshair_ring.tga";
}
- else if (wepent.activeweapon == WEP_HAGAR && STAT(HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
+ else if (wepent.activeweapon == WEP_HAGAR && wepent.hagar_load && autocvar_crosshair_ring_hagar)
{
- ring_value = bound(0, STAT(HAGAR_LOAD) / WEP_CVAR_SEC(hagar, load_max), 1);
+ ring_value = bound(0, wepent.hagar_load / WEP_CVAR_SEC(hagar, load_max), 1);
ring_alpha = autocvar_crosshair_ring_hagar_alpha;
ring_rgb = wcross_color;
ring_image = "gfx/crosshair_ring.tga";
if(f & 2)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
}
this.scale = ReadShort() / 256.0;
if(f & 0x20)
{
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
}
else
this.mins = this.maxs = '0 0 0';
this.bgmscriptdecay = ReadByte() / 64.0;
this.bgmscriptsustain = ReadByte() / 255.0;
this.bgmscriptrelease = ReadByte() / 64.0;
- this.movedir_x = ReadCoord();
- this.movedir_y = ReadCoord();
- this.movedir_z = ReadCoord();
+ this.movedir = ReadVector();
this.lip = ReadByte() / 255.0;
}
this.fade_start = ReadByte();
if (f & 1)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
if (this.count & 0x80)
{
- this.velocity_x = ReadCoord();
- this.velocity_y = ReadCoord();
- this.velocity_z = ReadCoord();
+ this.velocity = ReadVector();
if (f & 0x10)
this.gravity = ReadCoord();
else
CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) \
CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) \
CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 254, -1, 254) \
- CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 254, -1, 254) \
CSQCMODEL_ENDIF \
+ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 16, 0, 255) \
+ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 16, 0, 255) \
+ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 16, 0, 255) \
CSQCMODEL_IF(isplayer) \
CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) \
CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
.entity death_msgmurder;
.string death_msgextra;
-int dt_identity(int i) { return i; }
-
#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, extra) \
REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) { \
this.m_id += DT_FIRST; \
Net_Accept(net_debug);
this.sv_entnum = ReadShort();
if (ReadByte()) make_pure(this);
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.debug = true; // identify server entities by this
this.classname = strzone(ReadString());
o = (this.absmin + this.absmax) / 2;
if (this.tag_entity)
o += this.tag_entity.origin;
- WriteCoord(channel, o.x); WriteCoord(channel, o.y); WriteCoord(channel, o.z);
+ WriteVector(channel, o);
WriteString(channel, this.classname);
WriteString(channel, this.sourceLoc);
return true;
vector vel = '0 0 0';
int eff_cnt = 1;
bool eff_trail = eff.eent_eff_trail;
- vector v;
- v_x = ReadCoord();
- v_y = ReadCoord();
- v_z = ReadCoord();
+ vector v = ReadVector();
bool use_vel = ReadByte();
if(use_vel)
- {
- vel_x = ReadCoord();
- vel_y = ReadCoord();
- vel_z = ReadCoord();
- }
+ vel = ReadVector();
if(!eff_trail)
eff_cnt = ReadByte();
(Effects_COUNT >= 255)
? WriteShort(channel, this.m_id)
: WriteByte(channel, this.m_id);
- WriteCoord(channel, this.eent_net_location_x);
- WriteCoord(channel, this.eent_net_location_y);
- WriteCoord(channel, this.eent_net_location_z);
+ WriteVector(channel, this.eent_net_location);
// attempt to save a tiny bit more bandwidth by not sending velocity if it isn't set
if(this.eent_net_velocity)
{
WriteByte(channel, true);
- WriteCoord(channel, this.eent_net_velocity_x);
- WriteCoord(channel, this.eent_net_velocity_y);
- WriteCoord(channel, this.eent_net_velocity_z);
+ WriteVector(channel, this.eent_net_velocity);
}
else { WriteByte(channel, false); }
WriteHeader(MSG_ALL, casings);
WriteByte(MSG_ALL, casingtype);
- WriteCoord(MSG_ALL, org.x);
- WriteCoord(MSG_ALL, org.y);
- WriteCoord(MSG_ALL, org.z);
+ WriteVector(MSG_ALL, org);
WriteShort(MSG_ALL, compressShortVector(vel)); // actually compressed velocity
WriteByte(MSG_ALL, ang.x * 256 / 360);
WriteByte(MSG_ALL, ang.y * 256 / 360);
NET_HANDLE(casings, bool isNew)
{
int _state = ReadByte();
- vector org;
- org_x = ReadCoord();
- org_y = ReadCoord();
- org_z = ReadCoord();
+ vector org = ReadVector();
vector vel = decompressShortVector(ReadShort());
vector ang;
ang_x = ReadByte() * 360 / 256;
bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
{
+ vector org = vec3(floor(this.origin.x), floor(this.origin.y), floor(this.origin.z));
WriteHeader(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
WriteShort(MSG_ENTITY, this.projectiledeathtype);
- WriteCoord(MSG_ENTITY, floor(this.origin.x));
- WriteCoord(MSG_ENTITY, floor(this.origin.y));
- WriteCoord(MSG_ENTITY, floor(this.origin.z));
+ WriteVector(MSG_ENTITY, org);
WriteByte(MSG_ENTITY, bound(1, this.dmg, 255));
WriteByte(MSG_ENTITY, bound(0, this.dmg_radius, 255));
WriteByte(MSG_ENTITY, bound(1, this.dmg_edge, 255));
w_issilent = (w_deathtype & 0x8000);
w_deathtype = (w_deathtype & 0x7FFF);
- w_org.x = ReadCoord();
- w_org.y = ReadCoord();
- w_org.z = ReadCoord();
+ w_org = ReadVector();
thedamage = ReadByte();
rad = ReadByte();
WriteByte(channel, floor(_atten * 64));
entcs_force_origin(from);
vector o = from.origin + 0.5 * (from.mins + from.maxs);
- WriteCoord(channel, o.x);
- WriteCoord(channel, o.y);
- WriteCoord(channel, o.z);
+ WriteVector(channel, o);
}
/**
WriteByte(channel, floor(_atten * 64));
entcs_force_origin(from);
vector o = from.origin + 0.5 * (from.mins + from.maxs);
- WriteCoord(channel, o.x);
- WriteCoord(channel, o.y);
- WriteCoord(channel, o.z);
+ WriteVector(channel, o);
}
#endif
int chan = ReadSByte();
float vol = ReadByte() / 255;
float atten = ReadByte() / 64;
- vector o;
- o.x = ReadCoord();
- o.y = ReadCoord();
- o.z = ReadCoord();
+ vector o = ReadVector();
// TODO: is this really what we want to be doing? Footsteps that follow the player at head height?
if (who == player_currententnum) e = findfloat(NULL, entnum, who); // play at camera position for full volume
else if (e) e.origin = o;
int chan = ReadSByte();
float vol = ReadByte() / 255;
float atten = ReadByte() / 64;
- vector o;
- o.x = ReadCoord();
- o.y = ReadCoord();
- o.z = ReadCoord();
+ vector o = ReadVector();
if (who == player_currententnum) e = findfloat(NULL, entnum, who); // play at camera position for full volume
else if (e) e.origin = o;
if (e)
{
WriteHeader(MSG_BROADCAST, TE_CSQC_ARC);
- WriteCoord(MSG_BROADCAST, from.x);
- WriteCoord(MSG_BROADCAST, from.y);
- WriteCoord(MSG_BROADCAST, from.z);
- WriteCoord(MSG_BROADCAST, to.x);
- WriteCoord(MSG_BROADCAST, to.y);
- WriteCoord(MSG_BROADCAST, to.z);
+ WriteVector(MSG_BROADCAST, from);
+ WriteVector(MSG_BROADCAST, to);
}
#elif defined(CSQC)
NET_HANDLE(TE_CSQC_ARC, bool isNew)
{
- vector from;
- from.x = ReadCoord();
- from.y = ReadCoord();
- from.z = ReadCoord();
- vector to;
- to.x = ReadCoord();
- to.y = ReadCoord();
- to.z = ReadCoord();
+ vector from = ReadVector();
+ vector to = ReadVector();
return = true;
if (autocvar_cl_effects_lightningarc_simple)
WriteShort(MSG_ENTITY, this.modelindex);
WriteByte(MSG_ENTITY, this.skin);
WriteByte(MSG_ENTITY, this.frame);
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
if(f & 1)
{
- WriteCoord(MSG_ENTITY, this.velocity.x);
- WriteCoord(MSG_ENTITY, this.velocity.y);
- WriteCoord(MSG_ENTITY, this.velocity.z);
+ WriteVector(MSG_ENTITY, this.velocity);
}
if(f & 2)
{
e.skin = ReadByte();
e.frame = ReadByte();
e.frame1time = time;
- e.origin_x = ReadCoord();
- e.origin_y = ReadCoord();
- e.origin_z = ReadCoord();
+ e.origin = ReadVector();
setorigin(e, e.origin);
if(f & 1)
{
- e.velocity_x = ReadCoord();
- e.velocity_y = ReadCoord();
- e.velocity_z = ReadCoord();
+ e.velocity = ReadVector();
}
if(f & 2)
{
}
#endif
#ifdef SVQC
-.float metertime = _STAT(NB_METERSTART);
-
.entity ballcarried;
int autocvar_g_nexball_goalleadlimit;
ownr.effects &= ~autocvar_g_nexball_basketball_effects_default;
ownr.ballcarried = NULL;
GameRules_scoring_vip(ownr, false);
- if(ownr.metertime)
+ if(STAT(NB_METERSTART, ownr))
{
- ownr.metertime = 0;
+ STAT(NB_METERSTART, ownr) = 0;
ownr.(weaponentity).state = WS_READY;
}
WaypointSprite_Kill(ownr.waypointsprite_attachedforcarrier);
setthink(ball, ResetBall);
ball.nextthink = min(time + autocvar_g_nexball_delay_idle, ball.teamtime);
- if(ball.owner.metertime)
+ if(STAT(NB_METERSTART, ball.owner))
{
- ball.owner.metertime = 0;
+ STAT(NB_METERSTART, ball.owner) = 0;
.entity weaponentity = ball.weaponentity_fld;
ball.owner.(weaponentity).state = WS_READY;
}
entity spectatee = M_ARGV(0, entity);
entity client = M_ARGV(1, entity);
- client.metertime = spectatee.metertime;
+ STAT(NB_METERSTART, client) = STAT(NB_METERSTART, spectatee);
}
MUTATOR_HOOKFUNCTION(nb, PlayerSpawn)
{
entity player = M_ARGV(0, entity);
- player.metertime = 0;
+ STAT(NB_METERSTART, player) = 0;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
.entity weaponentity = weaponentities[slot];
return false;
}
-.float stat_sv_airspeedlimit_nonqw;
-.float stat_sv_maxspeed;
-
-MUTATOR_HOOKFUNCTION(nb, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(nb, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
if(player.ballcarried)
- {
- player.stat_sv_airspeedlimit_nonqw *= autocvar_g_nexball_basketball_carrier_highspeed;
- player.stat_sv_maxspeed *= autocvar_g_nexball_basketball_carrier_highspeed;
- }
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_nexball_basketball_carrier_highspeed;
}
MUTATOR_HOOKFUNCTION(nb, ForbidThrowCurrentWeapon)
if(weapon_prepareattack(thiswep, actor, weaponentity, false, autocvar_g_balance_nexball_primary_refire))
if(autocvar_g_nexball_basketball_meter)
{
- if(actor.ballcarried && !actor.metertime)
- actor.metertime = time;
+ if(actor.ballcarried && !STAT(NB_METERSTART, actor))
+ STAT(NB_METERSTART, actor) = time;
else
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, autocvar_g_balance_nexball_primary_animtime, w_ready);
}
weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, autocvar_g_balance_nexball_secondary_animtime, w_ready);
}
- if(!(fire & 1) && actor.metertime && actor.ballcarried)
+ if(!(fire & 1) && STAT(NB_METERSTART, actor) && actor.ballcarried)
{
- W_Nexball_Attack(actor, weaponentity, time - actor.metertime);
+ W_Nexball_Attack(actor, weaponentity, time - STAT(NB_METERSTART, actor));
// DropBall or stealing will set metertime back to 0
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, autocvar_g_balance_nexball_primary_animtime, w_ready);
}
if(!(ball = actor.ballcarried))
return;
- W_SetupShot(actor, weaponentity, false, 4, SND_NB_SHOOT1, CH_WEAPON_A, 0);
+ W_SetupShot(actor, weaponentity, false, 4, SND_NB_SHOOT1, CH_WEAPON_A, 0, WEP_PORTO.m_id); // TODO: use ballstealer weapon here? we don't want duplicates in the scoreboard
tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, NULL);
if(trace_startsolid)
{
- if(actor.metertime)
- actor.metertime = 0; // Shot failed, hide the power meter
+ if(STAT(NB_METERSTART, actor))
+ STAT(NB_METERSTART, actor) = 0; // Shot failed, hide the power meter
return;
}
if(actor.ballcarried.enemy)
{
entity _ball = actor.ballcarried;
- W_SetupShot(actor, weaponentity, false, 4, SND_NB_SHOOT1, CH_WEAPON_A, 0);
+ W_SetupShot(actor, weaponentity, false, 4, SND_NB_SHOOT1, CH_WEAPON_A, 0, WEP_PORTO.m_id | HITTYPE_SECONDARY); // TODO: use the ball stealer weapon here? probably don't want duplicates
DropBall(_ball, w_shotorg, trigger_push_calculatevelocity(_ball.origin, _ball.enemy, 32, _ball));
setthink(_ball, W_Nexball_Think);
_ball.nextthink = time;
if(!autocvar_g_nexball_tackling)
return;
- W_SetupShot(actor, weaponentity, false, 2, SND_NB_SHOOT2, CH_WEAPON_A, 0);
+ W_SetupShot(actor, weaponentity, false, 2, SND_NB_SHOOT2, CH_WEAPON_A, 0, WEP_PORTO.m_id);
entity missile = new(ballstealer);
missile.owner = actor;
if(sf & CPSF_SETUP)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.health = ReadByte();
if(sf & GSF_SETUP)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.health = ReadByte();
entity generator_camera;
NET_HANDLE(ENT_ONSCAMERA, bool isnew)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.angles_x = ReadAngle();
WriteByte(MSG_ENTITY, sf);
if(sf & CPSF_SETUP)
{
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteByte(MSG_ENTITY, this.health);
WriteByte(MSG_ENTITY, this.max_health);
WriteByte(MSG_ENTITY, sf);
if(sf & GSF_SETUP)
{
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteByte(MSG_ENTITY, this.health);
WriteByte(MSG_ENTITY, this.max_health);
{
WriteHeader(MSG_ENTITY, ENT_ONSCAMERA);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteAngle(MSG_ENTITY, this.angles_x);
WriteAngle(MSG_ENTITY, this.angles_y);
vector mymid = (this.absmin + this.absmax) * 0.5;
vector theirmid = (toucher.absmin + toucher.absmax) * 0.5;
- Damage(toucher, this, this, 0, DEATH_HURTTRIGGER.m_id, mymid, normalize(theirmid - mymid) * ons_captureshield_force);
+ Damage(toucher, this, this, 0, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, mymid, normalize(theirmid - mymid) * ons_captureshield_force);
if(IS_REAL_CLIENT(toucher))
{
WriteByte(MSG_ENTITY, sendflags);
if(sendflags & 1)
{
- WriteCoord(MSG_ENTITY, this.goalentity.origin_x);
- WriteCoord(MSG_ENTITY, this.goalentity.origin_y);
- WriteCoord(MSG_ENTITY, this.goalentity.origin_z);
+ WriteVector(MSG_ENTITY, this.goalentity.origin);
}
if(sendflags & 2)
{
- WriteCoord(MSG_ENTITY, this.enemy.origin_x);
- WriteCoord(MSG_ENTITY, this.enemy.origin_y);
- WriteCoord(MSG_ENTITY, this.enemy.origin_z);
+ WriteVector(MSG_ENTITY, this.enemy.origin);
}
if(sendflags & 4)
{
return 0;
}
-void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(damage <= 0) { return; }
this.SendFlags |= CPSF_STATUS;
if(this.health <= 0)
{
- ons_ControlPoint_Icon_Damage(this, this, this, 1, 0, this.origin, '0 0 0');
+ ons_ControlPoint_Icon_Damage(this, this, this, 1, 0, DMG_NOWEP, this.origin, '0 0 0');
return;
}
}
WriteAngle(MSG_ALL, cam.angles_z);
}
-void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(damage <= 0) return;
if(warmup_stage || game_stopped) return;
else
d = d * tmp_entity.max_health / max(30, 60 * autocvar_timelimit_suddendeath);
- Damage(tmp_entity, tmp_entity, tmp_entity, d, DEATH_HURTTRIGGER.m_id, tmp_entity.origin, '0 0 0');
+ Damage(tmp_entity, tmp_entity, tmp_entity, d, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, tmp_entity.origin, '0 0 0');
tmp_entity.sprite.SendFlags |= 16;
{
t = car(s); s = cdr(s);
Gametype f = MapInfo_Type_FromString(t);
- if(!autocvar_g_mapinfo_ignore_warnings)
- LOG_WARN("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.");
+ //if(!autocvar_g_mapinfo_ignore_warnings)
+ //LOG_WARN("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.");
if(f)
_MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, true);
else if(!autocvar_g_mapinfo_ignore_warnings)
tracebox(this.origin + v_forward * 50, this.mins * 0.5, this.maxs * 0.5, this.origin + v_forward * autocvar_g_monster_golem_attack_smash_range, MOVE_NORMAL, this);
if(trace_ent.takedamage)
- Damage(trace_ent, this, this, (autocvar_g_monster_golem_attack_smash_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_SMASH.m_id, trace_ent.origin, normalize(trace_ent.origin - this.origin));
+ Damage(trace_ent, this, this, (autocvar_g_monster_golem_attack_smash_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_SMASH.m_id, DMG_NOWEP, trace_ent.origin, normalize(trace_ent.origin - this.origin));
}
void M_Golem_Attack_Swing(entity this)
this.velocity = this.oldvelocity;
RadiusDamage (this, this.realowner, (autocvar_g_monster_golem_attack_lightning_damage), (autocvar_g_monster_golem_attack_lightning_damage), (autocvar_g_monster_golem_attack_lightning_radius),
- NULL, NULL, (autocvar_g_monster_golem_attack_lightning_force), this.projectiledeathtype, directhitentity);
+ NULL, NULL, (autocvar_g_monster_golem_attack_lightning_force), this.projectiledeathtype, DMG_NOWEP, directhitentity);
FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_golem_attack_lightning_radius_zap, it != this.realowner && it.takedamage,
{
te_csqc_lightningarc(this.origin, it.origin);
- Damage(it, this, this.realowner, (autocvar_g_monster_golem_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_ZAP.m_id, it.origin, '0 0 0');
+ Damage(it, this, this.realowner, (autocvar_g_monster_golem_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_ZAP.m_id, DMG_NOWEP, it.origin, '0 0 0');
});
setthink(this, SUB_Remove);
M_Golem_Attack_Lightning_Explode(this, trigger);
}
-void M_Golem_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void M_Golem_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if (this.health <= 0)
return;
if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, weaponentity, false, 0.2)) {
if (!actor.target_range) actor.target_range = autocvar_g_monsters_target_range;
actor.enemy = Monster_FindTarget(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MageSpike_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MageSpike_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_MAGE.m_id);
if (!IS_PLAYER(actor)) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin);
M_Mage_Attack_Spike(actor, w_shotdir);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready);
this.realowner.mage_spike = NULL;
Send_Effect(EFFECT_EXPLOSION_SMALL, this.origin, '0 0 0', 1);
- RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), NULL, NULL, 0, DEATH_MONSTER_MAGE.m_id, directhitentity);
+ RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius),
+ NULL, NULL, 0, DEATH_MONSTER_MAGE.m_id, DMG_NOWEP, directhitentity);
delete(this);
}
void M_Mage_Attack_Push(entity this)
{
sound(this, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM);
- RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), NULL, NULL, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, this.enemy);
+ RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius),
+ NULL, NULL, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, DMG_NOWEP, this.enemy);
Send_Effect(EFFECT_TE_EXPLOSION, this.origin, '0 0 0', 1);
setanim(this, this.anim_shoot, true, true, true);
#include <common/items/_mod.qh>
CLASS(MageSpike, PortoLaunch)
-/* flags */ ATTRIB(MageSpike, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(MageSpike, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(MageSpike, impulse, int, 9);
/* refname */ ATTRIB(MageSpike, netname, string, "magespike");
/* wepname */ ATTRIB(MageSpike, m_name, string, _("Mage spike"));
actor.anim_finished = time + 1;
}
if (isPlayer) actor.enemy = Monster_FindTarget(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_SpiderAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_SpiderAttack_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_SPIDER.m_id);
if (!isPlayer) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin);
M_Spider_Attack_Web(actor);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready);
if(this)
{
Send_Effect(EFFECT_ELECTRO_IMPACT, this.origin, '0 0 0', 1);
- RadiusDamage(this, this.realowner, 0, 0, 25, NULL, NULL, 25, this.projectiledeathtype, NULL);
+ RadiusDamage(this, this.realowner, 0, 0, 25, NULL, NULL, 25, this.projectiledeathtype, DMG_NOWEP, NULL);
FOREACH_ENTITY_RADIUS(this.origin, 25, it != this && it.takedamage && !IS_DEAD(it) && it.health > 0 && it.monsterid != MON_SPIDER.monsterid,
{
#include <common/weapons/_all.qh>
CLASS(SpiderAttack, PortoLaunch)
-/* flags */ ATTRIB(SpiderAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(SpiderAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(SpiderAttack, impulse, int, 9);
/* refname */ ATTRIB(SpiderAttack, netname, string, "spider");
/* wepname */ ATTRIB(SpiderAttack, m_name, string, _("Spider attack"));
TC(WyvernAttack, thiswep);
if (fire & 1)
if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, weaponentity, false, 1.2)) {
- if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WyvernAttack_FIRE, CH_WEAPON_B, 0);
+ if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WyvernAttack_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_WYVERN.m_id);
if (IS_MONSTER(actor)) {
//actor.anim_finished = time + 1.2;
setanim(actor, actor.anim_shoot, false, true, true);
entity own = this.realowner;
- RadiusDamage(this, own, autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force, NULL, NULL, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, NULL);
+ RadiusDamage(this, own, autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force,
+ NULL, NULL, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, DMG_NOWEP, NULL);
FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_wyvern_attack_fireball_radius, it.takedamage == DAMAGE_AIM,
{
#include <common/weapons/_all.qh>
CLASS(WyvernAttack, PortoLaunch)
-/* flags */ ATTRIB(WyvernAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(WyvernAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(WyvernAttack, impulse, int, 9);
/* refname */ ATTRIB(WyvernAttack, netname, string, "wyvern");
/* wepname */ ATTRIB(WyvernAttack, m_name, string, _("Wyvern attack"));
{
angles_face = vectoangles(this.moveto - this.origin);
angles_face = normalize(angles_face) * (autocvar_g_monster_zombie_attack_leap_force);
- Damage(toucher, this, this, (autocvar_g_monster_zombie_attack_leap_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_ZOMBIE_JUMP.m_id, toucher.origin, angles_face);
+ Damage(toucher, this, this, (autocvar_g_monster_zombie_attack_leap_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_ZOMBIE_JUMP.m_id, DMG_NOWEP, toucher.origin, angles_face);
settouch(this, Monster_Touch); // instantly turn it off to stop damage spam
this.state = 0;
}
string sample = this.(samplefield);
if (sample != "") sample = GlobalSound_sample(sample, random());
float myscale = ((this.scale) ? this.scale : 1); // safety net
- float scale_inverse = 1 / myscale;
// TODO: change volume depending on size too?
- sound7(this, chan, sample, VOL_BASE, ATTEN_NORM, scale_inverse * 100, 0);
+ sound7(this, chan, sample, VOL_BASE, ATTEN_NORM, 100 / myscale, 0);
this.msound_delay = time + sound_delay;
}
traceline(this.origin + this.view_ofs, this.origin + v_forward * er, 0, this);
if(trace_ent.takedamage)
- Damage(trace_ent, this, this, damg * MONSTER_SKILLMOD(this), deathtype, trace_ent.origin, normalize(trace_ent.origin - this.origin));
+ Damage(trace_ent, this, this, damg * MONSTER_SKILLMOD(this), deathtype, DMG_NOWEP, trace_ent.origin, normalize(trace_ent.origin - this.origin));
return true;
}
{
this.last_trace = time + 0.4;
- Damage (this, NULL, NULL, 2, DEATH_DROWN.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, 2, DEATH_DROWN.m_id, DMG_NOWEP, this.origin, '0 0 0');
this.angles = '90 90 0';
if(random() < 0.5)
{
this.moveto = this.origin;
}
-void Monster_Dead_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Monster_Dead_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
this.health -= damage;
}
}
-void Monster_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Monster_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if((this.spawnflags & MONSTERFLAG_INVINCIBLE) && deathtype != DEATH_KILL.m_id && !ITEM_DAMAGE_NEEDKILL(deathtype))
return;
{
if(STAT(FROZEN, this) == 2)
{
- this.revive_progress = bound(0, this.revive_progress + this.ticrate * this.revive_speed, 1);
- this.health = max(1, this.revive_progress * this.max_health);
- this.iceblock.alpha = bound(0.2, 1 - this.revive_progress, 1);
+ STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) + this.ticrate * this.revive_speed, 1);
+ this.health = max(1, STAT(REVIVE_PROGRESS, this) * this.max_health);
+ this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
WaypointSprite_UpdateHealth(this.sprite, this.health);
- if(this.revive_progress >= 1)
+ if(STAT(REVIVE_PROGRESS, this) >= 1)
Unfreeze(this);
}
else if(STAT(FROZEN, this) == 3)
{
- this.revive_progress = bound(0, this.revive_progress - this.ticrate * this.revive_speed, 1);
- this.health = max(0, autocvar_g_nades_ice_health + (this.max_health-autocvar_g_nades_ice_health) * this.revive_progress );
+ STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) - this.ticrate * this.revive_speed, 1);
+ this.health = max(0, autocvar_g_nades_ice_health + (this.max_health-autocvar_g_nades_ice_health) * STAT(REVIVE_PROGRESS, this) );
if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
WaypointSprite_UpdateHealth(this.sprite, this.health);
Unfreeze(this);
this.health = 0;
if(this.event_damage)
- this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, this.origin, '0 0 0');
+ this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
- else if ( this.revive_progress <= 0 )
+ else if ( STAT(REVIVE_PROGRESS, this) <= 0 )
Unfreeze(this);
}
// otherwise, no revival!
if(this.monster_lifetime && time >= this.monster_lifetime)
{
- Damage(this, this, this, this.health + this.max_health, DEATH_KILL.m_id, this.origin, this.origin);
+ Damage(this, this, this, this.health + this.max_health, DEATH_KILL.m_id, DMG_NOWEP, this.origin, this.origin);
return;
}
/**/ i(string, MUTATOR_ARGV_1_string) \
/**/ o(vector, MUTATOR_ARGV_2_vector) \
/**/ o(string, MUTATOR_ARGV_3_string) \
+ /**/ o(string, MUTATOR_ARGV_4_string) \
/**/
MUTATOR_HOOKABLE(WP_Format, EV_WP_Format);
#include <common/mutators/mutator/nades/_mod.inc>
#include <common/mutators/mutator/new_toys/_mod.inc>
#include <common/mutators/mutator/nix/_mod.inc>
+#include <common/mutators/mutator/offhand_blaster/_mod.inc>
#include <common/mutators/mutator/overkill/_mod.inc>
#include <common/mutators/mutator/physical_items/_mod.inc>
#include <common/mutators/mutator/pinata/_mod.inc>
#include <common/mutators/mutator/nades/_mod.qh>
#include <common/mutators/mutator/new_toys/_mod.qh>
#include <common/mutators/mutator/nix/_mod.qh>
+#include <common/mutators/mutator/offhand_blaster/_mod.qh>
#include <common/mutators/mutator/overkill/_mod.qh>
#include <common/mutators/mutator/physical_items/_mod.qh>
#include <common/mutators/mutator/pinata/_mod.qh>
if(player.vehicle)
vehicles_exit(player.vehicle, VHEF_RELEASE);
if(player.event_damage)
- player.event_damage(player, player, player, 1, DEATH_ROT.m_id, player.origin, '0 0 0');
+ player.event_damage(player, player, player, 1, DEATH_ROT.m_id, DMG_NOWEP, player.origin, '0 0 0');
player.bloodloss_timer = time + 0.5 + random() * 0.5;
}
}
// hurt the owner of the hook
if(DIFF_TEAM(frag_attacker, frag_target.realowner))
{
- Damage (frag_target.realowner, frag_attacker, frag_attacker, 5, WEP_HOOK.m_id | HITTYPE_SPLASH, frag_target.realowner.origin, '0 0 0');
+ Damage (frag_target.realowner, frag_attacker, frag_attacker, 5, WEP_HOOK.m_id | HITTYPE_SPLASH, DMG_NOWEP, frag_target.realowner.origin, '0 0 0'); // TODO: should get weapon entity from mutator hook
RemoveHook(frag_target);
return; // dead
}
#include <common/util.qh>
#ifdef GAMEQC
-REGISTER_WAYPOINT(Buff, _("Buff"), '1 0.5 0', 1);
+REGISTER_WAYPOINT(Buff, _("Buff"), "", '1 0.5 0', 1);
REGISTER_RADARICON(Buff, 1);
#endif
}
#ifdef SVQC
- // .int buffs = _STAT(BUFFS);
void buff_Init(entity ent);
void buff_Init_Compat(entity ent, entity replacement);
#define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
- this.buffs = b.m_itemid; \
+ STAT(BUFFS, this) = b.m_itemid; \
this.team = t; \
buff_Init(this); \
}
Buff b = Buffs_from(this.wp_extra);
M_ARGV(2, vector) = b.m_color;
M_ARGV(3, string) = b.m_prettyName;
+ M_ARGV(4, string) = strcat("buff_", b.m_name);
return true;
}
}
#include <common/triggers/target/music.qh>
#include <common/gamemodes/_mod.qh>
-.float buff_time = _STAT(BUFF_TIME);
void buffs_DelayedInit(entity this);
AUTOCVAR(g_buffs, int, -1, "Enable buffs, -1: enabled but no auto location or replacing powerups, 1: enabled and can replace them");
if(!this.owner.buff_active && !this.owner.buff_activetime)
return false;
- if (view.buffs)
+ if (STAT(BUFFS, view))
{
- return CS(view).cvar_cl_buffs_autoreplace == false || view.buffs != this.owner.buffs;
+ return CS(view).cvar_cl_buffs_autoreplace == false || STAT(BUFFS, view) != STAT(BUFFS, this.owner);
}
return WaypointSprite_visible_for_player(this, player, view);
void buff_Waypoint_Spawn(entity e)
{
- entity buff = buff_FirstFromFlags(e.buffs);
+ entity buff = buff_FirstFromFlags(STAT(BUFFS, e));
entity wp = WaypointSprite_Spawn(WP_Buff, 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, NULL, e.team, e, buff_waypoint, true, RADARICON_Buff);
wp.wp_extra = buff.m_id;
WaypointSprite_UpdateTeamRadar(e.buff_waypoint, RADARICON_Buff, e.glowmod);
return;
}
- if (toucher.buffs)
+ if (STAT(BUFFS, toucher))
{
- if (CS(toucher).cvar_cl_buffs_autoreplace && toucher.buffs != this.buffs)
+ if (CS(toucher).cvar_cl_buffs_autoreplace && STAT(BUFFS, toucher) != STAT(BUFFS, this))
{
- int buffid = buff_FirstFromFlags(toucher.buffs).m_id;
- //Send_Notification(NOTIF_ONE, toucher, MSG_MULTI, ITEM_BUFF_DROP, toucher.buffs);
+ int buffid = buff_FirstFromFlags(STAT(BUFFS, toucher)).m_id;
+ //Send_Notification(NOTIF_ONE, toucher, MSG_MULTI, ITEM_BUFF_DROP, STAT(BUFFS, toucher));
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ITEM_BUFF_LOST, toucher.netname, buffid);
- toucher.buffs = 0;
+ STAT(BUFFS, toucher) = 0;
//sound(toucher, CH_TRIGGER, SND_BUFF_LOST, VOL_BASE, ATTN_NORM);
}
else { return; } // do nothing
this.owner = toucher;
this.buff_active = false;
this.lifetime = 0;
- int buffid = buff_FirstFromFlags(this.buffs).m_id;
+ int buffid = buff_FirstFromFlags(STAT(BUFFS, this)).m_id;
Send_Notification(NOTIF_ONE, toucher, MSG_MULTI, ITEM_BUFF_GOT, buffid);
Send_Notification(NOTIF_ALL_EXCEPT, toucher, MSG_INFO, INFO_ITEM_BUFF, toucher.netname, buffid);
Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
sound(toucher, CH_TRIGGER, SND_SHIELD_RESPAWN, VOL_BASE, ATTN_NORM);
- toucher.buffs |= (this.buffs);
+ STAT(BUFFS, toucher) |= (STAT(BUFFS, this));
}
float buff_Available(entity buff)
});
entity newbuff = RandomSelection_chosen_ent;
newbuff.buff_seencount += 1; // lower chances of seeing this buff again soon
- ent.buffs = newbuff.m_itemid;
+ STAT(BUFFS, ent) = newbuff.m_itemid;
}
void buff_Think(entity this)
{
- if(this.buffs != this.oldbuffs)
+ if(STAT(BUFFS, this) != this.oldbuffs)
{
- entity buff = buff_FirstFromFlags(this.buffs);
+ entity buff = buff_FirstFromFlags(STAT(BUFFS, this));
this.color = buff.m_color;
this.glowmod = buff_GlowColor(buff);
this.skin = buff.m_skin;
WaypointSprite_UpdateBuildFinished(this.buff_waypoint, time + this.buff_activetime - frametime);
}
- this.oldbuffs = this.buffs;
+ this.oldbuffs = STAT(BUFFS, this);
}
if(!game_stopped)
}
if(!this.buff_active && !this.buff_activetime)
- if(!this.owner || STAT(FROZEN, this.owner) || IS_DEAD(this.owner) || !this.owner.iscreature || this.owner.vehicle || !(this.owner.buffs & this.buffs) || this.pickup_anyway > 0 || (this.pickup_anyway >= 0 && autocvar_g_buffs_pickup_anyway))
+ if(!this.owner || STAT(FROZEN, this.owner) || IS_DEAD(this.owner) || !this.owner.iscreature || this.owner.vehicle || !(STAT(BUFFS, this.owner) & STAT(BUFFS, this)) || this.pickup_anyway > 0 || (this.pickup_anyway >= 0 && autocvar_g_buffs_pickup_anyway))
{
buff_SetCooldown(this, autocvar_g_buffs_cooldown_respawn + frametime);
this.owner = NULL;
if(!teamplay && this.team) { this.team = 0; }
- entity buff = buff_FirstFromFlags(this.buffs);
+ entity buff = buff_FirstFromFlags(STAT(BUFFS, this));
- if(!this.buffs || !buff_Available(buff))
+ if(!STAT(BUFFS, this) || !buff_Available(buff))
buff_NewType(this);
this.classname = "item_buff";
else if (ent.spawnflags & 4)
ent.team = NUM_TEAM_2;
- ent.buffs = replacement.m_itemid;
+ STAT(BUFFS, ent) = replacement.m_itemid;
buff_Init(ent);
}
{
setorigin(ent, old.origin);
ent.angles = old.angles;
- ent.noalign = (old.noalign || (old.spawnflags & 1));
+ ent.noalign = Item_ShouldKeepPosition(old);
buff_Init(ent);
}
void buff_Vengeance_DelayedDamage(entity this)
{
if(this.enemy)
- Damage(this.enemy, this.owner, this.owner, this.dmg, DEATH_BUFF.m_id, this.enemy.origin, '0 0 0');
+ Damage(this.enemy, this.owner, this.owner, this.dmg, DEATH_BUFF.m_id, DMG_NOWEP, this.enemy.origin, '0 0 0');
delete(this);
return;
if(frag_deathtype == DEATH_BUFF.m_id) { return; }
- if(frag_target.buffs & BUFF_RESISTANCE.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_RESISTANCE.m_itemid)
{
float reduced = frag_damage * autocvar_g_buffs_resistance_blockpercent;
frag_damage = bound(0, frag_damage - reduced, frag_damage);
}
- if(frag_target.buffs & BUFF_SPEED.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_SPEED.m_itemid)
if(frag_target != frag_attacker)
frag_damage *= autocvar_g_buffs_speed_damage_take;
- if(frag_target.buffs & BUFF_MEDIC.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_MEDIC.m_itemid)
if((GetResourceAmount(frag_target, RESOURCE_HEALTH) - frag_damage) <= 0)
if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
if(frag_attacker)
if(random() <= autocvar_g_buffs_medic_survive_chance)
frag_damage = max(5, GetResourceAmount(frag_target, RESOURCE_HEALTH) - autocvar_g_buffs_medic_survive_health);
- if(frag_target.buffs & BUFF_JUMP.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_JUMP.m_itemid)
if(frag_deathtype == DEATH_FALL.m_id)
frag_damage = 0;
- if(frag_target.buffs & BUFF_VENGEANCE.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_VENGEANCE.m_itemid)
if(frag_attacker)
if(frag_attacker != frag_target)
if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
dmgent.nextthink = time + 0.1;
}
- if(frag_target.buffs & BUFF_BASH.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_BASH.m_itemid)
if(frag_attacker != frag_target)
frag_force = '0 0 0';
- if(frag_attacker.buffs & BUFF_BASH.m_itemid)
+ if(STAT(BUFFS, frag_attacker) & BUFF_BASH.m_itemid)
if(frag_force)
if(frag_attacker == frag_target)
frag_force *= autocvar_g_buffs_bash_force_self;
else
frag_force *= autocvar_g_buffs_bash_force;
- if(frag_attacker.buffs & BUFF_DISABILITY.m_itemid)
+ if(STAT(BUFFS, frag_attacker) & BUFF_DISABILITY.m_itemid)
if(frag_target != frag_attacker)
frag_target.buff_disability_time = time + autocvar_g_buffs_disability_slowtime;
- if(frag_target.buffs & BUFF_INFERNO.m_itemid)
+ if(STAT(BUFFS, frag_target) & BUFF_INFERNO.m_itemid)
{
if(frag_deathtype == DEATH_FIRE.m_id)
frag_damage = 0;
frag_damage *= 0.5; // TODO: cvarize?
}
- if(frag_attacker.buffs & BUFF_LUCK.m_itemid)
+ if(STAT(BUFFS, frag_attacker) & BUFF_LUCK.m_itemid)
if(frag_attacker != frag_target)
if(autocvar_g_buffs_luck_damagemultiplier > 0)
if(random() <= autocvar_g_buffs_luck_chance)
frag_damage *= autocvar_g_buffs_luck_damagemultiplier;
- if(frag_attacker.buffs & BUFF_INFERNO.m_itemid)
+ if(STAT(BUFFS, frag_attacker) & BUFF_INFERNO.m_itemid)
if(frag_target != frag_attacker) {
float btime = buff_Inferno_CalculateTime(
frag_damage,
}
// this... is ridiculous (TODO: fix!)
- if(frag_attacker.buffs & BUFF_VAMPIRE.m_itemid)
+ if(STAT(BUFFS, frag_attacker) & BUFF_VAMPIRE.m_itemid)
if(!frag_target.vehicle)
if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
if(!IS_DEAD(frag_target))
{
entity player = M_ARGV(0, entity);
- player.buffs = 0;
- player.buff_time = 0;
+ STAT(BUFFS, player) = 0;
+ STAT(BUFF_TIME, player) = 0;
PS(player).buff_shield = time + 0.5; // prevent picking up buffs immediately
// reset timers here to prevent them continuing after re-spawn
player.buff_disability_time = 0;
entity player = M_ARGV(0, entity);
// these automatically reset, no need to worry
- if(player.buffs & BUFF_SPEED.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_buffs_speed_speed;
if(time < player.buff_disability_time)
entity player = M_ARGV(0, entity);
// these automatically reset, no need to worry
- if(player.buffs & BUFF_JUMP.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_JUMP.m_itemid)
STAT(MOVEVARS_JUMPVELOCITY, player) = autocvar_g_buffs_jump_height;
}
{
entity frag_target = M_ARGV(2, entity);
- if(frag_target.buffs)
+ if(STAT(BUFFS, frag_target))
{
- int buffid = buff_FirstFromFlags(frag_target.buffs).m_id;
+ int buffid = buff_FirstFromFlags(STAT(BUFFS, frag_target)).m_id;
Send_Notification(NOTIF_ALL_EXCEPT, frag_target, MSG_INFO, INFO_ITEM_BUFF_LOST, frag_target.netname, buffid);
- frag_target.buffs = 0;
+ STAT(BUFFS, frag_target) = 0;
if(frag_target.buff_model)
{
entity player = M_ARGV(0, entity);
- if(player.buffs)
+ if(STAT(BUFFS, player))
{
- int buffid = buff_FirstFromFlags(player.buffs).m_id;
+ int buffid = buff_FirstFromFlags(STAT(BUFFS, player)).m_id;
Send_Notification(NOTIF_ONE, player, MSG_MULTI, ITEM_BUFF_DROP, buffid);
Send_Notification(NOTIF_ALL_EXCEPT, player, MSG_INFO, INFO_ITEM_BUFF_LOST, player.netname, buffid);
- player.buffs = 0;
+ STAT(BUFFS, player) = 0;
PS(player).buff_shield = time + max(0, autocvar_g_buffs_pickup_delay);
- //player.buff_time = 0; // already notified
+ //STAT(BUFF_TIME, player) = 0; // already notified
sound(player, CH_TRIGGER, SND_BUFF_LOST, VOL_BASE, ATTN_NORM);
return true;
}
if(MUTATOR_RETURNVALUE || game_stopped) return;
entity player = M_ARGV(0, entity);
- if(player.buffs & BUFF_SWAPPER.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_SWAPPER.m_itemid)
{
float best_distance = autocvar_g_buffs_swapper_range;
entity closest = NULL;
sound(closest, CH_TRIGGER, SND_KA_RESPAWN, VOL_BASE, ATTEN_NORM);
// TODO: add a counter to handle how many times one can teleport, and a delay to prevent spam
- player.buffs = 0;
+ STAT(BUFFS, player) = 0;
return true;
}
}
// if you have the invisibility powerup, sprites ALWAYS are restricted to your team
// but only apply this to real players, not to spectators
- if((wp.owner.flags & FL_CLIENT) && (wp.owner.buffs & BUFF_INVISIBLE.m_itemid) && (e == player))
+ if((wp.owner.flags & FL_CLIENT) && (STAT(BUFFS, wp.owner) & BUFF_INVISIBLE.m_itemid) && (e == player))
if(DIFF_TEAM(wp.owner, e))
return true;
}
-MUTATOR_HOOKFUNCTION(buffs, OnEntityPreSpawn, CBC_ORDER_LAST)
+MUTATOR_HOOKFUNCTION(buffs, FilterItem)
{
if(autocvar_g_buffs < 0)
- return; // no auto replacing of entities in this mode
+ return false; // no auto replacing of entities in this mode
- entity ent = M_ARGV(0, entity);
+ entity item = M_ARGV(0, entity);
if(autocvar_g_buffs_replace_powerups)
- switch(ent.classname)
{
- case "item_strength":
- case "item_shield":
+ switch(item.classname)
{
- entity e = spawn();
- buff_SpawnReplacement(e, ent);
- return true;
+ case "item_strength":
+ case "item_shield":
+ {
+ entity e = spawn();
+ buff_SpawnReplacement(e, item);
+ return true;
+ }
}
}
+
+ return false;
}
MUTATOR_HOOKFUNCTION(buffs, WeaponRateFactor)
{
entity player = M_ARGV(1, entity);
- if(player.buffs & BUFF_SPEED.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
M_ARGV(0, float) *= autocvar_g_buffs_speed_rate;
if(time < player.buff_disability_time)
{
entity player = M_ARGV(1, entity);
- if(player.buffs & BUFF_SPEED.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
M_ARGV(0, float) *= autocvar_g_buffs_speed_weaponspeed;
if(time < player.buff_disability_time)
if(game_stopped || IS_DEAD(player) || frametime || !IS_PLAYER(player)) return;
- if(player.buffs & BUFF_FLIGHT.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_FLIGHT.m_itemid)
{
if(!PHYS_INPUT_BUTTON_CROUCH(player))
player.buff_flight_crouchheld = false;
// 2: notify carrier as well
int buff_lost = 0;
- if(player.buff_time && player.buffs)
- if(time >= player.buff_time)
+ if(STAT(BUFF_TIME, player) && STAT(BUFFS, player))
+ if(time >= STAT(BUFF_TIME, player))
{
- player.buff_time = 0;
+ STAT(BUFF_TIME, player) = 0;
buff_lost = 2;
}
if(buff_lost)
{
- if(player.buffs)
+ if(STAT(BUFFS, player))
{
- int buffid = buff_FirstFromFlags(player.buffs).m_id;
+ int buffid = buff_FirstFromFlags(STAT(BUFFS, player)).m_id;
if(buff_lost == 2)
{
Send_Notification(NOTIF_ONE, player, MSG_MULTI, ITEM_BUFF_DROP, buffid); // TODO: special timeout message?
}
else
Send_Notification(NOTIF_ALL_EXCEPT, player, MSG_INFO, INFO_ITEM_BUFF_LOST, player.netname, buffid);
- player.buffs = 0;
+ STAT(BUFFS, player) = 0;
PS(player).buff_shield = time + max(0, autocvar_g_buffs_pickup_delay); // always put in a delay, even if small
}
}
- if(player.buffs & BUFF_MAGNET.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_MAGNET.m_itemid)
{
vector pickup_size;
IL_EACH(g_items, it.itemdef,
{
- if(it.buffs)
+ if(STAT(BUFFS, it))
pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_buff;
else
pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_item;
});
}
- if(player.buffs & BUFF_AMMO.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
{
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
}
}
- if((player.buffs & BUFF_INVISIBLE.m_itemid) && (player.oldbuffs & BUFF_INVISIBLE.m_itemid))
+ if((STAT(BUFFS, player) & BUFF_INVISIBLE.m_itemid) && (player.oldbuffs & BUFF_INVISIBLE.m_itemid))
player.alpha = ((autocvar_g_buffs_invisible_alpha) ? autocvar_g_buffs_invisible_alpha : -1); // powerups reset alpha, so we must enforce this (TODO)
- if(player.buffs & BUFF_MEDIC.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_MEDIC.m_itemid)
if(time >= player.buff_medic_healtime)
{
buff_Medic_Heal(player);
player.buff_medic_healtime = time + autocvar_g_buffs_medic_heal_delay;
}
-#define BUFF_ONADD(b) if ( (player.buffs & (b).m_itemid) && !(player.oldbuffs & (b).m_itemid))
-#define BUFF_ONREM(b) if (!(player.buffs & (b).m_itemid) && (player.oldbuffs & (b).m_itemid))
+#define BUFF_ONADD(b) if ( (STAT(BUFFS, player) & (b).m_itemid) && !(player.oldbuffs & (b).m_itemid))
+#define BUFF_ONREM(b) if (!(STAT(BUFFS, player) & (b).m_itemid) && (player.oldbuffs & (b).m_itemid))
- if(player.buffs != player.oldbuffs)
+ if(STAT(BUFFS, player) != player.oldbuffs)
{
- entity buff = buff_FirstFromFlags(player.buffs);
+ entity buff = buff_FirstFromFlags(STAT(BUFFS, player));
float bufftime = buff != BUFF_Null ? buff.m_time(buff) : 0;
- player.buff_time = (bufftime) ? time + bufftime : 0;
+ STAT(BUFF_TIME, player) = (bufftime) ? time + bufftime : 0;
BUFF_ONADD(BUFF_AMMO)
{
player.buff_ammo_prev_infitems = (player.items & IT_UNLIMITED_WEAPON_AMMO);
player.items |= IT_UNLIMITED_WEAPON_AMMO;
- if(player.buffs & BUFF_AMMO.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
{
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
else
player.items &= ~IT_UNLIMITED_WEAPON_AMMO;
- if(player.buffs & BUFF_AMMO.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
{
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
BUFF_ONREM(BUFF_FLIGHT)
player.gravity = ((player.trigger_gravity_check) ? player.trigger_gravity_check.enemy.gravity : player.buff_flight_oldgravity);
- player.oldbuffs = player.buffs;
- if(player.buffs)
+ player.oldbuffs = STAT(BUFFS, player);
+ if(STAT(BUFFS, player))
{
if(!player.buff_model)
buffs_BuffModel_Spawn(player);
entity spectatee = M_ARGV(0, entity);
entity client = M_ARGV(1, entity);
- client.buffs = spectatee.buffs;
- client.buff_time = spectatee.buff_time;
+ STAT(BUFFS, client) = STAT(BUFFS, spectatee);
+ STAT(BUFF_TIME, client) = STAT(BUFF_TIME, spectatee);
}
MUTATOR_HOOKFUNCTION(buffs, PlayerRegen)
{
entity player = M_ARGV(0, entity);
- if(player.buffs & BUFF_MEDIC.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_MEDIC.m_itemid)
{
M_ARGV(2, float) = autocvar_g_buffs_medic_rot; // rot_mod
M_ARGV(4, float) = M_ARGV(1, float) = autocvar_g_buffs_medic_max; // limit_mod = max_mod
M_ARGV(2, float) = autocvar_g_buffs_medic_regen; // regen_mod
}
- if(player.buffs & BUFF_SPEED.m_itemid)
+ if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
M_ARGV(2, float) = autocvar_g_buffs_speed_regen; // regen_mod
}
{
Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CAMPCHECK);
if(player.vehicle)
- Damage(player.vehicle, NULL, NULL, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, player.vehicle.origin, '0 0 0');
+ 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, GetResourceAmount(player, RESOURCE_HEALTH) + GetResourceAmount(player, RESOURCE_ARMOR) * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, player.origin, '0 0 0');
+ Damage(player, NULL, NULL, bound(0, autocvar_g_campcheck_damage, GetResourceAmount(player, RESOURCE_HEALTH) + GetResourceAmount(player, RESOURCE_ARMOR) * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, DMG_NOWEP, player.origin, '0 0 0');
}
player.campcheck_nextcheck = time + autocvar_g_campcheck_interval;
player.campcheck_traveled_distance = 0;
this.instagib_needammo = true;
if (hp <= 5)
{
- Damage(this, this, this, 5, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 5, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_INSTAGIB_TERMINATED);
}
else if (hp <= 10)
{
- Damage(this, this, this, 5, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 5, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_1);
}
else if (hp <= 20)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_2);
}
else if (hp <= 30)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_3);
}
else if (hp <= 40)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_4);
}
else if (hp <= 50)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_5);
}
else if (hp <= 60)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_6);
}
else if (hp <= 70)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_7);
}
else if (hp <= 80)
{
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_8);
}
else if (hp <= 90)
{
Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_INSTAGIB_FINDAMMO);
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_NUM_9);
}
else
{
Send_Notification(NOTIF_ONE_ONLY, this, MSG_MULTI, MULTI_INSTAGIB_FINDAMMO);
- Damage(this, this, this, 10, DEATH_NOAMMO.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 10, DEATH_NOAMMO.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
}
this.instagib_nextthink = time + 1;
}
}
-.float stat_sv_maxspeed;
-
-MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
if(player.items & ITEM_Speed.m_itemid)
- player.stat_sv_maxspeed = player.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed;
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_instagib_speed_highspeed;
}
MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_SplitHealthArmor)
void nade_burn_spawn(entity _nade)
{
- CSQCProjectile(_nade, true, Nades_from(_nade.nade_type).m_projectile[true], true);
+ CSQCProjectile(_nade, true, Nades_from(STAT(NADE_BONUS_TYPE, _nade)).m_projectile[true], true);
}
void nade_spawn(entity _nade)
_nade.effects |= EF_LOWPRECISION;
- CSQCProjectile(_nade, true, Nades_from(_nade.nade_type).m_projectile[false], true);
+ CSQCProjectile(_nade, true, Nades_from(STAT(NADE_BONUS_TYPE, _nade)).m_projectile[false], true);
}
void napalm_damage(entity this, float dist, float damage, float edgedamage, float burntime)
sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
RadiusDamage(this, this.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
- autocvar_g_nades_nade_radius, this, NULL, autocvar_g_nades_nade_force, this.projectiledeathtype, this.enemy);
+ autocvar_g_nades_nade_radius, this, NULL, autocvar_g_nades_nade_force, this.projectiledeathtype, DMG_NOWEP, this.enemy);
Damage_DamageInfo(this.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, this.projectiledeathtype, 0, this);
}
}
else if ( health_factor < 0 )
{
- Damage(toucher,this,this.realowner,-health_factor,DEATH_NADE_HEAL.m_id,toucher.origin,'0 0 0');
+ Damage(toucher,this,this.realowner,-health_factor,DEATH_NADE_HEAL.m_id,DMG_NOWEP,toucher.origin,'0 0 0');
}
}
if ( IS_REAL_CLIENT(toucher) || IS_VEHICLE(toucher) )
{
entity show_red = (IS_VEHICLE(toucher)) ? toucher.owner : toucher;
- show_red.stat_healing_orb = time+0.1;
- show_red.stat_healing_orb_alpha = 0.75 * (this.ltime - time) / this.orb_lifetime;
+ STAT(HEALING_ORB, show_red) = time+0.1;
+ STAT(HEALING_ORB_ALPHA, show_red) = 0.75 * (this.ltime - time) / this.orb_lifetime;
}
}
entity expef = NULL;
bool nade_blast = true;
- switch ( Nades_from(this.nade_type) )
+ switch ( Nades_from(STAT(NADE_BONUS_TYPE, this)) )
{
case NADE_TYPE_NAPALM:
nade_blast = autocvar_g_nades_napalm_blast;
if(nade_blast)
{
RadiusDamage(this, this.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
- autocvar_g_nades_nade_radius, this, NULL, autocvar_g_nades_nade_force, this.projectiledeathtype, this.enemy);
+ autocvar_g_nades_nade_radius, this, NULL, autocvar_g_nades_nade_force, this.projectiledeathtype, DMG_NOWEP, this.enemy);
Damage_DamageInfo(this.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, this.projectiledeathtype, 0, this);
}
if(this.takedamage)
- switch ( Nades_from(this.nade_type) )
+ switch ( Nades_from(STAT(NADE_BONUS_TYPE, this)) )
{
case NADE_TYPE_NAPALM: nade_napalm_boom(this); break;
case NADE_TYPE_ICE: nade_ice_boom(this); break;
void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, string pntype);
void nade_pickup(entity this, entity thenade)
{
- spawn_held_nade(this, thenade.realowner, autocvar_g_nades_pickup_time, thenade.nade_type, thenade.pokenade_type);
+ spawn_held_nade(this, thenade.realowner, autocvar_g_nades_pickup_time, STAT(NADE_BONUS_TYPE, thenade), thenade.pokenade_type);
// set refire so player can't even
this.nade_refire = time + autocvar_g_nades_nade_refire;
- this.nade_timer = 0;
+ STAT(NADE_TIMER, this) = 0;
if(this.nade)
this.nade.nade_time_primed = thenade.nade_time_primed;
this.nextthink = max(this.wait, time);
}
-void nade_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void nade_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
{
return;
}
- if(this.nade_type == NADE_TYPE_TRANSLOCATE.m_id || this.nade_type == NADE_TYPE_SPAWN.m_id)
+ if(STAT(NADE_BONUS_TYPE, this) == NADE_TYPE_TRANSLOCATE.m_id || STAT(NADE_BONUS_TYPE, this) == NADE_TYPE_SPAWN.m_id)
return;
if (MUTATOR_CALLHOOK(Nade_Damage, this, DEATH_WEAPONOF(deathtype), force, damage)) {}
SetResourceAmount(this, RESOURCE_HEALTH, hp);
- if ( this.nade_type != NADE_TYPE_HEAL.m_id || IS_PLAYER(attacker) )
+ if ( STAT(NADE_BONUS_TYPE, this) != NADE_TYPE_HEAL.m_id || IS_PLAYER(attacker) )
this.realowner = attacker;
if(hp <= 0)
makevectors(e.v_angle);
// NOTE: always throw from first weapon entity?
- W_SetupShot(e, _nade.weaponentity_fld, false, false, SND_Null, CH_WEAPON_A, 0);
+ W_SetupShot(e, _nade.weaponentity_fld, false, false, SND_Null, CH_WEAPON_A, 0, DEATH_NADE.m_id);
vector offset = (v_forward * autocvar_g_nades_throw_offset.x)
+ (v_right * autocvar_g_nades_throw_offset.y)
IL_PUSH(g_bot_dodge, _nade);
_nade.projectiledeathtype = DEATH_NADE.m_id;
_nade.toss_time = time;
- _nade.solid = SOLID_CORPSE; //((_nade.nade_type == NADE_TYPE_TRANSLOCATE) ? SOLID_CORPSE : SOLID_BBOX);
+ _nade.solid = SOLID_CORPSE; //((STAT(NADE_BONUS_TYPE, _nade) == NADE_TYPE_TRANSLOCATE) ? SOLID_CORPSE : SOLID_BBOX);
- if(_nade.nade_type == NADE_TYPE_TRANSLOCATE.m_id || _nade.nade_type == NADE_TYPE_SPAWN.m_id)
+ if(STAT(NADE_BONUS_TYPE, _nade) == NADE_TYPE_TRANSLOCATE.m_id || STAT(NADE_BONUS_TYPE, _nade) == NADE_TYPE_SPAWN.m_id)
_nade.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
else
_nade.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
}
e.nade_refire = time + autocvar_g_nades_nade_refire;
- e.nade_timer = 0;
+ STAT(NADE_TIMER, e) = 0;
}
void nades_GiveBonus(entity player, float score)
if (autocvar_g_nades)
if (autocvar_g_nades_bonus)
if (IS_REAL_CLIENT(player))
- if (IS_PLAYER(player) && player.bonus_nades < autocvar_g_nades_bonus_max)
+ if (IS_PLAYER(player) && STAT(NADE_BONUS, player) < autocvar_g_nades_bonus_max)
if (STAT(FROZEN, player) == 0)
if (!IS_DEAD(player))
{
- if ( player.bonus_nade_score < 1 )
- player.bonus_nade_score += score/autocvar_g_nades_bonus_score_max;
+ if ( STAT(NADE_BONUS_SCORE, player) < 1 )
+ STAT(NADE_BONUS_SCORE, player) += score/autocvar_g_nades_bonus_score_max;
- if ( player.bonus_nade_score >= 1 )
+ if ( STAT(NADE_BONUS_SCORE, player) >= 1 )
{
Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_NADE_BONUS);
play2(player, SND(KH_ALARM));
- player.bonus_nades++;
- player.bonus_nade_score -= 1;
+ STAT(NADE_BONUS, player)++;
+ STAT(NADE_BONUS_SCORE, player) -= 1;
}
}
}
/** Remove all bonus nades from a player */
void nades_RemoveBonus(entity player)
{
- player.bonus_nades = player.bonus_nade_score = 0;
+ STAT(NADE_BONUS, player) = STAT(NADE_BONUS_SCORE, player) = 0;
}
MUTATOR_HOOKFUNCTION(nades, PutClientInServer)
{
//this.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
if(!this.traileffectnum)
- this.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(this.nade_type).m_projectile[false], this.team).eent_eff_name);
+ this.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(STAT(NADE_BONUS_TYPE, this)).m_projectile[false], this.team).eent_eff_name);
this.alpha = 1;
}
{
entity n = new(nade), fn = new(fake_nade);
- n.nade_type = max(1, ntype);
+ STAT(NADE_BONUS_TYPE, n) = max(1, ntype);
n.pokenade_type = pntype;
- if(Nades_from(n.nade_type) == NADE_TYPE_Null)
- n.nade_type = NADE_TYPE_NORMAL.m_id;
+ if(Nades_from(STAT(NADE_BONUS_TYPE, n)) == NADE_TYPE_Null)
+ STAT(NADE_BONUS_TYPE, n) = NADE_TYPE_NORMAL.m_id;
.entity weaponentity = weaponentities[0]; // TODO: unhardcode
//setattachment(n, player, "bip01 l hand");
n.exteriormodeltoclient = player;
setcefc(n, nade_customize);
- n.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(n.nade_type).m_projectile[false], player.team).eent_eff_name);
- n.colormod = Nades_from(n.nade_type).m_color;
+ n.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(STAT(NADE_BONUS_TYPE, n)).m_projectile[false], player.team).eent_eff_name);
+ n.colormod = Nades_from(STAT(NADE_BONUS_TYPE, n)).m_color;
n.realowner = nowner;
n.colormap = player.colormap;
n.glowmod = player.glowmod;
setmodel(fn, MDL_NADE_VIEW);
setattachment(fn, player.(weaponentity), "");
fn.realowner = fn.owner = player;
- fn.colormod = Nades_from(n.nade_type).m_color;
+ fn.colormod = Nades_from(STAT(NADE_BONUS_TYPE, n)).m_color;
fn.colormap = player.colormap;
fn.glowmod = player.glowmod;
setthink(fn, SUB_Remove);
void nade_prime(entity this)
{
if(autocvar_g_nades_bonus_only)
- if(!this.bonus_nades)
+ if(!STAT(NADE_BONUS, this))
return; // only allow bonus nades
if(this.nade)
int ntype;
string pntype = this.pokenade_type;
- if(this.items & ITEM_Strength.m_itemid && autocvar_g_nades_bonus_onstrength)
- ntype = this.nade_type;
- else if (this.bonus_nades >= 1)
+ if((this.items & ITEM_Strength.m_itemid) && autocvar_g_nades_bonus_onstrength)
+ ntype = STAT(NADE_BONUS_TYPE, this);
+ else if (STAT(NADE_BONUS, this) >= 1)
{
- ntype = this.nade_type;
+ ntype = STAT(NADE_BONUS_TYPE, this);
pntype = this.pokenade_type;
- this.bonus_nades -= 1;
+ STAT(NADE_BONUS, this) -= 1;
}
else
{
delete(player.fake_nade);
player.nade = player.fake_nade = NULL;
- player.nade_timer = 0;
+ STAT(NADE_TIMER, player) = 0;
}
MUTATOR_HOOKFUNCTION(nades, VehicleEnter)
entity held_nade = player.nade;
if (held_nade)
{
- player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / held_nade.nade_lifetime, 1);
- // LOG_TRACEF("%d %d", player.nade_timer, time - held_nade.nade_time_primed);
+ STAT(NADE_TIMER, player) = bound(0, (time - held_nade.nade_time_primed) / held_nade.nade_lifetime, 1);
+ // LOG_TRACEF("%d %d", STAT(NADE_TIMER, player), time - held_nade.nade_time_primed);
makevectors(player.angles);
held_nade.velocity = player.velocity;
setorigin(held_nade, player.origin + player.view_ofs + v_forward * 8 + v_right * -8 + v_up * 0);
if(autocvar_g_nades_bonus_client_select)
{
- player.nade_type = CS(player).cvar_cl_nade_type;
+ STAT(NADE_BONUS_TYPE, player) = CS(player).cvar_cl_nade_type;
player.pokenade_type = CS(player).cvar_cl_pokenade_type;
}
else
{
- player.nade_type = autocvar_g_nades_bonus_type;
+ STAT(NADE_BONUS_TYPE, player) = autocvar_g_nades_bonus_type;
player.pokenade_type = autocvar_g_nades_pokenade_monster_type;
}
- player.nade_type = bound(1, player.nade_type, Nades_COUNT);
+ STAT(NADE_BONUS_TYPE, player) = bound(1, STAT(NADE_BONUS_TYPE, player), Nades_COUNT);
- if(player.bonus_nade_score >= 0 && autocvar_g_nades_bonus_score_max)
+ if(STAT(NADE_BONUS_SCORE, player) >= 0 && autocvar_g_nades_bonus_score_max)
nades_GiveBonus(player, time_score / autocvar_g_nades_bonus_score_max);
}
else
{
- player.bonus_nades = player.bonus_nade_score = 0;
+ STAT(NADE_BONUS, player) = STAT(NADE_BONUS_SCORE, player) = 0;
}
}
if(n > 0 && STAT(FROZEN, player) == 3) // OK, there is at least one teammate reviving us
{
- player.revive_progress = bound(0, player.revive_progress + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
- SetResourceAmount(player, RESOURCE_HEALTH, max(1, player.revive_progress * start_health));
+ STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
+ SetResourceAmount(player, RESOURCE_HEALTH, max(1, STAT(REVIVE_PROGRESS, player) * start_health));
- if(player.revive_progress >= 1)
+ if(STAT(REVIVE_PROGRESS, player) >= 1)
{
Unfreeze(player);
}
FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, {
- it.revive_progress = player.revive_progress;
+ STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
it.reviving = false;
});
}
}
-MUTATOR_HOOKFUNCTION(nades, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(nades, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
- if (STAT(ENTRAP_ORB, player) > time)
- {
- player.stat_sv_maxspeed *= autocvar_g_nades_entrap_speed;
- player.stat_sv_airspeedlimit_nonqw *= autocvar_g_nades_entrap_speed;
- }
+ if(STAT(ENTRAP_ORB, player) > time)
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_nades_entrap_speed;
}
MUTATOR_HOOKFUNCTION(nades, MonsterMove)
player.nade_refire = time + autocvar_g_nades_nade_refire;
if(autocvar_g_nades_bonus_client_select)
- player.nade_type = CS(player).cvar_cl_nade_type;
+ STAT(NADE_BONUS_TYPE, player) = CS(player).cvar_cl_nade_type;
- player.nade_timer = 0;
+ STAT(NADE_TIMER, player) = 0;
if (!player.offhand) player.offhand = OFFHAND_NADE;
entity spectatee = M_ARGV(0, entity);
entity client = M_ARGV(1, entity);
- client.nade_timer = spectatee.nade_timer;
- client.nade_type = spectatee.nade_type;
+ STAT(NADE_TIMER, client) = STAT(NADE_TIMER, spectatee);
+ STAT(NADE_BONUS_TYPE, client) = STAT(NADE_BONUS_TYPE, spectatee);
client.pokenade_type = spectatee.pokenade_type;
- client.bonus_nades = spectatee.bonus_nades;
- client.bonus_nade_score = spectatee.bonus_nade_score;
- client.stat_healing_orb = spectatee.stat_healing_orb;
- client.stat_healing_orb_alpha = spectatee.stat_healing_orb_alpha;
+ STAT(NADE_BONUS, client) = STAT(NADE_BONUS, spectatee);
+ STAT(NADE_BONUS_SCORE, client) = STAT(NADE_BONUS_SCORE, spectatee);
+ STAT(HEALING_ORB, client) = STAT(HEALING_ORB, spectatee);
+ STAT(HEALING_ORB_ALPHA, client) = STAT(HEALING_ORB_ALPHA, spectatee);
STAT(ENTRAP_ORB, client) = STAT(ENTRAP_ORB, spectatee);
STAT(ENTRAP_ORB_ALPHA, client) = STAT(ENTRAP_ORB_ALPHA, spectatee);
}
.entity nade;
.entity fake_nade;
-.float nade_timer = _STAT(NADE_TIMER);
.float nade_refire;
-.float bonus_nades = _STAT(NADE_BONUS);
.float nade_special_time;
-.float bonus_nade_score = _STAT(NADE_BONUS_SCORE);
-.int nade_type = _STAT(NADE_BONUS_TYPE);
.string pokenade_type;
.entity nade_damage_target;
.float cvar_cl_nade_type;
.string cvar_cl_pokenade_type;
.float toss_time;
-.float stat_healing_orb = _STAT(HEALING_ORB);
-.float stat_healing_orb_alpha = _STAT(HEALING_ORB_ALPHA);
.float nade_show_particles;
bool orb_send(entity this, entity to, int sf);
Net_Accept(Nade_Orb);
int sf = ReadByte();
if (sf & 1) {
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
- this.colormod_x = ReadCoord();
- this.colormod_y = ReadCoord();
- this.colormod_z = ReadCoord();
+ this.colormod = ReadVector();
this.orb_lifetime = ReadByte();
this.orb_radius = ReadShort();
this.ltime = time + ReadByte()/10.0;
WriteHeader(channel, Nade_Orb);
WriteByte(channel, sf);
if (sf & 1) {
- WriteCoord(channel, this.origin.x);
- WriteCoord(channel, this.origin.y);
- WriteCoord(channel, this.origin.z);
+ WriteVector(channel, this.origin);
- WriteCoord(channel, this.colormod.x);
- WriteCoord(channel, this.colormod.y);
- WriteCoord(channel, this.colormod.z);
+ WriteVector(channel, this.colormod);
WriteByte(channel, this.orb_lifetime);
//WriteByte(MSG_ENTITY, this.ltime - time + 1);
}
}
- // vortex too
- if(WEP_CVAR(vortex, charge))
- {
- if(WEP_CVAR_SEC(vortex, chargepool))
- this.vortex_chargepool_ammo = 1;
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- this.(weaponentity).vortex_charge = WEP_CVAR(vortex, charge_start);
- }
- }
-
// set last change info
this.nix_lastchange_id = nix_nextchange;
}
--- /dev/null
+// generated file; do not modify
+#ifdef SVQC
+ #include <common/mutators/mutator/offhand_blaster/sv_offhand_blaster.qc>
+#endif
--- /dev/null
+// generated file; do not modify
--- /dev/null
+string autocvar_g_offhand_blaster;
+
+REGISTER_MUTATOR(offhand_blaster, expr_evaluate(autocvar_g_offhand_blaster));
+
+MUTATOR_HOOKFUNCTION(offhand_blaster, BuildMutatorsString)
+{
+ M_ARGV(0, string) = strcat(M_ARGV(0, string), ":offhand_blaster");
+}
+
+MUTATOR_HOOKFUNCTION(offhand_blaster, BuildMutatorsPrettyString)
+{
+ M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Offhand blaster");
+}
+
+MUTATOR_HOOKFUNCTION(offhand_blaster, BuildGameplayTipsString)
+{
+ M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3offhand blaster^8 is enabled, press 'e' to use it\n");
+}
+
+MUTATOR_HOOKFUNCTION(offhand_blaster, PlayerSpawn)
+{
+ entity player = M_ARGV(0, entity);
+ player.offhand = OFFHAND_BLASTER;
+}
W_DecreaseAmmo(WEP_HMG, actor, WEP_CVAR(hmg, ammo), weaponentity);
- W_SetupShot (actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(hmg, damage));
+ W_SetupShot (actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(hmg, damage), WEP_HMG.m_id);
if(!autocvar_g_norecoil)
{
this.event_damage = func_null;
this.takedamage = DAMAGE_NO;
- RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
W_RocketPropelledChainsaw_Explode(this, toucher);
}
-void W_RocketPropelledChainsaw_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_RocketPropelledChainsaw_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if (this.health <= 0)
return;
return;
}
- this.cnt = vlen(this.velocity);
- this.wait = this.cnt * sys_frametime;
- this.pos1 = normalize(this.velocity);
+ float myspeed = vlen(this.velocity);
+ float myspeed_accel = myspeed * sys_frametime;
+ vector mydir = normalize(this.velocity);
- tracebox(this.origin, this.mins, this.maxs, this.origin + this.pos1 * (2 * this.wait), MOVE_NORMAL, this);
+ tracebox(this.origin, this.mins, this.maxs, this.origin + mydir * (2 * myspeed_accel), MOVE_NORMAL, this);
if(IS_PLAYER(trace_ent))
- Damage (trace_ent, this, this.realowner, WEP_CVAR(rpc, damage2), this.projectiledeathtype, this.origin, normalize(this.origin - trace_ent.origin) * WEP_CVAR(rpc, force));
+ Damage (trace_ent, this, this.realowner, WEP_CVAR(rpc, damage2), this.projectiledeathtype, this.weaponentity_fld, this.origin, normalize(this.origin - trace_ent.origin) * WEP_CVAR(rpc, force));
- this.velocity = this.pos1 * (this.cnt + (WEP_CVAR(rpc, speedaccel) * sys_frametime));
+ this.velocity = mydir * (myspeed + (WEP_CVAR(rpc, speedaccel) * sys_frametime));
UpdateCSQCProjectile(this);
this.nextthink = time;
entity flash = spawn ();
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(rpc, ammo), weaponentity);
- W_SetupShot_ProjectileSize (actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(rpc, damage));
+ W_SetupShot_ProjectileSize (actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(rpc, damage), WEP_RPC.m_id);
Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
PROJECTILE_MAKETRIGGER(missile);
set_movetype(missile, MOVETYPE_FLY);
missile.projectiledeathtype = WEP_RPC.m_id;
+ missile.weaponentity_fld = weaponentity;
setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
setorigin(missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
SUB_SetFade (flash, time, 0.1);
flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
W_AttachToShotorg(actor, weaponentity, flash, '5 0 0');
- missile.pos1 = missile.velocity;
MUTATOR_CALLHOOK(EditProjectile, actor, missile);
}
if(player.(weaponentity).m_weapon == WEP_Null && slot != 0)
continue;
- Weapon oldwep = player.(weaponentity).m_weapon;
- player.(weaponentity).m_weapon = WEP_BLASTER;
- W_Blaster_Attack(
- player,
- weaponentity,
- WEP_BLASTER.m_id | HITTYPE_SECONDARY,
- WEP_CVAR_SEC(vaporizer, shotangle),
- WEP_CVAR_SEC(vaporizer, damage),
- WEP_CVAR_SEC(vaporizer, edgedamage),
- WEP_CVAR_SEC(vaporizer, radius),
- WEP_CVAR_SEC(vaporizer, force),
- WEP_CVAR_SEC(vaporizer, speed),
- WEP_CVAR_SEC(vaporizer, spread),
- WEP_CVAR_SEC(vaporizer, delay),
- WEP_CVAR_SEC(vaporizer, lifetime)
- );
- player.(weaponentity).m_weapon = oldwep;
+ BLASTER_SECONDARY_ATTACK(vaporizer, player, weaponentity);
}
}
{
return false;
}
+ switch(item.itemdef)
+ {
+ case ITEM_HealthMega: return autocvar_g_overkill_filter_healthmega;
+ case ITEM_ArmorMedium: return autocvar_g_overkill_filter_armormedium;
+ case ITEM_ArmorBig: return autocvar_g_overkill_filter_armorbig;
+ case ITEM_ArmorMega: return autocvar_g_overkill_filter_armormega;
+ }
if (!autocvar_g_powerups || !autocvar_g_overkill_powerups_replace)
{
return true;
}
}
-void physical_item_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void physical_item_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(!this.cnt) // not for dropped items
if(ITEM_DAMAGE_NEEDKILL(deathtype))
entity e = spawn();
setorigin(e, org);
- RadiusDamage(e, NULL, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, NULL, NULL, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE.m_id, NULL);
+ RadiusDamage(e, NULL, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, NULL, NULL, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE.m_id, DMG_NOWEP, NULL);
delete(e);
}
{
thehook.last_dmg = time + autocvar_g_vampirehook_damagerate;
thehook.owner.damage_dealt += autocvar_g_vampirehook_damage;
- Damage(dmgent, thehook, thehook.owner, autocvar_g_vampirehook_damage, WEP_HOOK.m_id, thehook.origin, '0 0 0');
+ Damage(dmgent, thehook, thehook.owner, autocvar_g_vampirehook_damage, WEP_HOOK.m_id, DMG_NOWEP, thehook.origin, '0 0 0');
if(SAME_TEAM(thehook.owner, thehook.aiment))
thehook.aiment.health = min(thehook.aiment.health + autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max);
else
/** If you register a new waypoint, make sure to add it to this list */
-REGISTER_WAYPOINT(Waypoint, _("Waypoint"), '0 1 1', 1);
-REGISTER_WAYPOINT(Helpme, _("Help me!"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(Here, _("Here"), '0 1 0', 1);
-REGISTER_WAYPOINT(Danger, _("DANGER"), '1 0.5 0', 1);
+REGISTER_WAYPOINT(Waypoint, _("Waypoint"), "", '0 1 1', 1);
+REGISTER_WAYPOINT(Helpme, _("Help me!"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(Here, _("Here"), "", '0 1 0', 1);
+REGISTER_WAYPOINT(Danger, _("DANGER"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(Frozen, _("Frozen!"), '0.25 0.90 1', 1);
+REGISTER_WAYPOINT(Frozen, _("Frozen!"), "", '0.25 0.90 1', 1);
-REGISTER_WAYPOINT(Item, _("Item"), '1 0 1', 1);
+REGISTER_WAYPOINT(Item, _("Item"), "", '1 0 1', 1);
-REGISTER_WAYPOINT(RaceCheckpoint, _("Checkpoint"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(RaceFinish, _("Finish"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(RaceStart, _("Start"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(RaceStartFinish, _("Start"), '1 0.5 0', 1);
+REGISTER_WAYPOINT(RaceCheckpoint, _("Checkpoint"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(RaceFinish, _("Finish"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(RaceStart, _("Start"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(RaceStartFinish, _("Start"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(AssaultDefend, _("Defend"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(AssaultDestroy, _("Destroy"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(AssaultPush, _("Push"), '1 0.5 0', 1);
+REGISTER_WAYPOINT(AssaultDefend, _("Defend"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(AssaultDestroy, _("Destroy"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(AssaultPush, _("Push"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(FlagCarrier, _("Flag carrier"), '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagCarrierEnemy, _("Enemy carrier"), '1 1 1', 1);
-REGISTER_WAYPOINT(FlagDropped, _("Dropped flag"), '1 1 1', 1);
-REGISTER_WAYPOINT(FlagBaseNeutral, _("White base"), '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseRed, _("Red base"), '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), '0.8 0.8 0', 1);
-REGISTER_WAYPOINT(FlagReturn, _("Return flag here"), '0 0.8 0.8', 1);
+REGISTER_WAYPOINT(FlagCarrier, _("Flag carrier"), "", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagCarrierEnemy, _("Enemy carrier"), "flag_neutral_carrying", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagDropped, _("Dropped flag"), "flag_neutral_lost", '1 1 1', 1);
+REGISTER_WAYPOINT(FlagBaseNeutral, _("White base"), "flag_neutral_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseRed, _("Red base"), "flag_red_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), "flag_blue_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), "flag_yellow_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), "flag_pink_taken", '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagReturn, _("Return flag here"), "", '0 0.8 0.8', 1);
-REGISTER_WAYPOINT(DomNeut, _("Control point"), '0 1 1', 1);
-REGISTER_WAYPOINT(DomRed, _("Control point"), '0 1 1', 1);
-REGISTER_WAYPOINT(DomBlue, _("Control point"), '0 1 1', 1);
-REGISTER_WAYPOINT(DomYellow, _("Control point"), '0 1 1', 1);
-REGISTER_WAYPOINT(DomPink, _("Control point"), '0 1 1', 1);
+REGISTER_WAYPOINT(DomNeut, _("Control point"), "dom_icon_blue-highlighted", '0 1 1', 1);
+REGISTER_WAYPOINT(DomRed, _("Control point"), "dom_icon_red-highlighted", '0 1 1', 1);
+REGISTER_WAYPOINT(DomBlue, _("Control point"), "dom_icon_blue-highlighted", '0 1 1', 1);
+REGISTER_WAYPOINT(DomYellow, _("Control point"), "dom_icon_yellow-highlighted", '0 1 1', 1);
+REGISTER_WAYPOINT(DomPink, _("Control point"), "dom_icon_pink-highlighted", '0 1 1', 1);
-REGISTER_WAYPOINT(KeyDropped, _("Dropped key"), '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierFriend, _("Key carrier"), '0 1 0', 1);
-REGISTER_WAYPOINT(KeyCarrierFinish, _("Run here"), '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierRed, _("Key carrier"), '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierBlue, _("Key carrier"), '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierYellow, _("Key carrier"), '0 1 1', 1);
-REGISTER_WAYPOINT(KeyCarrierPink, _("Key carrier"), '0 1 1', 1);
+REGISTER_WAYPOINT(KeyDropped, _("Dropped key"), "kh_dropped", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierFriend, _("Key carrier"), "", '0 1 0', 1);
+REGISTER_WAYPOINT(KeyCarrierFinish, _("Run here"), "", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierRed, _("Key carrier"), "kh_red_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierBlue, _("Key carrier"), "kh_blue_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierYellow, _("Key carrier"), "kh_yellow_carrying", '0 1 1', 1);
+REGISTER_WAYPOINT(KeyCarrierPink, _("Key carrier"), "kh_pink_carrying", '0 1 1', 1);
-REGISTER_WAYPOINT(KaBall, _("Ball"), '0 1 1', 1);
-REGISTER_WAYPOINT(KaBallCarrier, _("Ball carrier"), '1 0 0', 1);
+REGISTER_WAYPOINT(KaBall, _("Ball"), "notify_ballpickedup", '0 1 1', 1);
+REGISTER_WAYPOINT(KaBallCarrier, _("Ball carrier"), "keepawayball_carrying", '1 0 0', 1);
-REGISTER_WAYPOINT(NbBall, _("Ball"), '0.91 0.85 0.62', 1);
-REGISTER_WAYPOINT(NbGoal, _("Goal"), '1 0.5 0', 1);
+REGISTER_WAYPOINT(NbBall, _("Ball"), "", '0.91 0.85 0.62', 1);
+REGISTER_WAYPOINT(NbGoal, _("Goal"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(OnsCP, _("Control point"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(OnsCPDefend, _("Control point"), '1 0.5 0', 0.5);
-REGISTER_WAYPOINT(OnsCPAttack, _("Control point"), '1 0.5 0', 2);
-REGISTER_WAYPOINT(OnsGen, _("Generator"), '1 0.5 0', 1);
-REGISTER_WAYPOINT(OnsGenShielded, _("Generator"), '1 0.5 0', 1);
+REGISTER_WAYPOINT(OnsCP, _("Control point"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(OnsCPDefend, _("Control point"), "", '1 0.5 0', 0.5);
+REGISTER_WAYPOINT(OnsCPAttack, _("Control point"), "", '1 0.5 0', 2);
+REGISTER_WAYPOINT(OnsGen, _("Generator"), "", '1 0.5 0', 1);
+REGISTER_WAYPOINT(OnsGenShielded, _("Generator"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(Weapon, _("Weapon"), '0 0 0', 1);
+REGISTER_WAYPOINT(Weapon, _("Weapon"), "", '0 0 0', 1);
-REGISTER_WAYPOINT(Monster, _("Monster"), '1 0 0', 1);
+REGISTER_WAYPOINT(Monster, _("Monster"), "", '1 0 0', 1);
-REGISTER_WAYPOINT(Vehicle, _("Vehicle"), '1 1 1', 1);
-REGISTER_WAYPOINT(VehicleIntruder, _("Intruder!"), '1 1 1', 1);
+REGISTER_WAYPOINT(Vehicle, _("Vehicle"), "", '1 1 1', 1);
+REGISTER_WAYPOINT(VehicleIntruder, _("Intruder!"), "", '1 1 1', 1);
-REGISTER_WAYPOINT(Seeker, _("Tagged"), '0.5 1 0', 2);
+REGISTER_WAYPOINT(Seeker, _("Tagged"), "", '0.5 1 0', 2);
ATTRIB(Waypoint, m_id, int, 0);
ATTRIB(Waypoint, netname, string);
ATTRIB(Waypoint, m_name, string);
+ ATTRIB(Waypoint, m_icon, string);
ATTRIB(Waypoint, m_color, vector, '1 1 1');
ATTRIB(Waypoint, m_blink, int, 1);
- CONSTRUCTOR(Waypoint, string _netname, string _name, vector _color, int _blink) {
+ CONSTRUCTOR(Waypoint, string _netname, string _name, string _icon, vector _color, int _blink) {
CONSTRUCT(Waypoint);
this.netname = _netname;
this.m_name = _name;
+ this.m_icon = _icon;
this.m_color = _color;
this.m_blink = _blink;
}
ENDCLASS(Waypoint)
-#define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink))
+#define REGISTER_WAYPOINT(id, text, icon, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, icon, color, blink))
REGISTRY(RadarIcons, BITS(7))
#define RadarIcons_from(i) _RadarIcons_from(i, RADARICON_NONE)
.int m_radaricon;
#define REGISTER_RADARICON(id, num) REGISTER(RadarIcons, RADARICON, id, m_id, new_pure(RadarIcon)) { this.m_radaricon = num; this.netname = #id; }
-REGISTER_WAYPOINT(Null, "", '0 0 0', 1);
+REGISTER_WAYPOINT(Null, "", "", '0 0 0', 1);
REGISTER_RADARICON(NONE, 0);
REGISTER_RADARICON(FLAG, 1);
if (sendflags & 64)
{
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if (sendflags & 1)
if (sendflags & 64)
{
// unfortunately, this needs to be exact (for the 3D display)
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
}
string spritelookuptext(entity this, string s)
{
+ if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
+ return "Spam"; // no need to translate this debug string
if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_name;
if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint;
return s;
}
+
+string spritelookupicon(entity this, string s)
+{
+ // TODO: needs icons! //if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
+ if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
+ if (s == WP_Item.netname) return Items_from(this.wp_extra).m_icon;
+ if (s == WP_Vehicle.netname) return Vehicles_from(this.wp_extra).m_icon;
+ //if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).m_icon;
+ if (MUTATOR_CALLHOOK(WP_Format, this, s))
+ {
+ return M_ARGV(4, string);
+ }
+
+ // need to loop, as our netname could be one of three
+ FOREACH(Waypoints, it.netname == s, {
+ return it.m_icon;
+ });
+
+ return s;
+}
#endif
#ifdef CSQC
}
// returns location of sprite healthbar
-vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, vector fontsize, string s)
+vector drawsprite_TextOrIcon(bool is_text, vector o, float ang, float minwidth, vector rgb, float a, vector sz, string str)
{
float algnx, algny;
float sw, w, h;
float aspect, sa, ca;
- sw = stringwidth(s, false, fontsize);
+ if (is_text)
+ sw = stringwidth(str, false, sz);
+ else
+ sw = sz.x;
+
if (sw > minwidth)
w = sw;
else
w = minwidth;
- h = fontsize.y;
+ h = sz.y;
// how do corners work?
aspect = vid_conwidth / vid_conheight;
if (o.x > vid_conwidth - w)
o.x = vid_conwidth - w;
if (o.y > vid_conheight - h)
- o.x = vid_conheight - h;
+ o.y = vid_conheight - h;
o.x += 0.5 * (w - sw);
- drawstring(o, s, fontsize, rgb, a, DRAWFLAG_NORMAL);
+ if (is_text)
+ drawstring(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
+ else
+ drawpic(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
o.x += 0.5 * sw;
o.y += 0.5 * h;
o = drawspritearrow(o, ang, rgb, a, SPRITE_ARROW_SCALE * t);
- string txt;
- if (autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
- txt = _("Spam");
- else
+ string pic = "";
+ bool is_text = true;
+ if (!autocvar_g_waypointsprite_text)
+ {
+ string spr_icon = spritelookupicon(this, spriteimage);
+ pic = spr_icon;
+ bool icon_found = !(!spr_icon || spr_icon == "");
+ if (icon_found) // it's valid, but let's make sure it exists!
+ {
+ pic = strcat(hud_skin_path, "/", spr_icon);
+ if(precache_pic(pic) == "")
+ {
+ pic = strcat("gfx/hud/default/", spr_icon);
+ if(!precache_pic(pic))
+ icon_found = false;
+ }
+ }
+ if (icon_found)
+ is_text = false;
+ }
+
+ vector sz;
+ vector txt_color;
+ string txt = string_null;
+ if (is_text)
+ {
txt = spritelookuptext(this, spriteimage);
- if (this.helpme && time < this.helpme)
- txt = sprintf(_("%s needing help!"), txt);
- if (autocvar_g_waypointsprite_uppercase)
- txt = strtoupper(txt);
+ if (this.helpme && time < this.helpme)
+ txt = sprintf(_("%s needing help!"), txt);
+ if (autocvar_g_waypointsprite_uppercase)
+ txt = strtoupper(txt);
+ txt_color = rgb;
+ sz = waypointsprite_fontsize * '1 1 0';
+ }
+ else
+ {
+ // for convenience icon path and color are saved to txt and txt_color
+ txt = pic;
+ txt_color = ((autocvar_g_waypointsprite_iconcolor) ? '1 1 1' : rgb);
+ sz = autocvar_g_waypointsprite_iconsize * '1 1 0';
+ }
draw_beginBoldFont();
if (this.health >= 0)
{
- o = drawspritetext(o, ang, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
-
- float align, marg;
+ float align = 0, marg;
if (this.build_finished)
align = 0.5;
else
align = 0;
if (cos(ang) > 0)
- marg = -(SPRITE_HEALTHBAR_MARGIN + SPRITE_HEALTHBAR_HEIGHT + 2 * SPRITE_HEALTHBAR_BORDER) * t - 0.5 * waypointsprite_fontsize;
+ marg = -(SPRITE_HEALTHBAR_MARGIN + SPRITE_HEALTHBAR_HEIGHT + 2 * SPRITE_HEALTHBAR_BORDER) * t - 0.5 * sz.y;
else
- marg = SPRITE_HEALTHBAR_MARGIN * t + 0.5 * waypointsprite_fontsize;
+ marg = SPRITE_HEALTHBAR_MARGIN * t + 0.5 * sz.y;
+
+ float minwidth = (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t;
+ o = drawsprite_TextOrIcon(is_text, o, ang, minwidth, txt_color, a, sz, txt);
drawhealthbar(
o,
0,
}
else
{
- o = drawspritetext(o, ang, 0, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
+ drawsprite_TextOrIcon(is_text, o, ang, 0, txt_color, a, sz, txt);
}
+
draw_endBoldFont();
}
bool autocvar_g_waypointsprite_turrets = true;
float autocvar_g_waypointsprite_turrets_maxdist = 5000;
bool autocvar_g_waypointsprite_uppercase;
+bool autocvar_g_waypointsprite_text;
+float autocvar_g_waypointsprite_iconsize = 32;
+bool autocvar_g_waypointsprite_iconcolor;
float waypointsprite_fadedistance;
float waypointsprite_normdistance;
vector drawspritearrow(vector o, float ang, vector rgb, float a, float t);
// returns location of sprite healthbar
-vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, vector fontsize, string s);
+vector drawsprite_TextOrIcon(bool is_text, vector o, float ang, float minwidth, vector rgb, float a, vector sz, string str);
float spritelookupblinkvalue(entity this, string s);
vector spritelookupcolor(entity this, string s, vector def);
.float lastflags;
.float lastground;
.float wasFlying;
-#ifdef SVQC
-.float spectatorspeed = _STAT(SPECTATORSPEED);
-#elif defined(CSQC)
-.float spectatorspeed;
-#endif
.int buttons_old;
.vector movement_old;
void PM_UpdateButtons(entity this, entity store);
- .float stat_sv_airspeedlimit_nonqw = _STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW);
- .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED);
-
/** Not real stats */
.string jumpspeedcap_min;
.string jumpspeedcap_max;
REGISTER_STAT(STRENGTH_FINISHED, float)
REGISTER_STAT(INVINCIBLE_FINISHED, float)
/** arc heat in [0,1] */
-REGISTER_STAT(ARC_HEAT, float)
REGISTER_STAT(PRESSED_KEYS, int)
/** this stat could later contain some other bits of info, like, more server-side particle config */
REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool, autocvar_g_allow_oldvortexbeam)
/** compressShotOrigin */
REGISTER_STAT(SHOTORG, int)
REGISTER_STAT(LEADLIMIT, float, autocvar_leadlimit)
-REGISTER_STAT(WEAPON_CLIPLOAD, int)
-REGISTER_STAT(WEAPON_CLIPSIZE, int)
-REGISTER_STAT(VORTEX_CHARGE, float)
REGISTER_STAT(LAST_PICKUP, float)
REGISTER_STAT(HUD, int)
-REGISTER_STAT(VORTEX_CHARGEPOOL, float)
REGISTER_STAT(HIT_TIME, float)
REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
REGISTER_STAT(TYPEHIT_TIME, float)
-REGISTER_STAT(LAYED_MINES, int)
-REGISTER_STAT(HAGAR_LOAD, int)
REGISTER_STAT(SUPERWEAPONS_FINISHED, float)
REGISTER_STAT(VEHICLESTAT_HEALTH, int)
REGISTER_STAT(VEHICLESTAT_SHIELD, int)
if(sf & ISF_LOCATION)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.oldorigin = this.origin;
}
this.pushable = true;
//this.angles = '0 0 0';
set_movetype(this, MOVETYPE_TOSS);
- this.velocity_x = ReadCoord();
- this.velocity_y = ReadCoord();
- this.velocity_z = ReadCoord();
+ this.velocity = ReadVector();
setorigin(this, this.oldorigin);
if(!this.move_time)
//WriteByte(MSG_ENTITY, this.cnt);
if(sf & ISF_LOCATION)
{
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if(sf & ISF_ANGLES)
if(sf & ISF_DROP)
{
- WriteCoord(MSG_ENTITY, this.velocity.x);
- WriteCoord(MSG_ENTITY, this.velocity.y);
- WriteCoord(MSG_ENTITY, this.velocity.z);
+ WriteVector(MSG_ENTITY, this.velocity);
}
return true;
AUTOCVAR(g_pickup_respawntime_scaling_offset, float, 0.0, "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening");
AUTOCVAR(g_pickup_respawntime_scaling_linear, float, 1.0, "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly");
+/// Adjust respawn time according to the number of players.
float adjust_respawntime(float normal_respawntime) {
float r = autocvar_g_pickup_respawntime_scaling_reciprocal;
float o = autocvar_g_pickup_respawntime_scaling_offset;
//LOG_INFOF("item %s will respawn in %f", e.classname, adjusted_respawntime);
// range: adjusted_respawntime - respawntimejitter .. adjusted_respawntime + respawntimejitter
- float actual_time = adjusted_respawntime + crandom() * e.respawntimejitter;
- Item_ScheduleRespawnIn(e, actual_time);
+ float respawn_in = adjusted_respawntime + crandom() * e.respawntimejitter;
+ Item_ScheduleRespawnIn(e, respawn_in);
}
else // if respawntime is -1, this item does not respawn
Item_Show(e, -1);
}
+AUTOCVAR(g_pickup_respawntime_initial_random, int, 1,
+ "For items that don't start spawned: 0: spawn after their normal respawntime; 1: spawn after `random * respawntime` with the *same* random; 2: same as 1 but each item has separate random");
+
+float shared_random;
+STATIC_INIT(shared_random) { shared_random = random(); }
void Item_ScheduleInitialRespawn(entity e)
{
Item_Show(e, 0);
- Item_ScheduleRespawnIn(e, max(0, game_starttime - time) + ((e.respawntimestart) ? e.respawntimestart : ITEM_RESPAWNTIME_INITIAL(e)));
+
+ float spawn_in;
+ if (autocvar_g_pickup_respawntime_initial_random == 0)
+ {
+ // range: respawntime .. respawntime + respawntimejitter
+ spawn_in = e.respawntime + random() * e.respawntimejitter;
+ }
+ else if (autocvar_g_pickup_respawntime_initial_random == 1)
+ {
+ // range:
+ // if respawntime >= ITEM_RESPAWN_TICKS: ITEM_RESPAWN_TICKS .. respawntime + respawntimejitter
+ // else: 0 .. ITEM_RESPAWN_TICKS
+ // this is to prevent powerups spawning unexpectedly without waypoints
+ spawn_in = ITEM_RESPAWN_TICKS + shared_random * (e.respawntime + e.respawntimejitter - ITEM_RESPAWN_TICKS);
+ }
+ else
+ {
+ // range: same as 1
+ spawn_in = ITEM_RESPAWN_TICKS + random() * (e.respawntime + e.respawntimejitter - ITEM_RESPAWN_TICKS);
+ }
+
+ Item_ScheduleRespawnIn(e, max(0, game_starttime - time) + ((e.respawntimestart) ? e.respawntimestart : spawn_in));
}
void GiveRandomWeapons(entity receiver, int num_weapons, string weapon_names,
LABEL(pickup)
- toucher.last_pickup = time;
+ STAT(LAST_PICKUP, toucher) = time;
Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
_sound (toucher, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
return rating;
}
-void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
RemoveItem(this);
s = Buff_UndeprecateName(argv(j));
if(s == it.m_name)
{
- this.buffs |= (it.m_itemid);
+ STAT(BUFFS, this) |= (it.m_itemid);
break;
}
});
if(this.ammo_fuel != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, this.ammo_fuel), "fuel");
if(this.health != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, this.health), "health");
if(this.armorvalue != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, this.armorvalue), "armor");
- FOREACH(Buffs, it != BUFF_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(this.buffs & (it.m_itemid)), it.m_name));
+ FOREACH(Buffs, it != BUFF_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(STAT(BUFFS, this) & (it.m_itemid)), it.m_name));
FOREACH(Weapons, it != WEP_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(this.weapons & (it.m_wepset)), it.netname));
}
this.netname = strzone(this.netname);
bool GiveBuff(entity e, Buff thebuff, int op, int val)
{
- bool had_buff = (e.buffs & thebuff.m_itemid);
+ bool had_buff = (STAT(BUFFS, e) & thebuff.m_itemid);
switch(op)
{
case OP_SET:
if(val > 0)
- e.buffs |= thebuff.m_itemid;
+ STAT(BUFFS, e) |= thebuff.m_itemid;
else
- e.buffs &= ~thebuff.m_itemid;
+ STAT(BUFFS, e) &= ~thebuff.m_itemid;
break;
case OP_MIN:
case OP_PLUS:
if(val > 0)
- e.buffs |= thebuff.m_itemid;
+ STAT(BUFFS, e) |= thebuff.m_itemid;
break;
case OP_MAX:
if(val <= 0)
- e.buffs &= ~thebuff.m_itemid;
+ STAT(BUFFS, e) &= ~thebuff.m_itemid;
break;
case OP_MINUS:
if(val > 0)
- e.buffs &= ~thebuff.m_itemid;
+ STAT(BUFFS, e) &= ~thebuff.m_itemid;
break;
}
- bool have_buff = (e.buffs & thebuff.m_itemid);
+ bool have_buff = (STAT(BUFFS, e) & thebuff.m_itemid);
return (had_buff != have_buff);
}
const float ITEM_RESPAWN_TICKS = 10;
-#define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS))
- // range: 10 .. respawntime + respawntimejitter
-
.float max_armorvalue;
.float pickup_anyway;
// Otherwise mdl_dead will be displayed at the map origin, and nobody would
// want that!
-void func_breakable_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void func_breakable_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
//
// func_breakable
_sound (this, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM);
if(this.dmg)
- RadiusDamage(this, act, this.dmg, this.dmg_edge, this.dmg_radius, this, NULL, this.dmg_force, DEATH_HURTTRIGGER.m_id, NULL);
+ RadiusDamage(this, act, this.dmg, this.dmg_edge, this.dmg_radius, this, NULL, this.dmg_force, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, NULL);
if(this.cnt) // TODO
__pointparticles(this.cnt, this.absmin * 0.5 + this.absmax * 0.5, '0 0 0', this.count);
func_breakable_destroy(this, NULL, NULL);
}
-void func_breakable_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void func_breakable_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.state == 1)
return;
button_fire (this);
}
-void button_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void button_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.spawnflags & DOOR_NOSPLASH)
if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
if(sf & 1)
{
WriteByte(MSG_ENTITY, this.warpzone_isboxy);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
- WriteCoord(MSG_ENTITY, this.mins_x);
- WriteCoord(MSG_ENTITY, this.mins_y);
- WriteCoord(MSG_ENTITY, this.mins_z);
- WriteCoord(MSG_ENTITY, this.maxs_x);
- WriteCoord(MSG_ENTITY, this.maxs_y);
- WriteCoord(MSG_ENTITY, this.maxs_z);
+ WriteVector(MSG_ENTITY, this.mins);
+ WriteVector(MSG_ENTITY, this.maxs);
- WriteCoord(MSG_ENTITY, this.movedir_x);
- WriteCoord(MSG_ENTITY, this.movedir_y);
- WriteCoord(MSG_ENTITY, this.movedir_z);
+ WriteVector(MSG_ENTITY, this.movedir);
WriteByte(MSG_ENTITY, this.speed);
WriteByte(MSG_ENTITY, this.state);
if(sf & 1)
{
this.warpzone_isboxy = ReadByte();
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
setsize(this, this.mins, this.maxs);
- this.movedir_x = ReadCoord();
- this.movedir_y = ReadCoord();
- this.movedir_z = ReadCoord();
+ this.movedir = ReadVector();
this.speed = ReadByte();
this.state = ReadByte();
)
{ // KIll Kill Kill!!
#ifdef SVQC
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
#endif
}
else
{
#ifdef SVQC
if((this.dmg) && (blocker.takedamage == DAMAGE_YES)) // Shall we bite?
- Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
#endif
// don't change direction for dead or dying stuff
{
//gib dying stuff just to make sure
if((this.dmg) && (blocker.takedamage != DAMAGE_NO)) // Shall we bite?
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
}
#endif
}
door_fire(this.owner, actor, trigger);
}
-void door_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void door_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.spawnflags & DOOR_NOSPLASH)
if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
{
if((this.spawnflags & 8) && (blocker.takedamage != DAMAGE_NO)) { // Kill Kill Kill!!
#ifdef SVQC
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
#endif
}
else
#ifdef SVQC
if((this.dmg) && (blocker.takedamage == DAMAGE_YES)) // Shall we bite?
- Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
#endif
//Dont chamge direction for dead or dying stuff
{
//gib dying stuff just to make sure
if((this.dmg) && (blocker.takedamage != DAMAGE_NO)) // Shall we bite?
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
}
#endif
}
trigger_common_write(this, true);
- WriteCoord(MSG_ENTITY, this.pos1_x);
- WriteCoord(MSG_ENTITY, this.pos1_y);
- WriteCoord(MSG_ENTITY, this.pos1_z);
- WriteCoord(MSG_ENTITY, this.pos2_x);
- WriteCoord(MSG_ENTITY, this.pos2_y);
- WriteCoord(MSG_ENTITY, this.pos2_z);
+ WriteVector(MSG_ENTITY, this.pos1);
+ WriteVector(MSG_ENTITY, this.pos2);
- WriteCoord(MSG_ENTITY, this.size_x);
- WriteCoord(MSG_ENTITY, this.size_y);
- WriteCoord(MSG_ENTITY, this.size_z);
+ WriteVector(MSG_ENTITY, this.size);
WriteShort(MSG_ENTITY, this.wait);
WriteShort(MSG_ENTITY, this.speed);
if(sf & SF_TRIGGER_UPDATE)
{
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
-
- WriteCoord(MSG_ENTITY, this.pos1_x);
- WriteCoord(MSG_ENTITY, this.pos1_y);
- WriteCoord(MSG_ENTITY, this.pos1_z);
- WriteCoord(MSG_ENTITY, this.pos2_x);
- WriteCoord(MSG_ENTITY, this.pos2_y);
- WriteCoord(MSG_ENTITY, this.pos2_z);
+ WriteVector(MSG_ENTITY, this.origin);
+
+ WriteVector(MSG_ENTITY, this.pos1);
+ WriteVector(MSG_ENTITY, this.pos2);
}
return true;
trigger_common_read(this, true);
- vector v;
-
- v.x = ReadCoord();
- v.y = ReadCoord();
- v.z = ReadCoord();
- this.pos1 = v;
-
- v.x = ReadCoord();
- v.y = ReadCoord();
- v.z = ReadCoord();
- this.pos2 = v;
+ this.pos1 = ReadVector();
+ this.pos2 = ReadVector();
- v.x = ReadCoord();
- v.y = ReadCoord();
- v.z = ReadCoord();
- this.size = v;
+ this.size = ReadVector();
this.wait = ReadShort();
this.speed = ReadShort();
if(sf & SF_TRIGGER_UPDATE)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
- this.pos1_x = ReadCoord();
- this.pos1_y = ReadCoord();
- this.pos1_z = ReadCoord();
- this.pos2_x = ReadCoord();
- this.pos2_y = ReadCoord();
- this.pos2_z = ReadCoord();
+ this.pos1 = ReadVector();
+ this.pos2 = ReadVector();
}
return true;
}
_sound(this, CH_TRIGGER_SINGLE, this.noise2, VOL_BASE, ATTEN_NORM);
}
-void fd_secret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void fd_secret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
fd_secret_use(this, NULL, NULL);
}
trigger_common_write(this, true);
- WriteCoord(MSG_ENTITY, this.pos1_x);
- WriteCoord(MSG_ENTITY, this.pos1_y);
- WriteCoord(MSG_ENTITY, this.pos1_z);
- WriteCoord(MSG_ENTITY, this.pos2_x);
- WriteCoord(MSG_ENTITY, this.pos2_y);
- WriteCoord(MSG_ENTITY, this.pos2_z);
+ WriteVector(MSG_ENTITY, this.pos1);
+ WriteVector(MSG_ENTITY, this.pos2);
- WriteCoord(MSG_ENTITY, this.size_x);
- WriteCoord(MSG_ENTITY, this.size_y);
- WriteCoord(MSG_ENTITY, this.size_z);
+ WriteVector(MSG_ENTITY, this.size);
WriteAngle(MSG_ENTITY, this.mangle_x);
WriteAngle(MSG_ENTITY, this.mangle_y);
trigger_common_read(this, true);
- this.pos1_x = ReadCoord();
- this.pos1_y = ReadCoord();
- this.pos1_z = ReadCoord();
- this.pos2_x = ReadCoord();
- this.pos2_y = ReadCoord();
- this.pos2_z = ReadCoord();
+ this.pos1 = ReadVector();
+ this.pos2 = ReadVector();
- this.size_x = ReadCoord();
- this.size_y = ReadCoord();
- this.size_z = ReadCoord();
+ this.size = ReadVector();
this.mangle_x = ReadAngle();
this.mangle_y = ReadAngle();
}
if(fl & 4)
{
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if(fl & 1)
{
WriteShort(MSG_ENTITY, this.modelindex);
if(fl & 0x80)
{
- WriteCoord(MSG_ENTITY, this.mins_x);
- WriteCoord(MSG_ENTITY, this.mins_y);
- WriteCoord(MSG_ENTITY, this.mins_z);
- WriteCoord(MSG_ENTITY, this.maxs_x);
- WriteCoord(MSG_ENTITY, this.maxs_y);
- WriteCoord(MSG_ENTITY, this.maxs_z);
+ WriteVector(MSG_ENTITY, this.mins);
+ WriteVector(MSG_ENTITY, this.maxs);
}
}
else
WriteShort(MSG_ENTITY, 0);
if(fl & 0x80)
{
- WriteCoord(MSG_ENTITY, this.maxs_x);
- WriteCoord(MSG_ENTITY, this.maxs_y);
- WriteCoord(MSG_ENTITY, this.maxs_z);
+ WriteVector(MSG_ENTITY, this.maxs);
}
}
WriteShort(MSG_ENTITY, this.cnt);
}
if(f & 4)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
}
if(f & 1)
{
{
if(this.modelindex)
{
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
}
else
{
this.mins = '0 0 0';
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.maxs = ReadVector();
}
}
else
#ifdef SVQC
bool rainsnow_SendEntity(entity this, entity to, float sf)
{
+ vector myorg = this.origin + this.mins;
+ vector mysize = this.maxs - this.mins;
WriteHeader(MSG_ENTITY, ENT_CLIENT_RAINSNOW);
WriteByte(MSG_ENTITY, this.state);
- WriteCoord(MSG_ENTITY, this.origin_x + this.mins_x);
- WriteCoord(MSG_ENTITY, this.origin_y + this.mins_y);
- WriteCoord(MSG_ENTITY, this.origin_z + this.mins_z);
- WriteCoord(MSG_ENTITY, this.maxs_x - this.mins_x);
- WriteCoord(MSG_ENTITY, this.maxs_y - this.mins_y);
- WriteCoord(MSG_ENTITY, this.maxs_z - this.mins_z);
+ WriteVector(MSG_ENTITY, myorg);
+ WriteVector(MSG_ENTITY, mysize);
WriteShort(MSG_ENTITY, compressShortVector(this.dest));
WriteShort(MSG_ENTITY, this.count);
WriteByte(MSG_ENTITY, this.cnt);
NET_HANDLE(ENT_CLIENT_RAINSNOW, bool isnew)
{
this.impulse = ReadByte(); // Rain, Snow, or Whatever
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.origin = ReadVector();
+ this.maxs = ReadVector();
this.velocity = decompressShortVector(ReadShort());
this.count = ReadShort() * 10;
this.glow_color = ReadByte(); // color
WriteString(MSG_ENTITY, this.curvetarget);
- WriteCoord(MSG_ENTITY, this.pos1_x);
- WriteCoord(MSG_ENTITY, this.pos1_y);
- WriteCoord(MSG_ENTITY, this.pos1_z);
- WriteCoord(MSG_ENTITY, this.pos2_x);
- WriteCoord(MSG_ENTITY, this.pos2_y);
- WriteCoord(MSG_ENTITY, this.pos2_z);
+ WriteVector(MSG_ENTITY, this.pos1);
+ WriteVector(MSG_ENTITY, this.pos2);
- WriteCoord(MSG_ENTITY, this.size_x);
- WriteCoord(MSG_ENTITY, this.size_y);
- WriteCoord(MSG_ENTITY, this.size_z);
+ WriteVector(MSG_ENTITY, this.size);
- WriteCoord(MSG_ENTITY, this.view_ofs_x);
- WriteCoord(MSG_ENTITY, this.view_ofs_y);
- WriteCoord(MSG_ENTITY, this.view_ofs_z);
+ WriteVector(MSG_ENTITY, this.view_ofs);
WriteAngle(MSG_ENTITY, this.mangle_x);
WriteAngle(MSG_ENTITY, this.mangle_y);
this.curvetarget = strzone(ReadString());
- this.pos1_x = ReadCoord();
- this.pos1_y = ReadCoord();
- this.pos1_z = ReadCoord();
- this.pos2_x = ReadCoord();
- this.pos2_y = ReadCoord();
- this.pos2_z = ReadCoord();
+ this.pos1 = ReadVector();
+ this.pos2 = ReadVector();
- this.size_x = ReadCoord();
- this.size_y = ReadCoord();
- this.size_z = ReadCoord();
+ this.size = ReadVector();
- this.view_ofs_x = ReadCoord();
- this.view_ofs_y = ReadCoord();
- this.view_ofs_z = ReadCoord();
+ this.view_ofs = ReadVector();
this.mangle_x = ReadAngle();
this.mangle_y = ReadAngle();
WriteString(MSG_ENTITY, this.platmovetype);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteString(MSG_ENTITY, this.target);
WriteString(MSG_ENTITY, this.target2);
{
this.platmovetype = strzone(ReadString());
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.target = strzone(ReadString());
if(((this.spawnflags & 8) == 0) == (this.team != hitent.team))
return;
if(hitent.takedamage)
- Damage(hitent, this, this, ((this.dmg < 0) ? 100000 : (this.dmg * frametime)), DEATH_HURTTRIGGER.m_id, hitloc, '0 0 0');
+ Damage(hitent, this, this, ((this.dmg < 0) ? 100000 : (this.dmg * frametime)), DEATH_HURTTRIGGER.m_id, DMG_NOWEP, hitloc, '0 0 0');
}
}
WriteByte(MSG_ENTITY, fl);
if(fl & 1)
{
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if(fl & 8)
{
{
if(fl & 0x80)
{
- WriteCoord(MSG_ENTITY, this.enemy.origin_x);
- WriteCoord(MSG_ENTITY, this.enemy.origin_y);
- WriteCoord(MSG_ENTITY, this.enemy.origin_z);
+ WriteVector(MSG_ENTITY, this.enemy.origin);
}
else
{
if(f & 1)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
}
if(f & 8)
{
if(f & 0x80)
{
- this.velocity_x = ReadCoord();
- this.velocity_y = ReadCoord();
- this.velocity_z = ReadCoord();
+ this.velocity = ReadVector();
}
else
{
WriteByte(MSG_ENTITY, this.cnt);
WriteCoord(MSG_ENTITY, this.speed);
WriteString(MSG_ENTITY, this.targetname);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteAngle(MSG_ENTITY, this.mangle_x);
WriteAngle(MSG_ENTITY, this.mangle_y);
this.cnt = ReadByte();
this.speed = ReadCoord();
this.targetname = strzone(ReadString());
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
this.mangle_x = ReadAngle();
this.mangle_y = ReadAngle();
{
if(this.dmgtime2 < time)
{
- Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
this.dmgtime2 = time + this.dmgtime;
}
// Gib dead/dying stuff
if(IS_DEAD(blocker))
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
}
#endif
}
if((this.spawnflags & 4) && (blocker.takedamage != DAMAGE_NO))
{ // KIll Kill Kill!!
#ifdef SVQC
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
#endif
}
else
#ifdef SVQC
if((this.dmg) && (blocker.takedamage != DAMAGE_NO))
{ // Shall we bite?
- Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
// Gib dead/dying stuff
if(IS_DEAD(blocker))
- Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, blocker.origin, '0 0 0');
+ Damage (blocker, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, blocker.origin, '0 0 0');
}
#endif
#include <common/triggers/target/location.qc>
#include <common/triggers/target/music.qc>
#include <common/triggers/target/spawn.qc>
+#include <common/triggers/target/spawnpoint.qc>
#include <common/triggers/target/speaker.qc>
#include <common/triggers/target/voicescript.qc>
#include <common/triggers/target/location.qh>
#include <common/triggers/target/music.qh>
#include <common/triggers/target/spawn.qh>
+#include <common/triggers/target/spawnpoint.qh>
#include <common/triggers/target/speaker.qh>
#include <common/triggers/target/voicescript.qh>
#include "location.qc"
#include "music.qc"
#include "spawn.qc"
+#include "spawnpoint.qc"
#include "speaker.qc"
#include "voicescript.qc"
if(!actor.iscreature && !actor.damagedbytriggers)
return;
- Damage(actor, this, trigger, 1000, DEATH_HURTTRIGGER.m_id, actor.origin, '0 0 0');
+ Damage(actor, this, trigger, 1000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, actor.origin, '0 0 0');
}
spawnfunc(target_kill)
WriteByte(MSG_ENTITY, sf);
if(sf & 4)
{
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if(sf & 1)
{
if(this.model != "null")
{
WriteShort(MSG_ENTITY, this.modelindex);
- WriteCoord(MSG_ENTITY, this.mins.x);
- WriteCoord(MSG_ENTITY, this.mins.y);
- WriteCoord(MSG_ENTITY, this.mins.z);
- WriteCoord(MSG_ENTITY, this.maxs.x);
- WriteCoord(MSG_ENTITY, this.maxs.y);
- WriteCoord(MSG_ENTITY, this.maxs.z);
+ WriteVector(MSG_ENTITY, this.mins);
+ WriteVector(MSG_ENTITY, this.maxs);
}
else
{
WriteShort(MSG_ENTITY, 0);
- WriteCoord(MSG_ENTITY, this.maxs.x);
- WriteCoord(MSG_ENTITY, this.maxs.y);
- WriteCoord(MSG_ENTITY, this.maxs.z);
+ WriteVector(MSG_ENTITY, this.maxs);
}
WriteByte(MSG_ENTITY, this.volume * 255.0);
WriteByte(MSG_ENTITY, this.fade_time * 16.0);
int f = ReadByte();
if(f & 4)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
}
if(f & 1)
{
this.modelindex = ReadShort();
if(this.modelindex)
{
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
}
else
{
this.mins = '0 0 0';
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.maxs = ReadVector();
}
this.volume = ReadByte() / 255.0;
--- /dev/null
+#include "spawnpoint.qh"
+
+#ifdef SVQC
+void target_spawnpoint_use(entity this, entity actor, entity trigger)
+{
+ if(this.active != ACTIVE_ACTIVE)
+ return;
+
+ actor.spawnpoint_targ = this;
+}
+
+void target_spawnpoint_reset(entity this)
+{
+ this.active = ACTIVE_ACTIVE;
+}
+
+// TODO: persistent spawnflag?
+spawnfunc(target_spawnpoint)
+{
+ this.active = ACTIVE_ACTIVE;
+ this.use = target_spawnpoint_use;
+ this.reset = target_spawnpoint_reset;
+}
+#endif
--- /dev/null
+#pragma once
+
+#ifdef SVQC
+.entity spawnpoint_targ;
+#endif
if(IS_PLAYER(head))
if(head.health >= 1)
++tdeath_hit;
- Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG.m_id, head.origin, '0 0 0');
+ Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG.m_id, DMG_NOWEP, head.origin, '0 0 0');
}
}
else // dead bodies and monsters gib themselves instead of telefragging
- Damage (telefragger, teleporter, telefragger, 10000, DEATH_TELEFRAG.m_id, telefragger.origin, '0 0 0');
+ Damage (telefragger, teleporter, telefragger, 10000, DEATH_TELEFRAG.m_id, DMG_NOWEP, telefragger.origin, '0 0 0');
}
}
this.enemy = NULL; // I still hate you all
}
- Damage (toucher, this, own, this.dmg, DEATH_HURTTRIGGER.m_id, toucher.origin, '0 0 0');
+ Damage (toucher, this, own, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, toucher.origin, '0 0 0');
}
}
else if(toucher.damagedbytriggers)
if(toucher.takedamage)
{
EXACTTRIGGER_TOUCH(this, toucher);
- Damage(toucher, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, toucher.origin, '0 0 0');
+ Damage(toucher, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, toucher.origin, '0 0 0');
}
}
WriteByte(MSG_ENTITY, this.active);
WriteCoord(MSG_ENTITY, this.height);
- WriteCoord(MSG_ENTITY, this.movedir_x);
- WriteCoord(MSG_ENTITY, this.movedir_y);
- WriteCoord(MSG_ENTITY, this.movedir_z);
+ WriteVector(MSG_ENTITY, this.movedir);
trigger_common_write(this, true);
WriteByte(MSG_ENTITY, this.cnt);
WriteString(MSG_ENTITY, this.targetname);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteAngle(MSG_ENTITY, this.angles_x);
WriteAngle(MSG_ENTITY, this.angles_y);
this.active = ReadByte();
this.height = ReadCoord();
- this.movedir_x = ReadCoord();
- this.movedir_y = ReadCoord();
- this.movedir_z = ReadCoord();
+ this.movedir = ReadVector();
trigger_common_read(this, true);
this.classname = "push_target";
this.cnt = ReadByte();
this.targetname = strzone(ReadString());
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
this.angles_x = ReadAngle();
this.angles_y = ReadAngle();
multi_trigger(this);
}
-void multi_eventdamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void multi_eventdamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(!this.takedamage)
return;
void secrets_setstatus(entity this)
{
- this.stat_secrets_total = secrets_total;
- this.stat_secrets_found = secrets_found;
+ // TODO: use global stats!
+ STAT(SECRETS_TOTAL, this) = secrets_total;
+ STAT(SECRETS_FOUND, this) = secrets_found;
}
/**
float secrets_found;
-.float stat_secrets_total = _STAT(SECRETS_TOTAL);
-.float stat_secrets_found = _STAT(SECRETS_FOUND);
-
/**
* update secrets status.
*/
// Or we have exited it very recently.
// Do the damage and renew the timer.
#ifdef SVQC
- Damage (this.owner, this, this, this.dmg, DEATH_SWAMP.m_id, this.owner.origin, '0 0 0');
+ Damage (this.owner, this, this, this.dmg, DEATH_SWAMP.m_id, DMG_NOWEP, this.owner.origin, '0 0 0');
#endif
this.nextthink = time + this.swamp_interval;
// set myself as current viewloc where possible
#if 1
- FOREACH_CLIENT(it.viewloc == this,
+ FOREACH_CLIENT(IS_PLAYER(it) && it.viewloc == this,
{
it.viewloc = NULL;
});
WriteEntity(MSG_ENTITY, this.enemy);
WriteEntity(MSG_ENTITY, this.goalentity);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
return true;
}
WriteByte(MSG_ENTITY, this.cnt);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteAngle(MSG_ENTITY, this.angles_x);
WriteAngle(MSG_ENTITY, this.angles_y);
this.enemy = findfloat(NULL, entnum, point1);
this.goalentity = findfloat(NULL, entnum, point2);
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
return = true;
{
this.cnt = ReadByte();
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.movedir_x = ReadAngle();
BITSET_ASSIGN(f, 1);
if(this.origin != '0 0 0')
BITSET_ASSIGN(f, 4);
+ if(this.movedir != '0 0 0')
+ BITSET_ASSIGN(f, 8);
+ if(this.angles != '0 0 0')
+ BITSET_ASSIGN(f, 16);
WriteByte(MSG_ENTITY, f);
if(withtarget)
{
- WriteString(MSG_ENTITY, this.target);
- WriteString(MSG_ENTITY, this.target2);
- WriteString(MSG_ENTITY, this.target3);
- WriteString(MSG_ENTITY, this.target4);
- WriteString(MSG_ENTITY, this.targetname);
- WriteString(MSG_ENTITY, this.killtarget);
+ // probably some way to clean this up...
+ int targbits = 0;
+ if(this.target && this.target != "") targbits |= BIT(0);
+ if(this.target2 && this.target2 != "") targbits |= BIT(1);
+ if(this.target3 && this.target3 != "") targbits |= BIT(2);
+ if(this.target4 && this.target4 != "") targbits |= BIT(3);
+ if(this.targetname && this.targetname != "") targbits |= BIT(4);
+ if(this.killtarget && this.killtarget != "") targbits |= BIT(5);
+
+ WriteByte(MSG_ENTITY, targbits);
+
+ if(targbits & BIT(0))
+ WriteString(MSG_ENTITY, this.target);
+ if(targbits & BIT(1))
+ WriteString(MSG_ENTITY, this.target2);
+ if(targbits & BIT(2))
+ WriteString(MSG_ENTITY, this.target3);
+ if(targbits & BIT(3))
+ WriteString(MSG_ENTITY, this.target4);
+ if(targbits & BIT(4))
+ WriteString(MSG_ENTITY, this.targetname);
+ if(targbits & BIT(5))
+ WriteString(MSG_ENTITY, this.killtarget);
}
if(f & 4)
- {
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
- }
+ WriteVector(MSG_ENTITY, this.origin);
- WriteShort(MSG_ENTITY, this.modelindex);
- WriteCoord(MSG_ENTITY, this.mins.x);
- WriteCoord(MSG_ENTITY, this.mins.y);
- WriteCoord(MSG_ENTITY, this.mins.z);
- WriteCoord(MSG_ENTITY, this.maxs.x);
- WriteCoord(MSG_ENTITY, this.maxs.y);
- WriteCoord(MSG_ENTITY, this.maxs.z);
- WriteByte(MSG_ENTITY, bound(1, this.scale * 16, 255));
+ if(f & 8)
+ WriteVector(MSG_ENTITY, this.movedir);
- WriteCoord(MSG_ENTITY, this.movedir_x);
- WriteCoord(MSG_ENTITY, this.movedir_y);
- WriteCoord(MSG_ENTITY, this.movedir_z);
+ if(f & 16)
+ WriteVector(MSG_ENTITY, this.angles);
- WriteCoord(MSG_ENTITY, this.angles_x);
- WriteCoord(MSG_ENTITY, this.angles_y);
- WriteCoord(MSG_ENTITY, this.angles_z);
+ WriteShort(MSG_ENTITY, this.modelindex);
+ WriteVector(MSG_ENTITY, this.mins);
+ WriteVector(MSG_ENTITY, this.maxs);
+ WriteByte(MSG_ENTITY, bound(1, this.scale * 16, 255));
}
#elif defined(CSQC)
if(withtarget)
{
if(this.target) { strunzone(this.target); }
- this.target = strzone(ReadString());
if(this.target2) { strunzone(this.target2); }
- this.target2 = strzone(ReadString());
if(this.target3) { strunzone(this.target3); }
- this.target3 = strzone(ReadString());
if(this.target4) { strunzone(this.target4); }
- this.target4 = strzone(ReadString());
if(this.targetname) { strunzone(this.targetname); }
- this.targetname = strzone(ReadString());
if(this.killtarget) { strunzone(this.killtarget); }
- this.killtarget = strzone(ReadString());
+
+ int targbits = ReadByte();
+
+ #define X(xs,b) MACRO_BEGIN { \
+ if(targbits & BIT(b)) \
+ xs = strzone(ReadString()); \
+ else \
+ xs = string_null; \
+ } MACRO_END
+
+ X(this.target, 0);
+ X(this.target2, 1);
+ X(this.target3, 2);
+ X(this.target4, 3);
+ X(this.targetname, 4);
+ X(this.killtarget, 5);
+ #undef X
}
if(f & 4)
- {
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
- }
+ this.origin = ReadVector();
else
this.origin = '0 0 0';
setorigin(this, this.origin);
+ if(f & 8)
+ this.movedir = ReadVector();
+ else
+ this.movedir = '0 0 0';
+
+ if(f & 16)
+ this.angles = ReadVector();
+ else
+ this.angles = '0 0 0';
+
this.modelindex = ReadShort();
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
this.scale = ReadByte() / 16;
setsize(this, this.mins, this.maxs);
-
- this.movedir_x = ReadCoord();
- this.movedir_y = ReadCoord();
- this.movedir_z = ReadCoord();
-
- this.angles_x = ReadCoord();
- this.angles_y = ReadCoord();
- this.angles_z = ReadCoord();
}
void trigger_remove_generic(entity this)
LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it", spriteimage);
}
- txt = this.netname;
- if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
- txt = _("Spam");
- else
- txt = spritelookuptext(this, spriteimage);
+ txt = spritelookuptext(this, spriteimage);
if(time - floor(time) > 0.5 && t == this.team)
{
}
o = drawspritearrow(o, M_PI, rgb, a, SPRITE_ARROW_SCALE * t);
- o = drawspritetext(o, M_PI, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
+ o = drawsprite_TextOrIcon(true, o, M_PI, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
drawhealthbar(
o,
0,
{
this.m_id = ReadByte();
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.angles_x = ReadAngle();
if(sf & TNSF_MOVE)
{
- this.origin_x = ReadShort();
- this.origin_y = ReadShort();
- this.origin_z = ReadShort();
+ this.origin = ReadVector();
setorigin(this, this.origin);
- this.velocity_x = ReadShort();
- this.velocity_y = ReadShort();
- this.velocity_z = ReadShort();
+ this.velocity = ReadVector();
this.angles_y = ReadShort();
}
}
-void turret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
+void turret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector vforce)
{
// Enough already!
if(this.deadflag == DEAD_DEAD)
{
WriteByte(MSG_ENTITY, this.m_id);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteAngle(MSG_ENTITY, this.angles_x);
WriteAngle(MSG_ENTITY, this.angles_y);
if(sf & TNSF_MOVE)
{
- WriteShort(MSG_ENTITY, rint(this.origin_x));
- WriteShort(MSG_ENTITY, rint(this.origin_y));
- WriteShort(MSG_ENTITY, rint(this.origin_z));
+ WriteVector(MSG_ENTITY, this.origin);
- WriteShort(MSG_ENTITY, rint(this.velocity_x));
- WriteShort(MSG_ENTITY, rint(this.velocity_y));
- WriteShort(MSG_ENTITY, rint(this.velocity_z));
+ WriteVector(MSG_ENTITY, this.velocity);
WriteShort(MSG_ENTITY, rint(this.angles_y));
}
this.event_damage = func_null;
#ifdef TURRET_DEBUG
float d;
- d = RadiusDamage (this, this.owner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
+ d = RadiusDamage (this, this.owner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, DMG_NOWEP, NULL);
this.owner.tur_debug_dmg_t_h = this.owner.tur_debug_dmg_t_h + d;
this.owner.tur_debug_dmg_t_f = this.owner.tur_debug_dmg_t_f + this.owner.shot_dmg;
#else
- RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
+ RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, DMG_NOWEP, NULL);
#endif
delete(this);
}
turret_projectile_explode(this);
}
-void turret_projectile_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
+void turret_projectile_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector vforce)
{
this.velocity += vforce;
this.health -= damage;
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_EWheelAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_EWheelAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_EWHEEL.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(EWheelAttack, PortoLaunch)
-/* flags */ ATTRIB(EWheelAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(EWheelAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(EWheelAttack, impulse, int, 5);
/* refname */ ATTRIB(EWheelAttack, netname, string, "turret_ewheel");
/* wepname */ ATTRIB(EWheelAttack, m_name, string, _("eWheel"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_FlacAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_FlacAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_FLAC.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
setorigin(this, this.enemy.origin + randomvec() * this.owner.shot_radius);
#ifdef TURRET_DEBUG
- float d = RadiusDamage (this, this.owner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
+ float d = RadiusDamage (this, this.owner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, DMG_NOWEP, NULL);
this.owner.tur_dbg_dmg_t_h = this.owner.tur_dbg_dmg_t_h + d;
this.owner.tur_dbg_dmg_t_f = this.owner.tur_dbg_dmg_t_f + this.owner.shot_dmg;
#else
- RadiusDamage (this, this.realowner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL);
+ RadiusDamage (this, this.realowner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, DMG_NOWEP, NULL);
#endif
delete(this);
}
#pragma once
+// TODO: WEP_TYPE_OTHER?
+
CLASS(FlacAttack, PortoLaunch)
/* flags */ ATTRIB(FlacAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(FlacAttack, impulse, int, 5);
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_HellionAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_HellionAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_HELLION.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(HellionAttack, PortoLaunch)
-/* flags */ ATTRIB(HellionAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(HellionAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(HellionAttack, impulse, int, 9);
/* refname */ ATTRIB(HellionAttack, netname, string, "turret_hellion");
/* wepname */ ATTRIB(HellionAttack, m_name, string, _("Hellion"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_HunterKillerAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_HunterKillerAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_HK.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(HunterKillerAttack, PortoLaunch)
-/* flags */ ATTRIB(HunterKillerAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(HunterKillerAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(HunterKillerAttack, impulse, int, 9);
/* refname */ ATTRIB(HunterKillerAttack, netname, string, "turret_hk");
/* wepname */ ATTRIB(HunterKillerAttack, m_name, string, _("Hunter-Killer"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(machinegun, sustained_refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MachineGunTurretAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MachineGunTurretAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_MACHINEGUN.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(MachineGunTurretAttack, PortoLaunch)
-/* flags */ ATTRIB(MachineGunTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(MachineGunTurretAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(MachineGunTurretAttack, impulse, int, 9);
/* refname */ ATTRIB(MachineGunTurretAttack, netname, string, "turret_machinegun");
/* wepname */ ATTRIB(MachineGunTurretAttack, m_name, string, _("Machinegun"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(machinegun, sustained_refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MLRSTurretAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MLRSTurretAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_MLRS.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(MLRSTurretAttack, PortoLaunch)
-/* flags */ ATTRIB(MLRSTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(MLRSTurretAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(MLRSTurretAttack, impulse, int, 9);
/* refname */ ATTRIB(MLRSTurretAttack, netname, string, "turret_mlrs");
/* wepname */ ATTRIB(MLRSTurretAttack, m_name, string, _("MLRS"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_PhaserTurretAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_PhaserTurretAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_PHASER.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(PhaserTurretAttack, PortoLaunch)
-/* flags */ ATTRIB(PhaserTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(PhaserTurretAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(PhaserTurretAttack, impulse, int, 9);
/* refname */ ATTRIB(PhaserTurretAttack, netname, string, "turret_phaser");
/* wepname */ ATTRIB(PhaserTurretAttack, m_name, string, _("Phaser"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_PlasmaAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_PlasmaAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_PLASMA.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(PlasmaAttack, PortoLaunch)
-/* flags */ ATTRIB(PlasmaAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(PlasmaAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(PlasmaAttack, impulse, int, 5);
/* refname */ ATTRIB(PlasmaAttack, netname, string, "turret_plasma");
/* wepname */ ATTRIB(PlasmaAttack, m_name, string, _("Plasma"));
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_TeslaCoilTurretAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_TeslaCoilTurretAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_TESLA.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
if (etarget)
{
te_csqc_lightningarc(from.origin, etarget.origin);
- Damage(etarget, actor, actor, damage, DEATH_TURRET_TESLA.m_id, etarget.origin, '0 0 0');
+ Damage(etarget, actor, actor, damage, DEATH_TURRET_TESLA.m_id, DMG_NOWEP, etarget.origin, '0 0 0');
etarget.railgunhit = true;
IL_PUSH(g_railgunhit, etarget);
}
#pragma once
CLASS(TeslaCoilTurretAttack, PortoLaunch)
-/* flags */ ATTRIB(TeslaCoilTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(TeslaCoilTurretAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(TeslaCoilTurretAttack, impulse, int, 9);
/* refname */ ATTRIB(TeslaCoilTurretAttack, netname, string, "turret_tesla");
/* wepname */ ATTRIB(TeslaCoilTurretAttack, m_name, string, _("Tesla Coil"));
{
if (turret_validate_target(this, e, this.target_validate_flags))
if (e != this && e.owner != this)
- Damage(e, this, this, (autocvar_g_turrets_unit_walker_melee_damage), DEATH_TURRET_WALK_MELEE.m_id, '0 0 0', v_forward * (autocvar_g_turrets_unit_walker_melee_force));
+ Damage(e, this, this, (autocvar_g_turrets_unit_walker_melee_damage), DEATH_TURRET_WALK_MELEE.m_id, DMG_NOWEP, '0 0 0', v_forward * (autocvar_g_turrets_unit_walker_melee_force));
e = e.chain;
}
}
void walker_rocket_explode(entity this)
{
- RadiusDamage (this, this.owner, (autocvar_g_turrets_unit_walker_rocket_damage), 0, (autocvar_g_turrets_unit_walker_rocket_radius), this, NULL, (autocvar_g_turrets_unit_walker_rocket_force), DEATH_TURRET_WALK_ROCKET.m_id, NULL);
+ RadiusDamage (this, this.owner, (autocvar_g_turrets_unit_walker_rocket_damage), 0, (autocvar_g_turrets_unit_walker_rocket_radius), this, NULL, (autocvar_g_turrets_unit_walker_rocket_force), DEATH_TURRET_WALK_ROCKET.m_id, DMG_NOWEP, NULL);
delete(this);
}
walker_rocket_explode(this);
}
-void walker_rocket_damage(entity this, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
+void walker_rocket_damage(entity this, entity inflictor, entity attacker, float damage, float deathtype, .entity weaponentity, vector hitloc, vector vforce)
{
this.health = this.health - damage;
this.velocity = this.velocity + vforce;
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) {
if (isPlayer) {
turret_initparams(actor);
- W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WalkerTurretAttack_FIRE, CH_WEAPON_B, 0);
+ W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WalkerTurretAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_WALK_GUN.m_id);
actor.tur_shotdir_updated = w_shotdir;
actor.tur_shotorg = w_shotorg;
actor.tur_head = actor;
#pragma once
CLASS(WalkerTurretAttack, PortoLaunch)
-/* flags */ ATTRIB(WalkerTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(WalkerTurretAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(WalkerTurretAttack, impulse, int, 5);
/* refname */ ATTRIB(WalkerTurretAttack, netname, string, "turret_walker");
/* wepname */ ATTRIB(WalkerTurretAttack, m_name, string, _("Walker"));
// apply the damage
if (ent.takedamage)
{
- Damage (ent, this, this, f_dmg, deathtype, hitloc, force);
+ Damage (ent, this, this, f_dmg, deathtype, DMG_NOWEP, hitloc, force);
ent.velocity = ent.velocity * f_velfactor;
//ent.alpha = 0.25 + random() * 0.75;
}
if(sf & 2)
{
- axh.origin_x = ReadCoord();
- axh.origin_y = ReadCoord();
- axh.origin_z = ReadCoord();
+ axh.origin = ReadVector();
}
if(sf & 4)
if(sf & 2)
{
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if(sf & 4)
bool AuxiliaryXhair_customize(entity this, entity client)
{
- //entity e = WaypointSprite_getviewentity(client);
- entity axh = client.(AuxiliaryXhair[this.cnt]);
+ entity e = WaypointSprite_getviewentity(client);
+ entity axh = e.(AuxiliaryXhair[this.cnt]);
return axh.owner == this.owner; // cheaply check if the client's axh owner is the same as our real owner
}
}
// projectile handling
-void vehicles_projectile_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void vehicles_projectile_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
// Ignore damage from oterh projectiles from my owner (dont mess up volly's)
if(inflictor.owner == this.owner)
PROJECTILE_TOUCH(this, toucher);
this.event_damage = func_null;
- RadiusDamage (this, this.realowner, this.shot_dmg, 0, this.shot_radius, this, NULL, this.shot_force, this.totalfrags, toucher);
+ RadiusDamage (this, this.realowner, this.shot_dmg, 0, this.shot_radius, this, NULL, this.shot_force, this.totalfrags, DMG_NOWEP, toucher);
delete(this);
}
_slot.PlayerPhysplug = _framefunc;
_slot.vehicle_exit = _exitfunc;
_slot.vehicle_enter = _enterfunc;
- _slot.hud = _hud;
+ STAT(HUD, _slot) = _hud;
_slot.vehicle_flags = VHF_PLAYERSLOT;
_slot.vehicle_viewport = spawn();
_slot.vehicle_hudmodel = spawn();
else
rgb = '1 1 1';
entity wp = WaypointSprite_Spawn(WP_Vehicle, 0, 0, ent, '0 0 64', NULL, 0, ent, waypointsprite_attached, true, RADARICON_Vehicle);
+ wp.wp_extra = ent.wp00.vehicleid;
wp.colormod = rgb;
if(ent.waypointsprite_attached)
{
vehicles_painframe(this);
}
-void vehicles_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void vehicles_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
this.dmg_time = time;
if(_minspeed < wc)
{
float take = min(_speedfac * wc, _maxpain);
- Damage (this, NULL, NULL, take, DEATH_FALL.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, take, DEATH_FALL.m_id, DMG_NOWEP, this.origin, '0 0 0');
this.play_time = time + 0.25;
//dprint("wc: ", ftos(wc), "\n");
player.solid = SOLID_SLIDEBOX;
set_movetype(player, MOVETYPE_WALK);
player.effects &= ~EF_NODRAW;
- player.teleportable = TELEPORT_NORMAL;
+ player.teleportable = TELEPORT_NORMAL;
player.alpha = 1;
player.PlayerPhysplug = func_null;
player.vehicle = NULL;
- player.view_ofs = STAT(PL_VIEW_OFS, player);
- player.event_damage = PlayerDamage;
- player.hud = HUD_NORMAL;
+ player.view_ofs = STAT(PL_VIEW_OFS, player);
+ player.event_damage = PlayerDamage;
+ STAT(HUD, player) = HUD_NORMAL;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++ slot)
{
.entity weaponentity = weaponentities[slot];
if(vehicles_crushable(toucher))
{
if(vdist(this.velocity, >=, 30))
- Damage(toucher, this, this.owner, autocvar_g_vehicles_crush_dmg, DEATH_VH_CRUSH.m_id, '0 0 0', normalize(toucher.origin - this.origin) * autocvar_g_vehicles_crush_force);
+ Damage(toucher, this, this.owner, autocvar_g_vehicles_crush_dmg, DEATH_VH_CRUSH.m_id, DMG_NOWEP, '0 0 0', normalize(toucher.origin - this.origin) * autocvar_g_vehicles_crush_force);
return; // Dont do selfdamage when hitting "soft targets".
}
veh.(weaponentity) = new(temp_wepent);
veh.(weaponentity).m_switchweapon = pl.(weaponentity).m_switchweapon;
}
- pl.hud = veh.vehicleid;
+ STAT(HUD, pl) = veh.vehicleid;
pl.PlayerPhysplug = veh.PlayerPhysplug;
pl.vehicle_ammo1 = veh.vehicle_ammo1;
this.nextthink = time + autocvar_g_vehicles_thinkrate;
if(this.owner)
- this.owner.vehicle_weapon2mode = this.vehicle_weapon2mode;
+ STAT(VEHICLESTAT_W2MODE, this.owner) = STAT(VEHICLESTAT_W2MODE, this);
Vehicle info = Vehicles_from(this.vehicleid);
info.vr_think(info, this);
const float VHSF_NORMAL = 0;
const float VHSF_FACTORY = 2;
-.int hud = _STAT(HUD);
.float dmg_time;
.float play_time;
// vehicle functions
.void(int _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
.bool(entity this, int _imp) vehicles_impulse;
-.int vehicle_weapon2mode = _STAT(VEHICLESTAT_W2MODE);
.void(entity this, int exit_flags) vehicle_exit;
.bool(entity this, entity player) vehicle_enter;
const int VHEF_NORMAL = 0; /// User pressed exit key
player.PlayerPhysplug = func_null;
player.view_ofs = STAT(PL_VIEW_OFS, player);
player.event_damage = PlayerDamage;
- player.hud = HUD_NORMAL;
+ STAT(HUD, player) = HUD_NORMAL;
player.teleportable = TELEPORT_NORMAL;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
set_movetype(player, MOVETYPE_NOCLIP);
player.event_damage = func_null;
player.view_ofs = '0 0 0';
- player.hud = gunner.hud;
+ STAT(HUD, player) = STAT(HUD, gunner);
player.teleportable = false;
player.PlayerPhysplug = gunner.PlayerPhysplug;
player.vehicle_ammo1 = vehic.vehicle_ammo1;
WriteAngle(MSG_ONE, 0); // roll
}
- CSQCVehicleSetup(player, player.hud);
+ CSQCVehicleSetup(player, STAT(HUD, player));
MUTATOR_CALLHOOK(VehicleEnter, player, gunner);
{
if(autocvar_g_vehicle_bumblebee_raygun)
{
- Damage(trace_ent, vehic, this, autocvar_g_vehicle_bumblebee_raygun_dps * PHYS_INPUT_FRAMETIME, DEATH_GENERIC.m_id, trace_endpos, v_forward * autocvar_g_vehicle_bumblebee_raygun_fps * PHYS_INPUT_FRAMETIME);
+ Damage(trace_ent, vehic, this, autocvar_g_vehicle_bumblebee_raygun_dps * PHYS_INPUT_FRAMETIME, DEATH_GENERIC.m_id, DMG_NOWEP, trace_endpos, v_forward * autocvar_g_vehicle_bumblebee_raygun_fps * PHYS_INPUT_FRAMETIME);
vehic.vehicle_energy -= autocvar_g_vehicle_bumblebee_raygun_aps * PHYS_INPUT_FRAMETIME;
}
else
autocvar_g_vehicle_bumblebee_blowup_edgedamage,
autocvar_g_vehicle_bumblebee_blowup_radius, this, NULL,
autocvar_g_vehicle_bumblebee_blowup_forceintensity,
- DEATH_VH_BUMB_DEATH.m_id, NULL);
+ DEATH_VH_BUMB_DEATH.m_id, DMG_NOWEP, NULL);
sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
Send_Effect(EFFECT_EXPLOSION_BIG, (this.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
if(sf & BRG_START)
{
- WriteCoord(MSG_ENTITY, this.hook_start_x);
- WriteCoord(MSG_ENTITY, this.hook_start_y);
- WriteCoord(MSG_ENTITY, this.hook_start_z);
+ WriteVector(MSG_ENTITY, this.hook_start);
}
if(sf & BRG_END)
{
- WriteCoord(MSG_ENTITY, this.hook_end_x);
- WriteCoord(MSG_ENTITY, this.hook_end_y);
- WriteCoord(MSG_ENTITY, this.hook_end_z);
+ WriteVector(MSG_ENTITY, this.hook_end);
}
return true;
if(sf & BRG_START)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
}
if(sf & BRG_END)
{
- this.bumble_origin_x = ReadCoord();
- this.bumble_origin_y = ReadCoord();
- this.bumble_origin_z = ReadCoord();
+ this.bumble_origin = ReadVector();
}
return true;
}
autocvar_g_vehicle_racer_blowup_edgedamage,
autocvar_g_vehicle_racer_blowup_radius, NULL, NULL,
autocvar_g_vehicle_racer_blowup_forceintensity,
- DEATH_VH_WAKI_DEATH.m_id, NULL);
+ DEATH_VH_WAKI_DEATH.m_id, DMG_NOWEP, NULL);
this.nextthink = time + autocvar_g_vehicle_racer_respawntime;
setthink(this, vehicles_spawn);
veh.vehicle_energy -= autocvar_g_vehicle_racer_cannon_cost;
veh.wait = time;
}
- if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0);
+ if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0, DEATH_VH_WAKI_GUN.m_id);
vector org = w_shotorg;
vector dir = w_shotdir;
entity bolt = vehicles_projectile(veh, EFFECT_RACER_MUZZLEFLASH.eent_eff_name, SND_LASERGUN_FIRE,
}
if (fire & 2)
if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, 0.2)) {
- if (isPlayer) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0);
+ if (isPlayer) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0, DEATH_VH_WAKI_ROCKET.m_id);
racer_fire_rocket(player, w_shotorg, w_shotdir, NULL);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, 0, w_ready);
}
#include <common/weapons/_all.qh>
CLASS(RacerAttack, PortoLaunch)
-/* flags */ ATTRIB(RacerAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(RacerAttack, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(RacerAttack, impulse, int, 3);
/* refname */ ATTRIB(RacerAttack, netname, string, "racercannon");
/* wepname */ ATTRIB(RacerAttack, m_name, string, _("Racer cannon"));
setorigin(this, vehic.origin + '0 0 32');
this.oldorigin = this.origin; // negate fall damage
- this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+ STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
vector vf, ad;
// Target lock & predict
Weapon wep2a = WEP_RAPTOR_BOMB;
if(!forbidWeaponUse(this))
- if(vehic.vehicle_weapon2mode == RSM_BOMB)
+ if(STAT(VEHICLESTAT_W2MODE, vehic) == RSM_BOMB)
{
if(time > vehic.lip + autocvar_g_vehicle_raptor_bombs_refire)
if(PHYS_INPUT_BUTTON_ATCK2(this))
else
this.PlayerPhysplug = raptor_frame;
- this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+ STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
if(vehic.vehicle_flags & VHF_SHIELDREGEN)
vehicles_regen(vehic, vehic.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, dt, true);
{
this.deadflag = DEAD_DEAD;
this.vehicle_exit(this, VHEF_NORMAL);
- RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, NULL);
+ RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, DMG_NOWEP, NULL);
this.alpha = -1;
set_movetype(this, MOVETYPE_NONE);
switch(_imp)
{
case IMP_weapon_group_1.impulse:
- this.vehicle.vehicle_weapon2mode = RSM_BOMB;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_BOMB;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_group_2.impulse:
- this.vehicle.vehicle_weapon2mode = RSM_FLARE;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_FLARE;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_next_byid.impulse:
case IMP_weapon_next_bypriority.impulse:
case IMP_weapon_next_bygroup.impulse:
- this.vehicle.vehicle_weapon2mode += 1;
- if(this.vehicle.vehicle_weapon2mode > RSM_LAST)
- this.vehicle.vehicle_weapon2mode = RSM_FIRST;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) += 1;
+ if(STAT(VEHICLESTAT_W2MODE, this.vehicle) > RSM_LAST)
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_FIRST;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_prev_byid.impulse:
case IMP_weapon_prev_bypriority.impulse:
case IMP_weapon_prev_bygroup.impulse:
- this.vehicle.vehicle_weapon2mode -= 1;
- if(this.vehicle.vehicle_weapon2mode < RSM_FIRST)
- this.vehicle.vehicle_weapon2mode = RSM_LAST;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) -= 1;
+ if(STAT(VEHICLESTAT_W2MODE, this.vehicle) < RSM_FIRST)
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_LAST;
CSQCVehicleSetup(this, 0);
return true;
}
METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
{
- instance.vehicle_weapon2mode = RSM_BOMB;
+ STAT(VEHICLESTAT_W2MODE, instance) = RSM_BOMB;
instance.owner.PlayerPhysplug = raptor_takeoff;
set_movetype(instance, MOVETYPE_BOUNCEMISSILE);
instance.solid = SOLID_SLIDEBOX;
float t = autocvar_g_vehicle_raptor_cannon_refire * (1 + veh.misc_bulletcounter == 4);
if (fire & 1)
if (weapon_prepareattack(thiswep, player, weaponentity, false, t)) {
- if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0);
+ if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0, DEATH_VH_RAPT_CANNON.m_id);
vector org = w_shotorg;
vector dir = w_shotdir;
if (veh) {
}
void raptor_flare_think(entity this);
-void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
void raptor_flare_touch(entity this, entity toucher);
METHOD(RaptorFlare, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) {
RadiusDamage (this, this.realowner, autocvar_g_vehicle_raptor_bomblet_damage,
autocvar_g_vehicle_raptor_bomblet_edgedamage,
autocvar_g_vehicle_raptor_bomblet_radius, NULL, NULL,
- autocvar_g_vehicle_raptor_bomblet_force, DEATH_VH_RAPT_BOMB.m_id, NULL);
+ autocvar_g_vehicle_raptor_bomblet_force, DEATH_VH_RAPT_BOMB.m_id, DMG_NOWEP, NULL);
delete(this);
}
delete(this);
}
-void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
this.health -= damage;
if(this.health <= 0)
#include <common/weapons/_all.qh>
CLASS(RaptorCannon, PortoLaunch)
-/* flags */ ATTRIB(RaptorCannon, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(RaptorCannon, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(RaptorCannon, impulse, int, 3);
/* refname */ ATTRIB(RaptorCannon, netname, string, "raptorcannon");
/* wepname */ ATTRIB(RaptorCannon, m_name, string, _("Raptor cannon"));
REGISTER_WEAPON(RAPTOR, NEW(RaptorCannon));
CLASS(RaptorBomb, PortoLaunch)
-/* flags */ ATTRIB(RaptorBomb, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* flags */ ATTRIB(RaptorBomb, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
/* impulse */ ATTRIB(RaptorBomb, impulse, int, 3);
/* refname */ ATTRIB(RaptorBomb, netname, string, "raptorbomb");
/* wepname */ ATTRIB(RaptorBomb, m_name, string, _("Raptor bomb"));
.entity weaponentity = weaponentities[slot];
this.(weaponentity).m_switchweapon = WEP_Null;
}
- this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+ STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
#if 1 // 0 to enable per-gun impact aux crosshairs
SUB_SetFade(g1, time, min(this.respawntime, 10));
SUB_SetFade(g2, time, min(this.respawntime, 10));
- RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_SPID_DEATH.m_id, NULL);
+ RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_SPID_DEATH.m_id, DMG_NOWEP, NULL);
this.alpha = this.tur_head.alpha = this.gun1.alpha = this.gun2.alpha = -1;
set_movetype(this, MOVETYPE_NONE);
switch(_imp)
{
case IMP_weapon_group_1.impulse:
- this.vehicle.vehicle_weapon2mode = SBRM_VOLLY;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_VOLLY;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_group_2.impulse:
- this.vehicle.vehicle_weapon2mode = SBRM_GUIDE;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_GUIDE;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_group_3.impulse:
- this.vehicle.vehicle_weapon2mode = SBRM_ARTILLERY;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_ARTILLERY;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_next_byid.impulse:
case IMP_weapon_next_bypriority.impulse:
case IMP_weapon_next_bygroup.impulse:
- this.vehicle.vehicle_weapon2mode += 1;
- if(this.vehicle.vehicle_weapon2mode > SBRM_LAST)
- this.vehicle.vehicle_weapon2mode = SBRM_FIRST;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) += 1;
+ if(STAT(VEHICLESTAT_W2MODE, this.vehicle) > SBRM_LAST)
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_FIRST;
- //centerprint(this, strcat("Rocket mode is ", ftos(this.vehicle.vehicle_weapon2mode)));
+ //centerprint(this, strcat("Rocket mode is ", ftos(STAT(VEHICLESTAT_W2MODE, this.vehicle))));
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_last.impulse:
case IMP_weapon_prev_byid.impulse:
case IMP_weapon_prev_bypriority.impulse:
case IMP_weapon_prev_bygroup.impulse:
- this.vehicle.vehicle_weapon2mode -= 1;
- if(this.vehicle.vehicle_weapon2mode < SBRM_FIRST)
- this.vehicle.vehicle_weapon2mode = SBRM_LAST;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) -= 1;
+ if(STAT(VEHICLESTAT_W2MODE, this.vehicle) < SBRM_FIRST)
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_LAST;
- //centerprint(this, strcat("Rocket mode is ", ftos(this.vehicle.vehicle_weapon2mode)));
+ //centerprint(this, strcat("Rocket mode is ", ftos(STAT(VEHICLESTAT_W2MODE, this.vehicle))));
CSQCVehicleSetup(this, 0);
return true;
}
METHOD(Spiderbot, vr_enter, void(Spiderbot thisveh, entity instance))
{
- instance.vehicle_weapon2mode = SBRM_GUIDE;
+ STAT(VEHICLESTAT_W2MODE, instance) = SBRM_GUIDE;
set_movetype(instance, MOVETYPE_WALK);
CSQCVehicleSetup(instance.owner, 0);
instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_spiderbot_health) * 100;
if (this.wait != -10)
{
- if (PHYS_INPUT_BUTTON_ATCK2(this.owner) && this.vehicle_weapon2mode == SBRM_GUIDE)
+ if (PHYS_INPUT_BUTTON_ATCK2(this.owner) && STAT(VEHICLESTAT_W2MODE, this) == SBRM_GUIDE)
{
if (this.wait == 1)
if (this.tur_head.frame == 9 || this.tur_head.frame == 1)
v = gettaginfo(this.tur_head,gettagindex(this.tur_head,"tag_fire"));
- switch(this.vehicle_weapon2mode)
+ switch(STAT(VEHICLESTAT_W2MODE, this))
{
case SBRM_VOLLY:
rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, SND_ROCKET_FIRE,
if (this.tur_head.frame == 9)
this.attack_finished_single[0] = autocvar_g_vehicle_spiderbot_rocket_reload;
else
- this.attack_finished_single[0] = ((this.vehicle_weapon2mode == SBRM_VOLLY) ? autocvar_g_vehicle_spiderbot_rocket_refire2 : autocvar_g_vehicle_spiderbot_rocket_refire);
+ this.attack_finished_single[0] = ((STAT(VEHICLESTAT_W2MODE, this) == SBRM_VOLLY) ? autocvar_g_vehicle_spiderbot_rocket_refire2 : autocvar_g_vehicle_spiderbot_rocket_refire);
this.gun2.cnt = time + this.attack_finished_single[0];
}
// make them match perfectly
#ifdef SVQC
// null during init
- if (this.owner) this.owner.stat_shotorg = compressed_shotorg;
+ if (this.owner) STAT(SHOTORG, this.owner) = compressed_shotorg;
this.movedir = decompressShotOrigin(compressed_shotorg);
#else
this.movedir = decompressShotOrigin(compressed_shotorg);
#ifdef CSQC
NET_HANDLE(wframe, bool isNew)
{
- vector a;
- a.x = ReadCoord();
- a.y = ReadCoord();
- a.z = ReadCoord();
+ vector a = ReadVector();
int slot = ReadByte();
bool restartanim = ReadByte();
entity wepent = viewmodels[slot];
int channel = MSG_ONE;
msg_entity = actor;
WriteHeader(channel, wframe);
- WriteCoord(channel, a.x);
- WriteCoord(channel, a.y);
- WriteCoord(channel, a.z);
+ WriteVector(channel, a);
WriteByte(channel, weaponslot(weaponentity.weaponentity_fld));
WriteByte(channel, restartanim);
WriteByte(channel, weaponentity.state);
// no weapon specific image for this weapon
return false;
}
+ /** (CLIENT) check whether the weapon should zoom (special handling) */
+ METHOD(Weapon, wr_zoomdir, bool(Weapon this)) {return false;}
/** (CLIENT) weapon specific view model */
METHOD(Weapon, wr_viewmodel, string(Weapon this, entity wep)) { return string_null; }
/** (CLIENT) weapon specific glow */
#endif
// weapon flags
-const int WEP_TYPE_OTHER = 0x00; // not for damaging people
-const int WEP_TYPE_SPLASH = 0x01; // splash damage
-const int WEP_TYPE_HITSCAN = 0x02; // hitscan
-const int WEP_TYPEMASK = 0x0F;
-const int WEP_FLAG_CANCLIMB = 0x10; // can be used for movement
-const int WEP_FLAG_NORMAL = 0x20; // in "most weapons" set
-const int WEP_FLAG_HIDDEN = 0x40; // hides from menu
-const int WEP_FLAG_RELOADABLE = 0x80; // can has reload
-const int WEP_FLAG_SUPERWEAPON = 0x100; // powerup timer
-const int WEP_FLAG_MUTATORBLOCKED = 0x200; // hides from impulse 99 etc. (mutators are allowed to clear this flag)
-const int WEP_TYPE_MELEE_PRI = 0x400; // primary attack is melee swing (for animation)
-const int WEP_TYPE_MELEE_SEC = 0x800; // secondary attack is melee swing (for animation)
-const int WEP_FLAG_DUALWIELD = 0x1000; // weapon can be dual wielded
-const int WEP_FLAG_NODUAL = 0x2000; // weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything
-const int WEP_FLAG_PENETRATEWALLS = 0x4000; // weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
+const int WEP_TYPE_OTHER = BIT(0); // not for damaging people
+const int WEP_TYPE_SPLASH = BIT(1); // splash damage
+const int WEP_TYPE_HITSCAN = BIT(2); // hitscan
+const int WEP_FLAG_CANCLIMB = BIT(3); // can be used for movement
+const int WEP_FLAG_NORMAL = BIT(4); // in "most weapons" set
+const int WEP_FLAG_HIDDEN = BIT(5); // hides from menu
+const int WEP_FLAG_RELOADABLE = BIT(6); // can has reload
+const int WEP_FLAG_SUPERWEAPON = BIT(7); // powerup timer
+const int WEP_FLAG_MUTATORBLOCKED = BIT(8); // hides from impulse 99 etc. (mutators are allowed to clear this flag)
+const int WEP_TYPE_MELEE_PRI = BIT(9); // primary attack is melee swing (for animation)
+const int WEP_TYPE_MELEE_SEC = BIT(10); // secondary attack is melee swing (for animation)
+const int WEP_FLAG_DUALWIELD = BIT(11); // weapon can be dual wielded
+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)
// variables:
string weaponorder_byid;
}
if(sf & ARC_SF_START) // starting location
{
- WriteCoord(MSG_ENTITY, this.beam_start.x);
- WriteCoord(MSG_ENTITY, this.beam_start.y);
- WriteCoord(MSG_ENTITY, this.beam_start.z);
+ WriteVector(MSG_ENTITY, this.beam_start);
}
if(sf & ARC_SF_WANTDIR) // want/aim direction
{
- WriteCoord(MSG_ENTITY, this.beam_wantdir.x);
- WriteCoord(MSG_ENTITY, this.beam_wantdir.y);
- WriteCoord(MSG_ENTITY, this.beam_wantdir.z);
+ WriteVector(MSG_ENTITY, this.beam_wantdir);
}
if(sf & ARC_SF_BEAMDIR) // beam direction
{
- WriteCoord(MSG_ENTITY, this.beam_dir.x);
- WriteCoord(MSG_ENTITY, this.beam_dir.y);
- WriteCoord(MSG_ENTITY, this.beam_dir.z);
+ WriteAngle(MSG_ENTITY, this.beam_dir.x);
+ WriteAngle(MSG_ENTITY, this.beam_dir.y);
+ WriteAngle(MSG_ENTITY, this.beam_dir.z);
}
if(sf & ARC_SF_BEAMTYPE) // beam type
{
}
void Arc_Player_SetHeat(entity player, .entity weaponentity)
{
- player.arc_heat_percent = Arc_GetHeat_Percent(player, weaponentity);
+ player.(weaponentity).arc_heat_percent = Arc_GetHeat_Percent(player, weaponentity);
//dprint("Heat: ",ftos(player.arc_heat_percent*100),"%\n");
}
void W_Arc_Bolt_Explode(entity this, entity directhitentity)
{
this.event_damage = func_null;
- RadiusDamage(this, this.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), NULL, NULL, WEP_CVAR(arc, bolt_force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), NULL, NULL, WEP_CVAR(arc, bolt_force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
W_Arc_Bolt_Explode(this, trigger);
}
-void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(arc, bolt_ammo), weaponentity);
- W_SetupShot(actor, weaponentity, false, 2, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR(arc, bolt_damage));
+ W_SetupShot(actor, weaponentity, false, 2, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR(arc, bolt_damage), WEP_ARC.m_id | HITTYPE_SECONDARY);
Send_Effect(EFFECT_ARC_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile.nextthink = time + WEP_CVAR(arc, bolt_lifetime);
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_ARC.m_id | HITTYPE_SECONDARY;
+ missile.weaponentity_fld = weaponentity;
setorigin(missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
SND_Null,
0,
WEP_CVAR(arc, beam_damage) * coefficient,
- WEP_CVAR(arc, beam_range)
+ WEP_CVAR(arc, beam_range),
+ WEP_ARC.m_id
);
// After teleport, "lock" the beam until the teleport is confirmed.
own,
rootdamage * coefficient * falloff,
WEP_ARC.m_id,
+ weaponentity,
hitorigin,
WEP_CVAR(arc, beam_force) * new_dir * coefficient * falloff
);
void Arc_Smoke(entity actor, .entity weaponentity)
{
makevectors(actor.v_angle);
- W_SetupShot_Range(actor,weaponentity,true,0,SND_Null,0,0,0);
+ W_SetupShot_Range(actor,weaponentity,true,0,SND_Null,0,0,0,WEP_ARC.m_id); // TODO: probably doesn't need deathtype, since this is just a prefire effect
vector smoke_origin = w_shotorg + actor.velocity*frametime;
if ( actor.arc_overheat > time )
{
- if ( random() < actor.arc_heat_percent )
+ if ( random() < actor.(weaponentity).arc_heat_percent )
Send_Effect(EFFECT_ARC_SMOKE, smoke_origin, '0 0 0', 1 );
if ( PHYS_INPUT_BUTTON_ATCK(actor) || PHYS_INPUT_BUTTON_ATCK2(actor) )
{
if(sf & ARC_SF_START) // starting location
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
}
else if(this.beam_usevieworigin) // infer the location from player location
{
if(sf & ARC_SF_WANTDIR) // want/aim direction
{
- this.v_angle_x = ReadCoord();
- this.v_angle_y = ReadCoord();
- this.v_angle_z = ReadCoord();
+ this.v_angle = ReadVector();
}
if(sf & ARC_SF_BEAMDIR) // beam direction
{
- this.angles_x = ReadCoord();
- this.angles_y = ReadCoord();
- this.angles_z = ReadCoord();
+ this.angles_x = ReadAngle();
+ this.angles_y = ReadAngle();
+ this.angles_z = ReadAngle();
}
if(sf & ARC_SF_BEAMTYPE) // beam type
.float beam_heat; // (beam) amount of heat produced
.float arc_overheat; // (dropped arc/player) time during which it's too hot
.float arc_cooldown; // (dropped arc/player) cooling speed
-.float arc_heat_percent = _STAT(ARC_HEAT);
+.float arc_heat_percent;
.float arc_smoke_sound;
#endif
#ifdef CSQC
NULL,
this.blaster_force,
this.projectiledeathtype,
+ this.weaponentity_fld,
toucher
);
{
vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD);
- W_SetupShot_Dir(actor, weaponentity, s_forward, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, atk_damage);
+ W_SetupShot_Dir(actor, weaponentity, s_forward, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, atk_damage, atk_deathtype);
Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
entity missile = new(blasterbolt);
IL_PUSH(g_bot_dodge, missile);
missile.missile_flags = MIF_SPLASH;
missile.projectiledeathtype = atk_deathtype;
+ missile.weaponentity_fld = weaponentity;
setthink(missile, W_Blaster_Think);
missile.nextthink = time + atk_delay;
return WEAPON_BLASTER_MURDER;
}
+METHOD(OffhandBlaster, offhand_think, void(OffhandBlaster this, entity actor, bool key_pressed))
+{
+ if (!key_pressed || (time < actor.jump_interval))
+ {
+ return;
+ }
+ actor.jump_interval = time + WEP_CVAR_SEC(blaster, refire) * W_WeaponRateFactor(actor);
+ .entity weaponentity = weaponentities[1];
+ BLASTER_SECONDARY_ATTACK(blaster, actor, weaponentity);
+}
+
#endif
#ifdef CSQC
SPAWNFUNC_WEAPON(weapon_blaster, WEP_BLASTER)
SPAWNFUNC_WEAPON(weapon_laser, WEP_BLASTER)
+CLASS(OffhandBlaster, OffhandWeapon)
+ENDCLASS(OffhandBlaster)
+OffhandBlaster OFFHAND_BLASTER; STATIC_INIT(OFFHAND_BLASTER) { OFFHAND_BLASTER = NEW(OffhandBlaster); }
+
#ifdef SVQC
.float blaster_damage;
.float blaster_edgedamage;
.float blaster_force;
.float blaster_lifetime;
+// Will be demacroed after WEP_CVAR macros are also demacroed.
+#define BLASTER_SECONDARY_ATTACK(weapon_name, actor, weaponentity) \
+ makevectors(actor.v_angle); \
+ W_Blaster_Attack( \
+ actor, \
+ weaponentity, \
+ WEP_BLASTER.m_id | HITTYPE_SECONDARY, \
+ WEP_CVAR_SEC(weapon_name, shotangle), \
+ WEP_CVAR_SEC(weapon_name, damage), \
+ WEP_CVAR_SEC(weapon_name, edgedamage), \
+ WEP_CVAR_SEC(weapon_name, radius), \
+ WEP_CVAR_SEC(weapon_name, force), \
+ WEP_CVAR_SEC(weapon_name, speed), \
+ WEP_CVAR_SEC(weapon_name, spread), \
+ WEP_CVAR_SEC(weapon_name, delay), \
+ WEP_CVAR_SEC(weapon_name, lifetime) \
+ );
+
#endif
float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * a, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * a, WEP_CVAR_BOTH(crylink, isprimary, radius),
- NULL, NULL, WEP_CVAR_BOTH(crylink, isprimary, force) * a, e.projectiledeathtype, directhitentity);
+ NULL, NULL, WEP_CVAR_BOTH(crylink, isprimary, force) * a, e.projectiledeathtype, e.weaponentity_fld, directhitentity);
W_Crylink_LinkExplode(e.queuenext, e2, directhitentity);
NULL,
WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n,
e.projectiledeathtype,
+ e.weaponentity_fld,
NULL
);
Send_Effect(EFFECT_CRYLINK_JOINEXPLODE, this.origin, '0 0 0', n);
if(a)
f *= a;
- float totaldamage = RadiusDamage(this, this.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * f, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * f, WEP_CVAR_BOTH(crylink, isprimary, radius), NULL, NULL, WEP_CVAR_BOTH(crylink, isprimary, force) * f, this.projectiledeathtype, toucher);
+ float totaldamage = RadiusDamage(this, this.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * f, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * f, WEP_CVAR_BOTH(crylink, isprimary, radius),
+ NULL, NULL, WEP_CVAR_BOTH(crylink, isprimary, force) * f, this.projectiledeathtype, this.weaponentity_fld, toucher);
if(totaldamage && ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 2) || ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 1) && !W_Crylink_Touch_WouldHitFriendly(this, WEP_CVAR_BOTH(crylink, isprimary, radius)))))
{
if(WEP_CVAR_PRI(crylink, joinexplode))
maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
- W_SetupShot(actor, weaponentity, false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, maxdmg);
+ W_SetupShot(actor, weaponentity, false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, maxdmg, WEP_CRYLINK.m_id);
forward = v_forward;
right = v_right;
up = v_up;
if(WEP_CVAR_SEC(crylink, joinexplode))
maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
- W_SetupShot(actor, weaponentity, false, 2, SND_CRYLINK_FIRE2, CH_WEAPON_A, maxdmg);
+ W_SetupShot(actor, weaponentity, false, 2, SND_CRYLINK_FIRE2, CH_WEAPON_A, maxdmg, WEP_CRYLINK.m_id | HITTYPE_SECONDARY);
forward = v_forward;
right = v_right;
up = v_up;
NULL,
WEP_CVAR(devastator, force),
this.projectiledeathtype,
+ this.weaponentity_fld,
directhitentity
);
head,
(WEP_CVAR(devastator, remote_jump_force) ? WEP_CVAR(devastator, remote_jump_force) : 0),
this.projectiledeathtype | HITTYPE_BOUNCE,
+ this.weaponentity_fld,
NULL
);
break;
NULL,
WEP_CVAR(devastator, remote_force),
this.projectiledeathtype | HITTYPE_BOUNCE,
+ this.weaponentity_fld,
NULL
);
W_Devastator_Explode(this, toucher);
}
-void W_Devastator_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Devastator_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
{
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(devastator, ammo), weaponentity);
- W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage), WEP_DEVASTATOR.m_id);
Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
NULL,
WEP_CVAR(electro, combo_force),
WEP_ELECTRO.m_id | HITTYPE_BOUNCE, // use THIS type for a combo because primary can't bounce
+ this.weaponentity_fld,
NULL
);
NULL,
WEP_CVAR_SEC(electro, force),
this.projectiledeathtype,
+ this.weaponentity_fld,
directhitentity
);
}
NULL,
WEP_CVAR_PRI(electro, force),
this.projectiledeathtype,
+ this.weaponentity_fld,
directhitentity
);
}
2,
SND_ELECTRO_FIRE,
CH_WEAPON_A,
- WEP_CVAR_PRI(electro, damage)
+ WEP_CVAR_PRI(electro, damage),
+ WEP_ELECTRO.m_id
);
Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = WEP_ELECTRO.m_id;
+ proj.weaponentity_fld = weaponentity;
setorigin(proj, w_shotorg);
// if (IS_CSQC)
set_movetype(newproj, MOVETYPE_NONE); // lock the orb in place
newproj.projectiledeathtype = this.projectiledeathtype;
+ newproj.weaponentity_fld = this.weaponentity_fld;
settouch(newproj, func_null);
setthink(newproj, getthink(this));
}
}
-void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
2,
SND_ELECTRO_FIRE2,
CH_WEAPON_A,
- WEP_CVAR_SEC(electro, damage)
+ WEP_CVAR_SEC(electro, damage),
+ WEP_ELECTRO.m_id | HITTYPE_SECONDARY
);
w_shotdir = v_forward; // no TrueAim for grenades please
proj.nextthink = time + WEP_CVAR_SEC(electro, lifetime);
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = WEP_ELECTRO.m_id | HITTYPE_SECONDARY;
+ proj.weaponentity_fld = weaponentity;
setorigin(proj, w_shotorg);
//proj.glow_size = 50;
// 1. dist damage
d = (this.realowner.health + this.realowner.armorvalue);
- RadiusDamage(this, this.realowner, WEP_CVAR_PRI(fireball, damage), WEP_CVAR_PRI(fireball, edgedamage), WEP_CVAR_PRI(fireball, radius), NULL, NULL, WEP_CVAR_PRI(fireball, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR_PRI(fireball, damage), WEP_CVAR_PRI(fireball, edgedamage), WEP_CVAR_PRI(fireball, radius), NULL, NULL, WEP_CVAR_PRI(fireball, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
if(this.realowner.health + this.realowner.armorvalue >= d)
if(!this.cnt)
{
if(accuracy_isgooddamage(this.realowner, e))
accuracy_add(this.realowner, WEP_FIREBALL.m_id, 0, WEP_CVAR_PRI(fireball, bfgdamage) * points);
- Damage(e, this, this.realowner, WEP_CVAR_PRI(fireball, bfgdamage) * points, this.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, WEP_CVAR_PRI(fireball, bfgforce) * dir);
+ Damage(e, this, this.realowner, WEP_CVAR_PRI(fireball, bfgdamage) * points, this.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, this.weaponentity_fld, e.origin + e.view_ofs, WEP_CVAR_PRI(fireball, bfgforce) * dir);
Send_Effect(EFFECT_FIREBALL_BFGDAMAGE, e.origin, -1 * dir, 1);
}
}
this.nextthink = time + 0.1;
}
-void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
void W_Fireball_Attack1(entity actor, .entity weaponentity)
{
- W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 2, SND_FIREBALL_FIRE2, CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 2, SND_FIREBALL_FIRE2, CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage), WEP_FIREBALL.m_id);
Send_Effect(EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
proj.damageforcescale = WEP_CVAR_PRI(fireball, damageforcescale);
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = WEP_FIREBALL.m_id;
+ proj.weaponentity_fld = weaponentity;
+ proj.weaponentity_fld = weaponentity;
setorigin(proj, w_shotorg);
set_movetype(proj, MOVETYPE_FLY);
void W_Fireball_AttackEffect(entity actor, .entity weaponentity, float i, vector f_diff)
{
- W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 0, SND_Null, 0, 0);
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 0, SND_Null, 0, 0, WEP_FIREBALL.m_id); // TODO: probably doesn't need deathtype, just a prefire effect
w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
}
f_diff = '+1.25 +3.75 0';
break;
}
- W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 2, SND_FIREBALL_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 2, SND_FIREBALL_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage), WEP_FIREBALL.m_id | HITTYPE_SECONDARY);
traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, actor);
w_shotorg = trace_endpos;
void W_Hagar_Explode(entity this, entity directhitentity)
{
this.event_damage = func_null;
- RadiusDamage(this, this.realowner, WEP_CVAR_PRI(hagar, damage), WEP_CVAR_PRI(hagar, edgedamage), WEP_CVAR_PRI(hagar, radius), NULL, NULL, WEP_CVAR_PRI(hagar, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR_PRI(hagar, damage), WEP_CVAR_PRI(hagar, edgedamage), WEP_CVAR_PRI(hagar, radius), NULL, NULL, WEP_CVAR_PRI(hagar, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
void W_Hagar_Explode2(entity this, entity directhitentity)
{
this.event_damage = func_null;
- RadiusDamage(this, this.realowner, WEP_CVAR_SEC(hagar, damage), WEP_CVAR_SEC(hagar, edgedamage), WEP_CVAR_SEC(hagar, radius), NULL, NULL, WEP_CVAR_SEC(hagar, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR_SEC(hagar, damage), WEP_CVAR_SEC(hagar, edgedamage), WEP_CVAR_SEC(hagar, radius), NULL, NULL, WEP_CVAR_SEC(hagar, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
W_Hagar_Explode2(this, trigger);
}
-void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(hagar, ammo), weaponentity);
- W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage));
+ W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage), WEP_HAGAR.m_id);
Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile.nextthink = time + WEP_CVAR_PRI(hagar, lifetime);
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_HAGAR.m_id;
+ missile.weaponentity_fld = weaponentity;
setorigin(missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(hagar, ammo), weaponentity);
- W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
+ W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage), WEP_HAGAR.m_id | HITTYPE_SECONDARY);
Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_HAGAR.m_id | HITTYPE_SECONDARY;
+ missile.weaponentity_fld = weaponentity;
setorigin(missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
weapon_prepareattack_do(actor, weaponentity, true, WEP_CVAR_SEC(hagar, refire));
- W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
+ W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage), WEP_HAGAR.m_id | HITTYPE_SECONDARY);
Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
forward = v_forward;
missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_HAGAR.m_id | HITTYPE_SECONDARY;
+ missile.weaponentity_fld = weaponentity;
setorigin(missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
set_movetype(missile, MOVETYPE_FLY);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(hagar, load_animtime), w_ready);
actor.(weaponentity).hagar_loadstep = time + WEP_CVAR_SEC(hagar, refire) * W_WeaponRateFactor(actor);
actor.(weaponentity).hagar_load = 0;
-
- if(weaponslot(weaponentity) == 0)
- actor.hagar_load = 0;
}
void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
actor.(weaponentity).state = WS_READY;
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(hagar, ammo) * actor.(weaponentity).hagar_load * -1, weaponentity); // give back ammo
actor.(weaponentity).hagar_load = 0;
- if(weaponslot(weaponentity) == 0)
- actor.hagar_load = 0;
sound(actor, CH_WEAPON_A, SND_HAGAR_BEEP, VOL_BASE, ATTN_NORM);
// pause until we can load rockets again, once we re-press the alt fire button
{
float loadable_secondary;
loadable_secondary = (WEP_CVAR_SEC(hagar, load) && WEP_CVAR(hagar, secondary));
- if(weaponslot(weaponentity) == 0)
- actor.hagar_load = actor.(weaponentity).hagar_load;
if(loadable_secondary)
W_Hagar_Attack2_Load(thiswep, actor, weaponentity); // must always run each frame
}
METHOD(Hagar, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
{
- actor.hagar_load = 0;
actor.(weaponentity).hagar_loadblock = false;
if(actor.(weaponentity).hagar_load)
{
}
METHOD(Hagar, wr_resetplayer, void(entity thiswep, entity actor))
{
- actor.hagar_load = 0;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
.entity weaponentity = weaponentities[slot];
isprimary = !(this.projectiledeathtype & HITTYPE_SECONDARY);
- RadiusDamage(this, this.realowner, WEP_CVAR_BOTH(hlac, isprimary, damage), WEP_CVAR_BOTH(hlac, isprimary, edgedamage), WEP_CVAR_BOTH(hlac, isprimary, radius), NULL, NULL, WEP_CVAR_BOTH(hlac, isprimary, force), this.projectiledeathtype, toucher);
+ RadiusDamage(this, this.realowner, WEP_CVAR_BOTH(hlac, isprimary, damage), WEP_CVAR_BOTH(hlac, isprimary, edgedamage), WEP_CVAR_BOTH(hlac, isprimary, radius),
+ NULL, NULL, WEP_CVAR_BOTH(hlac, isprimary, force), this.projectiledeathtype, this.weaponentity_fld, toucher);
delete(this);
}
if(actor.crouch)
spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod);
- W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage));
+ W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage), WEP_HLAC.m_id);
Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
if(!autocvar_g_norecoil)
{
IL_PUSH(g_projectiles, missile);
IL_PUSH(g_bot_dodge, missile);
missile.projectiledeathtype = WEP_HLAC.m_id;
+ missile.weaponentity_fld = weaponentity;
CSQCProjectile(missile, true, PROJECTILE_HLAC, true);
if(actor.crouch)
spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod);
- W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
+ W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage), WEP_HLAC.m_id | HITTYPE_SECONDARY);
Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile = new(hlacbolt);
IL_PUSH(g_bot_dodge, missile);
missile.missile_flags = MIF_SPLASH;
missile.projectiledeathtype = WEP_HLAC.m_id | HITTYPE_SECONDARY;
+ missile.weaponentity_fld = weaponentity;
CSQCProjectile(missile, true, PROJECTILE_HLAC, true);
f = this.dmg_last - dmg_remaining_next;
this.dmg_last = dmg_remaining_next;
- RadiusDamage(this, this.realowner, this.dmg * f, this.dmg_edge * f, this.dmg_radius, this.realowner, NULL, this.dmg_force * f, this.projectiledeathtype, NULL);
+ RadiusDamage(this, this.realowner, this.dmg * f, this.dmg_edge * f, this.dmg_radius, this.realowner, NULL, this.dmg_force * f, this.projectiledeathtype, this.weaponentity_fld, NULL);
this.projectiledeathtype |= HITTYPE_BOUNCE;
//RadiusDamage(this, NULL, this.dmg * f, this.dmg_edge * f, this.dmg_radius, NULL, NULL, this.dmg_force * f, this.projectiledeathtype, NULL);
W_Hook_Explode2(this);
}
-void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
void W_Hook_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
{
//W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(hook, ammo)); // WEAPONTODO: Figure out how to handle ammo with hook secondary (gravitybomb)
- W_SetupShot(actor, weaponentity, false, 4, SND_HOOKBOMB_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hook, damage));
+ W_SetupShot(actor, weaponentity, false, 4, SND_HOOKBOMB_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hook, damage), WEP_HOOK.m_id | HITTYPE_SECONDARY);
entity gren = new(hookbomb);
gren.owner = gren.realowner = actor;
set_movetype(gren, MOVETYPE_TOSS);
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_HOOK.m_id | HITTYPE_SECONDARY;
+ gren.weaponentity_fld = weaponentity;
setorigin(gren, w_shotorg);
setsize(gren, '0 0 0', '0 0 0');
}
if(sf & 2)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
}
if(sf & 4)
{
- this.velocity_x = ReadCoord();
- this.velocity_y = ReadCoord();
- this.velocity_z = ReadCoord();
+ this.velocity = ReadVector();
}
InterpolateOrigin_Note(this);
void W_MachineGun_Attack(Weapon thiswep, int deathtype, entity actor, .entity weaponentity)
{
- W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, ((actor.(weaponentity).misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage)));
+ W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, ((actor.(weaponentity).misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage)), deathtype);
if(!autocvar_g_norecoil)
{
actor.punchangle_x = random() - 0.5;
W_DecreaseAmmo(WEP_MACHINEGUN, actor, WEP_CVAR(machinegun, sustained_ammo), weaponentity);
- W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage));
+ W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage), WEP_MACHINEGUN.m_id);
if(!autocvar_g_norecoil)
{
actor.punchangle_x = random() - 0.5;
void W_MachineGun_Attack_Burst(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
- W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage));
+ W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(machinegun, sustained_damage), WEP_MACHINEGUN.m_id);
if(!autocvar_g_norecoil)
{
actor.punchangle_x = random() - 0.5;
this.event_damage = func_null;
this.takedamage = DAMAGE_NO;
- RadiusDamage(this, this.realowner, WEP_CVAR(minelayer, damage), WEP_CVAR(minelayer, edgedamage), WEP_CVAR(minelayer, radius), NULL, NULL, WEP_CVAR(minelayer, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR(minelayer, damage), WEP_CVAR(minelayer, edgedamage), WEP_CVAR(minelayer, radius), NULL, NULL, WEP_CVAR(minelayer, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
.entity weaponentity = this.weaponentity_fld;
if(this.realowner.(weaponentity).m_weapon == WEP_MINE_LAYER)
if(this.move_movetype == MOVETYPE_NONE || this.move_movetype == MOVETYPE_FOLLOW)
this.velocity = this.mine_orientation; // particle fx and decals need .velocity
- RadiusDamage(this, this.realowner, WEP_CVAR(minelayer, remote_damage), WEP_CVAR(minelayer, remote_edgedamage), WEP_CVAR(minelayer, remote_radius), NULL, NULL, WEP_CVAR(minelayer, remote_force), this.projectiledeathtype | HITTYPE_BOUNCE, NULL);
+ RadiusDamage(this, this.realowner, WEP_CVAR(minelayer, remote_damage), WEP_CVAR(minelayer, remote_edgedamage), WEP_CVAR(minelayer, remote_radius),
+ NULL, NULL, WEP_CVAR(minelayer, remote_force), this.projectiledeathtype | HITTYPE_BOUNCE, this.weaponentity_fld, NULL);
.entity weaponentity = this.weaponentity_fld;
if(this.realowner.(weaponentity).m_weapon == WEP_MINE_LAYER)
}
}
-void W_MineLayer_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_MineLayer_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(minelayer, ammo), weaponentity);
- W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 5, SND_MINE_FIRE, CH_WEAPON_A, WEP_CVAR(minelayer, damage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 5, SND_MINE_FIRE, CH_WEAPON_A, WEP_CVAR(minelayer, damage), WEP_MINE_LAYER.m_id);
Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
mine = WarpZone_RefSys_SpawnSameRefSys(actor);
set_movetype(mine, MOVETYPE_TOSS);
PROJECTILE_MAKETRIGGER(mine);
mine.projectiledeathtype = WEP_MINE_LAYER.m_id;
+ mine.weaponentity_fld = weaponentity;
setsize(mine, '-4 -4 -4', '4 4 4'); // give it some size so it can be shot
setorigin(mine, w_shotorg - v_forward * 4); // move it back so it hits the wall at the right point
}
METHOD(MineLayer, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
{
- if(weaponslot(weaponentity) == 0)
- actor.minelayer_mines = actor.(weaponentity).minelayer_mines;
-
if(autocvar_g_balance_minelayer_reload_ammo && actor.(weaponentity).clip_load < WEP_CVAR(minelayer, ammo)) // forced reload
{
// not if we're holding the minelayer without enough ammo, but can detonate existing mines
}
METHOD(MineLayer, wr_resetplayer, void(entity thiswep, entity actor))
{
- actor.minelayer_mines = 0;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
.entity weaponentity = weaponentities[slot];
if(this.move_movetype == MOVETYPE_NONE)
this.velocity = this.oldvelocity;
- RadiusDamage(this, this.realowner, WEP_CVAR_PRI(mortar, damage), WEP_CVAR_PRI(mortar, edgedamage), WEP_CVAR_PRI(mortar, radius), NULL, NULL, WEP_CVAR_PRI(mortar, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR_PRI(mortar, damage), WEP_CVAR_PRI(mortar, edgedamage), WEP_CVAR_PRI(mortar, radius), NULL, NULL, WEP_CVAR_PRI(mortar, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
if(this.move_movetype == MOVETYPE_NONE)
this.velocity = this.oldvelocity;
- RadiusDamage(this, this.realowner, WEP_CVAR_SEC(mortar, damage), WEP_CVAR_SEC(mortar, edgedamage), WEP_CVAR_SEC(mortar, radius), NULL, NULL, WEP_CVAR_SEC(mortar, force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR_SEC(mortar, damage), WEP_CVAR_SEC(mortar, edgedamage), WEP_CVAR_SEC(mortar, radius), NULL, NULL, WEP_CVAR_SEC(mortar, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
W_Mortar_Grenade_Explode2(this, trigger);
}
-void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
{
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(mortar, ammo), weaponentity);
- W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage), WEP_MORTAR.m_id);
w_shotdir = v_forward; // no TrueAim for grenades please
Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
gren.bouncestop = WEP_CVAR(mortar, bouncestop);
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_MORTAR.m_id;
+ gren.weaponentity_fld = weaponentity;
setorigin(gren, w_shotorg);
setsize(gren, '-3 -3 -3', '3 3 3');
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(mortar, ammo), weaponentity);
- W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage), WEP_MORTAR.m_id | HITTYPE_SECONDARY);
w_shotdir = v_forward; // no TrueAim for grenades please
Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
gren.bouncestop = WEP_CVAR(mortar, bouncestop);
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_MORTAR.m_id | HITTYPE_SECONDARY;
+ gren.weaponentity_fld = weaponentity;
setorigin(gren, w_shotorg);
setsize(gren, '-3 -3 -3', '3 3 3');
{
entity gren;
- W_SetupShot(actor, weaponentity, false, 4, SND_PORTO_FIRE, CH_WEAPON_A, 0);
+ W_SetupShot(actor, weaponentity, false, 4, SND_PORTO_FIRE, CH_WEAPON_A, 0, WEP_PORTO.m_id); // TODO: does the deathtype even need to be set here? porto can't hurt people
// always shoot from the eye
w_shotdir = v_forward;
w_shotorg = actor.origin + actor.view_ofs + ((w_shotorg - actor.origin - actor.view_ofs) * v_forward) * v_forward;
W_DecreaseAmmo(thiswep, actor, pAmmo, weaponentity);
- W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots);
+ W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots, deathtype);
Send_Effect(EFFECT_RIFLE_MUZZLEFLASH, w_shotorg, w_shotdir * 2000, 1);
return false;
}
}
+METHOD(Rifle, wr_zoomdir, bool(entity thiswep))
+{
+ return button_attack2 && !WEP_CVAR(rifle, secondary);
+}
#endif
void W_Seeker_Missile_Explode(entity this, entity directhitentity)
{
this.event_damage = func_null;
- RadiusDamage(this, this.realowner, WEP_CVAR(seeker, missile_damage), WEP_CVAR(seeker, missile_edgedamage), WEP_CVAR(seeker, missile_radius), NULL, NULL, WEP_CVAR(seeker, missile_force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR(seeker, missile_damage), WEP_CVAR(seeker, missile_edgedamage), WEP_CVAR(seeker, missile_radius), NULL, NULL, WEP_CVAR(seeker, missile_force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
-void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(seeker, missile_ammo), weaponentity);
makevectors(actor.v_angle);
- W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0);
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0, ((m_target != NULL) ? WEP_SEEKER.m_id | HITTYPE_SECONDARY : WEP_SEEKER.m_id));
w_shotorg += f_diff;
Send_Effect(EFFECT_SEEKER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile.solid = SOLID_BBOX;
missile.scale = 2;
missile.takedamage = DAMAGE_YES;
+ missile.weaponentity_fld = weaponentity;
missile.health = WEP_CVAR(seeker, missile_health);
missile.damageforcescale = WEP_CVAR(seeker, missile_damageforcescale);
missile.damagedbycontents = true;
{
this.event_damage = func_null;
- RadiusDamage(this, this.realowner, WEP_CVAR(seeker, flac_damage), WEP_CVAR(seeker, flac_edgedamage), WEP_CVAR(seeker, flac_radius), NULL, NULL, WEP_CVAR(seeker, flac_force), this.projectiledeathtype, directhitentity);
+ RadiusDamage(this, this.realowner, WEP_CVAR(seeker, flac_damage), WEP_CVAR(seeker, flac_edgedamage), WEP_CVAR(seeker, flac_radius), NULL, NULL, WEP_CVAR(seeker, flac_force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
f_diff = '+1.25 +3.75 0';
break;
}
- W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage), WEP_SEEKER.m_id | HITTYPE_SECONDARY);
w_shotorg += f_diff;
Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile.nextthink = time + WEP_CVAR(seeker, flac_lifetime) + WEP_CVAR(seeker, flac_lifetime_rand);
missile.solid = SOLID_BBOX;
set_movetype(missile, MOVETYPE_FLY);
- missile.projectiledeathtype = WEP_SEEKER.m_id;
missile.projectiledeathtype = WEP_SEEKER.m_id | HITTYPE_SECONDARY;
+ missile.weaponentity_fld = weaponentity;
missile.flags = FL_PROJECTILE;
IL_PUSH(g_projectiles, missile);
IL_PUSH(g_bot_dodge, missile);
delete(this);
}
-void W_Seeker_Tag_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void W_Seeker_Tag_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
{
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(seeker, tag_ammo), weaponentity);
- W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_TAG_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count));
+ W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_TAG_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count), WEP_SEEKER.m_id | HITTYPE_BOUNCE | HITTYPE_SECONDARY);
entity missile = new(seeker_tag);
missile.weaponentity_fld = weaponentity;
this.realowner,
swing_damage,
(WEP_SHOCKWAVE.m_id | HITTYPE_SECONDARY),
+ this.weaponentity_fld,
(this.realowner.origin + this.realowner.view_ofs),
(v_forward * WEP_CVAR(shockwave, melee_force))
);
meleetemp.owner = meleetemp.realowner = actor;
setthink(meleetemp, W_Shockwave_Melee_Think);
meleetemp.nextthink = time + WEP_CVAR(shockwave, melee_delay) * W_WeaponRateFactor(actor);
- W_SetupShot_Range(actor, weaponentity, true, 0, SND_Null, 0, WEP_CVAR(shockwave, melee_damage), WEP_CVAR(shockwave, melee_range));
+ meleetemp.weaponentity_fld = weaponentity;
+ W_SetupShot_Range(actor, weaponentity, true, 0, SND_Null, 0, WEP_CVAR(shockwave, melee_damage), WEP_CVAR(shockwave, melee_range), WEP_SHOCKWAVE.m_id | HITTYPE_SECONDARY);
}
// SHOCKWAVE ATTACK MODE
void W_Shockwave_Send(entity actor)
{
WriteHeader(MSG_BROADCAST, TE_CSQC_SHOCKWAVEPARTICLE);
- WriteCoord(MSG_BROADCAST, w_shotorg.x);
- WriteCoord(MSG_BROADCAST, w_shotorg.y);
- WriteCoord(MSG_BROADCAST, w_shotorg.z);
- WriteCoord(MSG_BROADCAST, w_shotdir.x);
- WriteCoord(MSG_BROADCAST, w_shotdir.y);
- WriteCoord(MSG_BROADCAST, w_shotdir.z);
+ WriteVector(MSG_BROADCAST, w_shotorg);
+ WriteVector(MSG_BROADCAST, w_shotdir);
WriteShort(MSG_BROADCAST, WEP_CVAR(shockwave, blast_distance));
WriteByte(MSG_BROADCAST, bound(0, WEP_CVAR(shockwave, blast_spread_max), 255));
WriteByte(MSG_BROADCAST, bound(0, WEP_CVAR(shockwave, blast_spread_min), 255));
float i, queue = 0;
// set up the shot direction
- W_SetupShot(actor, weaponentity, true, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, WEP_CVAR(shockwave, blast_damage));
+ W_SetupShot(actor, weaponentity, true, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, WEP_CVAR(shockwave, blast_damage), WEP_SHOCKWAVE.m_id);
vector attack_endpos = (w_shotorg + (w_shotdir * WEP_CVAR(shockwave, blast_distance)));
WarpZone_TraceLine(w_shotorg, attack_endpos, MOVE_NOMONSTERS, actor);
vector attack_hitpos = trace_endpos;
actor,
final_damage,
WEP_SHOCKWAVE.m_id,
+ weaponentity,
head.origin,
final_force
);
actor,
final_damage,
WEP_SHOCKWAVE.m_id,
+ weaponentity,
head.origin,
final_force
);
shockwave.draw = Draw_Shockwave;
IL_PUSH(g_drawables, shockwave);
- shockwave.sw_shotorg_x = ReadCoord(); shockwave.sw_shotorg_y = ReadCoord(); shockwave.sw_shotorg_z = ReadCoord();
- shockwave.sw_shotdir_x = ReadCoord(); shockwave.sw_shotdir_y = ReadCoord(); shockwave.sw_shotdir_z = ReadCoord();
+ shockwave.sw_shotorg = ReadVector();
+ shockwave.sw_shotdir = ReadVector();
shockwave.sw_distance = ReadShort();
shockwave.sw_spread_max = ReadByte();
{
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(shotgun, ammo), weaponentity);
- W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets));
+ W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets), WEP_SHOTGUN.m_id);
for(int sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1)
fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN.m_id, 0);
//print(strcat(this.realowner.netname, " hitting ", target_victim.netname, " with ", strcat(ftos(swing_damage), " damage (factor: ", ftos(swing_factor), ") at "), ftos(time), " seconds.\n"));
Damage(target_victim, this.realowner, this.realowner,
- swing_damage, WEP_SHOTGUN.m_id | HITTYPE_SECONDARY,
+ swing_damage, WEP_SHOTGUN.m_id | HITTYPE_SECONDARY, this.weaponentity_fld,
this.realowner.origin + this.realowner.view_ofs,
v_forward * WEP_CVAR_SEC(shotgun, force));
meleetemp.realowner = actor;
setthink(meleetemp, W_Shotgun_Melee_Think);
meleetemp.nextthink = time + WEP_CVAR_SEC(shotgun, melee_delay) * W_WeaponRateFactor(actor);
- W_SetupShot_Range(actor, weaponentity, true, 0, SND_Null, 0, WEP_CVAR_SEC(shotgun, damage), WEP_CVAR_SEC(shotgun, melee_range));
+ meleetemp.weaponentity_fld = weaponentity;
+ W_SetupShot_Range(actor, weaponentity, true, 0, SND_Null, 0, WEP_CVAR_SEC(shotgun, damage), WEP_CVAR_SEC(shotgun, melee_range), WEP_SHOTGUN.m_id | HITTYPE_SECONDARY);
}
// alternate secondary weapon frames
}
if (sf & 2)
{
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
}
return true;
}
void W_Tuba_NoteOn(entity actor, .entity weaponentity, float hittype)
{
vector o;
- float n;
-
- W_SetupShot(actor, weaponentity, false, 2, SND_Null, 0, WEP_CVAR(tuba, damage));
-
- n = W_Tuba_GetNote(actor, hittype);
+ float n = W_Tuba_GetNote(actor, hittype);
hittype = 0;
if(actor.(weaponentity).tuba_instrument & 1)
if(actor.(weaponentity).tuba_instrument & 2)
hittype |= HITTYPE_BOUNCE;
+ W_SetupShot(actor, weaponentity, false, 2, SND_Null, 0, WEP_CVAR(tuba, damage), hittype | WEP_TUBA.m_id);
+
if(actor.(weaponentity).tuba_note)
{
if(actor.(weaponentity).tuba_note.cnt != n || actor.(weaponentity).tuba_note.tuba_instrument != actor.(weaponentity).tuba_instrument)
actor.(weaponentity).tuba_note.teleport_time = time + WEP_CVAR(tuba, refire) * 2 * W_WeaponRateFactor(actor); // so it can get prolonged safely
//sound(actor, c, TUBA_NOTE(n), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), autocvar_g_balance_tuba_attenuation);
- RadiusDamage(actor, actor, WEP_CVAR(tuba, damage), WEP_CVAR(tuba, edgedamage), WEP_CVAR(tuba, radius), NULL, NULL, WEP_CVAR(tuba, force), hittype | WEP_TUBA.m_id, NULL);
+ RadiusDamage(actor, actor, WEP_CVAR(tuba, damage), WEP_CVAR(tuba, edgedamage), WEP_CVAR(tuba, radius), NULL, NULL, WEP_CVAR(tuba, force), hittype | WEP_TUBA.m_id, weaponentity, NULL);
o = gettaginfo(actor.exteriorweaponentity, 0);
if(time > actor.(weaponentity).tuba_smoketime)
actor.(weaponentity).weaponname = "tuba";
break;
}
- W_SetupShot(actor, weaponentity, false, 0, SND_Null, 0, 0);
+ int hittype = 0;
+ if(actor.(weaponentity).tuba_instrument & 1)
+ hittype |= HITTYPE_SECONDARY;
+ if(actor.(weaponentity).tuba_instrument & 2)
+ hittype |= HITTYPE_BOUNCE;
+ W_SetupShot(actor, weaponentity, false, 0, SND_Null, 0, 0, hittype | WEP_TUBA.m_id);
Send_Effect(EFFECT_TELEPORT, w_shotorg, '0 0 0', 1);
actor.(weaponentity).state = WS_INUSE;
weapon_thinkf(actor, weaponentity, WFRAME_RELOAD, 0.5, w_ready);
}
if (f & 2) {
- this.enemy.origin_x = ReadCoord();
- this.enemy.origin_y = ReadCoord();
- this.enemy.origin_z = ReadCoord();
+ this.enemy.origin = ReadVector();
setorigin(this.enemy, this.enemy.origin);
if (this.enemy.enemy) {
setorigin(this.enemy.enemy, this.enemy.origin);
vector v;
v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
WriteHeader(MSG_BROADCAST, TE_CSQC_VAPORBEAMPARTICLE);
- WriteCoord(MSG_BROADCAST, w_shotorg.x);
- WriteCoord(MSG_BROADCAST, w_shotorg.y);
- WriteCoord(MSG_BROADCAST, w_shotorg.z);
- WriteCoord(MSG_BROADCAST, v.x);
- WriteCoord(MSG_BROADCAST, v.y);
- WriteCoord(MSG_BROADCAST, v.z);
+ WriteVector(MSG_BROADCAST, w_shotorg);
+ WriteVector(MSG_BROADCAST, v);
WriteByte(MSG_BROADCAST, hit);
WriteByte(MSG_BROADCAST, etof(player));
WriteByte(MSG_BROADCAST, player.team);
if (isNew) IL_PUSH(g_drawables, this);
this.drawmask = MASK_NORMAL;
- this.vorg1_x = ReadCoord(); this.vorg1_y = ReadCoord(); this.vorg1_z = ReadCoord();
- this.vorg2_x = ReadCoord(); this.vorg2_y = ReadCoord(); this.vorg2_z = ReadCoord();
+ this.vorg1 = ReadVector();
+ this.vorg2 = ReadVector();
this.cnt = ReadByte();
int myowner = ReadByte();
this.owner = playerslots[myowner - 1];
#ifdef SVQC
-void W_RocketMinsta_Explosion(entity actor, vector loc)
+void W_RocketMinsta_Explosion(entity actor, .entity weaponentity, vector loc)
{
if(accuracy_canbegooddamage(actor))
accuracy_add(actor, WEP_DEVASTATOR.m_id, autocvar_g_rm_damage, 0);
entity dmgent = spawn();
dmgent.owner = dmgent.realowner = actor;
setorigin(dmgent, loc);
- RadiusDamage (dmgent, actor, autocvar_g_rm_damage, autocvar_g_rm_edgedamage, autocvar_g_rm_radius, NULL, NULL, autocvar_g_rm_force, WEP_DEVASTATOR.m_id | HITTYPE_SPLASH, NULL);
+ RadiusDamage (dmgent, actor, autocvar_g_rm_damage, autocvar_g_rm_edgedamage, autocvar_g_rm_radius, NULL, NULL, autocvar_g_rm_force, WEP_DEVASTATOR.m_id | HITTYPE_SPLASH, weaponentity, NULL);
delete(dmgent);
}
bool flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
float vaporizer_damage = ((WEP_CVAR_PRI(vaporizer, damage) > 0) ? WEP_CVAR_PRI(vaporizer, damage) : 10000);
- W_SetupShot(actor, weaponentity, true, 0, SND_Null, CH_WEAPON_A, vaporizer_damage);
+ W_SetupShot(actor, weaponentity, true, 0, SND_Null, CH_WEAPON_A, vaporizer_damage, WEP_VAPORIZER.m_id);
// handle sound separately so we can change the volume
// added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway)
sound (actor, CH_WEAPON_A, SND_MINSTANEXFIRE, VOL_BASE * 0.8, ATTEN_NORM);
if(autocvar_g_rm)
if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
- W_RocketMinsta_Explosion(actor, trace_endpos);
+ W_RocketMinsta_Explosion(actor, weaponentity, trace_endpos);
W_DecreaseAmmo(thiswep, actor, ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo)), weaponentity);
}
this.event_damage = func_null;
this.takedamage = DAMAGE_NO;
- RadiusDamage (this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, directhitentity);
+ RadiusDamage (this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, this.weaponentity_fld, directhitentity);
delete(this);
}
{
PROJECTILE_TOUCH(this, toucher);
//W_RocketMinsta_Laser_Explode ();
- RadiusDamage(this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, toucher);
+ RadiusDamage(this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, this.weaponentity_fld, toucher);
delete(this);
}
float spread = autocvar_g_rm_laser_spread;
float rndspread = autocvar_g_rm_laser_spread_random;
- Weapon w = actor.(weaponentity).m_weapon;
- actor.(weaponentity).m_weapon = WEP_ELECTRO;
- W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage);
- actor.(weaponentity).m_weapon = w;
+ W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
proj.nextthink = time + autocvar_g_rm_laser_lifetime;
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = WEP_ELECTRO.m_id;
+ proj.weaponentity_fld = weaponentity;
setorigin(proj, w_shotorg);
proj.rm_force = autocvar_g_rm_laser_force / total;
float counter = 0;
float total = 1;
- Weapon w = actor.(weaponentity).m_weapon;
- actor.(weaponentity).m_weapon = WEP_ELECTRO;
- W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage);
- actor.(weaponentity).m_weapon = w;
+ W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
proj.nextthink = time + autocvar_g_rm_laser_lifetime;
PROJECTILE_MAKETRIGGER(proj);
proj.projectiledeathtype = WEP_ELECTRO.m_id;
+ proj.weaponentity_fld = weaponentity;
setorigin(proj, w_shotorg);
proj.rm_force = autocvar_g_rm_laser_force / total;
if(WEP_CVAR_SEC(vaporizer, ammo))
W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(vaporizer, ammo), weaponentity);
- // ugly instagib hack to reuse the fire mode of the laser
- makevectors(actor.v_angle);
- Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
- actor.(weaponentity).m_weapon = WEP_BLASTER;
- W_Blaster_Attack(
- actor,
- weaponentity,
- WEP_BLASTER.m_id | HITTYPE_SECONDARY,
- WEP_CVAR_SEC(vaporizer, shotangle),
- WEP_CVAR_SEC(vaporizer, damage),
- WEP_CVAR_SEC(vaporizer, edgedamage),
- WEP_CVAR_SEC(vaporizer, radius),
- WEP_CVAR_SEC(vaporizer, force),
- WEP_CVAR_SEC(vaporizer, speed),
- WEP_CVAR_SEC(vaporizer, spread),
- WEP_CVAR_SEC(vaporizer, delay),
- WEP_CVAR_SEC(vaporizer, lifetime)
- );
- actor.(weaponentity).m_weapon = oldwep;
+ BLASTER_SECONDARY_ATTACK(vaporizer, actor, weaponentity);
// now do normal refire
weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
vector v;
v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
WriteHeader(MSG_BROADCAST, TE_CSQC_VORTEXBEAMPARTICLE);
- WriteCoord(MSG_BROADCAST, w_shotorg.x);
- WriteCoord(MSG_BROADCAST, w_shotorg.y);
- WriteCoord(MSG_BROADCAST, w_shotorg.z);
- WriteCoord(MSG_BROADCAST, v.x);
- WriteCoord(MSG_BROADCAST, v.y);
- WriteCoord(MSG_BROADCAST, v.z);
+ WriteVector(MSG_BROADCAST, w_shotorg);
+ WriteVector(MSG_BROADCAST, v);
WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
}
#elif defined(CSQC)
NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
{
- vector shotorg, endpos;
float charge;
- shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
- endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
+ vector shotorg = ReadVector();
+ vector endpos = ReadVector();
charge = ReadByte() / 255.0;
pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
mydmg *= charge;
myforce *= charge;
- W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg);
+ W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg, WEP_VORTEX.m_id);
if(charge > WEP_CVAR(vortex, charge_animlimit) && WEP_CVAR(vortex, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound
{
sound(actor, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(vortex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(vortex, charge_animlimit)), ATTN_NORM);
if(WEP_CVAR(vortex, charge) && actor.(weaponentity).vortex_charge < WEP_CVAR(vortex, charge_limit))
actor.(weaponentity).vortex_charge = min(1, actor.(weaponentity).vortex_charge + WEP_CVAR(vortex, charge_rate) * frametime / W_TICSPERFRAME);
- if(weaponslot(weaponentity) == 0)
- actor.vortex_charge = actor.(weaponentity).vortex_charge;
-
if(WEP_CVAR_SEC(vortex, chargepool))
if(actor.(weaponentity).vortex_chargepool_ammo < 1)
{
actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(vortex, chargepool_pause_regen));
}
- if(weaponslot(weaponentity) == 0)
- actor.vortex_chargepool_ammo = actor.(weaponentity).vortex_chargepool_ammo;
-
if(autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).clip_load < min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo))) { // forced reload
thiswep.wr_reload(thiswep, actor, weaponentity);
} else
if(WEP_CVAR_SEC(vortex, ammo))
{
// always deplete if secondary is held
- actor.vortex_chargepool_ammo = max(0, actor.vortex_chargepool_ammo - WEP_CVAR_SEC(vortex, ammo) * dt);
+ actor.(weaponentity).vortex_chargepool_ammo = max(0, actor.(weaponentity).vortex_chargepool_ammo - WEP_CVAR_SEC(vortex, ammo) * dt);
dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(vortex, charge_rate));
actor.vortex_chargepool_pauseregen_finished = time + WEP_CVAR_SEC(vortex, chargepool_pause_regen);
- dt = min(dt, actor.vortex_chargepool_ammo);
+ dt = min(dt, actor.(weaponentity).vortex_chargepool_ammo);
dt = max(0, dt);
actor.(weaponentity).vortex_charge += dt * WEP_CVAR(vortex, charge_rate);
METHOD(Vortex, wr_resetplayer, void(entity thiswep, entity actor))
{
if (WEP_CVAR(vortex, charge)) {
- if (WEP_CVAR_SEC(vortex, chargepool)) {
- actor.vortex_chargepool_ammo = 1;
- }
- actor.vortex_charge = WEP_CVAR(vortex, charge_start);
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
.entity weaponentity = weaponentities[slot];
return false;
}
}
+METHOD(Vortex, wr_zoomdir, bool(entity thiswep))
+{
+ return button_attack2 && !WEP_CVAR(vortex, secondary);
+}
#endif
{ (viewmodels[this.m_wepent_slot]).alpha = (ReadByte() + -1) / 254; }) \
\
PROP(false, vortex_charge, WEPENT_SET_NORMAL, \
- { WriteByte(chan, this.vortex_charge * 16); }, \
- { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 16; }) \
+ { WriteByte(chan, this.vortex_charge * 255); }, \
+ { (viewmodels[this.m_wepent_slot]).vortex_charge = ReadByte() / 255; }) \
\
PROP(false, m_gunalign, WEPENT_SET_NORMAL, \
{ WriteByte(chan, this.m_gunalign); }, \
PROP(false, tuba_instrument, WEPENT_SET_NORMAL, \
{ WriteByte(chan, this.tuba_instrument); }, \
{ (viewmodels[this.m_wepent_slot]).tuba_instrument = ReadByte(); }) \
+ \
+ PROP(false, hagar_load, WEPENT_SET_NORMAL, \
+ { WriteByte(chan, this.hagar_load); }, \
+ { (viewmodels[this.m_wepent_slot]).hagar_load = ReadByte(); }) \
+ \
+ PROP(false, minelayer_mines, WEPENT_SET_NORMAL, \
+ { WriteByte(chan, this.minelayer_mines); }, \
+ { (viewmodels[this.m_wepent_slot]).minelayer_mines = ReadByte(); }) \
+ \
+ PROP(false, arc_heat_percent, WEPENT_SET_NORMAL, \
+ { WriteByte(chan, this.arc_heat_percent * 16); }, \
+ { (viewmodels[this.m_wepent_slot]).arc_heat_percent = ReadByte() / 16; }) \
+ \
+ PROP(false, vortex_chargepool_ammo, WEPENT_SET_NORMAL, \
+ { WriteByte(chan, this.vortex_chargepool_ammo * 16); }, \
+ { (viewmodels[this.m_wepent_slot]).vortex_chargepool_ammo = ReadByte() / 16; }) \
+ \
+ PROP(false, clip_load, WEPENT_SET_NORMAL, \
+ { WriteShort(chan, this.clip_load); }, \
+ { (viewmodels[this.m_wepent_slot]).clip_load = ReadShort(); }) \
+ \
+ PROP(false, clip_size, WEPENT_SET_NORMAL, \
+ { WriteShort(chan, this.clip_size); }, \
+ { (viewmodels[this.m_wepent_slot]).clip_size = ReadShort(); }) \
\
/**/
}
WEPENT_NETPROPS(X);
#undef X
- if (i >= BITS(16 - 1)) LOG_FATAL("Exceeded WEPENT_NETPROPS limit");
+ if (i >= BITS(24 - 1)) LOG_FATAL("Exceeded WEPENT_NETPROPS limit");
}
bool _wepent_send(entity this, entity to, int sf, int chan)
WriteHeader(chan, CLIENT_WEPENT);
.entity weaponentity = this.owner.weaponentity_fld;
WriteByte(chan, weaponslot(weaponentity));
- WriteShort(chan, sf);
+ WriteInt24_t(chan, sf);
int i = 0;
#define X(public, fld, set, sv, cl) { \
if (sf & BIT(i)) { \
bool wepent_customize(entity this, entity client)
{
- //entity e = WaypointSprite_getviewentity(client);
+ entity e = WaypointSprite_getviewentity(client);
.entity weaponentity = this.owner.weaponentity_fld;
- return client.(weaponentity) == this.owner;
+ return e.(weaponentity) == this.owner;
}
void wepent_link(entity wep)
int slot = ReadByte();
this.m_wepent_slot = slot;
viewmodels[slot].m_wepent_slot = slot;
- int sf = ReadShort();
+ int sf = ReadInt24_t();
int i = 0;
#define X(public, fld, set, sv, cl) { \
if (sf & BIT(i)) { \
REGISTER_NET_TEMP(CLIENT_WEPENT)
.float vortex_charge;
+.float vortex_chargepool_ammo;
.int tuba_instrument;
+.int minelayer_mines;
+.float arc_heat_percent;
+.int hagar_load;
+.int clip_load;
+.int clip_size;
#ifdef SVQC
PHYS_WATERJUMP_TIME(this) -= dt;
this.movement = PHYS_INPUT_MOVEVALUES(this);
this.items = STAT(ITEMS, this);
- this.spectatorspeed = STAT(SPECTATORSPEED, this);
if (!(PHYS_INPUT_BUTTON_JUMP(this))) // !jump
UNSET_JUMP_HELD(this); // canjump = true
PM_ClientMovement_UpdateStatus(this);
if (!IS_PLAYER(this)) {
sys_phys_spectator_control(this);
- maxspeed_mod = this.spectatorspeed;
+ maxspeed_mod = STAT(SPECTATORSPEED, this);
}
sys_phys_fixspeed(this, maxspeed_mod);
void sys_phys_spectator_control(entity this)
{
float maxspeed_mod = autocvar_sv_spectator_speed_multiplier;
- if (!this.spectatorspeed) { this.spectatorspeed = maxspeed_mod; }
+ if (!STAT(SPECTATORSPEED, this)) { STAT(SPECTATORSPEED, this) = maxspeed_mod; }
if ((CS(this).impulse >= 1 && CS(this).impulse <= 19)
|| (CS(this).impulse >= 200 && CS(this).impulse <= 209)
|| (CS(this).impulse >= 220 && CS(this).impulse <= 229)
|| CS(this).impulse == 18
|| (CS(this).impulse >= 200 && CS(this).impulse <= 209)
) {
- this.spectatorspeed = bound(autocvar_sv_spectator_speed_multiplier_min, this.spectatorspeed + 0.5, autocvar_sv_spectator_speed_multiplier_max);
+ STAT(SPECTATORSPEED, this) = bound(autocvar_sv_spectator_speed_multiplier_min, STAT(SPECTATORSPEED, this) + 0.5, autocvar_sv_spectator_speed_multiplier_max);
} else if (CS(this).impulse == 11) {
- this.spectatorspeed = maxspeed_mod;
+ STAT(SPECTATORSPEED, this) = maxspeed_mod;
} else if (CS(this).impulse == 12
|| CS(this).impulse == 16
|| CS(this).impulse == 19
|| (CS(this).impulse >= 220 && CS(this).impulse <= 229)
) {
- this.spectatorspeed = bound(autocvar_sv_spectator_speed_multiplier_min, this.spectatorspeed - 0.5, autocvar_sv_spectator_speed_multiplier_max);
+ STAT(SPECTATORSPEED, this) = bound(autocvar_sv_spectator_speed_multiplier_min, STAT(SPECTATORSPEED, this) - 0.5, autocvar_sv_spectator_speed_multiplier_max);
} else if (CS(this).impulse >= 1 && CS(this).impulse <= 9) {
- this.spectatorspeed = 1 + 0.5 * (CS(this).impulse - 1);
+ STAT(SPECTATORSPEED, this) = 1 + 0.5 * (CS(this).impulse - 1);
}
} // otherwise just clear
CS(this).impulse = 0;
#define ALLPROPERTIES_COMMON \
CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, int, ReadByte, WriteByte, frame) \
CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, int, ReadShort, WriteShort, modelindex) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_x) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_y) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_z) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_x) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_y) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_z) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_x) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_y) \
- CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_z) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, vector, ReadVector, WriteVector, origin) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, mins) \
+ CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, maxs) \
CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_x) \
CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_YAW, float, ReadAngle, WriteAngle, angles_y) \
CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_z) \
FIELD_SCALAR(fld, ammo_cells) \
FIELD_SCALAR(fld, ammo_nails) \
FIELD_SCALAR(fld, ammo_rockets) \
+ FIELD_SCALAR(fld, antiwall_flag) \
FIELD_SCALAR(fld, armorvalue) \
FIELD_SCALAR(fld, atten) \
FIELD_SCALAR(fld, bgmscriptdecay) \
this.warpzone_isboxy = (f & 1);
if(f & 4)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
}
else
this.origin = '0 0 0';
this.modelindex = ReadShort();
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
this.scale = ReadByte() / 16;
- this.enemy.oldorigin_x = ReadCoord();
- this.enemy.oldorigin_y = ReadCoord();
- this.enemy.oldorigin_z = ReadCoord();
- this.enemy.avelocity_x = ReadCoord();
- this.enemy.avelocity_y = ReadCoord();
- this.enemy.avelocity_z = ReadCoord();
- this.oldorigin_x = ReadCoord();
- this.oldorigin_y = ReadCoord();
- this.oldorigin_z = ReadCoord();
- this.avelocity_x = ReadCoord();
- this.avelocity_y = ReadCoord();
- this.avelocity_z = ReadCoord();
+ this.enemy.oldorigin = ReadVector();
+ this.enemy.avelocity = ReadVector();
+ this.oldorigin = ReadVector();
+ this.avelocity = ReadVector();
if(f & 2)
{
int f = ReadByte();
if(f & 4)
{
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
}
else
this.origin = '0 0 0';
this.modelindex = ReadShort();
- this.mins_x = ReadCoord();
- this.mins_y = ReadCoord();
- this.mins_z = ReadCoord();
- this.maxs_x = ReadCoord();
- this.maxs_y = ReadCoord();
- this.maxs_z = ReadCoord();
+ this.mins = ReadVector();
+ this.maxs = ReadVector();
this.scale = ReadByte() / 16;
- this.oldorigin_x = ReadCoord();
- this.oldorigin_y = ReadCoord();
- this.oldorigin_z = ReadCoord();
- this.avelocity_x = ReadCoord();
- this.avelocity_y = ReadCoord();
- this.avelocity_z = ReadCoord();
+ this.oldorigin = ReadVector();
+ this.avelocity = ReadVector();
if(f & 2)
{
NET_HANDLE(ENT_CLIENT_WARPZONE_TELEPORTED, bool isnew)
{
this.classname = "warpzone_teleported";
- vector v;
- v.x = ReadCoord();
- v.y = ReadCoord();
- v.z = ReadCoord();
+ vector v = ReadVector();
return = true;
if (!isnew) return;
this.warpzone_transform = v;
bool WarpZone_Teleported_Send(entity this, entity to, int sf)
{
WriteHeader(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
- WriteCoord(MSG_ENTITY, this.angles.x);
- WriteCoord(MSG_ENTITY, this.angles.y);
- WriteCoord(MSG_ENTITY, this.angles.z);
+ WriteVector(MSG_ENTITY, this.angles);
return true;
}
#endif
me.gotoRC(me, 1.25, 0);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Geometry detail:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_subdivisions_tolerance",
- _("Change the smoothness of the curves on the map (default: normal)")));
+ _("Change the smoothness of the curves on the map")));
e.addValue(e, ZCTX(_("DET^Lowest")), "16");
e.addValue(e, ZCTX(_("DET^Low")), "8");
e.addValue(e, ZCTX(_("DET^Normal")), "4");
{
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(3, 0, "r_showsurfaces", _("Show surfaces"),
- _("Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly. (default: disabled)")));
+ _("Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly.")));
}
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"),
- _("Use high resolution lightmaps, which will look pretty but use up some extra video memory (default: enabled)")));
+ _("Use high resolution lightmaps, which will look pretty but use up some extra video memory")));
e.applyButton = effectsApplyButton;
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_deluxemapping", _("Deluxe mapping"),
- _("Use per-pixel lighting effects (default: enabled)")));
+ _("Use per-pixel lighting effects")));
setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_gloss", _("Gloss"),
- _("Enable the use of glossmaps on textures supporting it (default: enabled)")));
+ _("Enable the use of glossmaps on textures supporting it")));
setDependentAND3(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0, "r_glsl_deluxemapping", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_offsetmapping", _("Offset mapping"),
- _("Offset mapping effect that will make textures with bumpmaps appear like they \"pop out\" of the flat 2D surface (default: disabled)")));
+ _("Offset mapping effect that will make textures with bumpmaps appear like they \"pop out\" of the flat 2D surface")));
setDependent(e, "vid_gl20", 1, 1);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping"),
- _("Higher quality offset mapping, which also has a huge impact on performance (default: disabled)")));
+ _("Higher quality offset mapping, which also has a huge impact on performance")));
setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_water", _("Reflections:"),
- _("Reflection and refraction quality, has a huge impact on performance on maps with reflecting surfaces (default: disabled)")));
+ _("Reflection and refraction quality, has a huge impact on performance on maps with reflecting surfaces")));
setDependent(e, "vid_gl20", 1, 1);
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_water_resolutionmultiplier",
- _("Resolution of reflections/refractions (default: good)")));
+ _("Resolution of reflections/refractions")));
e.addValue(e, _("Blurred"), "0.25");
e.addValue(e, ZCTX(_("REFL^Good")), "0.5");
e.addValue(e, _("Sharp"), "1");
setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "cl_decals", _("Decals"),
- _("Enable decals (bullet holes and blood) (default: enabled)")));
+ _("Enable decals (bullet holes and blood)")));
me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models")));
setDependent(e, "cl_decals", 1, 1);
me.TR(me);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:")));
setDependent(e, "cl_decals", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(200, 500, 20, "r_drawdecals_drawdistance",
- _("Decals further away than this will not be drawn (default: 300)")));
+ _("Decals further away than this will not be drawn")));
setDependent(e, "cl_decals", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:")));
setDependent(e, "cl_decals", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 20, 1, "cl_decals_fadetime",
- _("Time in seconds before decals fade away (default: 2)")));
+ _("Time in seconds before decals fade away")));
setDependent(e, "cl_decals", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
me.gotoRC(me, 1.25, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 3, e = makeXonoticRadioButton_T(1, "r_coronas", "0", _("No dynamic lighting"),
- _("Enable corona flares around certain lights (default: enabled)")));
+ _("Enable corona flares around certain lights")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticRadioButton_T(1, "gl_flashblend", string_null, _("Fake corona lighting"),
- _("Enable faster but uglier dynamic lights by rendering bright coronas instead of real dynamic lights (default: disabled)")));
+ _("Enable faster but uglier dynamic lights by rendering bright coronas instead of real dynamic lights")));
makeMulti(e, "r_coronas");
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticRadioButton_T(1, "r_shadow_realtime_dlight", string_null, _("Realtime dynamic lighting"),
- _("Enable rendering of dynamic lights such as explosions and rocket lights (default: enabled)")));
+ _("Enable rendering of dynamic lights such as explosions and rocket lights")));
makeMulti(e, "r_coronas");
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_dlight_shadows", _("Shadows"),
- _("Enable rendering of shadows from dynamic lights (default: disabled)")));
+ _("Enable rendering of shadows from dynamic lights")));
setDependent(e, "r_shadow_realtime_dlight", 1, 1);
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_world", _("Realtime world lighting"),
- _("Enable rendering of full realtime world lighting on maps that support it. Note that this might have a big impact on performance. (default: disabled)")));
+ _("Enable rendering of full realtime world lighting on maps that support it. Note that this might have a big impact on performance.")));
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_world_shadows", _("Shadows"),
- _("Enable rendering of shadows from realtime world lights (default: disabled)")));
+ _("Enable rendering of shadows from realtime world lights")));
setDependent(e, "r_shadow_realtime_world", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "r_shadow_usenormalmap", _("Use normal maps"),
- _("Enable use of directional shading on textures (default: enabled)")));
+ _("Enable use of directional shading on textures")));
setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1);
me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", _("Soft shadows")));
setDependentWeird(e, someShadowCvarIsEnabled);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "r_coronas_occlusionquery", _("Fade corona according to visibility"),
- _("Fade coronas according to visibility (default: enabled)")));
+ _("Fade coronas according to visibility")));
setDependent(e, "r_coronas", 1, 1);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_bloom", _("Bloom"),
- _("Enable bloom effect, which brightens the neighboring pixels of very bright pixels. Has a big impact on performance. (default: disabled)")));
+ _("Enable bloom effect, which brightens the neighboring pixels of very bright pixels. Has a big impact on performance.")));
me.TD(me, 1, 2, e = makeXonoticCheckBoxEx_T(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"),
- _("Enables special postprocessing effects for when damaged or under water or using a powerup (default: disabled)")));
+ _("Enables special postprocessing effects for when damaged or under water or using a powerup")));
makeMulti(e, "hud_powerup");
setDependent(e, "vid_gl20", 1, 1);
me.TR(me);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Quality:")));
setDependent(e, "cl_particles", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 3.0, 0.25, "cl_particles_quality",
- _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1.0)")));
+ _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance")));
setDependent(e, "cl_particles", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:")));
setDependent(e, "cl_particles", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(200, 3000, 200, "r_drawparticles_drawdistance",
- _("Particles further away than this will not be drawn (default: 1000)")));
+ _("Particles further away than this will not be drawn")));
setDependent(e, "cl_particles", 1, 1);
me.gotoRC(me, me.rows - 1, 0);
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 1, "g_waypointsprite_crosshairfadealpha", _("Fade when near the crosshair")));
setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "g_waypointsprite_text", _("Display names instead of icons")));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
#if 0
me.TR(me);
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
me.TD(me, 1, 2, e = makeXonoticSlider_T(60, 130, 5, "fov",
- _("Field of vision in degrees (default: 100)")));
+ _("Field of vision in degrees")));
me.TR(me);
me.TR(me);
//me.TDempty(me, 0.2);
me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("This will create a backup config in your data directory")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "saveconfig backup.cfg\n;\n exec defaultXonotic.cfg\n", 0));
+ me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "saveconfig backup.cfg\n;\n exec default.cfg\n", 0));
me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
me.gotoRC(me, 11.5, 3.25); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 2.5, e = makeXonoticCheckBox_T(0, "cl_gentle", _("Disable gore effects and harsh language"),
- _("Replace blood and gibs with content that does not have any gore effects (default: disabled)")));
+ _("Replace blood and gibs with content that does not have any gore effects")));
e.applyButton = userApplyButton;
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen")));
e.applyButton = videoApplyButton;
me.TD(me, 1, 2, e = makeXonoticCheckBox_T(0, "vid_vsync", _("Vertical Synchronization"),
- _("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate (default: disabled)")));
+ _("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate")));
me.TR(me);
if(cvar("developer"))
{
me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "v_flipped", _("Flip view horizontally"),
- _("Poor man's left handed mode (default: off)")));
+ _("Poor man's left handed mode")));
}
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("gl_texture_anisotropy",
- _("Anisotropic filtering quality (default: 1x)")));
+ _("Anisotropic filtering quality")));
e.addValue(e, ZCTX(_("ANISO^Disabled")), "1");
e.addValue(e, _("2x"), "2");
e.addValue(e, _("4x"), "4");
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Antialiasing:")));
setDependent(e, "r_viewfbo", 0, 0);
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("vid_samples",
- _("Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot (default: disabled)")));
+ _("Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot")));
e.addValue(e, ZCTX(_("AA^Disabled")), "1");
e.addValue(e, _("2x"), "2");
e.addValue(e, _("4x"), "4");
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_depthfirst",
- _("Eliminate overdraw by rendering a depth-only version of the scene before the normal rendering starts (default: disabled)")));
+ _("Eliminate overdraw by rendering a depth-only version of the scene before the normal rendering starts")));
e.addValue(e, ZCTX(_("DF^Disabled")), "0");
e.addValue(e, ZCTX(_("DF^World")), "1");
e.addValue(e, ZCTX(_("DF^All")), "2");
me.TDempty(me, 0.2);
me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", ZCTX(_("VBO^Off"))));
me.TD(me, 1, 1.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)"),
- _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)")));
+ _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering")));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "2", _("Vertices"),
- _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)")));
+ _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering")));
me.TD(me, 1, 1.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "1", _("Vertices and Triangles"),
- _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)")));
+ _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering")));
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Brightness:")));
me.TD(me, 1, 2, e = makeXonoticSlider_T(0.0, 0.5, 0.02, "v_brightness",
- _("Brightness of black (default: 0)")));
+ _("Brightness of black")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast:")));
me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 3.0, 0.05, "v_contrast",
- _("Brightness of white (default: 1)")));
+ _("Brightness of white")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:")));
setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "v_gamma",
- _("Inverse gamma correction value, a brightness effect that does not affect white or black (default: 1.125)")));
+ _("Inverse gamma correction value, a brightness effect that does not affect white or black")));
setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:")));
setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 5.0, 0.1, "v_contrastboost",
- _("By how much to multiply the contrast in dark areas (default: 1)")));
+ _("By how much to multiply the contrast in dark areas")));
setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:")));
setDependent(e, "vid_gl20", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_glsl_saturation",
- _("Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control (default: 1)")));
+ _("Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control")));
setDependent(e, "vid_gl20", 1, 1);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("LIT^Ambient:"))));
me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 20.0, 0.25, "r_ambient",
- _("Ambient lighting, if set too high it tends to make light on maps look dull and flat (default: 4)")));
+ _("Ambient lighting, if set too high it tends to make light on maps look dull and flat")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Intensity:")));
me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_hdr_scenebrightness",
- _("Global rendering brightness (default: 1)")));
+ _("Global rendering brightness")));
me.TR(me);
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "gl_finish", _("Wait for GPU to finish each frame"),
- _("Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines (default: disabled)")));
+ _("Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)")));
e.applyButton = videoApplyButton;
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "v_glslgamma", _("Use GLSL to handle color control"),
- _("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot (default: disabled)")));
+ _("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot")));
setDependent(e, "vid_gl20", 1, 1);
if(cvar("developer"))
{
void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me)
{
me.configureXonoticTextSlider(me, "cl_particles_quality",
- _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1)"));
+ _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance"));
if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")), "0.25 250 0"); }
me.addValue(me, ZCTX(_("PART^Low")), "0.5 500 0");
me.addValue(me, ZCTX(_("PART^Medium")), "0.75 750 0");
void XonoticPicmipSlider_configureXonoticPicmipSlider(entity me)
{
me.configureXonoticTextSlider(me, "gl_picmip",
- _("Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry. (default: good)"));
+ _("Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry."));
me.autofix(me);
me.have_s3tc = GL_Have_TextureCompression();
}
float autocvar_g_balance_portal_health;
float autocvar_g_balance_portal_lifetime;
float autocvar_g_balance_powerup_invincible_takedamage;
+float autocvar_g_balance_powerup_invincible_takeforce = 0.33;
//float autocvar_g_balance_powerup_invincible_time;
float autocvar_g_balance_powerup_strength_damage;
float autocvar_g_balance_powerup_strength_force;
bool autocvar_sv_precacheplayermodels;
//float autocvar_sv_precacheweapons; // WEAPONTODO?
bool autocvar_sv_q3acompat_machineshotgunswap;
-bool autocvar_sv_ready_restart;
-bool autocvar_sv_ready_restart_after_countdown;
-bool autocvar_sv_ready_restart_repeatable;
bool autocvar_sv_servermodelsonly;
int autocvar_sv_spectate;
float autocvar_sv_spectator_speed_multiplier;
e2 = spawn();
setorigin(e2, e.origin);
- RadiusDamage(e2, this, 1000, 0, 128, NULL, NULL, 500, DEATH_CHEAT.m_id, e);
+ RadiusDamage(e2, this, 1000, 0, 128, NULL, NULL, 500, DEATH_CHEAT.m_id, DMG_NOWEP, e);
delete(e2);
LOG_INFO("404 Sportsmanship not found.");
// arguments:
// effectname
effectnum = _particleeffectnum(argv(1));
- W_SetupShot(this, weaponentities[0], false, false, SND_Null, CH_WEAPON_A, 0);
+ W_SetupShot(this, weaponentities[0], false, false, SND_Null, CH_WEAPON_A, 0, 0);
traceline(w_shotorg, w_shotorg + w_shotdir * max_shot_distance, MOVE_NORMAL, this);
__trailparticles(this, effectnum, w_shotorg, trace_endpos);
DID_CHEAT();
// arguments:
// modelname mode
f = stof(argv(2));
- W_SetupShot(this, weaponentities[0], false, false, SND_Null, CH_WEAPON_A, 0);
+ W_SetupShot(this, weaponentities[0], false, false, SND_Null, CH_WEAPON_A, 0, 0);
traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, this);
if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1)
{
#include "../common/triggers/func/conveyor.qh"
#include "../common/triggers/teleporters.qh"
+#include "../common/triggers/target/spawnpoint.qh"
#include "../common/vehicles/all.qh"
if(this.bot_attack)
IL_REMOVE(g_bot_targets, this);
this.bot_attack = false;
- this.hud = HUD_NORMAL;
+ STAT(HUD, this) = HUD_NORMAL;
TRANSMUTE(Observer, this);
this.iscreature = false;
this.teleportable = TELEPORT_SIMPLE;
this.death_time = 0;
this.respawn_flags = 0;
this.respawn_time = 0;
- this.stat_respawn_time = 0;
+ STAT(RESPAWN_TIME, this) = 0;
this.alpha = 0;
this.scale = 0;
this.fade_time = 0;
this.nextthink = 0;
this.deadflag = DEAD_NO;
this.crouch = false;
- this.revive_progress = 0;
+ STAT(REVIVE_PROGRESS, this) = 0;
this.revival_time = 0;
this.items = 0;
this.weapons = '0 0 0';
this.drawonlytoclient = this;
+ this.viewloc = NULL;
+
+ //this.spawnpoint_targ = NULL; // keep it so they can return to where they were?
+
this.weaponmodel = "";
for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
this.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot_spawn;
this.pauserotfuel_finished = time + autocvar_g_balance_pause_fuel_rot_spawn;
this.pauseregen_finished = time + autocvar_g_balance_pause_health_regen_spawn;
- // extend the pause of rotting if client was reset at the beginning of the countdown
- if (!autocvar_sv_ready_restart_after_countdown && time < game_starttime) { // TODO why is this cvar NOTted?
+ if (!sv_ready_restart_after_countdown && time < game_starttime)
+ {
float f = game_starttime - time;
this.spawnshieldtime += f;
this.pauserotarmor_finished += f;
this.pauserothealth_finished += f;
this.pauseregen_finished += f;
}
+
this.damageforcescale = 2;
this.death_time = 0;
this.respawn_flags = 0;
this.respawn_time = 0;
- this.stat_respawn_time = 0;
+ STAT(RESPAWN_TIME, this) = 0;
this.scale = autocvar_sv_player_scale;
this.fade_time = 0;
this.pain_frame = 0;
this.strength_finished = 0;
this.invincible_finished = 0;
this.fire_endtime = -1;
- this.revive_progress = 0;
+ STAT(REVIVE_PROGRESS, this) = 0;
this.revival_time = 0;
this.air_finished = time + 12;
this.viewloc = NULL;
+ for(int slot = 0; slot < MAX_AXH; ++slot)
+ {
+ entity axh = this.(AuxiliaryXhair[slot]);
+ this.(AuxiliaryXhair[slot]) = NULL;
+
+ if(axh.owner == this && axh != NULL && !wasfreed(axh))
+ delete(axh);
+ }
+
+ this.spawnpoint_targ = NULL;
+
this.crouch = false;
this.view_ofs = STAT(PL_VIEW_OFS, this);
setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
if(this.conveyor)
IL_REMOVE(g_conveyed, this);
this.conveyor = NULL; // prevent conveyors at the previous location from moving a freshly spawned player
- this.hud = HUD_NORMAL;
+ STAT(HUD, this) = HUD_NORMAL;
this.event_damage = PlayerDamage;
if(!this.killindicator_teamchange)
{
this.vehicle_health = -1;
- Damage(this, this, this, 1 , DEATH_KILL.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 1 , DEATH_KILL.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
}
if (!IS_SPEC(this) && !IS_OBSERVER(this) && MUTATOR_CALLHOOK(ClientKill_Now, this) == false)
{
- Damage(this, this, this, 100000, DEATH_KILL.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 100000, DEATH_KILL.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
// now I am sure the player IS dead
if(this.vehicle)
vehicles_exit(this.vehicle, VHEF_RELEASE);
if(this.event_damage)
- this.event_damage(this, this, this, 1, DEATH_ROT.m_id, this.origin, '0 0 0');
+ this.event_damage(this, this, this, 1, DEATH_ROT.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
if (!(this.items & IT_UNLIMITED_WEAPON_AMMO))
this.ammo_nails = spectatee.ammo_nails;
this.ammo_rockets = spectatee.ammo_rockets;
this.ammo_fuel = spectatee.ammo_fuel;
- this.clip_load = spectatee.clip_load;
- this.clip_size = spectatee.clip_size;
this.effects = spectatee.effects & EFMASK_CHEAP; // eat performance
this.health = spectatee.health;
CS(this).impulse = 0;
this.items = spectatee.items;
- this.last_pickup = spectatee.last_pickup;
- this.hit_time = spectatee.hit_time;
+ STAT(LAST_PICKUP, this) = STAT(LAST_PICKUP, spectatee);
+ STAT(HIT_TIME, this) = STAT(HIT_TIME, spectatee);
this.strength_finished = spectatee.strength_finished;
this.invincible_finished = spectatee.invincible_finished;
this.superweapons_finished = spectatee.superweapons_finished;
STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
this.weapons = spectatee.weapons;
- this.vortex_charge = spectatee.vortex_charge;
- this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
- this.hagar_load = spectatee.hagar_load;
- this.arc_heat_percent = spectatee.arc_heat_percent;
- this.minelayer_mines = spectatee.minelayer_mines;
this.punchangle = spectatee.punchangle;
this.view_ofs = spectatee.view_ofs;
this.velocity = spectatee.velocity;
this.v_angle = spectatee.v_angle;
this.angles = spectatee.v_angle;
STAT(FROZEN, this) = STAT(FROZEN, spectatee);
- this.revive_progress = spectatee.revive_progress;
+ STAT(REVIVE_PROGRESS, this) = STAT(REVIVE_PROGRESS, spectatee);
this.viewloc = spectatee.viewloc;
if(!PHYS_INPUT_BUTTON_USE(this) && STAT(CAMERA_SPECTATOR, this) != 2)
this.fixangle = true;
setsize(this, spectatee.mins, spectatee.maxs);
SetZoomState(this, CS(spectatee).zoomstate);
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- this.(weaponentity) = spectatee.(weaponentity);
- }
-
- for(int slot = 0; slot < MAX_AXH; ++slot)
- {
- this.(AuxiliaryXhair[slot]) = spectatee.(AuxiliaryXhair[slot]);
- }
-
anticheat_spectatecopy(this, spectatee);
- this.hud = spectatee.hud;
+ STAT(HUD, this) = STAT(HUD, spectatee);
if(spectatee.vehicle)
{
this.angles = spectatee.v_angle;
{
.entity weaponentity = weaponentities[slot];
W_WeaponFrame(this, weaponentity);
-
- if(slot == 0)
- {
- this.clip_load = this.(weaponentity).clip_load;
- this.clip_size = this.(weaponentity).clip_size;
- }
}
this.items_added = 0;
{
if (STAT(FROZEN, this) == 2)
{
- this.revive_progress = bound(0, this.revive_progress + frametime * this.revive_speed, 1);
- this.health = max(1, this.revive_progress * start_health);
- this.iceblock.alpha = bound(0.2, 1 - this.revive_progress, 1);
+ STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) + frametime * this.revive_speed, 1);
+ this.health = max(1, STAT(REVIVE_PROGRESS, this) * start_health);
+ this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
- if (this.revive_progress >= 1)
+ if (STAT(REVIVE_PROGRESS, this) >= 1)
Unfreeze(this);
}
else if (STAT(FROZEN, this) == 3)
{
- this.revive_progress = bound(0, this.revive_progress - frametime * this.revive_speed, 1);
- this.health = max(0, autocvar_g_nades_ice_health + (start_health-autocvar_g_nades_ice_health) * this.revive_progress );
+ STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) - frametime * this.revive_speed, 1);
+ this.health = max(0, autocvar_g_nades_ice_health + (start_health-autocvar_g_nades_ice_health) * STAT(REVIVE_PROGRESS, this) );
if (this.health < 1)
{
if (this.vehicle)
vehicles_exit(this.vehicle, VHEF_RELEASE);
if(this.event_damage)
- this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, this.origin, '0 0 0');
+ this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
- else if (this.revive_progress <= 0)
+ else if (STAT(REVIVE_PROGRESS, this) <= 0)
Unfreeze(this);
}
}
{ // drown!
if (this.pain_finished < time)
{
- Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_drowning * autocvar_g_balance_contents_damagerate, DEATH_DROWN.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_drowning * autocvar_g_balance_contents_damagerate, DEATH_DROWN.m_id, DMG_NOWEP, this.origin, '0 0 0');
this.pain_finished = time + 0.5;
}
}
{
if (IS_CLIENT(caller))
{
- if (warmup_stage || autocvar_sv_ready_restart || g_race_qualifying == 2)
+ if (warmup_stage || sv_ready_restart || g_race_qualifying == 2)
{
- if (!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
+ if (!readyrestart_happened || sv_ready_restart_repeatable)
{
if (time < game_starttime) // game is already restarting
return;
if (mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
if (!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
- Damage(mon, NULL, NULL, mon.health + mon.max_health + 200, DEATH_KILL.m_id, mon.origin, '0 0 0');
+ Damage(mon, NULL, NULL, mon.health + mon.max_health + 200, DEATH_KILL.m_id, DMG_NOWEP, mon.origin, '0 0 0');
print_to(caller, strcat("Your pet '", mon.monster_name, "' has been brutally mutilated"));
return;
}
}
// initiate the restart-countdown-announcer entity
- if (autocvar_sv_ready_restart_after_countdown)
+ if (sv_ready_restart_after_countdown)
{
entity restart_timer = new_pure(restart_timer);
setthink(restart_timer, ReadyRestart_think);
{
FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { CS(it).allowed_timeouts = autocvar_sv_timeout_number; });
}
- // reset map immediately if this cvar is not set
- if (!autocvar_sv_ready_restart_after_countdown) reset_map(true);
+
+ if (!sv_ready_restart_after_countdown) reset_map(true);
if (autocvar_sv_eventlog) GameLogEcho(":restart");
}
// Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
// Otherwise scores could be manipulated during the countdown.
- if (!autocvar_sv_ready_restart_after_countdown) Score_ClearAll();
+ if (!sv_ready_restart_after_countdown) Score_ClearAll();
ReadyRestart_force();
}
break;
}
+ case "nextmap": // TODO: replicate the old behaviour of being able to vote for maps from different modes on multimode servers (possibly support it in gotomap too), maybe fallback instead of aborting if map name is invalid?
+ {
+ vote_command = ValidateMap(argv(startpos + 1), caller);
+ if (!vote_command) return -1;
+ vote_parsed_command = strcat("nextmap ", vote_command);
+ vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
+
+ break;
+ }
+
default:
{
vote_parsed_command = vote_command;
#include <server/defs.qh>
#include <server/miscfunctions.qh>
#include <server/items.qh>
+#include <server/resources.qh>
#include <common/weapons/_all.qh>
spawnfunc(target_items);
}
}
+void target_init_use(entity this, entity actor, entity trigger)
+{
+ if (!(this.spawnflags & 1))
+ {
+ SetResourceAmount(actor, RESOURCE_ARMOR, start_armorvalue);
+ actor.pauserotarmor_finished = time + autocvar_g_balance_pause_armor_rot;
+ }
+
+ if (!(this.spawnflags & 2))
+ {
+ SetResourceAmount(actor, RESOURCE_HEALTH, start_health);
+ actor.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot;
+ actor.pauseregen_finished = time + autocvar_g_balance_pause_health_regen;
+ }
+
+ if (!(this.spawnflags & 4))
+ {
+ SetResourceAmount(actor, RESOURCE_SHELLS, start_ammo_shells);
+ SetResourceAmount(actor, RESOURCE_BULLETS, start_ammo_nails);
+ SetResourceAmount(actor, RESOURCE_ROCKETS, start_ammo_rockets);
+ SetResourceAmount(actor, RESOURCE_CELLS, start_ammo_cells);
+ SetResourceAmount(actor, RESOURCE_PLASMA, start_ammo_plasma);
+ SetResourceAmount(actor, RESOURCE_FUEL, start_ammo_fuel);
+
+ actor.weapons = start_weapons;
+ if (this.spawnflags & 32)
+ {
+ // TODO
+ }
+ }
+
+ if (!(this.spawnflags & 8))
+ {
+ actor.strength_finished = 0;
+ actor.invincible_finished = 0;
+ STAT(BUFFS, actor) = 0;
+ }
+
+ if (!(this.spawnflags & 16))
+ {
+ // We don't have holdables.
+ }
+
+ SUB_UseTargets(this, actor, trigger);
+}
+
spawnfunc(target_init)
{
- this.spawnflags = 0; // remove all weapons except the ones listed below
- this.netname = "shotgun"; // keep these weapons through the remove trigger
- spawnfunc_target_items(this);
+ this.use = target_init_use;
InitializeEntity(this, target_init_verify, INITPRIO_FINDTARGET);
}
float warmup_stage;
float g_jetpack;
+bool sv_ready_restart;
+bool sv_ready_restart_after_countdown;
+bool sv_ready_restart_repeatable;
+
float sv_clones;
float sv_foginterval;
// Fields
-.void(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) event_damage;
+.void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
//.string wad;
//.string map;
.bool canteamdamage;
-void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
+
+// WEAPONTODO
+#define DMG_NOWEP (weaponentities[0])
float lockteams;
.float floodcontrol_voice;
.float floodcontrol_voiceteam;
-.float stat_shotorg = _STAT(SHOTORG); // networked stat for trueaim HUD
-
string matchid;
-.float last_pickup = _STAT(LAST_PICKUP);
-
-.float hit_time = _STAT(HIT_TIME);
-.float typehit_time = _STAT(TYPEHIT_TIME);
-.float kill_time = _STAT(KILL_TIME);
-
-.float damage_dealt_total = _STAT(DAMAGE_DEALT_TOTAL);
-
bool radar_showennemies;
#ifdef PROFILING
.float weapon_load[Weapons_MAX];
.int ammo_none; // used by the reloading system, must always be 0
-.float clip_load = _STAT(WEAPON_CLIPLOAD);
+.float clip_load;
.float old_clip_load;
-.float clip_size = _STAT(WEAPON_CLIPSIZE);
+.float clip_size;
-.float minelayer_mines = _STAT(LAYED_MINES);
-.float vortex_charge = _STAT(VORTEX_CHARGE);
+.int minelayer_mines;
+.float vortex_charge;
.float vortex_charge_rottime;
-.float vortex_chargepool_ammo = _STAT(VORTEX_CHARGEPOOL);
-.float hagar_load = _STAT(HAGAR_LOAD);
+.float vortex_chargepool_ammo;
+.int hagar_load;
.int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
.float player_blocked;
-.float revive_progress = _STAT(REVIVE_PROGRESS);
.float revival_time; // time at which player was last revived
.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
.entity iceblock;
.entity muzzle_flash;
.float misc_bulletcounter; // replaces uzi & hlac bullet counter.
-.float stat_respawn_time = _STAT(RESPAWN_TIME); // shows respawn time, and is negative when awaiting respawn
-
.int killindicator_teamchange;
void PlayerUseKey(entity this);
GameRules_scoring_add_team(player, SCORE, f);
}
-void GiveFrags (entity attacker, entity targ, float f, int deathtype)
+void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity)
{
// TODO route through PlayerScores instead
if(game_stopped) return;
GameRules_scoring_add(targ, DEATHS, 1);
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
-
if(targ != attacker) // not for suicides
if(g_weaponarena_random)
{
return MUTATOR_CALLHOOK(FragCenterMessage, attacker, targ, deathtype, kill_count_to_attacker, kill_count_to_target);
}
-.int buffs = _STAT(BUFFS); // TODO: remove
entity buff_FirstFromFlags(int _buffs);
-void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
+void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity)
{
// Sanity check
if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; }
}
LogDeath("suicide", deathtype, targ, targ);
if(deathtype != DEATH_AUTOTEAMCHANGE.m_id) // special case: don't negate frags if auto switched
- GiveFrags(attacker, targ, -1, deathtype);
+ GiveFrags(attacker, targ, -1, deathtype, weaponentity);
}
// ======
if(SAME_TEAM(attacker, targ))
{
LogDeath("tk", deathtype, attacker, targ);
- GiveFrags(attacker, targ, -1, deathtype);
+ GiveFrags(attacker, targ, -1, deathtype, weaponentity);
CS(attacker).killcount = 0;
else
{
LogDeath("frag", deathtype, attacker, targ);
- GiveFrags(attacker, targ, 1, deathtype);
+ GiveFrags(attacker, targ, 1, deathtype, weaponentity);
CS(attacker).taunt_soundtime = time + 1;
CS(attacker).killcount = CS(attacker).killcount + 1;
int f3 = 0;
if(deathtype == DEATH_BUFF.m_id)
- f3 = buff_FirstFromFlags(attacker.buffs).m_id;
+ f3 = buff_FirstFromFlags(STAT(BUFFS, attacker)).m_id;
if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker))
Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
}
LogDeath("accident", deathtype, targ, targ);
- GiveFrags(targ, targ, -1, deathtype);
+ GiveFrags(targ, targ, -1, deathtype, weaponentity);
if(GameRules_scoring_add(targ, SCORE, 0) == -5)
{
float targ_maxhealth = ((IS_MONSTER(targ)) ? targ.max_health : start_health);
STAT(FROZEN, targ) = frozen_type;
- targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
+ STAT(REVIVE_PROGRESS, targ) = ((frozen_type == 3) ? 1 : 0);
SetResourceAmount(targ, RESOURCE_HEALTH, ((frozen_type == 3) ? targ_maxhealth : 1));
targ.revive_speed = freeze_time;
if(targ.bot_attack)
}
STAT(FROZEN, targ) = 0;
- targ.revive_progress = 0;
+ STAT(REVIVE_PROGRESS, targ) = 0;
targ.revival_time = time;
if(!targ.bot_attack)
IL_PUSH(g_bot_targets, targ);
targ.iceblock = NULL;
}
-void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
float complainteamdamage = 0;
float mirrordamage = 0;
{
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
- .entity weaponentity = weaponentities[slot];
- if(targ.(weaponentity).hook && targ.(weaponentity).hook.aiment == attacker)
- RemoveHook(targ.(weaponentity).hook);
+ .entity went = weaponentities[slot];
+ if(targ.(went).hook && targ.(went).hook.aiment == attacker)
+ RemoveHook(targ.(went).hook);
}
}
// apply invincibility multiplier
if (targ.items & ITEM_Shield.m_itemid)
+ {
damage = damage * autocvar_g_balance_powerup_invincible_takedamage;
+ if (targ != attacker)
+ {
+ force = force * autocvar_g_balance_powerup_invincible_takeforce;
+ }
+ }
}
if (targ == attacker)
// apply damage
if (damage != 0 || (targ.damageforcescale && force))
if (targ.event_damage)
- targ.event_damage (targ, inflictor, attacker, damage, deathtype, hitloc, force);
+ targ.event_damage (targ, inflictor, attacker, damage, deathtype, weaponentity, hitloc, force);
// apply mirror damage if any
if(!autocvar_g_mirrordamage_onlyweapons || DEATH_WEAPONOF(deathtype) != WEP_Null)
attacker = attacker_save;
force = normalize(attacker.origin + attacker.view_ofs - hitloc) * mirrorforce;
- Damage(attacker, inflictor, attacker, mirrordamage, DEATH_MIRRORDAMAGE.m_id, attacker.origin, force);
+ Damage(attacker, inflictor, attacker, mirrordamage, DEATH_MIRRORDAMAGE.m_id, weaponentity, attacker.origin, force);
}
}
-float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity)
+float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,
+ float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity)
// Returns total damage applies to creatures
{
entity targ;
}
if(targ == directhitentity || DEATH_ISSPECIAL(deathtype))
- Damage (targ, inflictor, attacker, finaldmg, deathtype, nearest, force);
+ Damage (targ, inflictor, attacker, finaldmg, deathtype, weaponentity, nearest, force);
else
- Damage (targ, inflictor, attacker, finaldmg, deathtype | HITTYPE_SPLASH, nearest, force);
+ Damage (targ, inflictor, attacker, finaldmg, deathtype | HITTYPE_SPLASH, weaponentity, nearest, force);
}
}
}
return total_damage_to_creatures;
}
-float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity)
+float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity)
{
- return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, directhitentity);
+ return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, weaponentity, directhitentity);
}
float Fire_IsBurning(entity e)
hi = e.fire_owner.damage_dealt;
ty = e.fire_owner.typehitsound;
- Damage(e, e, e.fire_owner, d, e.fire_deathtype, e.origin, '0 0 0');
+ Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
if(e.fire_hitsound && e.fire_owner)
{
e.fire_owner.damage_dealt = hi;
// NOTE: f=0 means still count as a (positive) kill, but count no frags for it
void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
entity GiveFrags_randomweapons;
-void GiveFrags (entity attacker, entity targ, float f, int deathtype);
+void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity);
string AppendItemcodes(string s, entity player);
string s1, string s2, string s3,
float f1, float f2);
-void Obituary(entity attacker, entity inflictor, entity targ, int deathtype);
+void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
void Ice_Think(entity this);
void Unfreeze (entity targ);
-void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+// NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
float RadiusDamage_running;
-float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity);
+float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity);
// Returns total damage applies to creatures
-float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity);
+float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity);
.float fire_damagepersec;
.float fire_endtime;
}
if(sf & 2)
{
- WriteCoord(MSG_ENTITY, this.hook_start.x);
- WriteCoord(MSG_ENTITY, this.hook_start.y);
- WriteCoord(MSG_ENTITY, this.hook_start.z);
+ WriteVector(MSG_ENTITY, this.hook_start);
}
if(sf & 4)
{
- WriteCoord(MSG_ENTITY, this.hook_end.x);
- WriteCoord(MSG_ENTITY, this.hook_end.y);
- WriteCoord(MSG_ENTITY, this.hook_end.z);
+ WriteVector(MSG_ENTITY, this.hook_end);
}
return true;
}
//this.realowner.disableclientprediction = true;
}
-void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.health <= 0)
return;
if(sf & BIT(1))
{
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
}
if(sf & BIT(2))
WriteShort(MSG_ENTITY, floor(this.scale * 256));
if(sf & 0x20)
{
- WriteCoord(MSG_ENTITY, this.mins.x);
- WriteCoord(MSG_ENTITY, this.mins.y);
- WriteCoord(MSG_ENTITY, this.mins.z);
- WriteCoord(MSG_ENTITY, this.maxs.x);
- WriteCoord(MSG_ENTITY, this.maxs.y);
- WriteCoord(MSG_ENTITY, this.maxs.z);
+ WriteVector(MSG_ENTITY, this.mins);
+ WriteVector(MSG_ENTITY, this.maxs);
}
WriteString(MSG_ENTITY, this.bgmscript);
if(this.bgmscript != "")
WriteByte(MSG_ENTITY, floor(this.bgmscriptdecay * 64));
WriteByte(MSG_ENTITY, floor(this.bgmscriptsustain * 255));
WriteByte(MSG_ENTITY, floor(this.bgmscriptrelease * 64));
- WriteCoord(MSG_ENTITY, this.movedir.x);
- WriteCoord(MSG_ENTITY, this.movedir.y);
- WriteCoord(MSG_ENTITY, this.movedir.z);
+ WriteVector(MSG_ENTITY, this.movedir);
WriteByte(MSG_ENTITY, floor(this.lip * 255));
}
WriteByte(MSG_ENTITY, this.fade_start);
FOREACH_CLIENT(IS_REAL_CLIENT(it), {
entity e = IS_SPEC(it) ? it.enemy : it;
if (e.typehitsound) {
- it.typehit_time = time;
+ STAT(TYPEHIT_TIME, it) = time;
} else if (e.killsound) {
- it.kill_time = time;
+ STAT(KILL_TIME, it) = time;
} else if (e.damage_dealt) {
- it.hit_time = time;
- it.damage_dealt_total += ceil(e.damage_dealt);
+ STAT(HIT_TIME, it) = time;
+ STAT(DAMAGE_DEALT_TOTAL, it) += ceil(e.damage_dealt);
}
});
// add 1 frametime because after this, engine SV_Physics
sv_maxidle_slots_countbots = cvar("sv_maxidle_slots_countbots");
sv_autotaunt = cvar("sv_autotaunt");
sv_taunt = cvar("sv_taunt");
+ sv_ready_restart = cvar("sv_ready_restart");
+ sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown");
+ sv_ready_restart_repeatable = cvar("sv_ready_restart_repeatable");
warmup_stage = cvar("g_warmup");
warmup_limit = cvar("g_warmup_limit");
.float lastground;
float total_players;
float redalive, bluealive, yellowalive, pinkalive;
-.float redalive_stat = _STAT(REDALIVE);
-.float bluealive_stat = _STAT(BLUEALIVE);
-.float yellowalive_stat = _STAT(YELLOWALIVE);
-.float pinkalive_stat = _STAT(PINKALIVE);
MUTATOR_HOOKFUNCTION(as, ReadLevelCvars)
{
- // no assault warmups
+ // incompatible
warmup_stage = 0;
+ sv_ready_restart_after_countdown = 0;
}
MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn)
}
});
FOREACH_CLIENT(IS_REAL_CLIENT(it), {
- it.redalive_stat = redalive;
- it.bluealive_stat = bluealive;
- it.yellowalive_stat = yellowalive;
- it.pinkalive_stat = pinkalive;
+ STAT(REDALIVE, it) = redalive;
+ STAT(BLUEALIVE, it) = bluealive;
+ STAT(YELLOWALIVE, it) = yellowalive;
+ STAT(PINKALIVE, it) = pinkalive;
});
}
vector mymid = (this.absmin + this.absmax) * 0.5;
vector theirmid = (toucher.absmin + toucher.absmax) * 0.5;
- Damage(toucher, this, this, 0, DEATH_HURTTRIGGER.m_id, mymid, normalize(theirmid - mymid) * ctf_captureshield_force);
+ Damage(toucher, this, this, 0, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, mymid, normalize(theirmid - mymid) * ctf_captureshield_force);
if(IS_REAL_CLIENT(toucher)) { Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED); }
}
}
}
-void ctf_FlagDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void ctf_FlagDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
{
{
// Can't navigate to my own base, suicide!
// TODO: drop it and wander around
- Damage(this, this, this, 100000, DEATH_KILL.m_id, this.origin, '0 0 0');
+ Damage(this, this, this, 100000, DEATH_KILL.m_id, DMG_NOWEP, this.origin, '0 0 0');
return;
}
}
bool b1 = false, b2 = false, b3 = false, b4 = false, b5 = false; // TODO: kill this, we WANT to show the other flags, somehow! (note: also means you don't see if you're FC)
// initially clear items so they can be set as necessary later.
- player.ctf_flagstatus &= ~(CTF_RED_FLAG_CARRYING | CTF_RED_FLAG_TAKEN | CTF_RED_FLAG_LOST
+ STAT(CTF_FLAGSTATUS, player) &= ~(CTF_RED_FLAG_CARRYING | CTF_RED_FLAG_TAKEN | CTF_RED_FLAG_LOST
| CTF_BLUE_FLAG_CARRYING | CTF_BLUE_FLAG_TAKEN | CTF_BLUE_FLAG_LOST
| CTF_YELLOW_FLAG_CARRYING | CTF_YELLOW_FLAG_TAKEN | CTF_YELLOW_FLAG_LOST
| CTF_PINK_FLAG_CARRYING | CTF_PINK_FLAG_TAKEN | CTF_PINK_FLAG_LOST
if(flag.team == NUM_TEAM_2 && !b2) { b2 = true; t = CTF_BLUE_FLAG_CARRYING; t2 = CTF_BLUE_FLAG_TAKEN; t3 = CTF_BLUE_FLAG_LOST; }
if(flag.team == NUM_TEAM_3 && !b3) { b3 = true; t = CTF_YELLOW_FLAG_CARRYING; t2 = CTF_YELLOW_FLAG_TAKEN; t3 = CTF_YELLOW_FLAG_LOST; }
if(flag.team == NUM_TEAM_4 && !b4) { b4 = true; t = CTF_PINK_FLAG_CARRYING; t2 = CTF_PINK_FLAG_TAKEN; t3 = CTF_PINK_FLAG_LOST; }
- if(flag.team == 0 && !b5) { b5 = true; t = CTF_NEUTRAL_FLAG_CARRYING; t2 = CTF_NEUTRAL_FLAG_TAKEN; t3 = CTF_NEUTRAL_FLAG_LOST; player.ctf_flagstatus |= CTF_FLAG_NEUTRAL; }
+ if(flag.team == 0 && !b5) { b5 = true; t = CTF_NEUTRAL_FLAG_CARRYING; t2 = CTF_NEUTRAL_FLAG_TAKEN; t3 = CTF_NEUTRAL_FLAG_LOST; STAT(CTF_FLAGSTATUS, player) |= CTF_FLAG_NEUTRAL; }
switch(flag.ctf_status)
{
case FLAG_CARRY:
{
if((flag.owner == player) || (flag.pass_sender == player))
- player.ctf_flagstatus |= t; // carrying: player is currently carrying the flag
+ STAT(CTF_FLAGSTATUS, player) |= t; // carrying: player is currently carrying the flag
else
- player.ctf_flagstatus |= t2; // taken: someone else is carrying the flag
+ STAT(CTF_FLAGSTATUS, player) |= t2; // taken: someone else is carrying the flag
break;
}
case FLAG_DROPPED:
{
- player.ctf_flagstatus |= t3; // lost: the flag is dropped somewhere on the map
+ STAT(CTF_FLAGSTATUS, player) |= t3; // lost: the flag is dropped somewhere on the map
break;
}
}
// item for stopping players from capturing the flag too often
if(player.ctf_captureshielded)
- player.ctf_flagstatus |= CTF_SHIELDED;
+ STAT(CTF_FLAGSTATUS, player) |= CTF_SHIELDED;
if(ctf_stalemate)
- player.ctf_flagstatus |= CTF_STALEMATE;
+ STAT(CTF_FLAGSTATUS, player) |= CTF_STALEMATE;
// update the health of the flag carrier waypointsprite
if(player.wps_flagcarrier)
entity spectatee = M_ARGV(0, entity);
entity client = M_ARGV(1, entity);
- client.ctf_flagstatus = spectatee.ctf_flagstatus;
+ STAT(CTF_FLAGSTATUS, client) = STAT(CTF_FLAGSTATUS, spectatee);
}
MUTATOR_HOOKFUNCTION(ctf, GetRecords)
// team checking
#define CTF_SAMETEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b))
#define CTF_DIFFTEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b))
-
-// networked flag statuses
-.int ctf_flagstatus = _STAT(CTF_FLAGSTATUS);
#endif
const int CTF_RED_FLAG_TAKEN = 1;
void set_dom_state(entity e)
{
- e.dom_total_pps = total_pps;
- e.dom_pps_red = pps_red;
- e.dom_pps_blue = pps_blue;
+ STAT(DOM_TOTAL_PPS, e) = total_pps;
+ STAT(DOM_PPS_RED, e) = pps_red;
+ STAT(DOM_PPS_BLUE, e) = pps_blue;
if(domination_teams >= 3)
- e.dom_pps_yellow = pps_yellow;
+ STAT(DOM_PPS_YELLOW, e) = pps_yellow;
if(domination_teams >= 4)
- e.dom_pps_pink = pps_pink;
+ STAT(DOM_PPS_PINK, e) = pps_pink;
}
void dompoint_captured(entity this)
this.team = old_team;
entity msg = WP_DomNeut;
- switch(this.team)
+ switch(real_team)
{
case NUM_TEAM_1: msg = WP_DomRed; break;
case NUM_TEAM_2: msg = WP_DomBlue; break;
const float ST_DOM_CAPS = 1;
// pps: points per second
-.float dom_total_pps = _STAT(DOM_TOTAL_PPS);
-.float dom_pps_red = _STAT(DOM_PPS_RED);
-.float dom_pps_blue = _STAT(DOM_PPS_BLUE);
-.float dom_pps_yellow = _STAT(DOM_PPS_YELLOW);
-.float dom_pps_pink = _STAT(DOM_PPS_PINK);
float total_pps;
float pps_red;
float pps_blue;
}
});
FOREACH_CLIENT(IS_REAL_CLIENT(it), {
- it.redalive_stat = redalive;
- it.bluealive_stat = bluealive;
- it.yellowalive_stat = yellowalive;
- it.pinkalive_stat = pinkalive;
+ STAT(REDALIVE, it) = redalive;
+ STAT(BLUEALIVE, it) = bluealive;
+ STAT(YELLOWALIVE, it) = yellowalive;
+ STAT(PINKALIVE, it) = pinkalive;
});
eliminatedPlayers.SendFlags |= 1;
if(n && STAT(FROZEN, player) == 1) // OK, there is at least one teammate reviving us
{
- player.revive_progress = bound(0, player.revive_progress + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
- player.health = max(1, player.revive_progress * ((warmup_stage) ? warmup_start_health : start_health));
+ STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
+ player.health = max(1, STAT(REVIVE_PROGRESS, player) * ((warmup_stage) ? warmup_start_health : start_health));
- if(player.revive_progress >= 1)
+ if(STAT(REVIVE_PROGRESS, player) >= 1)
{
freezetag_Unfreeze(player);
freezetag_count_alive_players();
}
FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, {
- it.revive_progress = player.revive_progress;
+ STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
it.reviving = false;
});
}
else if(!n && STAT(FROZEN, player) == 1) // only if no teammate is nearby will we reset
{
- player.revive_progress = bound(0, player.revive_progress - frametime * autocvar_g_freezetag_revive_clearspeed, 1);
- player.health = max(1, player.revive_progress * ((warmup_stage) ? warmup_start_health : start_health));
+ STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) - frametime * autocvar_g_freezetag_revive_clearspeed, 1);
+ player.health = max(1, STAT(REVIVE_PROGRESS, player) * ((warmup_stage) ? warmup_start_health : start_health));
}
else if(!n && !STAT(FROZEN, player))
{
- player.revive_progress = 0; // thawing nobody
+ STAT(REVIVE_PROGRESS, player) = 0; // thawing nobody
}
return true;
player.effects |= autocvar_g_keepaway_ballcarrier_effects;
}
-.float stat_sv_airspeedlimit_nonqw;
-.float stat_sv_maxspeed;
-MUTATOR_HOOKFUNCTION(ka, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(ka, PlayerPhysics_UpdateStats)
{
entity player = M_ARGV(0, entity);
+ // these automatically reset, no need to worry
if(player.ballcarried)
- {
- player.stat_sv_airspeedlimit_nonqw *= autocvar_g_keepaway_ballcarrier_highspeed;
- player.stat_sv_maxspeed *= autocvar_g_keepaway_ballcarrier_highspeed;
- }
+ STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_keepaway_ballcarrier_highspeed;
}
MUTATOR_HOOKFUNCTION(ka, BotShouldAttack)
// bits 5- 9: team of key 2, or 0 for no such key, or 30 for dropped, or 31 for self
// bits 10-14: team of key 3, or 0 for no such key, or 30 for dropped, or 31 for self
// bits 15-19: team of key 4, or 0 for no such key, or 30 for dropped, or 31 for self
-.int kh_state = _STAT(KH_KEYS);
.float siren_time; // time delay the siren
//.float stuff_time; // time delay to stuffcmd a cvar
s |= (32 ** key.count) * f;
}
- FOREACH_CLIENT(true, { it.kh_state = s; });
+ FOREACH_CLIENT(true, { STAT(KH_KEYS, it) = s; });
FOR_EACH_KH_KEY(key)
{
if(key.owner)
- key.owner.kh_state |= (32 ** key.count) * 31;
+ STAT(KH_KEYS, key.owner) |= (32 ** key.count) * 31;
}
//print(ftos((nextent(NULL)).kh_state), "\n");
}
}
}
-void kh_Key_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void kh_Key_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(this.owner)
return;
entity spectatee = M_ARGV(0, entity);
entity client = M_ARGV(1, entity);
- client.kh_state = spectatee.kh_state;
+ STAT(KH_KEYS, client) = STAT(KH_KEYS, spectatee);
}
MUTATOR_HOOKFUNCTION(kh, PlayerUseKey)
animdecide_setimplicitstate(this, IS_ONGROUND(this));
}
-void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
float take, save;
vector v;
this.respawn_flags = this.respawn_flags | RESPAWN_FORCE;
}
-void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
float take, save, dh, da;
vector v;
bool valid_damage_for_weaponstats = false;
Weapon awep = WEP_Null;
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
if(vbot || IS_REAL_CLIENT(this))
if(abot || IS_REAL_CLIENT(attacker))
// print an obituary message
if(this.classname != "body")
- Obituary (attacker, inflictor, this, deathtype);
+ Obituary (attacker, inflictor, this, deathtype, weaponentity);
// increment frag counter for used weapon type
Weapon w = DEATH_WEAPONOF(deathtype);
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
.entity went = weaponentities[slot];
- if(!this.(weaponentity))
+ if(!this.(went))
continue; // TODO: clones have no weapon, but we don't want to have to check this all the time
- Weapon wep = this.(weaponentity).m_weapon;
+ Weapon wep = this.(went).m_weapon;
wep.wr_playerdeath(wep, this, went);
}
// set damage function to corpse damage
this.event_damage = PlayerCorpseDamage;
// call the corpse damage function just in case it wants to gib
- this.event_damage(this, inflictor, attacker, excess, deathtype, hitloc, force);
+ this.event_damage(this, inflictor, attacker, excess, deathtype, weaponentity, hitloc, force);
// set up to fade out later
SUB_SetFade (this, time + 6 + random (), 1);
if(autocvar_sv_gentle > 0 || autocvar_ekg || this.classname == "body") {
// remove corpse
// clones don't run any animation code any more, so we must gib them when they die :(
- PlayerCorpseDamage(this, inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, hitloc, force);
+ PlayerCorpseDamage(this, inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, weaponentity, hitloc, force);
}
// reset fields the weapons may use just in case
{
return false;
}
- Damage(client, client, client, 100000, DEATH_AUTOTEAMCHANGE.m_id, client.origin, '0 0 0'); // kill the player
+ Damage(client, client, client, 100000, DEATH_AUTOTEAMCHANGE.m_id, DMG_NOWEP, client.origin, '0 0 0'); // kill the player
lockteams = lockteams_backup; // restore the team lock
LogTeamchange(client.playerid, client.team, type);
return true;
void player_anim(entity this);
-void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
// g_<gametype>_str:
// If 0, default is used.
/// \return True on success, false otherwise.
bool MoveToTeam(entity client, float team_colour, float type);
-void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
int Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol);
}
}
-void Portal_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+void Portal_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
if(deathtype == DEATH_TELEFRAG.m_id)
return;
else
{
if(this.spawnflags & 4)
- Damage (player, this, this, 10000, DEATH_HURTTRIGGER.m_id, player.origin, '0 0 0');
+ Damage (player, this, this, 10000, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, player.origin, '0 0 0');
}
}
#include <common/net_linked.qh>
#include "../common/teams.qh"
#include "../common/triggers/subs.qh"
+#include "../common/triggers/target/spawnpoint.qh"
#include "../common/util.qh"
#include "../lib/warpzone/common.qh"
#include "../lib/warpzone/util_server.qh"
WriteHeader(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
WriteByte(MSG_ENTITY, this.team);
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
return true;
}
if(autocvar_g_spawn_alloweffects)
{
WriteByte(MSG_ENTITY, etof(this.owner));
- WriteCoord(MSG_ENTITY, this.owner.origin.x);
- WriteCoord(MSG_ENTITY, this.owner.origin.y);
- WriteCoord(MSG_ENTITY, this.owner.origin.z);
+ WriteVector(MSG_ENTITY, this.owner.origin);
send = true;
}
else if((to == this.owner) || (IS_SPEC(to) && (to.enemy == this.owner)) )
if (spot)
return spot;
+ if(this.spawnpoint_targ)
+ return this.spawnpoint_targ;
+
if(anypoint || autocvar_g_spawn_useallspawns)
teamcheck = -1;
else if(have_team_spawns > 0)
if (this.flags & FL_PROJECTILE)
{
if (this.watertype == CONTENT_LAVA)
- Damage (this, NULL, NULL, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_LAVA.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_LAVA.m_id, DMG_NOWEP, this.origin, '0 0 0');
else if (this.watertype == CONTENT_SLIME)
- Damage (this, NULL, NULL, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_SLIME.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_SLIME.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
else
{
this.watersound_finished = time + 0.5;
sound (this, CH_PLAYER_SINGLE, SND_LAVA, VOL_BASE, ATTEN_NORM);
}
- Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_lava * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_LAVA.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_lava * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_LAVA.m_id, DMG_NOWEP, this.origin, '0 0 0');
if(autocvar_g_balance_contents_playerdamage_lava_burn)
Fire_AddDamage(this, NULL, autocvar_g_balance_contents_playerdamage_lava_burn * this.waterlevel, autocvar_g_balance_contents_playerdamage_lava_burn_time * this.waterlevel, DEATH_LAVA.m_id);
}
this.watersound_finished = time + 0.5;
sound (this, CH_PLAYER_SINGLE, SND_SLIME, VOL_BASE, ATTEN_NORM);
}
- Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_slime * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_SLIME.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, autocvar_g_balance_contents_playerdamage_slime * autocvar_g_balance_contents_damagerate * this.waterlevel, DEATH_SLIME.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
}
}
else
dm = min((dm - autocvar_g_balance_falldamage_minspeed) * autocvar_g_balance_falldamage_factor, autocvar_g_balance_falldamage_maxdamage);
if (dm > 0)
- Damage (this, NULL, NULL, dm, DEATH_FALL.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, dm, DEATH_FALL.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
if(autocvar_g_maxspeed > 0 && velocity_len > autocvar_g_maxspeed)
- Damage (this, NULL, NULL, 100000, DEATH_SHOOTING_STAR.m_id, this.origin, '0 0 0');
+ Damage (this, NULL, NULL, 100000, DEATH_SHOOTING_STAR.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
}
{
return;
}
- Damage(player, player, player, 100000, DEATH_TEAMCHANGE.m_id, player.origin,
+ Damage(player, player, player, 100000, DEATH_TEAMCHANGE.m_id, DMG_NOWEP, player.origin,
'0 0 0');
}
if (hit) a.accuracy_hit [w] += hit;
if (fired) a.accuracy_fired[w] += fired;
- if (hit && a.hit_time != time) { // only run this once per frame
+ if (hit && STAT(HIT_TIME, a) != time) { // only run this once per frame
a.accuracy_cnt_hit[w] += 1;
- a.hit_time = time;
+ STAT(HIT_TIME, a) = time;
}
if (fired && a.fired_time != time) { // only run this once per frame
#include <common/state.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
+#include <common/wepent.qh>
#include <common/items/_mod.qh>
+bool W_DualWielding(entity player)
+{
+ int held_weapons = 0;
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ if(player.(weaponentity) && player.(weaponentity).m_switchweapon != WEP_Null)
+ ++held_weapons;
+ }
+
+ return held_weapons > 1;
+}
+
void W_GiveWeapon(entity e, int wep)
{
if (!wep) return;
#pragma once
+bool W_DualWielding(entity player);
void W_GiveWeapon (entity e, float wep);
.float prevstrengthsound;
.float prevstrengthsoundattempt;
if(sf & 1)
{
- WriteCoord(MSG_ENTITY, this.origin.x);
- WriteCoord(MSG_ENTITY, this.origin.y);
- WriteCoord(MSG_ENTITY, this.origin.z);
+ WriteVector(MSG_ENTITY, this.origin);
if(sf & 0x80)
{
- WriteCoord(MSG_ENTITY, this.velocity.x);
- WriteCoord(MSG_ENTITY, this.velocity.y);
- WriteCoord(MSG_ENTITY, this.velocity.z);
+ WriteVector(MSG_ENTITY, this.velocity);
if(sf & 0x10)
WriteCoord(MSG_ENTITY, this.gravity);
}
return ret;
}
-void W_HitPlotAnalysis(entity player, .entity weaponentity, vector screenforward, vector screenright, vector screenup)
+void W_HitPlotAnalysis(entity player, entity wep, vector screenforward, vector screenright, vector screenup)
{
if(CS(player).hitplotfh >= 0)
{
antilag_takeback(trace_ent, store, time - lag);
vector hitplot = W_HitPlotNormalizedUntransform(org, trace_ent, screenforward, screenright, screenup, trace_endpos);
antilag_restore(trace_ent, store);
- fputs(CS(player).hitplotfh, strcat(ftos(hitplot.x), " ", ftos(hitplot.y), " ", ftos(hitplot.z), " ", ftos(player.(weaponentity).m_switchweapon.m_id), "\n"));
+ fputs(CS(player).hitplotfh, strcat(ftos(hitplot.x), " ", ftos(hitplot.y), " ", ftos(hitplot.z), " ", ftos(wep.m_id), "\n"));
//print(strcat(ftos(hitplot_x), " ", ftos(hitplot_y), " ", ftos(hitplot_z), "\n"));
}
}
.float hitplotfh;
-void W_HitPlotAnalysis(entity player, .entity weaponentity, vector screenforward, vector screenright, vector screenup);
+void W_HitPlotAnalysis(entity player, entity wep, vector screenforward, vector screenright, vector screenup);
void W_HitPlotOpen(entity player);
void W_HitPlotClose(entity player);
// this function calculates w_shotorg and w_shotdir based on the weapon model
// offset, trueaim and antilag, and won't put w_shotorg inside a wall.
// make sure you call makevectors first (FIXME?)
-void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range)
+void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range, int deathtype)
{
TC(Sound, snd);
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?
float oldsolid = ent.dphitcontentsmask;
+ Weapon wep = DEATH_WEAPONOF(deathtype);
+ if (wep == WEP_Null)
+ wep = ent.(weaponentity).m_weapon; // TODO: don't fall back, if the attack isn't a weapon we don't want it to affect the user's held weapon!
if(!IS_CLIENT(ent))
antilag = false; // no antilag for non-clients!
- if (IS_PLAYER(ent) && (ent.(weaponentity).m_weapon.spawnflags & WEP_FLAG_PENETRATEWALLS))
+ if (IS_PLAYER(ent) && (wep.spawnflags & WEP_FLAG_PENETRATEWALLS))
ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
else
ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
// track max damage
if (IS_PLAYER(ent) && accuracy_canbegooddamage(ent))
- accuracy_add(ent, ent.(weaponentity).m_weapon.m_id, maxdamage, 0);
+ accuracy_add(ent, wep.m_id, maxdamage, 0);
if(IS_PLAYER(ent))
- W_HitPlotAnalysis(ent, weaponentity, v_forward, v_right, v_up);
+ W_HitPlotAnalysis(ent, wep, v_forward, v_right, v_up);
vector md = ent.(weaponentity).movedir;
vector vecs = ((md.x > 0) ? md : '0 0 0');
ent.punchangle_x = recoil * -1;
if (snd != SND_Null) {
- int held_weapons = 0; // HACK: muffle weapon sounds slightly while dual wielding!
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity wep_ent = weaponentities[slot];
- if(ent.(wep_ent) && ent.(wep_ent).m_switchweapon != WEP_Null)
- ++held_weapons;
- }
- sound (ent, chan, snd, ((held_weapons > 1) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
+ sound (ent, chan, snd, (W_DualWielding(ent) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
W_PlayStrengthSound(ent);
}
// apply the damage
if (it.takedamage)
- Damage (it, this, this, bdamage * foff, deathtype, hitloc, it.railgunforce * ffs);
+ Damage (it, this, this, bdamage * foff, deathtype, weaponentity, hitloc, it.railgunforce * ffs);
// create a small explosion to throw gibs around (if applicable)
//setorigin(explosion, hitloc);
MUTATOR_CALLHOOK(FireBullet_Hit, this, hit, start, end, damage, this.(weaponentity));
damage = M_ARGV(4, float);
float g = accuracy_isgooddamage(this, hit);
- Damage(hit, this, this, damage * solid_penetration_left, dtype, start, force * dir * solid_penetration_left);
+ Damage(hit, this, this, damage * solid_penetration_left, dtype, weaponentity, start, force * dir * solid_penetration_left);
// calculate hits for ballistic weapons
if(g)
{
// this function calculates w_shotorg and w_shotdir based on the weapon model
// offset, trueaim and antilag, and won't put w_shotorg inside a wall.
// make sure you call makevectors first (FIXME?)
-void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range);
+void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range, int deathtype);
-#define W_SetupShot_Dir_ProjectileSize(ent,wepent,s_forward,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, max_shot_distance)
-#define W_SetupShot_ProjectileSize(ent,wepent,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, wepent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage)
-#define W_SetupShot_Dir(ent,wepent,s_forward,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
-#define W_SetupShot(ent,wepent,antilag,recoil,snd,chan,maxdamage) W_SetupShot_ProjectileSize(ent, wepent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
-#define W_SetupShot_Range(ent,wepent,antilag,recoil,snd,chan,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range)
+#define W_SetupShot_Dir_ProjectileSize(ent,wepent,s_forward,mi,ma,antilag,recoil,snd,chan,maxdamage,deathtype) W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, max_shot_distance, deathtype)
+#define W_SetupShot_ProjectileSize(ent,wepent,mi,ma,antilag,recoil,snd,chan,maxdamage,deathtype) W_SetupShot_Dir_ProjectileSize(ent, wepent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
+#define W_SetupShot_Dir(ent,wepent,s_forward,antilag,recoil,snd,chan,maxdamage,deathtype) W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)
+#define W_SetupShot(ent,wepent,antilag,recoil,snd,chan,maxdamage,deathtype) W_SetupShot_ProjectileSize(ent, wepent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)
+#define W_SetupShot_Range(ent,wepent,antilag,recoil,snd,chan,maxdamage,range,deathtype) W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range, deathtype)
vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute);
bool forbidWeaponUse(entity player)
{
- if (time < game_starttime && !autocvar_sv_ready_restart_after_countdown) return true;
+ if (time < game_starttime && !sv_ready_restart_after_countdown) return true;
if (player.player_blocked) return true;
if (game_stopped) return true;
if (STAT(FROZEN, player)) return true;
if (this.m_switchweapon == WEP_Null)
{
+ if (this.state != WS_CLEAR)
+ w_ready(this.m_weapon, actor, weaponentity, button_atck | (button_atck2 << 1));
this.m_weapon = WEP_Null;
this.m_switchingweapon = WEP_Null;
this.state = WS_CLEAR;
--- /dev/null
+// ================
+// Xonotic Defrag
+// ================
+
+exec xonotic-server.cfg
+exec balance-xdf.cfg
+exec physicsXDF.cfg
+
+// general gameplay
+set g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
+set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
+set g_balance_kill_antispam 0
+set g_forced_respawn 1
+// g_playerclip_collisions 0 // do not check playerclips
+set g_powerups 0 // set to -1 or patch xonotic
+set g_spawnpoints_auto_move_out_of_solid 1
+set g_start_delay 3
+set g_use_ammunition 0 "if set to 0 all weapons have unlimited ammunition"
+set g_weapon_stay 1 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
+set teamplay_mode 2 // friendly fire and self damage
+set sv_vote_nospectators 1
+set timelimit_override 20
+set g_buffs_cooldown_respawn 0.1
+
+// game mode settings
+set g_cts_finish_kill_delay 2
+set g_cts_respawn_delay 0
+set g_cts_selfdamage 0
--- /dev/null
+// ==================
+// Xonotic Pro-Mode
+// ==================
+
+exec xonotic-server.cfg
+exec balance-xpm.cfg
+
+// general gameplay
+set g_norecoil 1
+set g_shootfromeye 1 // hit where you point at with the crosshair (promoders don't care about ugliness)
+set g_balance_kill_antispam 0
+set g_forced_respawn 1
+set teamplay_mode 2 // friendly fire and self damage
+set sv_vote_nospectators 1
+set g_chat_nospectators 2
+set g_warmup 1
+set g_balance_teams 0
+set g_spawnshieldtime 0
+set g_spawn_furthest 1
+set sv_autoscreenshot 1
+set sv_ready_restart 1
+set sv_ready_restart_after_countdown 1
+set g_monsters 0
+set g_turrets 0
+set g_vehicles 0
+set sv_showspectators 0
--- /dev/null
+// ==============
+// Overkill Mod
+// ==============
+
+exec xonotic-server.cfg
+exec balance-overkill.cfg
+exec physicsOverkill.cfg
+
+// general gameplay
+set g_overkill 1
+
+// hack - eventually, we should be able to choose overkill models in menu like for vanilla
+set sv_defaultcharacter 1
+set sv_defaultplayermodel "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+set sv_defaultplayermodel_red "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
+set sv_defaultplayermodel_blue "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+set sv_defaultplayermodel_yellow "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
+set sv_defaultplayermodel_pink "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+
+set g_respawn_ghosts 0
+
+set g_nades 1
+set g_nades_nade_small 1
+set g_nades_spread 0
+set g_nades_nade_refire 10
+set g_nades_nade_newton_style 2
+
+set g_dodging 1
+set sv_dodging_wall_dodging 1
+
+set g_spawn_near_teammate "!g_assault !g_freezetag"
+set g_spawn_near_teammate_ignore_spawnpoint 1
+set g_spawnshieldtime 0.5
+set g_respawn_delay_forced 2
+
+set g_lms_start_armor 100
--- /dev/null
+exec xonotic-server.cfg
--- /dev/null
+// this resets most client cvars and aliases to their defaults
+// if you want to reset your client to defaults, it's probably a better idea to delete (parts of) config.cfg and restart
+
+
+// changes a cvar and reports it to the server (for the menu to notify the
+// server about changes)
+alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
+
+seta cl_firststart "" "how many times the client has been run"
+seta cl_startcount 0 "how many times the client has been run"
+
+// other aliases
+alias +hook +button6
+alias -hook -button6
+alias +jetpack +button10
+alias -jetpack -button10
+alias +dodge +button11
+alias -dodge -button11
+alias use "impulse 21"
+
+// for backwards compatibility
+// TODO Remove after 0.8 release!
+cl_particles_forcetraileffects 1
+
+alias dropweapon "impulse 17"
+alias +show_info +button7
+alias -show_info -button7
+
+// merge lightmaps up to 2048x2048 textures
+mod_q3bsp_lightmapmergepower 4
+
+// player defaults
+_cl_color "112.211" // same effect as 112, but menuqc can detect this as the default and not intentionally set
+_cl_name ""
+seta _cl_gender 0 "storage cvar for current player gender (0 = undisclosed, 1 = male, 2 = female)"
+_cl_playerskin 0
+
+seta cl_reticle 1 "enable zoom reticles"
+seta cl_reticle_stretch 0 "stretch reticles so they fit the screen (breaks image proportions)"
+seta cl_reticle_normal 1 "draw an aiming reticle when zooming with the zoom button"
+seta cl_reticle_normal_alpha 1 "alpha of the normal reticle"
+seta cl_reticle_weapon 1 "draw custom aiming reticle when zooming with certain weapons"
+seta cl_reticle_weapon_alpha 1 "alpha of the custom reticle"
+
+fov 100
+seta cl_velocityzoom_enabled 0 "velocity based zooming of fov"
+seta cl_velocityzoom_factor 0 "factor of fov zooming (negative values zoom out)"
+seta cl_velocityzoom_type 3 "how to factor in speed, 1 = all velocity in all directions, 2 = velocity only in forward direction (can be negative), 3 = velocity only in forward direction (limited to forward only)"
+seta cl_velocityzoom_speed 1000 "target speed for fov factoring"
+seta cl_velocityzoom_time 0.2 "time value for averaging speed values"
+seta cl_spawnzoom 1 "zoom effect immediately when a player spawns"
+seta cl_spawnzoom_speed 1 "speed at which zooming occurs while spawning"
+seta cl_spawnzoom_factor 2 "factor of zoom while spawning"
+seta cl_zoomfactor 5 "how much +zoom will zoom (1-30)"
+seta cl_zoomspeed 8 "how fast it will zoom (0.5-16), negative values mean instant zoom"
+seta cl_zoomsensitivity 0 "how zoom changes sensitivity (0 = weakest, 1 = strongest)"
+
+seta cl_unpress_zoom_on_spawn 1 "automatically unpress zoom when you spawn"
+seta cl_unpress_zoom_on_death 1 "automatically unpress zoom when you die (and don't allow zoom again while dead)"
+seta cl_unpress_zoom_on_weapon_switch 1 "automatically unpress zoom when you switch a weapon"
+seta cl_unpress_attack_on_weapon_switch 0 "automatically unpress fire and fire1 attack buttons when you switch a weapon"
+
+seta cl_spawn_event_particles 1 "pointparticles effect whenever a player spawns"
+seta cl_spawn_event_sound 1 "sound effect whenever a player spawns"
+//seta cl_spawn_point_model 0 "place a model at all spawn points" // still needs a model
+seta cl_spawn_point_particles 1 "pointparticles effect at all spawn points" // managed by effects-.cfg files
+seta cl_spawn_point_dist_min 1200
+seta cl_spawn_point_dist_max 1600
+
+freelook 1
+sensitivity 6
+v_gamma 1
+viewsize 100
+bgmvolume 1
+volume 0.5
+// fullscreen 1024x768x32bit
+vid_bitsperpixel 32
+vid_fullscreen 1
+vid_width 1024
+vid_height 768
+vid_pixelheight 1
+vid_resizable 0 // cannot be turned on before it is sure it cannot cause a r_restart
+vid_desktopfullscreen 1
+prvm_language en
+set _menu_prvm_language ""
+set _menu_vid_width "$vid_width"
+set _menu_vid_height "$vid_height"
+set _menu_vid_pixelheight "$vid_pixelheight"
+set _menu_vid_desktopfullscreen "$vid_desktopfullscreen"
+seta menu_vid_scale 0
+seta menu_vid_allowdualscreenresolution 0
+// 2D resolution 800x600
+vid_conwidth 800
+vid_conheight 600
+// menu_conwidth, menu_conheight are set inside quake.rc
+v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
+
+// create a temporary empty alias for menu_sync so that execution of effects-normal.cfg, hud_luma.cfg
+// and sRGB-{disable,enable}.cfg on game start doesn't show an error message in the console
+alias menu_sync "" // will be re-aliased later
+
+// we want to use sRGB for our maps!
+exec sRGB-disable.cfg
+vid_sRGB_fallback 2
+r_hdr_glowintensity 1
+// #define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
+set rpn_sRGB_to_linear "dup 0.055 add 1.055 div 2.4 pow exch 12.92 div dup 0.0031308 gt when"
+// #define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
+set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul dup 0.04045 ge when"
+
+// -nosRGB to -sRGB sky shader conversion:
+//
+// q3map_sunExt 1 0.6875 0.375 340 25 47 0 16
+// ^^ elevation
+// ^^^ sunlight
+// q3map_skylight 110 3
+// ^^^ skylight
+//
+// With that, do (the last parameter is the ratio of skylight you assume hits
+// the surfaces, about 0.25 for inner surfaces near sky, about 1.00 on
+// terrain):
+// ]skybox_nosRGB_to_sRGB 340 47 110 0.25
+// rpn: still on stack: new_sunlight:
+// rpn: still on stack: 380.464142
+// rpn: still on stack: new_skylight:
+// rpn: still on stack: 9.32523632
+//
+// The equivalent -sRGB shader then will have:
+//
+// q3map_sunExt 1 0.6875 0.375 380.464142 25 47 0 16
+// q3map_skylight 9.32523632 3
+alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.123 $4 div mul /new_skylight: $3 402.123 $4 div div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 $4 div div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
+
+set cl_orthoview 0 "enable top-down view of the map- meant to be used for radar map images (note: orthoview sets cvars temporarily, requires restart to return them to normal)"
+set cl_orthoview_nofog 1 "disable fog while in orthoview-- note, should not be enabled on ALL maps, i.e. oilrig works fine with this disabled"
+
+// these settings determine how much the view is affected by movement/damage
+cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
+cl_deathfade 0 // fade screen to dark red when dead, value represents how fast the fade is (higher is faster)
+cl_bobcycle 0.5 // how long the cycle of up/down view movement takes (only works if cl_bob is not 0), default is 0.6
+cl_bob 0 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
+cl_bob2cycle 1 // how long the cycle of left/right view movement takes (only works if cl_bob2 is not 0), default is 0.6
+cl_bob2 0 // how much view moves left/right when moving (does not move if cl_bob2cycle is 0), default is 0.01
+cl_bobfall 0.05 "how much the view swings down when falling (influenced by the speed you hit the ground with)"
+cl_bobfallcycle 3 "speed of the bobfall swing"
+cl_bobfallspeed 200 "necessary amount of speed for bob-falling to occur"
+cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
+cl_bobmodel_side 0.2 // amount the gun sways to the sides
+cl_bobmodel_speed 10 // rate at which the gun sways
+cl_bobmodel_up 0.1 // amount the gun sways up and down
+
+cl_followmodel 1 // enables weapon pushing / pulling effect when walking
+seta cl_followmodel_speed 0.3 "gun following speed"
+seta cl_followmodel_limit 135 "gun following limit"
+seta cl_followmodel_velocity_absolute 0 "make the effect ignore velocity direction changes (side effect: it causes a glitch when teleporting / passing through a warpzone)"
+seta cl_followmodel_velocity_lowpass 0.05 "gun following velocity lowpass averaging time"
+seta cl_followmodel_highpass 0.05 "gun following highpass averaging time"
+seta cl_followmodel_lowpass 0.03 "gun following lowpass averaging time"
+
+cl_leanmodel 1 // enables weapon leaning effect when looking around
+seta cl_leanmodel_speed 0.3 "gun leaning speed"
+seta cl_leanmodel_limit 30 "gun leaning limit"
+seta cl_leanmodel_highpass1 0.2 "gun leaning pre-highpass averaging time"
+seta cl_leanmodel_highpass 0.2 "gun leaning highpass averaging time"
+seta cl_leanmodel_lowpass 0.05 "gun leaning lowpass averaging time"
+
+cl_rollangle 0 // amount of view tilt when strafing, default is 2.0
+v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
+gl_polyblend 0 // whether to use screen tints, this has now been replaced by a better system in CSQC
+r_motionblur 0 // motion blur value, default is 0
+r_damageblur 0 // motion blur when damaged, default is 0 (removed in Xonotic)
+
+r_bloom_blur 4
+r_bloom_brighten 2
+r_bloom_colorexponent 1
+r_bloom_colorscale 1
+r_bloom_colorsubtract 0.125
+r_bloom_resolution 320
+r_bloom_scenebrightness 0.85
+
+seta vid_x11_display "" "xonotic-linux-*.sh will use this to start xonotic on an other/new X display"
+// This can have three possible settings:
+// "" run as usual
+// ":n" use DISPLAY=:n, create it if needed
+// ":n/layout" use DISPLAY=:n, create it if needed with ServerLayout layout
+
+cl_autodemo_nameformat demos/%Y-%m-%d_%H-%M
+
+// taunts and voices
+seta cl_autotaunt 0 "automatically taunt enemies when fragging them"
+seta cl_voice_directional 1 "0 = all voices are non-directional, 1 = all voices are directional, 2 = only taunts are directional"
+seta cl_voice_directional_taunt_attenuation 0.5 "this defines the distance from which taunts can be heard"
+
+seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy, 1: same pitch 2: increase pitch with more damage 3: decrease pitch with more damage"
+set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
+seta cl_hitsound_min_pitch 0.75 "minimum pitch of hit sound"
+seta cl_hitsound_max_pitch 1.5 "maximum pitch of hit sound"
+seta cl_hitsound_nom_damage 25 "damage amount at which hitsound bases pitch off"
+
+seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
+seta cl_eventchase_frozen 0 "camera goes into 3rd person mode when the player is frozen"
+seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
+seta cl_eventchase_distance 140 "final camera distance"
+seta cl_eventchase_generator_distance 400 "final camera distance while viewing generator explosion"
+seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
+seta cl_eventchase_maxs "12 12 8" "max size of eventchase camera bbox"
+seta cl_eventchase_mins "-12 -12 -8" "min size of eventchase camera bbox"
+seta cl_eventchase_viewoffset "0 0 20" "viewoffset of eventchase camera"
+seta cl_eventchase_generator_viewoffset "0 0 80" "viewoffset of eventchase camera while viewing generator explosion"
+seta cl_eventchase_vehicle 1 "camera goes into 3rd person mode when inside a vehicle"
+seta cl_eventchase_vehicle_viewoffset "0 0 80"
+seta cl_eventchase_vehicle_distance 250
+
+set _vehicles_shownchasemessage 0
+
+seta cl_particles_oldvortexbeam 0 "Uses the old v2.3 Vortex beam instead of the new beam, only works if server allows it (g_allow_oldvortexbeam 1)"
+
+seta cl_damageeffect 1 "enable weapon damage effects: 1 enables the feature on skeletal models, 2 on any model"
+seta cl_damageeffect_ticrate 0.1 "particle spawn rate"
+seta cl_damageeffect_bones 5 "how many damages to allow on a rigged mesh at once (non-skeletal objects are limited to one)"
+seta cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present"
+seta cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, based on damage amount"
+seta cl_damageeffect_lifetime_min 3 "minimum lifetime a damage effect may have"
+seta cl_damageeffect_lifetime_max 6 "maximum lifetime a damage effect may have"
+
+set cl_deathglow 0.8 "number of seconds during which dead bodies glow out"
+
+cl_movement 1
+cl_movement_track_canjump 0
+cl_stairsmoothspeed 200
+
+alias g_waypointeditor_spawn "impulse 103"
+alias g_waypointeditor_remove "impulse 104"
+alias g_waypointeditor_relinkall "impulse 105"
+alias g_waypointeditor_saveall "impulse 106"
+alias g_waypointeditor_unreachable "impulse 107"
+
+seta menu_sandbox_spawn_model ""
+seta menu_sandbox_attach_bone ""
+seta menu_sandbox_edit_skin 0
+seta menu_sandbox_edit_alpha 1
+seta menu_sandbox_edit_color_main "1 1 1"
+seta menu_sandbox_edit_color_glow "1 1 1"
+seta menu_sandbox_edit_frame 0
+seta menu_sandbox_edit_scale 1
+seta menu_sandbox_edit_solidity 1
+seta menu_sandbox_edit_physics 1
+seta menu_sandbox_edit_force 1
+seta menu_sandbox_edit_material ""
+
+seta menu_monsters_edit_spawn ""
+seta menu_monsters_edit_skin 0
+seta menu_monsters_edit_movetarget 1
+
+// effects
+r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture
+mod_q3shader_force_terrain_alphaflag 1 // supposedly now required for r_glsl_vertextextureblend_usebothalphas to work
+r_glsl_postprocess 0 // but note, hud_postprocessing enables this
+r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
+r_picmipworld 1
+gl_picmip_world 0
+gl_picmip_sprites 0
+gl_picmip_other 1 // so, picmip -1 is best possible quality
+r_mipsprites 1
+r_mipskins 1
+gl_max_lightmapsize 4096
+r_shadow_realtime_world_lightmaps 1
+r_shadow_realtime_world_importlightentitiesfrommap 0 // Whether build process uses keepLights is nontransparent and may change, so better make keepLights not matter.
+cl_decals_fadetime 5
+cl_decals_time 1
+seta cl_gunalign 3 "Gun alignment; 1 = center, 3 = right, 4 = left; requires reconnect"
+seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
+seta cl_particlegibs 0 "simpler gibs"
+seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
+seta cl_gibs_lifetime 2.5 "average lifetime of gibs"
+seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
+seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
+seta cl_gibs_velocity_up 1 "extra z velocity for gibs"
+seta cl_gibs_ticrate 0.1 "ticrate for gibs"
+seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
+seta cl_gibs_avelocity_scale 1 "how much angular velocity to use on gibs"
+seta cl_casings 1 "enable or disable bullet casings"
+seta cl_casings_shell_time 30 "shell casing lifetime"
+seta cl_casings_bronze_time 10 "bullet casings lifetime"
+seta cl_casings_ticrate 0.1 "ticrate for casings"
+seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"
+seta cl_projectiles_sloppy 1 "sloppy projectiles, may temporarily penetrate walls"
+cl_stainmaps 0
+cl_particles_smoke 1
+vid_gl20 1
+r_glsl_deluxemapping 1
+r_glsl_offsetmapping 0
+r_glsl_offsetmapping_lod 1
+r_glsl_offsetmapping_reliefmapping 0
+r_glsl_offsetmapping_scale 0.02
+
+scr_conalpha 1
+scr_conbrightness 0.2
+scr_screenshot_jpeg 1
+scr_screenshot_jpeg_quality 0.9
+
+cl_sound_wizardhit ""
+cl_sound_hknighthit ""
+cl_sound_tink1 weapons/tink1.wav
+cl_sound_ric1 weapons/ric1.wav
+cl_sound_ric2 weapons/ric2.wav
+cl_sound_ric3 weapons/ric3.wav
+cl_sound_r_exp3 ""
+
+seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
+seta cl_announcer_antispam 2 "number of seconds before an announcement of the same sound can be played again"
+seta cl_announcer_maptime 3 "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
+
+// aliases:
+alias +fire +attack
+alias -fire -attack
+alias +fire2 +button3
+alias -fire2 -button3
+alias +attack2 +button3 // old alias from Nexuiz
+alias -attack2 -button3 // old alias name from Nexuiz
+alias +crouch +button5
+alias -crouch -button5
+alias weapnext "_weapnext_${cl_weaponpriority_useforcycling}"
+alias _weapnext_0 "impulse 18"
+alias _weapnext_1 "impulse 15"
+alias _weapnext_2 "impulse 10"
+alias weaplast "impulse 11"
+alias weapprev "_weapprev_${cl_weaponpriority_useforcycling}"
+alias _weapprev_0 "impulse 19"
+alias _weapprev_1 "impulse 16"
+alias _weapprev_2 "impulse 12"
+alias weapbest "impulse 13"
+
+// experimental zoom toggle (can be in wrong state at start of a game, though)
+set _togglezoom +
+alias +zoom "set _togglezoom -; +button4"
+alias -zoom "set _togglezoom +; -button4"
+alias togglezoom "${_togglezoom}zoom"
+
+alias reload "impulse 20"
+
+// weapons
+alias weapon_group_1 "impulse 1"
+alias weapon_group_2 "impulse 2"
+alias weapon_group_3 "impulse 3"
+alias weapon_group_4 "impulse 4"
+alias weapon_group_5 "impulse 5"
+alias weapon_group_6 "impulse 6"
+alias weapon_group_7 "impulse 7"
+alias weapon_group_8 "impulse 8"
+alias weapon_group_9 "impulse 9"
+alias weapon_group_0 "impulse 14" // cycles the superweapons
+// TODO: remove after 0.8.2. Default impulse commands for 0.8.1 servers
+exec weapons.cfg
+
+cl_curl_enabled 1
+cl_curl_maxdownloads 3
+cl_curl_maxspeed 0
+cl_curl_useragent 1
+cl_curl_useragent_append "$g_xonoticversion"
+
+seta g_waypointsprite_alpha 1 "This allows the client to control transparency of the waypoint"
+seta g_waypointsprite_crosshairfadealpha 0.25 "alpha multiplier near crosshair"
+seta g_waypointsprite_crosshairfadescale 1 "scale multiplier near the crosshair"
+seta g_waypointsprite_crosshairfadedistance 150 "distance in virtual pixels from crosshair where to start fading"
+seta g_waypointsprite_distancefadealpha 1 "alpha multiplier near distance"
+seta g_waypointsprite_distancefadescale 0.7 "scale multiplier near the distance"
+seta g_waypointsprite_distancefadedistancemultiplier 0.5 "distance in map sizes from distance where to stop fading"
+set g_waypointsprite_distancealphaexponent 2
+seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
+seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
+seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
+seta g_waypointsprite_edgeoffset_bottom 0 "offset of how close the waypoint can be to the bottom edge of the screen"
+seta g_waypointsprite_edgeoffset_left 0 "offset of how close the waypoint can be to the left edge of the screen"
+seta g_waypointsprite_edgeoffset_right 0 "offset of how close the waypoint can be to the right edge of the screen"
+seta g_waypointsprite_edgeoffset_top 0 "offset of how close the waypoint can be to the top edge of the screen"
+seta g_waypointsprite_fontsize 12
+seta g_waypointsprite_itemstime 2 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn: 1 when spectating, 2 even playing in warmup stage"
+set g_waypointsprite_minscale 0.5
+set g_waypointsprite_minalpha 0.4
+set g_waypointsprite_normdistance 512
+seta g_waypointsprite_scale 1
+set g_waypointsprite_spam 0 "Debugging feature. Set to 10 and load courtfun in race mode to test."
+set g_waypointsprite_timealphaexponent 1
+seta g_waypointsprite_turrets 1 "disable turret waypoints"
+seta g_waypointsprite_turrets_maxdist 5000 "max distance for turret waypoints"
+seta g_waypointsprite_uppercase 1
+seta g_waypointsprite_text 0 "Always show text instead of icons, setting this to 0 will still use text if the icon is unavailable"
+seta g_waypointsprite_iconsize 32
+seta g_waypointsprite_iconcolor 0 "Show the icon at natural color rather than the waypoint's color"
+
+alias "g_waypointsprite_personal" "impulse 30"
+alias "g_waypointsprite_personal_p" "impulse 31"
+alias "g_waypointsprite_personal_d" "impulse 32"
+alias "g_waypointsprite_team_helpme" "impulse 33"
+alias "g_waypointsprite_team_here" "impulse 34"
+alias "g_waypointsprite_team_here_p" "impulse 35"
+alias "g_waypointsprite_team_here_d" "impulse 36"
+alias "g_waypointsprite_team_danger" "impulse 37"
+alias "g_waypointsprite_team_danger_p" "impulse 38"
+alias "g_waypointsprite_team_danger_d" "impulse 39"
+alias "g_waypointsprite_clear_personal" "impulse 47"
+alias "g_waypointsprite_clear" "impulse 48"
+alias "g_waypointsprite_toggle" "toggle cl_hidewaypoints"
+
+seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
+
+seta cl_damagetext "1" "Draw damage dealt where you hit the enemy"
+seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health"
+seta cl_damagetext_format_verbose 0 "{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ"
+seta cl_damagetext_format_hide_redundant 0 "hide {armor} if 0; hide {potential} and {potential_health} when same as actual"
+seta cl_damagetext_color "1 1 0" "Damage text color"
+seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
+seta cl_damagetext_size_min 10 "Damage text font size for small damage"
+seta cl_damagetext_size_min_damage 25 "How much damage is considered small"
+seta cl_damagetext_size_max 16 "Damage text font size for large damage"
+seta cl_damagetext_size_max_damage 140 "How much damage is considered large"
+seta cl_damagetext_alpha_start "1" "Damage text initial alpha"
+seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds"
+seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
+seta cl_damagetext_offset "0 -40 0" "Damage text offset"
+seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
+seta cl_damagetext_accumulate_alpha_rel "0.65" "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha"
+seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too"
+seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire"
+
+seta cl_damagetext_2d_pos "0.47 0.53 0" "2D damage text initial position (X and Y between 0 and 1)"
+seta cl_damagetext_2d_alpha_start 1 "2D damage text initial alpha"
+seta cl_damagetext_2d_alpha_lifetime 1.3 "2D damage text lifetime (alpha fading) in seconds"
+seta cl_damagetext_2d_size_lifetime 3 "2D damage text lifetime (size shrinking) in seconds"
+seta cl_damagetext_2d_velocity "-25 0 0" "2D damage text move direction (screen coordinates)"
+seta cl_damagetext_2d_overlap_offset "0 -15 0" "Offset 2D damage text by this much to prevent overlapping (screen coordinates)"
+seta cl_damagetext_2d_close_range 125 "Always use 2D damagetext for hits closer that this"
+seta cl_damagetext_2d_out_of_view 1 "Always use 2D damagetext for hits that occured off-screen"
+
+seta cl_vehicles_alarm 1 "Play an alarm sound when the vehicle you are driving is heavily damaged"
+seta cl_vehicles_hud_tactical 1
+seta cl_vehicles_hudscale 0.5
+seta cl_vehicles_notify_time 15
+seta cl_vehicles_crosshair_size 0.5
+seta cl_vehicles_crosshair_colorize 1
+
+r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
+
+exec binds-xonotic.cfg
+
+seta menu_skin "luma"
+set menu_slowmo 1
+seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
+seta menu_tooltips 1 "menu tooltips: 0 disabled, 1 enabled, 2 also shows cvar or console command (when available) changed or executed by the item"
+set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
+set menu_showboxes 0 "show item bounding boxes (debug)"
+set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list"
+set menu_force_on_disconnection 1 "force to show the menu this number of seconds after you get disconnected (0 to disable)"
+
+r_textbrightness 0.2
+r_textcontrast 0.8
+r_textshadow 0
+r_font_postprocess_blur 1
+r_font_postprocess_outline 1
+
+// good settings for these fonts
+con_chat 5
+con_chatpos -9
+con_chatsize 10
+con_chatwidth 0.6
+con_notify 0
+con_notifysize 10
+con_notifyalign 0
+con_textsize 10
+
+seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info prints"
+
+// scoreboard
+seta scoreboard_columns default
+
+// keep old scoreboard cvars for compatibility's sake
+// they've been replaced by hud_panel_scoreboard_* cvars
+// TODO remove them after a future release (0.8.2+)
+seta scoreboard_border_thickness 1 "scoreboard border thickness"
+seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
+seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
+seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
+seta scoreboard_color_bg_r 0.125 "red color component of the scoreboard background"
+seta scoreboard_color_bg_g 0.55 "green color component of the scoreboard background"
+seta scoreboard_color_bg_b 0.875 "blue color component of the scoreboard background"
+seta scoreboard_color_bg_team 0.6 "team color multiplier of the scoreboard background"
+seta scoreboard_alpha_bg 0.7 "scoreboard background alpha"
+seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
+seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
+seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
+seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
+seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
+seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
+seta scoreboard_highlight_alpha 0.08 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
+seta scoreboard_highlight_alpha_self 0.3 "self highlight alpha value"
+seta scoreboard_offset_left 0.15 "how far (by percent) the scoreboard is offset from the left screen edge"
+seta scoreboard_offset_right 0.15 "how far (by percent) the scoreboard is offset from the right screen edge"
+seta scoreboard_offset_vertical 0.05 "how far (by percent) the scoreboard is offset from the top and bottom of the screen"
+seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
+seta scoreboard_respawntime_decimals 1 "decimal places to show for the respawntime countdown display on the scoreboard"
+seta scoreboard_dynamichud 0 "apply the dynamic hud effects to the scoreboard"
+
+seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta accuracy_color0 "1 0 0"
+seta accuracy_color1 "1 1 0"
+seta accuracy_color2 "0 1 0"
+
+// for menu server list (eventually make them have engine support?)
+seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
+seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
+seta menu_slist_modfilter "" // set to either: !modname or modname. modname of = means "same as we are running now".
+
+// other serverlist cvars
+seta menu_slist_categories 1
+seta menu_slist_categories_onlyifmultiple 1
+seta menu_slist_purethreshold 0
+seta menu_slist_modimpurity 0
+seta menu_slist_recommendations 3
+seta menu_slist_recommendations_maxping 150
+seta menu_slist_recommendations_minfreeslots 1
+seta menu_slist_recommendations_minhumans 0
+seta menu_slist_recommendations_purethreshold -1
+
+// serverlist category override cvars
+seta menu_slist_categories_CAT_FAVORITED_override ""
+seta menu_slist_categories_CAT_RECOMMENDED_override ""
+seta menu_slist_categories_CAT_NORMAL_override ""
+seta menu_slist_categories_CAT_SERVERS_override "CAT_NORMAL"
+seta menu_slist_categories_CAT_XPM_override ""
+seta menu_slist_categories_CAT_MODIFIED_override ""
+seta menu_slist_categories_CAT_OVERKILL_override ""
+seta menu_slist_categories_CAT_INSTAGIB_override ""
+seta menu_slist_categories_CAT_DEFRAG_override ""
+
+seta menu_weaponarena ""
+
+seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
+
+// useful keybind to maximize the chat area temporarily
+// HUD code takes care of many of these now...
+//set _backup_con_chatvars_set 0
+//alias _restore_con_chatvars_0 ""
+//alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites"
+//alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set"
+//alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites"
+//alias _backup_con_chatvars_1 ""
+//alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set"
+//alias +con_chat_maximize "_backup_con_chatvars; con_chatpos -9; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
+//alias -con_chat_maximize "_restore_con_chatvars"
+
+set _con_chat_maximized 0
+set _backup_con_chatvars_set 0
+alias _restore_con_chatvars_0 ""
+alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites"
+alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set"
+alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites"
+alias _backup_con_chatvars_1 ""
+alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set"
+alias +con_chat_maximize "_con_chat_maximized 1; _backup_con_chatvars; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
+alias -con_chat_maximize "_con_chat_maximized 0; _restore_con_chatvars"
+
+// tab completion
+set con_completion_playdemo *.dem
+set con_completion_timedemo *.dem
+set con_completion_ply *.dem
+set con_completion_tdem *.dem
+set con_completion_exec *.cfg
+set con_completion_chmap map
+set con_completion_devmap map
+set con_completion_gotomap map
+set con_completion_vmap map
+set con_completion_vnextmap map
+set con_completion_vdomap map
+set con_completion_playermodel "models/player/*.iqm"
+
+// helper
+// these non-saved engine cvars shall be saved
+alias makesaved "seta $1 \"${$1 ?}\""
+makesaved cl_maxfps_alwayssleep
+makesaved cl_port
+makesaved gl_finish
+makesaved net_slist_queriespersecond
+makesaved r_ambient
+makesaved r_drawviewmodel
+makesaved r_showsurfaces
+makesaved r_subdivisions_tolerance
+makesaved skill
+makesaved vid_gl13
+makesaved vid_gl20
+makesaved v_idlescale
+makesaved v_kicktime
+makesaved music_playlist_list0
+makesaved music_playlist_random0
+
+cl_netfps 60 // should match or be a multiple of sys_ticrate
+
+seta gl_texturecompression 0
+gl_texturecompression_color 1
+gl_texturecompression_gloss 1
+gl_texturecompression_glow 1
+gl_texturecompression_lightcubemaps 1
+gl_texturecompression_q3bsplightmaps 0
+gl_texturecompression_sky 1
+
+cl_maxfps 200
+
+seta menu_mouse_absolute 1 "use the OS mouse pointer motion for menu"
+seta menu_mouse_speed 1 "speed multiplier for the mouse in the menu (does not affect in-game aiming)"
+set menu_use_default_hostname 1
+alias sethostname "set menu_use_default_hostname 0; hostname $*"
+
+seta cl_weaponpriority "vaporizer hmg rpc vortex fireball mortar machinegun hagar rifle arc electro devastator crylink minelayer shotgun shockwave hlac tuba blaster porto seeker hook" "weapon priority list"
+seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
+seta cl_weaponpriority0 "rpc devastator mortar hagar seeker fireball" "use weapon_priority_0_prev for prev gun from this list, weapon_priority_0_best for best gun, weapon_priority_0_next for next gun. Default value: explosives"
+seta cl_weaponpriority1 "vaporizer vortex crylink hlac arc electro blaster shockwave" "use weapon_priority_1_prev for prev gun from this list, weapon_priority_1_best for best gun, weapon_priority_1_next for next gun. Default value: energy"
+seta cl_weaponpriority2 "vaporizer vortex rifle" "use weapon_priority_2_prev for prev gun from this list, weapon_priority_2_best for best gun, weapon_priority_2_next for next gun. Default value: hitscan exact"
+seta cl_weaponpriority3 "vaporizer hmg vortex rifle machinegun shotgun shockwave" "use weapon_priority_3_prev for prev gun from this list, weapon_priority_3_best for best gun, weapon_priority_3_next for next gun. Default value: hitscan all"
+seta cl_weaponpriority4 "mortar minelayer hlac hagar crylink seeker shotgun shockwave" "use weapon_priority_4_prev for prev gun from this list, weapon_priority_4_best for best gun, weapon_priority_4_next for next gun. Default value: spam weapons"
+seta cl_weaponpriority5 "blaster shockwave hook porto" "use weapon_priority_5_prev for prev gun from this list, weapon_priority_5_best for best gun, weapon_priority_5_next for next gun. Default value: weapons for moving"
+seta cl_weaponpriority6 "" "use weapon_priority_6_prev for prev gun from this list, weapon_priority_6_best for best gun, weapon_priority_6_next for next gun"
+seta cl_weaponpriority7 "" "use weapon_priority_7_prev for prev gun from this list, weapon_priority_7_best for best gun, weapon_priority_7_next for next gun"
+seta cl_weaponpriority8 "" "use weapon_priority_8_prev for prev gun from this list, weapon_priority_8_best for best gun, weapon_priority_8_next for next gun"
+seta cl_weaponpriority9 "" "use weapon_priority_9_prev for prev gun from this list, weapon_priority_9_best for best gun, weapon_priority_9_next for next gun"
+seta cl_weaponimpulsemode 0 "0: only cycle between currently usable weapons in weapon priority order; 1: cycle between all possible weapons on a key in weapon priority order"
+
+alias _gl_flashblend_update_00 "gl_flashblend 1"
+alias _gl_flashblend_update_10 "gl_flashblend 0"
+alias _gl_flashblend_update_01 "gl_flashblend 0"
+alias _gl_flashblend_update_11 "gl_flashblend 0"
+alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_showsurfaces"
+
+set cl_handicap 1 "multiplies damage received and divides damage dealt NOTE: reconnect or use 'sendcvar cl_handicap' to update the choice."
+
+seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
+
+seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway."
+
+seta cl_jetpack_jump 1 "Activate jetpack by pressing jump in the air. 0 = Disable, 1 = Stop when touching ground, 2 = Enable"
+
+seta cl_race_cptimes_showself 1 "Always show your own times as well as the current best on checkpoints in Race/CTS"
+seta cl_race_cptimes_onlyself 0 "Only show your own times on checkpoints in Race/CTS"
+
+set cl_stripcolorcodes 0 "experimental feature (notes: strips ALL color codes from messages!)"
+
+// Demo camera
+set camera_enable 0 "Enables the camera for demo playback"
+set camera_free 0 "Free camera instead of chasing the player"
+set camera_reset 0 "Resets the camera position and switch to chase mode"
+set camera_speed_roll 0.9 "Camera rotation speed"
+set camera_speed_chase 4 "Camera movement speed on the x/y/z axis while chasing the player"
+set camera_speed_free 8 "Camera movement speed on the x/y/z axis in free mode"
+set camera_speed_attenuation 10 "Camera movements attenuation factor. Bigger is smoother. Applies to mouse movements"
+set camera_mouse_threshold 0.5 "Use to ignore small mouse movements. This allows for smoother camera control"
+set camera_chase_smoothly 0 "Attenuate player movements (only in chase mode)"
+set camera_look_player 0 "Always look to the player. Mouse input is ignored in this mode"
+set camera_look_attenuation 8 "Attenuation of \"looking\" movements, only if camera_look_player is set. Bigger is smoother"
+set camera_forward_follows 1 "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking"
+
+// "Gentle mode": show no blood
+seta cl_gentle 0 "client side gentle mode, master switch for removing both gibs and messages"
+seta cl_gentle_gibs 0 "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
+seta cl_gentle_messages 0 "client side gentle mode (only replaces frag messages/centerprints)"
+seta cl_gentle_damage 0 "client side gentle mode (only replaces damage flash); when set to 1, a white flash replaces the blood image, when set to 2, a randomly colored flash is used instead"
+
+set cl_jetpack_attenuation 2 "jetpack sound attenuation"
+
+set cl_warpzone_usetrace 1 "do not touch"
+
+set cl_effects_lightningarc_simple 0
+set cl_effects_lightningarc_segmentlength 64
+set cl_effects_lightningarc_drift_start 0.45
+set cl_effects_lightningarc_drift_end 0.1
+set cl_effects_lightningarc_branchfactor_start 0.25
+set cl_effects_lightningarc_branchfactor_add 0.1
+
+set menu_updatecheck 1 "check for updates"
+set menu_updatecheck_getpacks 1 "get update packs from update server"
+
+set cl_loddistance1 1024
+set cl_loddistance2 3072
+seta cl_playerdetailreduction 4 "the higher, the less detailed player models are displayed (LOD)"
+seta cl_modeldetailreduction 1 "the higher, the less detailed certain map models are displayed (LOD)"
+
+seta cl_casings_maxcount 100 "maximum amount of shell casings (must be at least 1)"
+seta cl_gibs_maxcount 100 "maximum amount of gibs (must be at least 1)"
+
+//cl_gunalign calculator
+seta menu_cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only"
+alias _gunalign_01 "cl_gunalign 1"
+alias _gunalign_02 "cl_gunalign 2"
+alias _gunalign_03 "cl_gunalign 3"
+alias _gunalign_04 "cl_gunalign 4"
+alias _gunalign_11 "cl_gunalign 2"
+alias _gunalign_12 "cl_gunalign 1"
+alias _gunalign_13 "cl_gunalign 4"
+alias _gunalign_14 "cl_gunalign 3"
+alias _gunalign_update "_gunalign_$v_flipped$menu_cl_gunalign"
+
+set _menu_alpha "" // will be set by menu QC to the current fading of the menu, can be used by CSQC to fade items
+set _menu_initialized 0 "is 0 on first menu loading, 1 later"
+
+seta cl_noantilag 0 "turn this on if you believe antilag is bad"
+
+set cl_accuracy_data_share 0 "1 share my weapon accuracy data statistics with other players, 0 keep my weapon accuracy data statistics hidden"
+set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the end of the match"
+
+set developer_csqcentities 0 "csqc entity spam"
+
+seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
+seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); set it to 2 to enable it even in teamplay (only when there is exactly one enemy team)"
+seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
+seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
+seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
+seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce perceived lag"
+seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
+
+set debugdraw 0
+set debugdraw_filter ""
+set debugdraw_filterout ""
+set debugtrace 0
+
+// FIXME remove this when the engine feature FINALLY MAYBE works
+r_glsl_skeletal 0
+
+// animation tuning
+set cl_lerpanim_maxdelta_framegroups 0.05 // must be faster than fastest weapon refire
+set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server controlled anim (e.g. animinfo stuff)
+
+// autodemo deleting
+seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos"
+
+// freeze camera
+set cl_lockview 0 "when 1, the camera does not move any more"
+
+// we now use mastervolume
+volume 1
+
+// sucks less than the old one
+cl_decals_newsystem 1
+
+scr_conalpha 1
+scr_conalpha2factor 0.3
+scr_conalpha3factor 1
+scr_conalphafactor 0.8
+scr_conbrightness 0.35
+scr_conforcewhiledisconnected 1
+scr_conscroll2_x 0.11
+scr_conscroll2_y 0.2
+scr_conscroll3_x 0
+scr_conscroll3_y 0
+scr_conscroll_x -0.1
+scr_conscroll_y -0.3
+
+scr_conforcewhiledisconnected 0
+scr_infobar_height 12
+
+// DP cannot properly detect this, so rather turn off the detection
+r_texture_dds_load_alphamode 2
+r_texture_dds_swdecode 1 // SW decode to quarter res if we want to load DDS but don't support the extension for it
+r_texture_dds_load_logfailure 0 // this engine feature SUCKS
+set vid_netwmfullscreen 0 // doesn't support non-native res
+
+// particles optimization
+r_drawparticles_nearclip_min 8
+r_drawparticles_nearclip_max 16
+
+r_cullentities_trace 0
+
+// exact gloss looks better, e.g. on g-23
+r_shadow_glossexact 1
+r_shadow_glossintensity 1
+
+// use fake light if map has no lightmaps
+r_fakelight 1
+
+r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
+r_water_refractdistort 0.019
+
+set cl_rainsnow_maxdrawdist 2048
+
+// equalize looks better than fullbright
+r_equalize_entities_fullbright 1
+
+// safe font defaults
+r_font_hinting 1
+r_font_disable_freetype 0
+r_font_size_snapping 4
+
+// database management
+set cl_db_saveasdump 0 "write client.db in dump format (loads slower, easier to read/parse)"
+
+// uid2name
+seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)"
+seta cl_allow_uidtracking 1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid tracking (allows associating your data with your player ID)"
+// FIXME set to -1 before release, once we have a dialog for this!
+
+// polygonoffset for submodel SUCKS SUCKS SUCKS (only a hack for quake1, we don't need that)
+r_polygonoffset_submodel_offset 0
+r_polygonoffset_submodel_factor 0
+// decals: need a higher polygonoffset than default to not compete with _decal surfaces too much
+r_polygonoffset_decals_offset -28
+r_polygonoffset_decals_factor 0
+
+// loading screen
+scr_loadingscreen_background 0
+scr_loadingscreen_barcolor "0 0.5 1"
+scr_loadingscreen_barheight 12
+scr_loadingscreen_count 1
+scr_loadingscreen_firstforstartup 1
+scr_loadingscreen_scale 999
+scr_loadingscreen_scale_base 1
+scr_loadingscreen_scale_limit 2
+
+// other config files
+exec effects-normal.cfg
+exec crosshairs.cfg
+exec gamemodes-client.cfg
+exec notifications.cfg
+
+seta cl_physics "default" "client selected physics set"
+
+// hud cvar descriptions and common settings
+exec _hud_common.cfg
+exec _hud_descriptions.cfg
+// exec the default skin config
+// please add any new cvars into the hud_save script in qcsrc/client/hud_config.qc for consistency
+exec hud_luma.cfg
+
+// enable menu syncing - must be after files that call menu_sync on startup - see alias menu_sync ""
+alias menu_sync "menu_cmd sync"
+
+seta cl_items_nofade 0
+seta cl_animate_items 1
+seta cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
+seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
+seta cl_simple_items 0 "enable simple items (if server allows)"
+set cl_simpleitems_postfix "_luma" "posfix to add fo model name when simple items are enabled"
+set cl_fullbright_items 0 "enable fullbright items (if server allows, controlled by g_fullbrightitems)"
+set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0"
+set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
+
+seta cl_showspectators 0 "Show who's spectating you if server has sv_showspectators enabled"
+
+// Facility for config.cfg use ONLY.
+// Interpreted in post-config.cfg.
+seta menu_forced_saved_cvars "" "These cvars will always be saved, despite engine/Xonotic cvar saving status"
+set menu_reverted_nonsaved_cvars "" "These cvars are currently marked as saved in the flags, but have been reverted and won't stay saved. INTERNAL USE ONLY."
--- /dev/null
+// Xonotic version (formatted for machines)
+// used to determine if a client version is compatible
+// this doesn't have to be bumped with every release
+// bump when clients become incompatible or any other perfectly good reason
+// (e.g. game data incompatibility, engine version incompatibility, etc
+// note: this automatically filters the server browser, clients of the new
+// version won't see old servers, and clients of the old version won't see new
+// servers either
+//
+// e.g. Xonotic 1.5.1 RC1 will be 15101
+set g_xonoticversion git "Xonotic version (formatted for humans)"
+
+gameversion 802 // 0.8.2
+gameversion_min 0 // git builds see all versions
+gameversion_max 65535 // git builds see all versions
+
+// compatibility guideline:
+// version a.b.c = a0b0c
+// gameversion_min = a0(b-1)00 // show servers of the previous "line"
+// gameversion_max = a0(b+1)99 // show servers of the next "line"
+// so, for a given gameversion, _min and _max calculate as follows:
+// gameversion_min = (gameversion / 100) * 100 - 100
+// gameversion_max = (gameversion / 100) * 100 + 199
+
+seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
+
+exec xonotic-client.cfg
+exec xonotic-server.cfg
+
+set ekg 0 "Throw huge amounts of gibs"
+
+_cl_playermodel "models/player/erebus.iqm"
+
+locs_enable 0
+pausable 0
+set samelevel 0 "when 1, always play the same level over and over again"
+
+fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
+
+// singleplayer campaign
+set g_campaign 0
+set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
+seta g_campaign_name "xonoticbeta"
+seta g_campaign_skill -1 // -2 easy -1 medium 0 hard
+
+alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
+alias singleplayer_continue "set scmenu_campaign_goto -1"
+alias singleplayer_levellist "set scmenu_campaign_dump 1; togglemenu; wait; togglemenu"
+
+// campaign internal, set when loading a campaign map1G
+set _campaign_index ""
+set _campaign_name ""
+set _campaign_testrun 0 "To verify the campaign file, set this to 1, then start the first campaign level from the menu. If you end up in the menu again, it's good, if you get a QC crash, it's bad."
+
+// used by both server and menu to maintain the available list of maps
+seta g_maplist "" "the list of maps to be cycled among (is autogenerated if empty)"
+
+// we must change its default from 1.0 to 1 to be consistent with menuqc
+set slowmo 1
+
+// ticrate
+//sys_ticrate 0.0166667 // 60fps. This would be ideal, but kills home routers.
+sys_ticrate 0.0333333 // Use 30fps instead.
+
+// Audio track names (for old-style "cd loop NUMBER" usage)
+set _cdtrack_first "1"
+alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\""
+alias _cdtrack_1 "g_cdtracks_remaplist \"$1\"; set _cdtrack_first 0"
+alias _cdtrack "_cdtrack_$_cdtrack_first $2"
+set g_cdtracks_remaplist ""
+exec cdtracks.cfg
+unset _cdtrack_first
+unalias _cdtrack_0
+unalias _cdtrack_1
+unalias _cdtrack
+
+cd remap $g_cdtracks_remaplist
+set sv_intermission_cdtrack ""
+
+set g_cdtracks_dontusebydefault "rising-of-the-phoenix"
+seta menu_cdtrack "rising-of-the-phoenix"
+
+// these entities are not referenced by anything directly, they just represent
+// teams and are found by find() when needed
+prvm_leaktest_ignore_classnames "ctf_team dom_team tdm_team"
+prvm_backtraceforwarnings 1
+
+set _urllib_nextslot 0 "temp variable"
+
+set g_debug_defaultsounds 0 "always use default sounds"
+
+// define some engine cvars that we need even on dedicated server
+set r_showbboxes 0
+
+// support Q1BSP maps
+mod_q1bsp_polygoncollisions 1
+
+// match q3map2
+mod_obj_orientation 0
+
+// UTF-8
+utf8_enable 1
+
+// this is mainly for _decal entities (their shaders should use "polygonoffset" shader parameter) - this is "good enough" as it seems, but smaller than the decals one so these don't zfight decals
+mod_q3shader_default_polygonoffset -14
+mod_q3shader_default_polygonfactor 0
+
+// random charge stuff :P
+set g_weapon_charge_colormod_hdrmultiplier 4 "how much to multiply the colors by in the colormod vector"
+set g_weapon_charge_colormod_red_half 0
+set g_weapon_charge_colormod_green_half 0.5
+set g_weapon_charge_colormod_blue_half 1
+set g_weapon_charge_colormod_red_full 1
+set g_weapon_charge_colormod_green_full -0.5
+set g_weapon_charge_colormod_blue_full -1
+
+// session locking
+locksession 1
+
+// create this cvar in case the engine did not
+set snd_soundradius 1200
+set snd_softclip 1
+set snd_maxchannelvolume 0
+set snd_streaming_length 2
+seta menu_snd_sliderscale 2 "0: decibels; 1: linear percent; 2: 0..10 scale; 3: slider size percent"
+seta menu_snd_attenuation_method 1 "Use exponential instead of linear falloff for sound attenuation"
+alias snd_attenuation_method_0 "set menu_snd_attenuation_method 0; set snd_soundradius 1200; set snd_attenuation_exponent 1; set snd_attenuation_decibel 0" // Quake default
+alias snd_attenuation_method_1 "set menu_snd_attenuation_method 1; set snd_soundradius 2400; set snd_attenuation_exponent 4; set snd_attenuation_decibel 0" // nice approximation for method 2
+alias snd_attenuation_method_2 "set menu_snd_attenuation_method 2; set snd_soundradius 1200; set snd_attenuation_exponent 0; set snd_attenuation_decibel 10" // warning: plays sounds within up to 6000qu
+snd_attenuation_method_1
+
+// declare the channels we use
+seta snd_channel8volume 1 "QuakeC controlled background music volume"
+seta snd_channel9volume 1 "QuakeC controlled ambient sound volume"
+
+// sound randomization
+snd_identicalsoundrandomization_time -0.1
+snd_identicalsoundrandomization_tics 1
+
+// load console command aliases and settings
+exec commands.cfg
+
+// ... and now that everything is configured/aliased, we can do some things:
+
+// Change g_start_delay based upon if the server is local or not.
+if_client set g_start_delay 0 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
+if_dedicated set g_start_delay 15 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
--- /dev/null
+// this should reset most cvars and aliases affecting gameplay to their defaults
+// note that it doesn't reset all server cvars,
+// some are shared with the client and so are left in xonotic-common.cfg
+
+
+// taunts and voices
+set sv_taunt 1 "allow taunts on the server"
+set sv_autotaunt 1 "allow autotaunts on the server"
+
+// server settings
+hostname "Xonotic $g_xonoticversion Server"
+set sv_mapchange_delay 5
+set minplayers 0 "number of players playing at the same time (if not enough real players are there the remaining slots are filled with bots)"
+
+// restart server if all players hit "ready"-button
+set sv_ready_restart 0 "allow a map to be restarted once all players pressed the \"ready\" button"
+set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
+set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
+
+//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
+set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
+
+set g_maxplayers 0 "maximum number of players allowed to play at the same time, set to 0 to allow all players to join the game"
+set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectators\" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked"
+
+// tournament mod
+set g_warmup 0 "split the game into a warmup- and match-stage"
+set g_warmup_limit 0 "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
+set g_warmup_allow_timeout 0 "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
+set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
+set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
+
+set g_chat_nospectators 0 "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
+set sv_vote_nospectators 0 "only players can call a vote (thus spectators and observers can't call a vote): 0 = all people can vote, 1 = spectators can vote in warmup stage, 2 = only players can vote (no exceptions)."
+
+alias g_tourney "g_tourney_$1"
+alias g_tourney_1 "g_warmup 1; g_chat_nospectators 2; sv_vote_nospectators 1"
+alias g_tourney_0 "g_warmup 0; g_chat_nospectators 0; sv_vote_nospectators 0"
+
+set sv_timeout 0 "allow a player to call a timeout, this will pause the game for some time"
+set sv_timeout_length 120 "how long the game will be paused at max, in seconds"
+set sv_timeout_number 2 "how many timeouts one player is allowed to call (gets reset after a restart)"
+set sv_timeout_leadtime 4 "how long the players will be informed that a timeout was called before it starts, in seconds"
+set sv_timeout_resumetime 3 "how long the remaining timeout-time will be after a player called the timein command"
+
+set g_allow_oldvortexbeam 0 "If enabled, clients are allowed to use old v2.3 Vortex beam"
+
+set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
+set g_telefrags_teamplay 1 "never telefrag team mates"
+set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
+set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
+
+set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
+set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
+set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
+
+set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
+
+// use default physics
+set sv_friction_on_land 0
+set sv_friction_slick 0.5
+
+set sv_slick_applygravity 0
+
+set sv_aircontrol_backwards 0 "apply forward aircontrol options to backward movement"
+set sv_aircontrol_sidewards 0 "apply forward aircontrol options to sideward movement"
+
+set sv_player_viewoffset "0 0 35" "view offset of the player model"
+set sv_player_mins "-16 -16 -24" "playermodel mins"
+set sv_player_maxs "16 16 45" "playermodel maxs"
+set sv_player_crouch_viewoffset "0 0 20" "view offset of the player model when crouched"
+set sv_player_crouch_mins "-16 -16 -24" "mins of a crouched playermodel"
+set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel"
+
+set sv_doublejump 0 "allow Quake 2-style double jumps"
+set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
+set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
+set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
+set sv_track_canjump 0 "track if the player released the jump key between 2 jumps to decide if they are able to jump or not"
+set sv_jumpvelocity_crouch 0 "jump height while crouching, set to 0 to use regular jump height"
+
+set sv_precacheplayermodels 1
+set sv_precacheweapons 0
+set sv_precacheitems 0
+set sv_spectator_speed_multiplier 1.5
+set sv_spectator_speed_multiplier_min 1
+set sv_spectator_speed_multiplier_max 5
+set sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
+set sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
+set sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
+set sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
+set sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overridden by :<skinnumber> suffix in sv_defaultplayermodel"
+set sv_defaultplayermodel_red "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_red 0
+set sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_blue 0
+set sv_defaultplayermodel_yellow "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_yellow 0
+set sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_pink 0
+set sv_defaultplayercolors "" "set to 16*shirt+pants to force a color, note: it does NOT depend on defaultcharacter! Set to \"\" to disable"
+set sv_autoscreenshot 0 "if set to 1, the server forces all clients to create a local screenshot once the map ended"
+net_messagetimeout 30
+net_connecttimeout 30
+sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
+
+set sv_shownames_cull_distance 2500 "distance after which to not send origin/health/armor of another player"
+
+set bot_config_file bots.txt "Name and path of the bot configuration file"
+set bot_number 0 "Minimum number of bots"
+set bot_usemodelnames 0 "Use player model names for bot names"
+set bot_nofire 0 "When set, bots never fire. Mainly for testing in g_waypointeditor mode"
+set bot_prefix [BOT] "Prefix in front of the bot names"
+set bot_suffix "" "Suffix behind the bot names"
+set skill_auto 0 "when 1, \"skill\" gets adjusted to match the best player on the map"
+set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
+set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
+set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
+// general bot AI cvars
+set bot_ai_thinkinterval 0.05
+set bot_ai_strategyinterval 7 "How often a new objective is chosen"
+set bot_ai_strategyinterval_movingtarget 5.5 "How often a new objective is chosen when current objective can move"
+set bot_ai_enemydetectioninterval 2 "How often bots pick a new target"
+set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
+set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
+set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
+set bot_ai_dangerdetectioninterval 0.25 "How often scan for waypoints with dangers near"
+set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
+set bot_ai_aimskill_blendrate 2 "How much correction will be applied to the aiming angle"
+set bot_ai_aimskill_fixedrate 15
+set bot_ai_aimskill_firetolerance_distdegrees 100
+set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
+set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
+set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
+set bot_ai_keyboard_distance 250 "Keyboard emulation is disabled after this distance to the goal"
+set bot_ai_keyboard_threshold 0.57
+set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
+set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
+set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
+set bot_ai_custom_weapon_priority_far "vaporizer vortex rifle electro devastator mortar hagar hlac crylink blaster machinegun fireball seeker shotgun shockwave tuba minelayer" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid "vaporizer devastator vortex fireball seeker mortar electro machinegun arc crylink hlac hagar shotgun shockwave blaster rifle tuba minelayer" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "vaporizer vortex shotgun shockwave machinegun arc hlac tuba seeker hagar crylink mortar electro devastator blaster fireball rifle minelayer" "Desired weapons for close distances ordered by priority"
+set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
+set bot_ai_weapon_combo_threshold 0.4 "Try to make a combo N seconds after the last attack"
+set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
+set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds"
+set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this value will perform the \"bunnyhop\" technique"
+set bot_ai_bunnyhop_startdistance 200 "Run to goals located further than this distance"
+set bot_ai_bunnyhop_stopdistance 300 "Stop jumping after reaching this distance to the goal"
+set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
+set bot_god 0 "god mode for bots"
+set bot_ai_navigation_jetpack 0 "Enable bots to navigate maps using the jetpack"
+set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
+// Better don't touch these, there are hard to tweak!
+set bot_ai_aimskill_order_mix_1st 0.01 "Amount of the 1st filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_2nd 0.1 "Amount of the 2nd filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_3th 0.01 "Amount of the 3th filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_4th 0.05 "Amount of the 4th filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_5th 0.01 "Amount of the 5th filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_filter_1st 0.4 "Position filter"
+set bot_ai_aimskill_order_filter_2nd 0.4 "Movement filter"
+set bot_ai_aimskill_order_filter_3th 0.2 "Acceleration filter"
+set bot_ai_aimskill_order_filter_4th 0.4 "Position prediction filter. Used rarely"
+set bot_ai_aimskill_order_filter_5th 0.5 "Movement prediction filter. Used rarely"
+set bot_ai_timeitems 1 "allow skilled bots to run to important items a little time before respawning"
+set bot_ai_timeitems_minrespawndelay 25 "bots run to items with this minimum respawn delay before respawning"
+
+// waypoint editor enable
+set g_waypointeditor 0
+set g_waypointeditor_auto 0 "Automatically create waypoints for bots while playing; BEWARE, this currently creates too many of them"
+set g_waypointeditor_symmetrical 0 "Enable symmetrical editing of waypoints on symmetrical CTF maps (NOTE: it assumes that the map is perfectly symmetrical). 1: automatically determine origin of symmetry; -1: use custom origin (g_waypointeditor_symmetrical_origin); 2: automatically determine axis of symmetry; -2: use custom axis (g_waypointeditor_symmetrical_axis)"
+set g_waypointeditor_symmetrical_origin "0 0" "Custom origin of symmetry (x y)"
+set g_waypointeditor_symmetrical_order 0 "if >= 2 apply rotational symmetry (around origin of symmetry) of this order, otherwise apply autodetected order of symmetry"
+set g_waypointeditor_symmetrical_axis "0 0" "Custom axis of symmetry (m q parameters of y = mx + q)"
+set bot_ignore_bots 0 "When set, bots don't shoot at other bots"
+set bot_join_empty 0 "When set, bots also play if no player has joined the server"
+set bot_vs_human 0 "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game"
+
+set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
+set g_spawnshield_blockdamage 1 "how much spawn shield protects you from damage (1 = full protection)"
+set g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
+set g_antilag_nudge 0 "don't touch"
+set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
+set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
+set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
+set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
+set g_weapon_stay 0 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
+set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
+set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
+set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
+set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
+set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"
+set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening"
+set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly"
+set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
+set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)"
+set g_weaponarena_random_with_blaster "1" "additionally, always provide the blaster in random weapon arena games"
+set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid"
+set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once <g_respawn_delay> seconds are over"
+set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)"
+set g_fullbrightitems 0 "brightens up items"
+set g_nodepthtestplayers 0 "disables depth testing on players"
+set g_nodepthtestitems 0 "disables depth testing on items"
+set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"
+set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"
+set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"
+set g_maplist_mostrecent_count 3 "number of most recent maps that are blocked from being played again"
+set g_maplist_index 0 "this is used internally for saving position in maplist cycle"
+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_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"
+
+set g_grab_range 200 "distance at which dragable objects can be grabbed"
+
+set g_cloaked 0 "display all players mostly invisible"
+set g_player_alpha 1
+set g_player_brightness 0 "set to 2 for brighter players"
+set g_balance_cloaked_alpha 0.25
+
+set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
+set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
+
+set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
+set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
+set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
+// respawn delay
+set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
+set g_respawn_delay_small_count 0 "Player count per team for g_respawn_delay_small. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
+set g_respawn_delay_large 2 "large game number of seconds you have to wait before you can respawn again"
+set g_respawn_delay_large_count 8 "Player count per team for g_respawn_delay_large. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
+set g_respawn_delay_max 5 "number of seconds you can wait before you're forced to respawn (only effective with g_forced_respawn 1)"
+set g_respawn_delay_forced 0 "enforce regular respawn delay (prevent gamemode specific respawn delays)"
+set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
+
+// overtime
+set timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
+set timelimit_overtimes 0 "how many overtimes to add at max"
+set timelimit_suddendeath 5 "number of minutes suddendeath mode lasts after all overtimes were added and still no winner was found"
+
+// common team values
+set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
+set g_tdm_on_dm_maps 0 "when this is set, all DM maps automatically support TDM"
+
+set teamplay_mode 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the cvars g_mirrordamage*, g_friendlyfire* and g_teamdamage*"
+set g_mirrordamage 0.7 "for teamplay_mode 4: mirror damage factor"
+set g_mirrordamage_virtual 1 "for teamplay_mode 4: do not actually apply mirror damage, just show graphics effect for it"
+set g_mirrordamage_onlyweapons 0 "for teamplay_mode 4: only apply mirror damage if the attack was from a weapon"
+set g_friendlyfire 0.5 "for teamplay_mode 4: friendly fire factor"
+set g_friendlyfire_virtual 1 "for teamplay_mode 4: do not actually apply friendly fire, just show graphics effect for it"
+set g_friendlyfire_virtual_force 1 "for teamplay_mode 4: apply force even though damage was made virtual only"
+set g_teamdamage_threshold 40 "for teamplay_mode 4: threshold over which to apply mirror damage"
+set g_teamdamage_resetspeed 20 "for teamplay_mode 4: how fast player's teamdamage count decreases"
+
+set g_balance_teams 1 "automatically balance out players entering instead of asking them for their preferred team"
+set g_balance_teams_prevent_imbalance 1 "prevent players from changing to larger teams"
+set g_balance_teams_scorefactor 0.25 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)"
+set g_changeteam_banned 0 "not allowed to change team"
+set g_changeteam_fragtransfer 0 "% of frags you get to keep when you change teams (rounded down)"
+
+set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"
+
+set g_bloodloss 0 "amount of health below which blood loss occurs"
+
+set g_footsteps 1 "serverside footstep sounds"
+
+set g_throughfloor_debug 0 "enable debugging messages for throughfloor calculations"
+set g_throughfloor_damage_max_stddev 2 "Maximum standard deviation for splash damage"
+set g_throughfloor_force_max_stddev 10 "Maximum standard deviation for splash force"
+set g_throughfloor_min_steps_player 1 "Minimum number of steps for splash damage"
+set g_throughfloor_min_steps_other 1 "Minimum number of steps for splash damage"
+set g_throughfloor_max_steps_player 100 "Maximum number of steps for splash damage"
+set g_throughfloor_max_steps_other 10 "Maximum number of steps for splash damage"
+// note: for damage X, 0.25 * ((1-g_throughfloor_damage)*X / g_throughfloor_damage_max_stddev)^2 steps are used
+// for these numbers:
+// damage 25: 3
+// damage 60: 15
+// damage 80: 25
+// damage 200: 157
+// force 250: 10
+// force 300: 15
+// force 600: 57
+
+sv_maxvelocity 1000000000
+sv_sound_land ""
+sv_sound_watersplash ""
+
+// startmap_dm is used when running with the -listen or -dedicated commandline options
+set serverconfig server.cfg
+alias loadconfig "cvar_resettodefaults_saveonly; exec ${* !}"
+set _sv_init 0
+alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
+
+// score log
+set sv_logscores_console 0 "print scores to server console"
+set sv_logscores_file 0 "print scores to file"
+set sv_logscores_filename scores.log "filename"
+set sv_logscores_bots 0 "exclude bots by default"
+
+// spam (frag/capture) log
+set sv_eventlog 0 "the master switch for efficiency reasons"
+set sv_eventlog_console 1
+set sv_eventlog_files 0
+set sv_eventlog_files_timestamps 1
+set sv_eventlog_files_counter 0
+set sv_eventlog_files_nameprefix xonotic
+set sv_eventlog_files_namesuffix .log
+
+set nextmap "" "override the maplist when switching to the next map"
+set lastlevel ""
+set quit_when_empty 0 "set to 1, then the server exits when the next level would start but is empty"
+set quit_and_redirect "" "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
+set quit_and_redirect_timer 1.5 "set to number of seconds after quit before performing the connect operation of quit_and_redirect"
+
+// Green's fullbright skins, updated by Samual
+alias sv_fbskin_unique "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors \"\""
+alias sv_fbskin_green "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 51"
+alias sv_fbskin_red "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 68"
+alias sv_fbskin_orange "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 238"
+alias sv_fbskin_rainbow "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 95"
+
+alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
+
+set sv_servermodelsonly 1
+
+sv_curl_defaulturl "http://www.xonotic.org/contentdownload/getmap.php?file="
+set sv_curl_serverpackages_auto 1 "automatically add packs with *.serverpackage files to sv_curl_serverpackages"
+
+set sv_motd ""
+
+set g_waypoints_for_items 0 "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
+
+set g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
+set g_maplist_votable_keeptwotime 15 "show only 2 options after this amount of time during map vote screen"
+set g_maplist_votable_timeout 30 "timeout for the map voting; must be below 50 seconds!"
+set g_maplist_votable_suggestions 2
+set g_maplist_votable_suggestions_override_mostrecent 0
+set g_maplist_votable_nodetail 1 "nodetail only shows total count instead of all vote counts per map, so votes don't influence others that much"
+set g_maplist_votable_abstain 0 "when 1, you can abstain from your vote"
+set g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
+
+set sv_vote_gametype 0 "show a vote screen for gametypes before map vote screen"
+set sv_vote_gametype_keeptwotime 10 "show only 2 options after this amount of time during gametype vote screen"
+set sv_vote_gametype_options "dm ctf ca lms tdm ft"
+set sv_vote_gametype_timeout 20
+set sv_vote_gametype_default_current 1 "Keep the current gametype if no one votes"
+
+set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax 2 "normal chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst 2 "normal chat: allow bursts of so many chat lines"
+set g_chat_flood_spl_team 1 "team chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax_team 2 "team chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst_team 2 "team chat: allow bursts of so many chat lines"
+set g_chat_flood_spl_tell 1 "private chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax_tell 2 "private chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst_tell 2 "private chat: allow bursts of so many chat lines"
+set g_chat_flood_notify_flooder 1 "when 0, the flooder still can see his own message"
+set g_chat_teamcolors 0 "colorize nicknames in team color for chat"
+set g_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players."
+set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
+set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
+set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking"
+set g_nick_flood_penalty_red 30 "number of changes to allow before totally disorienting the player"
+
+set sv_waypointsprite_deployed_lifetime 10
+set sv_waypointsprite_deadlifetime 1
+set sv_waypointsprite_limitedrange 5120
+
+set sv_itemstime 1 "enable networking of time left until respawn for items such as mega health/armor and powerups"
+
+set g_ban_default_bantime 5400 "90 minutes"
+set g_ban_default_masksize 3 "masksize 0 means banning by UID only, 1 means banning by /8 (IPv6: /32) network, 2 means banning by /16 (IPv6: /48) network, 3 means banning by /24 (IPv6: /56) network, 4 means banning by single IP (IPv6: /64 network)"
+set g_banned_list "" "format: IP remainingtime IP remainingtime ..."
+set g_banned_list_idmode "1" "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)"
+
+// useful vote aliases
+set timelimit_increment 5
+set timelimit_decrement 5
+set timelimit_min 5
+set timelimit_max 60
+
+sv_gameplayfix_delayprojectiles 0
+sv_gameplayfix_q2airaccelerate 1
+sv_gameplayfix_stepmultipletimes 1
+
+// delay for "kill" to prevent abuse
+set g_balance_kill_delay 2
+set g_balance_kill_antispam 5
+
+// this feature is currently buggy in the engine (it appears to PREVENT any dropping in lots of maps, leading to weirdly aligned entities, and in some cases even CAUSES them to drop through solid, like in facing worlds nex)
+sv_gameplayfix_droptofloorstartsolid 0
+
+set sv_foginterval 1 "force enable fog in regular intervals"
+
+set sv_maxidle 0 "kick players idle for more than this amount of time in seconds"
+set sv_maxidle_spectatorsareidle 0 "when sv_maxidle is not 0, assume spectators are idle too"
+set sv_maxidle_slots 0 "when not 0, only kick idlers when this many or less player slots are available"
+set sv_maxidle_slots_countbots 1 "count bots as player slots"
+
+sv_allowdownloads_inarchive 1 // for csprogs.dat
+sv_allowdownloads 0 // download protocol is evil
+
+set g_jump_grunt 0 "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
+
+set g_maplist_allow_hidden 0 "allow hidden maps to be, e.g., voted for and in the maplist"
+set g_maplist_allow_frustrating 0 "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
+
+set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
+
+set g_ban_sync_uri "" "sync using this ban list provider (empty string to disable)"
+set g_ban_sync_interval 5 "sync every 5 minutes"
+set g_ban_sync_trusted_servers "" "request ban lists from these xonotic servers (do not include your own server there, or unbanning may fail)"
+set g_ban_sync_timeout 45 "time out in seconds for the ban sync requests"
+set g_ban_sync_trusted_servers_verify 0 "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
+
+set g_showweaponspawns 1 "1: display waypoints for weapon spawns found on the map when a weapon key is pressed and the weapon is not owned; 2: for dropped weapons too; 3: for all the weapons sharing the same impulse"
+
+// ballistics use physical units, but qu based
+// Quake-Newton: 1 qN = 1 qu * 1 g / 1 s^2
+// Quake-Joule: 1 qJ = 1 qN * 1 qu
+// Quake-Pascal: 1 qPa = 1 qN / 1 qu^2
+
+set g_ballistics_mindistance 2 // enable ballistics starting from 2 qu
+set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls
+set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls
+set g_ballistics_penetrate_clips 0 "allow ballistics to pass through weapon clips"
+
+sv_status_show_qcstatus 1 "Xonotic uses this field instead of frags"
+set g_full_getstatus_responses 0 "this currently breaks qstat"
+
+// "Gentle mode": show no blood
+set sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages"
+
+set g_jetpack 0 "Jetpack mutator"
+
+set g_hitplots 0 "when set to 1, hitplots are stored by the server to provide a means of proving that a triggerbot was used"
+set g_hitplots_individuals "" "the individuals, by IP, that should have their hitplots recorded"
+
+set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
+set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
+
+set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
+
+set g_triggerimpulse_accel_power 1 "trigger_impulse accelerator power (applied BEFORE the multiplier)"
+set g_triggerimpulse_accel_multiplier 1 "trigger_impulse accelerator multiplier (applied AFTER the power)"
+set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field multiplier"
+set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
+
+set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
+
+set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
+
+set g_mapinfo_allow_unsupported_modes_and_let_stuff_break "0" "set to 1 to be able to force game types using g_ cvars even if the map does not support them"
+set g_mutatormsg "" "mutator message"
+
+set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
+set loddebug 0 "force this LOD level"
+set speedmeter 0 "print landing speeds"
+set waypoint_benchmark 0 "quit after waypoint loading to benchmark bot navigation code"
+set g_debug_bot_commands 0 "print scripted bot commands before executing"
+
+// weapon accuracy stats
+set sv_accuracy_data_share 1 "1 send weapon accuracy data statistics to spectating clients, depends on cl_accuracy_data_share"
+set sv_accuracy_data_send 1 "1 send weapon accuracy data statistics and improved score info to all the clients at the end of the match, depends on cl_accuracy_data_receive, 0 send the current 'player has won' to all the clients"
+
+// debug
+set _independent_players 0 "DO NOT TOUCH"
+set _notarget 0 "NO, REALLY, DON'T"
+
+// otherwise, antilag breaks
+sv_gameplayfix_consistentplayerprethink 1
+
+// improve some minor details
+sv_gameplayfix_gravityunaffectedbyticrate 1
+sv_gameplayfix_nogravityonground 1
+
+set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
+
+set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
+
+set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"
+
+// sv_cullentities_trace is 1, so the client doesn't have to
+sv_cullentities_trace 1
+
+// less "lagging" of other players, but also less PL tolerant... let's try this
+sv_clmovement_inputtimeout 0.066 // slightly less than 2 frames, so only one frame can be compensated
+
+// strength sound settings
+set sv_strengthsound_antispam_time 0.1 "minimum distance of strength sounds"
+set sv_strengthsound_antispam_refire_threshold 0.04 "apply minimum distance only if refire of the gun is smaller than this"
+
+// database management
+set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
+
+// allow fullbright
+set sv_allow_fullbright 1 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
+
+// auto-teams (team selection by player ID)
+// any player not listed is forced to spectate
+set g_forced_team_red "" "list of player IDs for red team"
+set g_forced_team_blue "" "list of player IDs for blue team"
+set g_forced_team_yellow "" "list of player IDs for yellow team"
+set g_forced_team_pink "" "list of player IDs for pink team"
+set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
+
+// nice alias to set up a match
+// example: g_forced_team_matchsetup stormkeep "mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM=" "BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ="
+// will set up a match on stormkeep where mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM= and BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ= play against each other
+alias g_forced_team_matchsetup "map $1; settemp g_forced_team_red \"$2\"; settemp g_forced_team_blue \"$3\"; settemp g_forced_team_yellow \"$4\"; settemp g_forced_team_pink \"$5\"; settemp g_forced_team_otherwise spectate"
+
+// frozen
+set g_frozen_revive_falldamage 0 "Enable reviving from this amount of fall damage"
+set g_frozen_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
+set g_frozen_damage_trigger 1 "if 1, frozen players falling into the void will die instead of teleporting to spawn"
+set g_frozen_force 0.6 "How much to multiply the force on a frozen player with"
+
+// player statistics
+set g_playerstats_gamereport_uri "http://stats.xonotic.org/stats/submit" "Output player statistics information to either: URL (with ://), console (with a dash like this: -), or supply a filename to output to data directory."
+set g_playerstats_gamereport_ladder ""
+set g_playerstats_playerbasic_uri "http://stats.xonotic.org"
+set g_playerstats_playerdetail_uri "http://stats.xonotic.org/player/me"
+set g_playerstats_playerdetail_autoupdatetime 1800 // automatically update every 30 minutes anyway
+
+// autoscreenshots
+set g_max_info_autoscreenshot 3 "how many info_autoscreenshot entities are allowed"
+
+// mod names for server browser
+// note: the lowest of these that mismatches default is used
+set g_mod_physics "" "Current physics config name"
+set g_mod_balance "" "Current balance config name"
+set g_mod_config "" "Current config mod name"
+
+// other config files
+exec balance-xonotic.cfg
+exec physicsX.cfg
+exec turrets.cfg
+exec gamemodes-server.cfg
+exec mutators.cfg
+exec monsters.cfg
+exec minigames.cfg
+exec physics.cfg
+
+set sv_join_notices ""
+set sv_join_notices_time 15
+
+set sv_simple_items 1 "allow or forbid client use of simple items"
+
+set sv_showspectators 1 "Show who's spectating who in the player info panel when client has cl_showspectators on. Shouldn't be used on competitive servers, also disable when watching a suspected cheater"
+
+set sv_damagetext 2 "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage"