]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into martin-t/linkexplode
authorMartin Taibr <taibr.martin@gmail.com>
Tue, 14 Jan 2020 13:01:21 +0000 (14:01 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Tue, 14 Jan 2020 13:01:21 +0000 (14:01 +0100)
151 files changed:
.gitlab-ci.yml
.tx/merge-base
_hud_common.cfg
_hud_descriptions.cfg
bal-wep-testing.cfg
balance-mario.cfg
balance-nexuiz25.cfg
balance-overkill.cfg
balance-samual.cfg
balance-testing.cfg
balance-testingxpm.cfg
balance-xdf.cfg
balance-xonotic.cfg
balance-xpm.cfg
common.cs.po
common.el.po
common.ru.po
common.tr.po
crosshairs.cfg
effects-high.cfg
effects-low.cfg
effects-med.cfg
effects-normal.cfg
effects-omg.cfg
gamemodes-server.cfg
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
mutators.cfg
qcsrc/Makefile
qcsrc/client/autocvars.qh
qcsrc/client/defs.qh
qcsrc/client/hud/hud.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/hud/panel/weapons.qc
qcsrc/client/main.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/teamradar.qc
qcsrc/client/view.qc
qcsrc/client/view.qh
qcsrc/common/campaign_common.qh
qcsrc/common/campaign_file.qc
qcsrc/common/command/generic.qc
qcsrc/common/command/reg.qh
qcsrc/common/command/rpn.qc
qcsrc/common/debug.qh
qcsrc/common/effects/effectinfo.qc
qcsrc/common/effects/qc/casings.qc
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/globalsound.qh
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qh
qcsrc/common/items/all.qh
qcsrc/common/items/inventory.qh
qcsrc/common/mapinfo.qc
qcsrc/common/mapobjects/func/breakable.qc
qcsrc/common/mapobjects/func/button.qc
qcsrc/common/mapobjects/func/rainsnow.qc
qcsrc/common/mapobjects/models.qc
qcsrc/common/mapobjects/subs.qc
qcsrc/common/mapobjects/subs.qh
qcsrc/common/mapobjects/trigger/hurt.qc
qcsrc/common/mapobjects/trigger/jumppads.qc
qcsrc/common/mapobjects/trigger/multi.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/mutators/events.qh
qcsrc/common/mutators/mutator/bloodloss/_mod.inc
qcsrc/common/mutators/mutator/bloodloss/_mod.qh
qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc [new file with mode: 0644]
qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc [deleted file]
qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qh [deleted file]
qcsrc/common/mutators/mutator/buffs/all.inc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qh
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/walljump/walljump.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/notifications/all.qh
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/common/physics/movetypes/toss.qc
qcsrc/common/physics/player.qc
qcsrc/common/playerstats.qc
qcsrc/common/playerstats.qh
qcsrc/common/stats.qh
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh
qcsrc/common/turrets/all.qh
qcsrc/common/util.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/ecs/systems/physics.qc
qcsrc/i18n-guide.txt
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/lib/draw.qh
qcsrc/lib/i18n.qh
qcsrc/lib/log.qh
qcsrc/lib/matrix/command.qc
qcsrc/lib/oo.qh
qcsrc/lib/replicate.qh
qcsrc/lib/static.qh
qcsrc/lib/stats.qh
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/campaign.qc
qcsrc/menu/xonotic/campaign.qh
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/menu/xonotic/dialog_quit.qc
qcsrc/menu/xonotic/dialog_settings_audio.qc
qcsrc/menu/xonotic/dialog_settings_effects.qc
qcsrc/menu/xonotic/dialog_settings_game_view.qc
qcsrc/menu/xonotic/dialog_settings_game_weapons.qc
qcsrc/menu/xonotic/dialog_settings_misc.qc
qcsrc/menu/xonotic/dialog_settings_video.qc
qcsrc/menu/xonotic/dialog_singleplayer.qc
qcsrc/menu/xonotic/slider_particles.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/default/bot.qc
qcsrc/server/bot/default/navigation.qc
qcsrc/server/bot/default/waypoints.qc
qcsrc/server/campaign.qc
qcsrc/server/client.qc
qcsrc/server/command/vote.qc
qcsrc/server/compat/quake3.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/player.qc
qcsrc/server/portals.qc
qcsrc/server/sv_main.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/weapons/weaponsystem.qh
ruleset-overkill.cfg
scripts/electro.shader
xonotic-client.cfg
xonotic-common.cfg
xonotic-server.cfg

index 14337ff90858c39d4c7e1d66ae2f0229cdfbd554..ec9063ec09944c6c61a3fd1d661f204c84584eae 100644 (file)
@@ -29,8 +29,7 @@ test_sv_game:
     - 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=e1e7c492ce0f997c92b07678e05ee728
+    - EXPECT=4702792276f4902a051e97995eb7e138
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 547040790313863da4a7cfb44aa97d094f626ca5..a90598bb3f2da203bf2266d3e7ec0b9091d9351f 100644 (file)
@@ -1 +1 @@
-Thu Nov 28 07:24:39 CET 2019
+Tue Jan 14 07:24:53 CET 2020
index c860be99cebd39ff846ded8cba3cdcbc790fb8b9..0479f389bed5449b3e827971b9b3470b938febb8 100644 (file)
@@ -74,6 +74,7 @@ seta hud_panel_weapons_ammo_full_plasma 180 "show 100% of the status bar at this
 seta hud_panel_weapons_ammo_full_rockets 160 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_hide_ondeath 0 "hide this panel when dead"
+seta hud_panel_weapons_orderbyimpulse "1" "List weapons in their impulse order instead of priority"
 
 seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
 seta hud_panel_ammo_hide_ondeath 0 "hide this panel when dead"
index 6e393e6a57eff4fdba4a60878e94ce0a2d106ead..30e5a8bee9a8756fe9fafe883306260e1e4025aa 100644 (file)
@@ -63,7 +63,6 @@ seta hud_panel_weapons_label_scale "" "scale of the weapon text label"
 seta hud_panel_weapons_accuracy "" "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
 seta hud_panel_weapons_ammo "" "show ammo as a status bar"
 seta hud_panel_weapons_onlyowned "" "show only owned weapons, set it to 2 to show only the held weapon"
-seta hud_panel_weapons_orderbyimpulse "" "List weapons in their impulse order instead of priority"
 seta hud_panel_weapons_noncurrent_alpha "" "alpha of noncurrent weapons"
 seta hud_panel_weapons_noncurrent_scale "" "scale of noncurrent weapons, relative to the current weapon"
 seta hud_panel_weapons_selection_radius "" "number of weapons that get partially highlighted on each side of the currently selected weapon"
index ff90629489132300fafe95ba17f601ebf86e6fef..5f62ae83c7d8c69ea1aa3cf39e0e5e131bdb3b78 100644 (file)
@@ -289,7 +289,7 @@ set g_balance_crylink_weaponstartoverride -1
 set g_balance_crylink_weaponthrowable 1
 // }}}
 // {{{ #8: Vortex
-set g_balance_vortex_charge 0
+set g_balance_vortex_charge 1
 set g_balance_vortex_charge_always 0
 set g_balance_vortex_charge_animlimit 0.5
 set g_balance_vortex_charge_limit 1
@@ -305,7 +305,7 @@ set g_balance_vortex_charge_velocity_rate 0
 set g_balance_vortex_primary_ammo 6
 set g_balance_vortex_primary_animtime 0.4
 set g_balance_vortex_primary_armorpierce 0
-set g_balance_vortex_primary_damage 65
+set g_balance_vortex_primary_damage 80
 set g_balance_vortex_primary_damagefalloff_forcehalflife 0
 set g_balance_vortex_primary_damagefalloff_halflife 0
 set g_balance_vortex_primary_damagefalloff_maxdist 0
index 1974ad6c811d130e2ad129424d24e5824b5135c9..de22d1f7b5f5d71392bee5d050c31a27f877f232 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 73c63df9b7277014a78e9be149afa5dd222e9a23..81c786ed60cb08e895c964470125c8f061069fd4 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 150
 set g_balance_falldamage_minspeed 1400
 set g_balance_falldamage_factor 0.15
 set g_balance_falldamage_maxdamage 25
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 0
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 0e929ee74009f8038dc864228374d0af17766eb5..28f8f17d768c4424e5b60261fa5ad639b142906d 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 9bcb976b60853f8dda7a81c66d22806766eaac02..f98731e01726b4c381c3459974a7bfd2b974e7a2 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 96426aaa5ca191453edd6020b5ab131c83d50937..960211605e7dce56f54ae6f055fd159e8f65e952 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 4fa3130f02176c1d61bde908a854a3b179cdc648..4ee3f36cdb6bf4d26960512fb08e27b9fc139177 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 6a1622c2c42c5dc1a85148cd6d84e380c63c88a7..e866bd11d18ef8ea51f9b029029b15bed328833f 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index e19872454fa57d9b9cdfdd77ac6319763f390432..2666108f48b2e4163d985cb03f33dcd44dffbeae 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index c722638b1beb705ba42fb0eea195c87100b343f7..bcd58487892e716a01ba8122360838054ef65777 100644 (file)
@@ -185,6 +185,7 @@ set g_balance_falldamage_deadminspeed 250
 set g_balance_falldamage_minspeed 900
 set g_balance_falldamage_factor 0.20
 set g_balance_falldamage_maxdamage 40
+set g_balance_falldamage_onlyvertical 0
 set g_balance_damagepush_speedfactor 2.5
 set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
 set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
index 1b8dbda4fd945500b5a3f3672c00affece71d20c..1a08002a549569b59be57bac1343859cca797ea5 100644 (file)
@@ -15,8 +15,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-11-27 23:34+0000\n"
-"Last-Translator: Jan Kocka <kockahonza@gmail.com>\n"
+"PO-Revision-Date: 2019-12-11 18:36+0000\n"
+"Last-Translator: GamingasCZ <gamingforyou875@gmail.com>\n"
 "Language-Team: Czech (http://www.transifex.com/team-xonotic/xonotic/language/"
 "cs/)\n"
 "Language: cs\n"
@@ -170,7 +170,7 @@ msgstr "%sZmáčkni ^3%s%s pro ukončení zahřívací fáze"
 #: qcsrc/client/hud/panel/infomessages.qc:177
 #: qcsrc/menu/xonotic/keybinder.qc:101
 msgid "ready"
-msgstr ""
+msgstr "připraven"
 
 #: qcsrc/client/hud/panel/infomessages.qc:164
 #, c-format
@@ -317,11 +317,11 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/quickmenu.qc:796
 msgid "QMCMD^negative"
-msgstr ""
+msgstr "QMCMD^negativní"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:797
 msgid "QMCMD^positive"
-msgstr ""
+msgstr "QMCMD^pozitivní"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:798
 msgid "QMCMD^need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)"
@@ -436,7 +436,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/quickmenu.qc:819
 msgid "QMCMD^FPS"
-msgstr ""
+msgstr "QMCMD^FPS"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:820
 msgid "QMCMD^Net graph"
@@ -445,15 +445,15 @@ msgstr ""
 #: qcsrc/client/hud/panel/quickmenu.qc:823
 #: qcsrc/client/hud/panel/quickmenu.qc:826
 msgid "QMCMD^Sound settings"
-msgstr ""
+msgstr "QMCMD^Nastavení zvuku"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:824
 msgid "QMCMD^Hit sound"
-msgstr ""
+msgstr "QMCMD^Zvuk zásahu"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:825
 msgid "QMCMD^Chat sound"
-msgstr ""
+msgstr "QMCMD^Zvuk chatu"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:830
 #: qcsrc/client/hud/panel/quickmenu.qc:834
@@ -612,7 +612,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:92
 msgid "SCO^destroyed"
-msgstr ""
+msgstr "SCO^zničen"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:93
 msgid "SCO^damage"
@@ -648,7 +648,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:97
 msgid "SCO^fastest"
-msgstr ""
+msgstr "SCO^nejrychlejší"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:97
 msgid "Time of fastest lap (Race/CTS)"
@@ -672,11 +672,11 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:100
 msgid "FPS"
-msgstr ""
+msgstr "FPS"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:100
 msgid "SCO^fps"
-msgstr ""
+msgstr "SCO^fps"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:101
 msgid "Number of kills minus suicides"
@@ -734,36 +734,36 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:108
 msgid "SCO^laps"
-msgstr ""
+msgstr "SCO^kola"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:109
 msgid "Number of lives (LMS)"
-msgstr ""
+msgstr "Počet životů (LMS)"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:109
 msgid "SCO^lives"
-msgstr ""
+msgstr "SCO^životy"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:110
 msgid "Number of times a key was lost"
-msgstr ""
+msgstr "Kolikrát byl ztracen klíč"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:110
 msgid "SCO^losses"
-msgstr ""
+msgstr "SCO^prohry"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:111
 #: qcsrc/client/hud/panel/scoreboard.qc:112
 msgid "Player name"
-msgstr ""
+msgstr "Jméno hráče"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:111
 msgid "SCO^name"
-msgstr ""
+msgstr "SCO^jméno"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:112
 msgid "SCO^nick"
-msgstr ""
+msgstr "SCO^přezdívka"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:113
 msgid "Number of objectives destroyed"
@@ -784,11 +784,11 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:115
 msgid "Ping time"
-msgstr ""
+msgstr "Čas pingu"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:115
 msgid "SCO^ping"
-msgstr ""
+msgstr "SCO^ping"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:116
 msgid "Packet loss"
@@ -832,27 +832,27 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:121
 msgid "Number of rounds won"
-msgstr ""
+msgstr "Počet vyhraných kol"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:121
 msgid "SCO^rounds won"
-msgstr ""
+msgstr "SCO^vyhraných kol"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:122
 msgid "SCO^score"
-msgstr ""
+msgstr "SCO^skóre"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:122
 msgid "Total score"
-msgstr ""
+msgstr "Celkové skóre"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:123
 msgid "Number of suicides"
-msgstr ""
+msgstr "Počet sebevražd"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:123
 msgid "SCO^suicides"
-msgstr ""
+msgstr "SCO^sebevraždy"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:124
 msgid "Number of kills minus deaths"
@@ -860,7 +860,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:124
 msgid "SCO^sum"
-msgstr ""
+msgstr "SCO^součet"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:125
 msgid "Number of domination points taken (Domination)"
@@ -888,7 +888,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:128
 msgid "SCO^time"
-msgstr ""
+msgstr "SCO^čas"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:128
 msgid "Total time raced (Race/CTS)"
@@ -901,7 +901,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:313
 msgid "Usage:"
-msgstr ""
+msgstr "Použití:"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:315
 msgid "^2scoreboard_columns_set ^3field1 field2 ..."
@@ -982,11 +982,11 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1336
 msgid "Map stats:"
-msgstr ""
+msgstr "Statistiky mapy:"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1366
 msgid "Monsters killed:"
-msgstr ""
+msgstr "Zabitých monster:"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1373
 msgid "Secrets found:"
@@ -1003,38 +1003,38 @@ msgstr ""
 #: qcsrc/client/hud/panel/scoreboard.qc:1613
 #, c-format
 msgid "^3%1.0f minutes"
-msgstr ""
+msgstr "^3%1.0f minuty"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1622
 #: qcsrc/client/hud/panel/scoreboard.qc:1629
 #, c-format
 msgid "^5%s %s"
-msgstr ""
+msgstr "^5%s %s"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1623
 #: qcsrc/client/hud/panel/scoreboard.qc:1630
 #: qcsrc/client/hud/panel/scoreboard.qc:1642
 #: qcsrc/client/hud/panel/scoreboard.qc:1649
 msgid "SCO^points"
-msgstr ""
+msgstr "SCO^body"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1624
 #: qcsrc/client/hud/panel/scoreboard.qc:1631
 #: qcsrc/client/hud/panel/scoreboard.qc:1643
 #: qcsrc/client/hud/panel/scoreboard.qc:1650
 msgid "SCO^is beaten"
-msgstr ""
+msgstr "SCO^je poražen"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1641
 #: qcsrc/client/hud/panel/scoreboard.qc:1648
 #, c-format
 msgid "^2+%s %s"
-msgstr ""
+msgstr "^2+%s %s"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1659
 #, c-format
 msgid "^7Map: ^2%s"
-msgstr ""
+msgstr "^7Mapa: ^2%s"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1798
 #, c-format
@@ -1064,7 +1064,7 @@ msgstr ""
 #: qcsrc/client/hud/panel/scoreboard.qc:1864
 #, c-format
 msgid "You are dead, press ^2%s^7 to respawn"
-msgstr ""
+msgstr "Jsi mrtvý, zmáčkni ^2%s^7 pro respawnutí"
 
 #: qcsrc/client/hud/panel/timer.qc:67
 msgid "WARMUP"
@@ -1099,7 +1099,7 @@ msgstr "^1Nastavit HUD"
 #: qcsrc/menu/xonotic/dialog_settings_misc_reset.qc:16
 #: qcsrc/menu/xonotic/dialog_uid2name.qc:15
 msgid "Yes"
-msgstr ""
+msgstr "Ano"
 
 #: qcsrc/client/hud/panel/vote.qc:128 qcsrc/menu/xonotic/dialog_firstrun.qc:83
 #: qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc:21
@@ -1110,7 +1110,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_settings_misc_reset.qc:17
 #: qcsrc/menu/xonotic/dialog_uid2name.qc:17
 msgid "No"
-msgstr ""
+msgstr "Ne"
 
 #: qcsrc/client/hud/panel/weapons.qc:546
 msgid "Out of ammo"
@@ -1130,15 +1130,15 @@ msgstr ""
 
 #: qcsrc/client/main.qc:1029
 msgid " m/s"
-msgstr ""
+msgstr " m/s"
 
 #: qcsrc/client/main.qc:1031
 msgid " km/h"
-msgstr ""
+msgstr " km/h"
 
 #: qcsrc/client/main.qc:1033
 msgid " mph"
-msgstr ""
+msgstr " mph"
 
 #: qcsrc/client/main.qc:1035
 msgid " knots"
@@ -1151,12 +1151,12 @@ msgstr ""
 
 #: qcsrc/client/mapvoting.qc:52
 msgid " (1 vote)"
-msgstr ""
+msgstr "(1 hlas)"
 
 #: qcsrc/client/mapvoting.qc:54
 #, c-format
 msgid " (%d votes)"
-msgstr ""
+msgstr " (%d hlasů)"
 
 #: qcsrc/client/mapvoting.qc:274
 msgid "Don't care"
@@ -1168,12 +1168,12 @@ msgstr ""
 
 #: qcsrc/client/mapvoting.qc:375
 msgid "Vote for a map"
-msgstr ""
+msgstr "Hlasovat pro mapu"
 
 #: qcsrc/client/mapvoting.qc:392
 #, c-format
 msgid "%d seconds left"
-msgstr ""
+msgstr "zbývá%d sekund"
 
 #: qcsrc/client/mapvoting.qc:505
 msgid "mv_mapdownload: ^3You're not supposed to use this command on your own!"
@@ -1217,7 +1217,7 @@ msgstr ""
 
 #: qcsrc/common/items/item/ammo.qh:66
 msgid "bullets"
-msgstr ""
+msgstr "náboje"
 
 #: qcsrc/common/items/item/ammo.qh:96
 msgid "cells"
@@ -1225,11 +1225,11 @@ msgstr ""
 
 #: qcsrc/common/items/item/ammo.qh:126
 msgid "plasma"
-msgstr ""
+msgstr "plazma"
 
 #: qcsrc/common/items/item/ammo.qh:156
 msgid "rockets"
-msgstr ""
+msgstr "rakety"
 
 #: qcsrc/common/items/item/ammo.qh:190
 msgid "shells"
@@ -1237,7 +1237,7 @@ msgstr ""
 
 #: qcsrc/common/items/item/armor.qh:42
 msgid "Small armor"
-msgstr ""
+msgstr "malé brnění"
 
 #: qcsrc/common/items/item/armor.qh:80
 msgid "Medium armor"
@@ -4991,32 +4991,32 @@ msgstr ""
 #: qcsrc/common/util.qc:1584
 #, c-format
 msgid "UP"
-msgstr ""
+msgstr "NAHORU"
 
 #: qcsrc/common/util.qc:1585
 #, c-format
 msgid "DOWN"
-msgstr ""
+msgstr "DOLŮ"
 
 #: qcsrc/common/util.qc:1586
 #, c-format
 msgid "LEFT"
-msgstr ""
+msgstr "DOLEVA"
 
 #: qcsrc/common/util.qc:1587
 #, c-format
 msgid "RIGHT"
-msgstr ""
+msgstr "DOPRAVA"
 
 #: qcsrc/common/util.qc:1593
 #, c-format
 msgid "MIDINOTE%d"
-msgstr ""
+msgstr "MIDI NOTA%d"
 
 #: qcsrc/common/vehicles/cl_vehicles.qc:190
 #, c-format
 msgid "Press %s"
-msgstr ""
+msgstr "Zmáčkni %s"
 
 #: qcsrc/common/vehicles/vehicle/bumblebee.qc:947
 msgid "No right gunner!"
@@ -5084,11 +5084,11 @@ msgstr ""
 
 #: qcsrc/common/weapons/weapon/fireball.qh:18
 msgid "Fireball"
-msgstr ""
+msgstr "Ohnivá koule"
 
 #: qcsrc/common/weapons/weapon/hagar.qh:18
 msgid "Hagar"
-msgstr ""
+msgstr "Hagar"
 
 #: qcsrc/common/weapons/weapon/hlac.qh:18
 msgid "Heavy Laser Assault Cannon"
@@ -5326,26 +5326,26 @@ msgstr ""
 #: qcsrc/lib/counting.qh:79
 #, c-format
 msgid "%dst"
-msgstr ""
+msgstr "%d."
 
 #: qcsrc/lib/counting.qh:80
 #, c-format
 msgid "%dnd"
-msgstr ""
+msgstr "%d."
 
 #: qcsrc/lib/counting.qh:81
 #, c-format
 msgid "%drd"
-msgstr ""
+msgstr "%d."
 
 #: qcsrc/lib/counting.qh:82 qcsrc/lib/counting.qh:85
 #, c-format
 msgid "%dth"
-msgstr ""
+msgstr "%d."
 
 #: qcsrc/lib/oo.qh:330
 msgid "No description"
-msgstr ""
+msgstr "Bez popisu"
 
 #: qcsrc/lib/spawnfunc.qh:240
 #, c-format
@@ -5382,7 +5382,7 @@ msgstr ""
 
 #: qcsrc/menu/command/menu_cmd.qc:81
 msgid "Available options:"
-msgstr ""
+msgstr "Dostupné možnosti:"
 
 #: qcsrc/menu/command/menu_cmd.qc:130
 msgid "Invalid command. For a list of supported commands, try menu_cmd help."
@@ -5391,19 +5391,19 @@ msgstr ""
 #: qcsrc/menu/item/listbox.qc:413
 #, c-format
 msgid "Item %d"
-msgstr ""
+msgstr "Item %d"
 
 #: qcsrc/menu/item/textslider.qc:11 qcsrc/menu/item/textslider.qc:12
 #: qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc:37
 #: qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc:68
 #: qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc:115
 msgid "Custom"
-msgstr ""
+msgstr "Vlastní"
 
 #: qcsrc/menu/xonotic/campaign.qc:235
 #, c-format
 msgid "Level %d: %s"
-msgstr ""
+msgstr "Level %d: %s"
 
 #: qcsrc/menu/xonotic/credits.qc:4
 msgid "Core Team"
@@ -5415,11 +5415,11 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/credits.qc:48
 msgid "Website"
-msgstr ""
+msgstr "Stránka"
 
 #: qcsrc/menu/xonotic/credits.qc:53
 msgid "Stats"
-msgstr ""
+msgstr "Statistiky"
 
 #: qcsrc/menu/xonotic/credits.qc:57
 msgid "Art"
@@ -5427,19 +5427,19 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/credits.qc:65
 msgid "Animation"
-msgstr ""
+msgstr "Animace"
 
 #: qcsrc/menu/xonotic/credits.qc:69
 msgid "Level Design"
-msgstr ""
+msgstr "Design levelů"
 
 #: qcsrc/menu/xonotic/credits.qc:92
 msgid "Music / Sound FX"
-msgstr ""
+msgstr "Hudba / Zvuky FX"
 
 #: qcsrc/menu/xonotic/credits.qc:108
 msgid "Game Code"
-msgstr ""
+msgstr "Kód hry"
 
 #: qcsrc/menu/xonotic/credits.qc:116
 msgid "Marketing / PR"
@@ -5587,23 +5587,23 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/cvarlist.qc:79 qcsrc/menu/xonotic/cvarlist.qc:89
 msgid "will not be saved"
-msgstr ""
+msgstr "nebude uloženo"
 
 #: qcsrc/menu/xonotic/cvarlist.qc:84
 msgid "will be saved to config.cfg"
-msgstr ""
+msgstr "bude uloženo do config.cfg"
 
 #: qcsrc/menu/xonotic/cvarlist.qc:93
 msgid "private"
-msgstr ""
+msgstr "soukromé"
 
 #: qcsrc/menu/xonotic/cvarlist.qc:95
 msgid "engine setting"
-msgstr ""
+msgstr "nastavení enginu"
 
 #: qcsrc/menu/xonotic/cvarlist.qc:97
 msgid "read only"
-msgstr ""
+msgstr "jen ke čtení"
 
 #: qcsrc/menu/xonotic/dialog_credits.qc:13
 #: qcsrc/menu/xonotic/dialog_monstertools.qc:38
@@ -5612,7 +5612,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc:75
 #: qcsrc/menu/xonotic/dialog_singleplayer_winner.qc:14
 msgid "OK"
-msgstr ""
+msgstr "OK"
 
 #: qcsrc/menu/xonotic/dialog_credits.qh:7
 msgid "Credits"
@@ -5628,20 +5628,22 @@ msgid ""
 "player name to get started.  You can change these options later through the "
 "menu system."
 msgstr ""
+"Vítej v Xonotic, abys mohl začít, vyber si prosím svůj jazyk a zvol si "
+"jméno. Tyto možnosti si potom můžeš změnit v nastavení."
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qc:45
 #: qcsrc/menu/xonotic/dialog_settings_input_userbind.qc:28
 msgid "Name:"
-msgstr ""
+msgstr "Jméno:"
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qc:53
 #: qcsrc/menu/xonotic/dialog_multiplayer_profile.qc:64
 msgid "Name under which you will appear in the game"
-msgstr ""
+msgstr "Jméno pod kterým budeš vystupovat ve hře"
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qc:69
 msgid "Text language:"
-msgstr ""
+msgstr "Jazyk textu:"
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qc:78
 msgid "Allow player statistics to use your nickname at stats.xonotic.org?"
@@ -5650,15 +5652,15 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qc:84
 msgid "Undecided"
-msgstr ""
+msgstr "Nerozhodnutý"
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qc:88
 msgid "Save settings"
-msgstr ""
+msgstr "Uložit nastavení"
 
 #: qcsrc/menu/xonotic/dialog_firstrun.qh:6
 msgid "Welcome"
-msgstr ""
+msgstr "Vítej"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:18
 msgid "Ammunition display:"
@@ -5693,7 +5695,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc:21
 #: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:57
 msgid "Left"
-msgstr ""
+msgstr "Levý"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc:34
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc:34
@@ -5705,7 +5707,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc:23
 #: qcsrc/menu/xonotic/dialog_settings_game_hud.qc:59
 msgid "Right"
-msgstr ""
+msgstr "Pravý"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_ammo.qh:6
 msgid "Ammo Panel"
@@ -5732,11 +5734,11 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.qc:22
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:71
 msgid "Center"
-msgstr ""
+msgstr "Střed"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc:37
 msgid "Font scale:"
-msgstr ""
+msgstr "Škála písma"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh:6
 msgid "Centerprint Panel"
@@ -5748,23 +5750,23 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_chat.qc:20
 msgid "Chat size:"
-msgstr ""
+msgstr "Velikost chatu:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_chat.qc:24
 msgid "Chat lifetime:"
-msgstr ""
+msgstr "Životnost chatu:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_chat.qc:28
 msgid "Chat beep sound"
-msgstr ""
+msgstr "Zvuk pípnutí chatu"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_chat.qh:6
 msgid "Chat Panel"
-msgstr ""
+msgstr "Panel chatu"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc:16
 msgid "Engine info:"
-msgstr ""
+msgstr "Info o enginu:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc:19
 msgid "Use an averaging algorithm for fps"
@@ -5776,7 +5778,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc:17
 msgid "Combine health and armor"
-msgstr ""
+msgstr "Kombinovat životy a brnění"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc:19
 #: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc:28
@@ -5839,7 +5841,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/util.qc:778 qcsrc/menu/xonotic/util.qc:794
 #: qcsrc/menu/xonotic/util.qc:811
 msgid "Disable"
-msgstr ""
+msgstr "Zákázat"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc:17
 #: qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc:15
@@ -5856,7 +5858,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc:32
 msgid "Text/icon ratio:"
-msgstr ""
+msgstr "Poměr textu/ikon:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc:35
 msgid "Hide spawned items"
@@ -5868,7 +5870,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc:39
 msgid "Dynamic size"
-msgstr ""
+msgstr "Dynamická velikost"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qh:6
 msgid "Items Time Panel"
@@ -5880,7 +5882,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_notification.qc:17
 msgid "Notifications:"
-msgstr ""
+msgstr "Notifikace:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_notification.qc:20
 msgid "Also print notifications to the console"
@@ -5900,12 +5902,12 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_notification.qh:6
 msgid "Notification Panel"
-msgstr ""
+msgstr "Panel notifikací"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:16
 #: qcsrc/menu/xonotic/util.qc:766
 msgid "Enable"
-msgstr ""
+msgstr "Povolit"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:17
 msgid "Enable even observing"
@@ -5943,7 +5945,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:37
 msgid "Speed:"
-msgstr ""
+msgstr "Rychlost:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:38
 msgid "Include vertical speed"
@@ -5955,19 +5957,19 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:51
 msgid "qu/s"
-msgstr ""
+msgstr "qu/s"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:52
 msgid "m/s"
-msgstr ""
+msgstr "m/s"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:53
 msgid "km/h"
-msgstr ""
+msgstr "km/h"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:54
 msgid "mph"
-msgstr ""
+msgstr "mph"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:55
 msgid "knots"
@@ -5975,15 +5977,15 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:57
 msgid "Show"
-msgstr ""
+msgstr "Ukázat"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:60
 msgid "Top speed"
-msgstr ""
+msgstr "Nejvyšší rychlost"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:66
 msgid "Acceleration:"
-msgstr ""
+msgstr "Zrychlování:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qc:67
 msgid "Include vertical acceleration"
@@ -5991,7 +5993,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_physics.qh:6
 msgid "Physics Panel"
-msgstr ""
+msgstr "Panel fyziky"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_powerups.qh:6
 msgid "Powerups Panel"
@@ -6000,7 +6002,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc:16
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:17
 msgid "Always enable"
-msgstr ""
+msgstr "Vždy povolit"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc:23
 msgid "Forced aspect:"
@@ -6024,7 +6026,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:23
 msgid "Radar:"
-msgstr ""
+msgstr "Radar:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:26
 #: qcsrc/menu/xonotic/dialog_hudsetup_exit.qc:68
@@ -6045,39 +6047,39 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:32
 msgid "Forward"
-msgstr ""
+msgstr "Vpřed"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:33
 msgid "West"
-msgstr ""
+msgstr "Západ"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:34
 msgid "South"
-msgstr ""
+msgstr "Jih"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:35
 msgid "East"
-msgstr ""
+msgstr "Východ"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:36
 msgid "North"
-msgstr ""
+msgstr "Sever"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:40
 msgid "Scale:"
-msgstr ""
+msgstr "Škála:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:44
 msgid "Zoom mode:"
-msgstr ""
+msgstr "Režim přibližování:"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:46
 msgid "Zoomed in"
-msgstr ""
+msgstr "Přiblížen"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:47
 msgid "Zoomed out"
-msgstr ""
+msgstr "Oddálený"
 
 #: qcsrc/menu/xonotic/dialog_hudpanel_radar.qc:48
 msgid "Always zoomed"
index c32867dc4cf0b81fd6e3f8f46a498a6a25a06079..f7b0135c1fdb9afef381b5bd83c0abc7d6104886 100644 (file)
@@ -12,7 +12,7 @@
 # MasterWord, 2016
 # Mensious Mensious <ektoras@tutanota.com>, 2018-2019
 # Vindex <kon14.inside@gmail.com>, 2014
-# Γιάννης Ανθυμίδης, 2011-2012
+# Yannis Anthymidis, 2011-2012
 msgid ""
 msgstr ""
 "Project-Id-Version: Xonotic\n"
index d28163865858cd045fc1931c10dc0b0fa3849f25..94b3284e5cbe934e690d4bf92ef7b1a8dbcf5fea 100644 (file)
@@ -6,7 +6,7 @@
 # adem4ik, 2014
 # Alex Talker <alextalker7@gmail.com>, 2014-2015
 # Andrei Stepanov, 2014
-# Andrei Stepanov <adem4ik@gmail.com>, 2014-2019
+# Andrei Stepanov <adem4ik@gmail.com>, 2014-2020
 # Andrey P <andrey.pyntikov@gmail.com>, 2016
 # Artem Vorotnikov <artem@vorotnikov.me>, 2015
 # Lord Canistra <lordcanistra@gmail.com>, 2011
@@ -19,7 +19,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-11-21 19:30+0000\n"
+"PO-Revision-Date: 2020-01-13 21:04+0000\n"
 "Last-Translator: Andrei Stepanov <adem4ik@gmail.com>\n"
 "Language-Team: Russian (http://www.transifex.com/team-xonotic/xonotic/"
 "language/ru/)\n"
@@ -1202,7 +1202,7 @@ msgstr "Голосование за карту"
 #: qcsrc/client/mapvoting.qc:392
 #, c-format
 msgid "%d seconds left"
-msgstr "СекÑ\83нд Ð¾Ñ\81Ñ\82алоÑ\81Ñ\8c: %d"
+msgstr "Ð\9eÑ\81Ñ\82алоÑ\81Ñ\8c Ñ\81екÑ\83нд: %d"
 
 #: qcsrc/client/mapvoting.qc:505
 msgid "mv_mapdownload: ^3You're not supposed to use this command on your own!"
index 5ee89ac01adf346b3b72f99a1f2cff928f24b8b2..d69f52e8ee80a34b1ac46847de8f0773acaeebcd 100644 (file)
@@ -3,6 +3,7 @@
 # This file is distributed under the same license as the PACKAGE package.
 #
 # Translators:
+# Abdurrahman AKKUŞ <a.rahmanakkus@hotmail.com>, 2019
 # Çağlar Turalı <caglarturali@gmail.com>, 2018
 # Demiray Muhterem <mdemiray@msn.com>, 2018
 # ibra kap <ibrakap@gmail.com>, 2019
@@ -11,8 +12,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-09-11 17:17+0000\n"
-"Last-Translator: ibra kap <ibrakap@gmail.com>\n"
+"PO-Revision-Date: 2019-12-18 07:52+0000\n"
+"Last-Translator: Abdurrahman AKKUŞ <a.rahmanakkus@hotmail.com>\n"
 "Language-Team: Turkish (http://www.transifex.com/team-xonotic/xonotic/"
 "language/tr/)\n"
 "Language: tr\n"
@@ -24,12 +25,12 @@ msgstr ""
 #: qcsrc/client/hud/hud_config.qc:243
 #, c-format
 msgid "^2Successfully exported to %s! (Note: It's saved in data/data/)"
-msgstr ""
+msgstr "^2Başarıyla %s'e aktarıldı! (Dikkat: data/data/'ya kaydedildi)"
 
 #: qcsrc/client/hud/hud_config.qc:247
 #, c-format
 msgid "^1Couldn't write to %s"
-msgstr ""
+msgstr "^1 %s'e yazılamadı"
 
 #: qcsrc/client/hud/panel/centerprint.qc:140
 #, c-format
index 47631f0fa6cb70b4a664e493ff5dd06bd300bfae..ae3fec0805b9dfbeeccec68a43bc63d8df6c639f 100644 (file)
@@ -32,10 +32,10 @@ seta crosshair_hitindication_speed 5
 
 // hit testing/tracing for special effects for the crosshair
 set g_trueaim_minrange 44 "TrueAim minimum range (TrueAim adjusts shots so they hit the crosshair point even though the gun is not at the screen center)"
-seta crosshair_hittest 1 "do a crosshair hit evaluation, applying effects from the _blur, _scale, and _showipact cvars"
+seta crosshair_hittest 1 "do a crosshair hit evaluation, applying effects from the _blur and _scale cvars"
 seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
 seta crosshair_hittest_scale 1.25 "shrink crosshair if shot is obstructed or aiming at a teammate"
-seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
+seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed (debug setting, very glitchy!)"
 
 // change color based on special case
 seta crosshair_color_special 1 "special color handling for crosshair... 1 = per-weapon crosshair color (see crosshair_per_weapon), 2 = crosshair changes color based on health, 3 = rainbow/random color selection"
index 597bb4660a9f0e063e6009652c8c0997dbbbd99e..b935b03b1738c3c62d043efe94bfe79ed09319cb 100644 (file)
@@ -31,6 +31,7 @@ r_shadow_realtime_world_shadows 0
 r_shadow_shadowmapping 0
 r_shadow_usenormalmap 1
 r_showsurfaces 0
+r_sky 1
 r_subdivisions_tolerance 3
 r_texture_dds_load 1
 r_water 1
index c9549581bddb35ebfc0fa858b347760aed609b13..7c9921a32bfd17415af5327764facb5641c89290 100644 (file)
@@ -31,6 +31,7 @@ r_shadow_realtime_world_shadows 0
 r_shadow_shadowmapping 0
 r_shadow_usenormalmap 0
 r_showsurfaces 0
+r_sky 1
 r_subdivisions_tolerance 8
 r_texture_dds_load 1
 r_water 0
index 4ea20a1699d110c6742eab52260963c581b9ee66..b701674693a2578d58b85d52dc331d1df65c3c8c 100644 (file)
@@ -31,6 +31,7 @@ r_shadow_realtime_world_shadows 0
 r_shadow_shadowmapping 0
 r_shadow_usenormalmap 0
 r_showsurfaces 0
+r_sky 1
 r_subdivisions_tolerance 4
 r_texture_dds_load 1
 r_water 0
index ba708cb9f803e9c4446f0f1861c019a3e3510892..c519617f68b3dc0550991fd8dcd8ed5e534ef65c 100644 (file)
@@ -31,6 +31,7 @@ r_shadow_realtime_world_shadows 0
 r_shadow_shadowmapping 0
 r_shadow_usenormalmap 1
 r_showsurfaces 0
+r_sky 1
 r_subdivisions_tolerance 3
 r_texture_dds_load 1
 r_water 0
index 7614417ce2027e42c4d711fce396faaaf7c1cd14..7b05a1eaad79a6b773df475300a2d901bb1d25e0 100644 (file)
@@ -31,6 +31,7 @@ r_shadow_realtime_world_shadows 0
 r_shadow_shadowmapping 0
 r_shadow_usenormalmap 0
 r_showsurfaces 3
+r_sky 0
 r_subdivisions_tolerance 16
 r_texture_dds_load 1
 r_water 0
index 6d8ee6f07364532ee1ecb47cc6e051b8a4181823..cd71ecec0ee51d59ce45d0084598e74dbd826d44 100644 (file)
@@ -29,7 +29,9 @@ alias sv_hook_gamestart_ka
 alias sv_hook_gamestart_ft
 alias sv_hook_gamestart_inv
 alias sv_hook_gamestart_duel
-alias sv_hook_gamerestart
+// there is currently no hook for when the match is restarted
+// see sv_hook_readyrestart for previous uses of this hook
+//alias sv_hook_gamerestart
 alias sv_hook_gameend
 
 
index d8151425127d8fc80f1cd3e9d7c2250c229e06ad..813ecbaef0df64396789d8115bce2c758deaec4d 100644 (file)
@@ -64,7 +64,6 @@ seta hud_panel_weapons_timeout_fadefgmin "0.4"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_orderbyimpulse "1"
 seta hud_panel_weapons_noncurrent_alpha "0.8"
 seta hud_panel_weapons_noncurrent_scale "0.9"
 seta hud_panel_weapons_selection_radius "0"
index 8766bcb24835825fed6417263ba6b169455a38b4..c5cfe4ac548fdc62e070ac1cda9ed08d4a9c3524 100644 (file)
@@ -64,7 +64,6 @@ seta hud_panel_weapons_timeout_fadefgmin "0.4"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_orderbyimpulse "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 seta hud_panel_weapons_selection_radius "0"
index 02940f8d3ab5b8c1e81e61bc00c4b57381839652..b7282584637aba28087bec61f8c071f5ac97df68 100644 (file)
@@ -64,7 +64,6 @@ seta hud_panel_weapons_timeout_fadefgmin "0"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_orderbyimpulse "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 seta hud_panel_weapons_selection_radius "0"
index 41a47d7ab2d77cd1e6cc4d486eb5a0bf924b37f8..3bfd694b19cf2f0977c36c437ed7ee5c8220d5f9 100644 (file)
@@ -64,7 +64,6 @@ seta hud_panel_weapons_timeout_fadefgmin "0"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_orderbyimpulse "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 seta hud_panel_weapons_selection_radius "0"
index f4a5e0441b97f3b5c7c5940330cc2585a9afde01..c808f62fb5b10ca9f430153f3260821fc0280ff9 100644 (file)
@@ -64,7 +64,6 @@ seta hud_panel_weapons_timeout_fadefgmin "0"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_orderbyimpulse "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 seta hud_panel_weapons_selection_radius "0"
index ea5dc69a240f1fee326c3fd58e07b94fc6add213..b0b02d080c6e6517407ca8706a8315bca9160f46 100644 (file)
@@ -64,7 +64,6 @@ seta hud_panel_weapons_timeout_fadefgmin "0"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "0"
-seta hud_panel_weapons_orderbyimpulse "1"
 seta hud_panel_weapons_noncurrent_alpha "1"
 seta hud_panel_weapons_noncurrent_scale "1"
 seta hud_panel_weapons_selection_radius "0"
index 0fcbed2f2e45e5e9b273b92f7b3e2175a5358907..b6ad3468e0be9708d071c1abdb581e3175aa25ed 100644 (file)
@@ -6,7 +6,7 @@
 // =========
 //  dodging
 // =========
-set g_dodging 0 "set to 1 to enable dodging in games"
+set g_dodging 0 "set to 1 to enable dodging (quick acceleration in a given direction)"
 
 seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
 
@@ -110,7 +110,7 @@ set g_invincible_projectiles 0 "set to 1 to disable any damage to projectiles in
 // ===============
 //  rocket flying
 // ===============
-set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
+set g_rocket_flying 0 "make rocket jumping easier - use the remote_jump weapon cvars for selfdamage and selfpush force"
 set g_rocket_flying_disabledelays 1 "disable detonation delays on rockets and mines"
 
 
@@ -144,7 +144,7 @@ set g_nix_with_powerups 0 "when 1, powerups still show up in NIX"
 // ================
 set g_physical_items 0 "1 uses ODE physics for dropped weapons, 2 for all items, requires physics_ode to be enabled"
 set g_physical_items_damageforcescale 3 "how affected physical weapons are by damage"
-set g_physical_items_reset 1 "return map items to their original lotation after being picked up"
+set g_physical_items_reset 1 "return map items to their original location after being picked up"
 
 
 // ===============
@@ -152,9 +152,9 @@ set g_physical_items_reset 1 "return map items to their original lotation after
 // ===============
 set g_touchexplode 0 "touching other players causes an explosion"
 set g_touchexplode_radius 50
-set g_touchexplode_damage 10
+set g_touchexplode_damage 20
 set g_touchexplode_edgedamage 0
-set g_touchexplode_force 150
+set g_touchexplode_force 300
 
 
 // ================
@@ -184,7 +184,7 @@ set g_random_gravity_negative 1000 "negative gravity multiplier"
 // =======
 //  Nades
 // =======
-set g_nades 0 "enable off-hand grenades"
+set g_nades 0 "enable off-hand grenades - use the 'dropweapon' (second press throws) or 'hook' (release throws) binds"
 set g_nades_spread 0.04 "random spread offset of throw direction"
 set g_nades_throw_offset "0 -25 0" "nade throwing offset"
 set g_nades_spawn 1 "give nades right away when player spawns rather than delaying entire refire"
@@ -309,7 +309,8 @@ set g_buffs_effects 1 "show particle effects from carried buffs"
 set g_buffs_waypoint_distance 1024 "maximum distance at which buff waypoint can be seen from item"
 set g_buffs_pickup_anyway 0 "instantly respawn the buff when it is picked up, instead of waiting for the player to drop it"
 set g_buffs_pickup_delay 0.7 "cooldown before player can pick up another buff after dropping one"
-set g_buffs_randomize 1 "randomize buff type when player drops buff"
+set g_buffs_randomize 1 "randomize buff type when player drops the buff, only applies to teamplay gamemodes if g_buffs_randomize_teamplay is enabled"
+set g_buffs_randomize_teamplay 1 "in teamplay gamemodes, randomize buff type when player drops the buff, requires g_buffs_randomize"
 set g_buffs_random_lifetime 30 "re-spawn the buff again if it hasn't been touched after this time in seconds"
 set g_buffs_random_location 0 "randomize buff location on start and when reset"
 set g_buffs_random_location_attempts 10 "number of random locations a single buff will attempt to respawn at before giving up"
@@ -387,7 +388,7 @@ 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 0 "let players spawn with the grappling hook which allows them to pull themselves"
 set g_grappling_hook_useammo 0 "use ammunition with the off-hand grappling hook"
 
 
index d09b2c5ccffa730255a6545d0f411a11adc05fc5..7c8e3b8ad16f7207d5296f16a4cde3a61863c540 100644 (file)
@@ -93,8 +93,8 @@ pk3: csprogs-$(VER).pk3
        $(eval DAT=$(PROG)-$(VER).dat)
        $(eval LNO=$(PROG)-$(VER).lno)
        @ echo "http://xonotic.org" > $(TXT)
-       @ ln -f $(PROGS_OUT)/$(PROG).dat $(DAT)
-       @ ln -f $(PROGS_OUT)/$(PROG).lno $(LNO)
+       @ cp -f $(PROGS_OUT)/$(PROG).dat $(DAT)
+       @ cp -f $(PROGS_OUT)/$(PROG).lno $(LNO)
        @ $(RM) *.pk3
        $(ZIP) $(PK3) $(TXT) $(DAT) $(LNO)
        @ $(RM) $(TXT) $(DAT) $(LNO)
index d11355659aa8071a5795e030b555a01361aeeb8b..1ed785f9fe4248bd2266f17779b0b06f4d2136a7 100644 (file)
@@ -70,8 +70,8 @@ bool autocvar_cl_spawn_event_particles;
 bool autocvar_cl_spawn_event_sound = 1;
 // float autocvar_cl_spawn_point_model;
 bool autocvar_cl_spawn_point_particles;
-float autocvar_cl_spawn_point_dist_min = 1200;
-float autocvar_cl_spawn_point_dist_max = 1600;
+float autocvar_cl_spawn_point_dist_min = 800;
+float autocvar_cl_spawn_point_dist_max = 1200;
 bool autocvar_cl_spawnzoom = 1;
 float autocvar_cl_spawnzoom_speed = 1;
 float autocvar_cl_spawnzoom_factor = 2;
@@ -151,7 +151,7 @@ float autocvar_crosshair_ring_reload_alpha;
 float autocvar_crosshair_ring_reload_size;
 float autocvar_crosshair_size;
 bool autocvar_crosshair_chase = true;
-float crosshair_chase_playeralpha = 0.25;
+float autocvar_crosshair_chase_playeralpha = 0.25;
 int autocvar_ekg;
 float autocvar_fov;
 bool autocvar_hud_cursormode = true;
index db1a5afacaed87760c210bde6088c475c7dab29c..0cf71294a78936db18f480c5af6eb4047468405c 100644 (file)
@@ -173,10 +173,6 @@ REPLICATE(cvar_cl_weaponpriorities[9], string, "cl_weaponpriority9");
 
 float bgmtime;
 
-string weaponorder_byimpulse; // NOTE: this is a misnomer, weapon order is not always sorted by impulse
-string weaponorder_bypriority;
-bool weapons_orderbyimpulse; // update priority list when toggling this
-
 float vortex_charge_movingavg;
 
 int serverflags;
index 9da25ebe9145e27f7cf400afd30e4b1f74343fc5..3a13048d823b6398cdde1c7b9c52ced193a33449 100644 (file)
@@ -398,6 +398,8 @@ Main HUD system
 ==================
 */
 
+float lasthud;
+float vh_notice_time;
 void HUD_Vehicle()
 {
        if(autocvar__hud_configure) return;
@@ -409,6 +411,11 @@ void HUD_Vehicle()
                Vehicle info = Vehicles_from(hud);
                info.vr_hud(info);
        }
+
+       if(hud != HUD_NORMAL && lasthud == HUD_NORMAL)
+               vh_notice_time = time + autocvar_cl_vehicles_notify_time;
+
+       lasthud = hud;
 }
 
 void HUD_Panel_Draw(entity panent)
@@ -588,6 +595,7 @@ bool HUD_WouldShowCursor()
        return false;
 }
 
+float prev_myteam;
 void HUD_Main()
 {
        int i;
@@ -596,6 +604,13 @@ void HUD_Main()
        else
                hud_fade_alpha = 1 - autocvar__menu_alpha;
 
+       if(myteam != prev_myteam)
+       {
+               myteamcolors = colormapPaletteColor(myteam, 1);
+               FOREACH(hud_panels, true, it.update_time = time);
+               prev_myteam = myteam;
+       }
+
        HUD_Configure_Frame();
 
        if(scoreboard_fade_alpha == 1)
index e11a134558519acaa873875f8da9922b390b1786..a6d1cc941708193c6696c3a2479a3641d26f0eda 100644 (file)
@@ -1621,14 +1621,14 @@ void Scoreboard_Draw()
                        {
                                str = strcat(str, sprintf(_("^5%s %s"), ScoreString(teamscores_flags(ts_primary), fl),
                                        (teamscores_label(ts_primary) == "score")   ? CTX(_("SCO^points")) :
-                                       (teamscores_label(ts_primary) == "fastest") ? CTX(_("SCO^is beaten")) :
+                                       (teamscores_label(ts_primary) == "fastest") ? "" :
                                        TranslateScoresLabel(teamscores_label(ts_primary))));
                        }
                        else
                        {
                                str = strcat(str, sprintf(_("^5%s %s"), ScoreString(scores_flags(ps_primary), fl),
                                        (scores_label(ps_primary) == "score")   ? CTX(_("SCO^points")) :
-                                       (scores_label(ps_primary) == "fastest") ? CTX(_("SCO^is beaten")) :
+                                       (scores_label(ps_primary) == "fastest") ? "" :
                                        TranslateScoresLabel(scores_label(ps_primary))));
                        }
                }
@@ -1640,14 +1640,14 @@ void Scoreboard_Draw()
                        {
                                str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(teamscores_flags(ts_primary), ll),
                                        (teamscores_label(ts_primary) == "score")   ? CTX(_("SCO^points")) :
-                                       (teamscores_label(ts_primary) == "fastest") ? CTX(_("SCO^is beaten")) :
+                                       (teamscores_label(ts_primary) == "fastest") ? "" :
                                        TranslateScoresLabel(teamscores_label(ts_primary))));
                        }
                        else
                        {
                                str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(scores_flags(ps_primary), ll),
                                        (scores_label(ps_primary) == "score")   ? CTX(_("SCO^points")) :
-                                       (scores_label(ps_primary) == "fastest") ? CTX(_("SCO^is beaten")) :
+                                       (scores_label(ps_primary) == "fastest") ? "" :
                                        TranslateScoresLabel(scores_label(ps_primary))));
                        }
                }
index 832ffad0b38ca9b27727451808c44570e5d5eb79..8668886a91282da36356f92d9577a8fdfffa9601 100644 (file)
@@ -39,6 +39,8 @@ int weaponorder_cmp(int i, int j, entity pass)
        weapon_size.y = panel_size.y / rows; \
 MACRO_END
 
+string cl_weaponpriority_old;
+bool weapons_orderbyimpulse_old;
 void HUD_Weapons()
 {
        // declarations
@@ -90,19 +92,19 @@ void HUD_Weapons()
        // update generic hud functions
        HUD_Panel_LoadCvars();
 
-       // figure out weapon order (how the weapons are sorted) // TODO make this configurable
-       if(weaponorder_bypriority != autocvar_cl_weaponpriority || autocvar_hud_panel_weapons_orderbyimpulse != weapons_orderbyimpulse || !weaponorder[0])
+       if(cl_weaponpriority_old != autocvar_cl_weaponpriority || weapons_orderbyimpulse_old != autocvar_hud_panel_weapons_orderbyimpulse || weaponorder[0] == NULL)
        {
-               int weapon_cnt;
-               weapons_orderbyimpulse = autocvar_hud_panel_weapons_orderbyimpulse;
-               strcpy(weaponorder_bypriority, autocvar_cl_weaponpriority);
-               string weporder = W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority));
+               weapons_orderbyimpulse_old = autocvar_hud_panel_weapons_orderbyimpulse;
+               strcpy(cl_weaponpriority_old, autocvar_cl_weaponpriority);
+               string weporder = W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(cl_weaponpriority_old));
                if(autocvar_hud_panel_weapons_orderbyimpulse)
+               {
                        weporder = W_FixWeaponOrder_BuildImpulseList(weporder);
-               strcpy(weaponorder_byimpulse, weporder);
-               weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
+               }
+
+               weaponorder_cmp_str = strcat(" ", weporder, " ");
 
-               weapon_cnt = 0;
+               int weapon_cnt = 0;
                FOREACH(Weapons, it != WEP_Null && it.impulse >= 0, weaponorder[weapon_cnt++] = it);
                for(i = weapon_cnt; i < Weapons_MAX; ++i)
                        weaponorder[i] = NULL;
index b61f425aa6da44b8d9d4f073a7929275f54a5685..b7b7e530371b9430a90621262fd34c7ba453f6c2 100644 (file)
@@ -240,7 +240,7 @@ void Shutdown()
 bool SetTeam(entity o, int Team)
 {
        TC(int, Team);
-       devassert_once(Team);
+       //devassert_once(Team);
        entity tm;
        if(teamplay)
        {
index 360305601a8b71cfdd345436f213f9eafb5e50ee..bb0bfe12c7642bc09bc595d4982a80fb9913e581 100644 (file)
@@ -382,7 +382,7 @@ float PolyDrawModelSurface(entity e, float i_s)
        for(i_t = 0; i_t < n_t; ++i_t)
        {
                tri = getsurfacetriangle(e, i_s, i_t);
-               R_BeginPolygon(tex, 0);
+               R_BeginPolygon(tex, 0, false);
                R_PolygonVertex(getsurfacepoint(e, i_s, tri.x), getsurfacepointattribute(e, i_s, tri.x, SPA_TEXCOORDS0), '1 1 1', 1);
                R_PolygonVertex(getsurfacepoint(e, i_s, tri.y), getsurfacepointattribute(e, i_s, tri.y, SPA_TEXCOORDS0), '1 1 1', 1);
                R_PolygonVertex(getsurfacepoint(e, i_s, tri.z), getsurfacepointattribute(e, i_s, tri.z, SPA_TEXCOORDS0), '1 1 1', 1);
@@ -415,7 +415,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
        if(f >= 1)
        {
                // draw full rectangle
-               R_BeginPolygon(pic, drawflag);
+               R_BeginPolygon(pic, drawflag, true);
                        v = centre;                     t = '0.5 0.5 0';
                        v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
@@ -436,7 +436,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
                d = q - 1;
                if(d > 0)
                {
-                       R_BeginPolygon(pic, drawflag);
+                       R_BeginPolygon(pic, drawflag, true);
                                v = centre;                     t = '0.5 0.5 0';
                                R_PolygonVertex(v, t, rgb, a);
 
@@ -448,7 +448,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
        else if(f > 0.75)
        {
                // draw upper and first triangle
-               R_BeginPolygon(pic, drawflag);
+               R_BeginPolygon(pic, drawflag, true);
                        v = centre;                     t = '0.5 0.5 0';
                        v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
@@ -461,7 +461,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
                        v.x -= 0.5 * ringsize.x;        t -= '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
                R_EndPolygon();
-               R_BeginPolygon(pic, drawflag);
+               R_BeginPolygon(pic, drawflag, true);
                        v = centre;                     t = '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
@@ -480,7 +480,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
        else if(f > 0.5)
        {
                // draw upper triangle
-               R_BeginPolygon(pic, drawflag);
+               R_BeginPolygon(pic, drawflag, true);
                        v = centre;                     t = '0.5 0.5 0';
                        v.x += 0.5 * ringsize.x;        t += '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
@@ -497,7 +497,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
                d = q - 0.5;
                if(d > 0)
                {
-                       R_BeginPolygon(pic, drawflag);
+                       R_BeginPolygon(pic, drawflag, true);
                                v = centre;                     t = '0.5 0.5 0';
                                R_PolygonVertex(v, t, rgb, a);
 
@@ -509,7 +509,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
        else if(f > 0.25)
        {
                // draw first triangle
-               R_BeginPolygon(pic, drawflag);
+               R_BeginPolygon(pic, drawflag, true);
                        v = centre;                     t = '0.5 0.5 0';
                        R_PolygonVertex(v, t, rgb, a);
 
@@ -530,7 +530,7 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
                d = q;
                if(d > 0)
                {
-                       R_BeginPolygon(pic, drawflag);
+                       R_BeginPolygon(pic, drawflag, true);
                                v = centre;                     t = '0.5 0.5 0';
                                R_PolygonVertex(v, t, rgb, a);
 
index c565651d4a3a0b49daee81ae6a76649b60889d66..cdb8894a8dab6dab3872e191c7340afeb48206dc 100644 (file)
@@ -68,7 +68,7 @@ void draw_teamradar_background(float fg)
        {
                fga = 1;
                fgc = '1 1 1' * fg;
-               R_BeginPolygon(minimapname, DRAWFLAG_SCREEN | DRAWFLAG_MIPMAP);
+               R_BeginPolygon(minimapname, DRAWFLAG_SCREEN | DRAWFLAG_MIPMAP, true);
                if(v_flipped)
                {
                        R_PolygonVertex(teamradar_texcoord_to_2dcoord(mi_pictexcoord3), yinvert(mi_pictexcoord3), fgc, fga);
@@ -112,14 +112,14 @@ void draw_teamradar_player(vector coord3d, vector pangles, vector rgb)
        else
                rgb2 = '1 1 1';
 
-       R_BeginPolygon("", 0);
+       R_BeginPolygon("", 0, true);
        R_PolygonVertex(coord+forward*3, '0 0 0', rgb2, panel_fg_alpha);
        R_PolygonVertex(coord+right*4-forward*2.5, '0 1 0', rgb2, panel_fg_alpha);
        R_PolygonVertex(coord-forward*2, '1 0 0', rgb2, panel_fg_alpha);
        R_PolygonVertex(coord-right*4-forward*2.5, '1 1 0', rgb2, panel_fg_alpha);
        R_EndPolygon();
 
-       R_BeginPolygon("", 0);
+       R_BeginPolygon("", 0, true);
        R_PolygonVertex(coord+forward*2, '0 0 0', rgb, panel_fg_alpha);
        R_PolygonVertex(coord+right*3-forward*2, '0 1 0', rgb, panel_fg_alpha);
        R_PolygonVertex(coord-forward, '1 0 0', rgb, panel_fg_alpha);
@@ -164,7 +164,7 @@ void draw_teamradar_link(vector start, vector end, int colors)
        c0 = colormapPaletteColor(colors & 0x0F, false);
        c1 = colormapPaletteColor((colors & 0xF0) / 0x10, false);
 
-       R_BeginPolygon("", 0);
+       R_BeginPolygon("", 0, true);
        R_PolygonVertex(start - norm, '0 0 0', c0, panel_fg_alpha);
        R_PolygonVertex(start + norm, '0 1 0', c0, panel_fg_alpha);
        R_PolygonVertex(end + norm, '1 1 0', c1, panel_fg_alpha);
index 4b8bc4899a788de78152dec7a1990b56a1de01c0..22618d6431d61f1419d60eac34612a039f588565 100644 (file)
@@ -48,7 +48,7 @@
 #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT)
 
 float autocvar_cl_viewmodel_scale;
-float autocvar_cl_viewmodel_alpha;
+float autocvar_cl_viewmodel_alpha = 1;
 
 bool autocvar_cl_bobmodel;
 float autocvar_cl_bobmodel_speed;
@@ -394,7 +394,6 @@ STATIC_INIT(fpscounter_init)
        showfps_prevfps_time = currentTime; // we must initialize it to avoid an instant low frame sending
 }
 
-float drawtime;
 float avgspeed;
 vector GetCurrentFov(float fov)
 {
@@ -755,6 +754,146 @@ int WantEventchase(entity this, bool want_vehiclechase)
        return 0;
 }
 
+void View_EventChase(entity this)
+{
+       // event chase camera
+       if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped
+       {
+               if(STAT(CAMERA_SPECTATOR))
+               {
+                       if(spectatee_status > 0)
+                       {
+                               if(!autocvar_chase_active)
+                               {
+                                       cvar_set("chase_active", "-2");
+                                       return;
+                               }
+                       }
+                       else if(autocvar_chase_active == -2)
+                               cvar_set("chase_active", "0");
+
+                       if(autocvar_chase_active == -2)
+                               return;
+               }
+               else if(autocvar_chase_active == -2)
+                       cvar_set("chase_active", "0");
+
+               bool vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
+
+               float vehicle_viewdist = 0;
+               vector vehicle_viewofs = '0 0 0';
+
+               if(vehicle_chase)
+               {
+                       if(hud != HUD_BUMBLEBEE_GUN)
+                       {
+                               Vehicle info = Vehicles_from(hud);
+                               vehicle_viewdist = info.height;
+                               vehicle_viewofs = info.view_ofs;
+                               if(vehicle_viewdist < 0) // when set below 0, this vehicle doesn't use third person view (gunner slots)
+                                       vehicle_chase = false;
+                       }
+                       else
+                               vehicle_chase = false;
+               }
+
+               int eventchase = WantEventchase(this, vehicle_chase);
+               if (eventchase)
+               {
+                       vector current_view_origin_override = '0 0 0';
+                       vector view_offset_override = '0 0 0';
+                       float chase_distance_override = 0;
+                       bool custom_eventchase = MUTATOR_CALLHOOK(CustomizeEventchase, this);
+                       if(custom_eventchase)
+                       {
+                               current_view_origin_override = M_ARGV(0, vector);
+                               view_offset_override = M_ARGV(1, vector);
+                               chase_distance_override = M_ARGV(0, float);
+                       }
+                       eventchase_running = true;
+
+                       // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
+                       vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org);
+                       if (custom_eventchase)
+                               current_view_origin = current_view_origin_override;
+
+                       // detect maximum viewoffset and use it
+                       vector view_offset = autocvar_cl_eventchase_viewoffset;
+                       if(vehicle_chase)
+                       {
+                               if(vehicle_viewofs)
+                                       view_offset = vehicle_viewofs;
+                               else
+                                       view_offset = autocvar_cl_eventchase_vehicle_viewoffset;
+                       }
+                       if (custom_eventchase)
+                               view_offset = view_offset_override;
+
+                       if(view_offset)
+                       {
+                               WarpZone_TraceLine(current_view_origin, current_view_origin + view_offset + ('0 0 1' * autocvar_cl_eventchase_maxs.z), MOVE_WORLDONLY, this);
+                               if(trace_fraction == 1) { current_view_origin += view_offset; }
+                               else { current_view_origin.z += max(0, (trace_endpos.z - current_view_origin.z) - autocvar_cl_eventchase_maxs.z); }
+                       }
+
+                       // We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
+                       // Ideally, there should be another way to enable third person cameras, such as through setproperty()
+                       // -1 enables chase_active while marking it as set by this code, and not by the user (which would be 1)
+                       if(!autocvar_chase_active) { cvar_set("chase_active", "-1"); }
+
+                       // make the camera smooth back
+                       float chase_distance = autocvar_cl_eventchase_distance;
+                       if(vehicle_chase)
+                       {
+                               if(vehicle_viewofs)
+                                       chase_distance = vehicle_viewdist;
+                               else
+                                       chase_distance = autocvar_cl_eventchase_vehicle_distance;
+                       }
+                       if (custom_eventchase)
+                               chase_distance = chase_distance_override;
+
+                       if(autocvar_cl_eventchase_speed && eventchase_current_distance < chase_distance)
+                               eventchase_current_distance += autocvar_cl_eventchase_speed * (chase_distance - eventchase_current_distance) * frametime; // slow down the further we get
+                       else if(eventchase_current_distance != chase_distance)
+                               eventchase_current_distance = chase_distance;
+
+                       vector forward, right, up;
+                       MAKE_VECTORS(view_angles, forward, right, up);
+
+                       vector eventchase_target_origin = (current_view_origin - (forward * eventchase_current_distance));
+                       WarpZone_TraceBox(current_view_origin, autocvar_cl_eventchase_mins, autocvar_cl_eventchase_maxs, eventchase_target_origin, MOVE_WORLDONLY, this);
+
+                       // If the boxtrace fails, revert back to line tracing.
+                       if(!this.viewloc)
+                       if(trace_startsolid)
+                       {
+                               eventchase_target_origin = (current_view_origin - (forward * eventchase_current_distance));
+                               WarpZone_TraceLine(current_view_origin, eventchase_target_origin, MOVE_WORLDONLY, this);
+                               setproperty(VF_ORIGIN, (trace_endpos - (forward * autocvar_cl_eventchase_mins.z)));
+                       }
+                       else { setproperty(VF_ORIGIN, trace_endpos); }
+
+                       if(!this.viewloc)
+                               setproperty(VF_ANGLES, WarpZone_TransformVAngles(WarpZone_trace_transform, view_angles));
+               }
+
+               if (eventchase <= 0 && autocvar_chase_active < 0) // time to disable chase_active if it was set by this code
+               {
+                       eventchase_running = false;
+                       cvar_set("chase_active", "0");
+                       eventchase_current_distance = 0; // start from 0 next time
+               }
+       }
+       // workaround for camera stuck between player's legs when using chase_active 1
+       // because the engine stops updating the chase_active camera when the game ends
+       else if(intermission)
+       {
+               cvar_settemp("chase_active", "-1");
+               eventchase_current_distance = 0;
+       }
+}
+
 void HUD_Crosshair_Vehicle(entity this)
 {
        if(hud != HUD_BUMBLEBEE_GUN)
@@ -780,7 +919,7 @@ void UpdateDamage()
        if (damage_dealt_time != damage_dealt_time_prev)
        {
                unaccounted_damage += unaccounted_damage_new;
-               LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")");
+               //LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")");
        }
        damage_dealt_time_prev = damage_dealt_time;
 
@@ -829,7 +968,7 @@ void HitSound()
                                pitch_shift = mirror_value + (mirror_value - pitch_shift);
                        }
 
-                       LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift));
+                       //LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift));
 
                        // todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary
                        // todo: normalize sound pressure levels? seems unnecessary
@@ -981,12 +1120,12 @@ void HUD_Crosshair(entity this)
                else if(autocvar_chase_active > 0 && autocvar_crosshair_chase)
                {
                        vector player_org = ((csqcplayer) ? csqcplayer.origin + csqcplayer.view_ofs : view_origin);
-                       if(csqcplayer && crosshair_chase_playeralpha && crosshair_chase_playeralpha < 1)
+                       if(csqcplayer && autocvar_crosshair_chase_playeralpha && autocvar_crosshair_chase_playeralpha < 1)
                        {
                                traceline(view_origin, view_origin + max_shot_distance * view_forward, MOVE_NORMAL, NULL);
                                float myalpha = (!csqcplayer.m_alpha) ? 1 : csqcplayer.m_alpha;
                                if(trace_ent == csqcplayer && STAT(HEALTH) > 0)
-                                       csqcplayer.alpha = min(crosshair_chase_playeralpha, myalpha);
+                                       csqcplayer.alpha = min(autocvar_crosshair_chase_playeralpha, myalpha);
                                else
                                        csqcplayer.alpha = csqcplayer.m_alpha;
                        }
@@ -1553,267 +1692,517 @@ void HUD_Mouse(entity player)
        HUD_Cursor_Show();
 }
 
-bool ov_enabled;
-float oldr_nearclip;
-float oldr_farclip_base;
-float oldr_farclip_world;
-float oldr_novis;
-float oldr_useportalculling;
-float oldr_useinfinitefarclip;
-
-float prev_myteam;
-int lasthud;
-float vh_notice_time;
-void CSQC_UpdateView(entity this, float w, float h)
+void View_NightVision()
 {
-       TC(int, w); TC(int, h);
-       entity e;
-       float fov;
-       float f;
-       vector vf_size, vf_min;
+       if(!(autocvar_r_fakelight >= 2 || autocvar_r_fullbright) || (serverflags & SERVERFLAG_ALLOW_FULLBRIGHT))
+               return;
+
+       // apply night vision effect
+       vector tc_00, tc_01, tc_10, tc_11;
+       vector rgb = '0 0 0';
        float a;
 
-       execute_next_frame();
+       if(!nightvision_noise)
+       {
+               nightvision_noise = new(nightvision_noise);
+       }
+       if(!nightvision_noise2)
+       {
+               nightvision_noise2 = new(nightvision_noise2);
+       }
+
+       // color tint in yellow
+       drawfill('0 0 0', autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', '0.5 1 0.3', 1, DRAWFLAG_MODULATE);
+
+       // draw BG
+       a = Noise_Pink(nightvision_noise, frametime * 1.5) * 0.05 + 0.15;
+       rgb = '1 1 1';
+       tc_00 = '0 0 0' + '0.2 0 0' * sin(time * 0.3) + '0 0.3 0' * cos(time * 0.7);
+       tc_01 = '0 2.25 0' + '0.6 0 0' * cos(time * 1.2) - '0 0.3 0' * sin(time * 2.2);
+       tc_10 = '1.5 0 0' - '0.2 0 0' * sin(time * 0.5) + '0 0.5 0' * cos(time * 1.7);
+       //tc_11 = '1 1 0' + '0.6 0 0' * sin(time * 0.6) + '0 0.3 0' * cos(time * 0.1);
+       tc_11 = tc_01 + tc_10 - tc_00;
+       R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE, true);
+       R_PolygonVertex('0 0 0', tc_00, rgb, a);
+       R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
+       R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
+       R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
+       R_EndPolygon();
+
+       // draw FG
+       a = Noise_Pink(nightvision_noise2, frametime * 0.1) * 0.05 + 0.12;
+       rgb = '0.3 0.6 0.4' + '0.1 0.4 0.2' * Noise_White(nightvision_noise2, frametime);
+       tc_00 = '0 0 0' + '1 0 0' * Noise_White(nightvision_noise2, frametime) + '0 1 0' * Noise_White(nightvision_noise2, frametime);
+       tc_01 = tc_00 + '0 3 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.2);
+       tc_10 = tc_00 + '2 0 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.3);
+       tc_11 = tc_01 + tc_10 - tc_00;
+       R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE, true);
+       R_PolygonVertex('0 0 0', tc_00, rgb, a);
+       R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
+       R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
+       R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
+       R_EndPolygon();
+}
 
-       ++framecount;
+void DrawReticle(entity this)
+{
+       if(!autocvar_cl_reticle || MUTATOR_CALLHOOK(DrawReticle))
+       {
+               reticle_type = 0;
+               return;
+       }
 
-       stats_get();
-       hud = STAT(HUD);
+       float is_dead = (STAT(HEALTH) <= 0);
+       string reticle_image = string_null;
+       bool wep_zoomed = false;
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               entity wepe = viewmodels[slot];
+               Weapon wep = wepe.activeweapon;
+               if(wep != WEP_Null && wep.wr_zoom)
+               {
+                       bool do_zoom = wep.wr_zoom(wep, NULL);
+                       if(!reticle_image && wep.w_reticle && wep.w_reticle != "")
+                               reticle_image = wep.w_reticle;
+                       wep_zoomed += do_zoom;
+               }
+       }
+       // Draw the aiming reticle for weapons that use it
+       // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use
+       // It must be a persisted float for fading out to work properly (you let go of the zoom button for
+       // the view to go back to normal, so reticle_type would become 0 as we fade out)
+       if(spectatee_status || is_dead || hud != HUD_NORMAL || this.viewloc)
+       {
+               // no zoom reticle while dead
+               reticle_type = 0;
+       }
+       else if(wep_zoomed && autocvar_cl_reticle_weapon)
+       {
+               if(reticle_image) { reticle_type = 2; }
+               else { reticle_type = 0; }
+       }
+       else if(button_zoom || zoomscript_caught)
+       {
+               // normal zoom
+               reticle_type = 1;
+       }
 
-       if(hud != HUD_NORMAL && lasthud == HUD_NORMAL)
-               vh_notice_time = time + autocvar_cl_vehicles_notify_time;
+       if(reticle_type)
+       {
+               vector reticle_pos = '0 0 0', reticle_size = '0 0 0';
+               if(autocvar_cl_reticle_stretch)
+               {
+                       reticle_size.x = vid_conwidth;
+                       reticle_size.y = vid_conheight;
+                       reticle_pos.x = 0;
+                       reticle_pos.y = 0;
+               }
+               else
+               {
+                       reticle_size.x = max(vid_conwidth, vid_conheight);
+                       reticle_size.y = max(vid_conwidth, vid_conheight);
+                       reticle_pos.x = (vid_conwidth - reticle_size.x) / 2;
+                       reticle_pos.y = (vid_conheight - reticle_size.y) / 2;
+               }
 
-       lasthud = hud;
+               float f = (zoomscript_caught) ? 1 : current_zoomfraction;
 
-       ReplicateVars(false);
-       if (ReplicateVars_NOT_SENDING())
-               ReplicateVars_DELAY(0.8 + random() * 0.4); // no need to check cvars every frame
+               if(f)
+               {
+                       switch(reticle_type)
+                       {
+                               case 1: drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_normal_alpha, DRAWFLAG_NORMAL); break;
+                               case 2: if(reticle_image) drawpic(reticle_pos, reticle_image, reticle_size, '1 1 1', f * autocvar_cl_reticle_weapon_alpha, DRAWFLAG_NORMAL); break;
+                       }
+               }
+       }
+}
 
-       HUD_Scale_Disable();
+// visual overlay while in liquids
+// provides some effects to the postprocessing function
+void HUD_Contents()
+{
+       if(!autocvar_hud_contents || MUTATOR_CALLHOOK(HUD_Contents))
+               return;
 
-       if(autocvar__hud_showbinds_reload) // menu can set this one
+       // improved polyblend
+       float contentalpha_temp, incontent, liquidalpha, contentfadetime;
+       vector liquidcolor;
+
+       switch(pointcontents(view_origin))
        {
-               db_close(binddb);
-               binddb = db_create();
-               cvar_set("_hud_showbinds_reload", "0");
+               case CONTENT_WATER:
+                       liquidalpha = autocvar_hud_contents_water_alpha;
+                       liquidcolor = stov(autocvar_hud_contents_water_color);
+                       incontent = 1;
+                       break;
+
+               case CONTENT_LAVA:
+                       liquidalpha = autocvar_hud_contents_lava_alpha;
+                       liquidcolor = stov(autocvar_hud_contents_lava_color);
+                       incontent = 1;
+                       break;
+
+               case CONTENT_SLIME:
+                       liquidalpha = autocvar_hud_contents_slime_alpha;
+                       liquidcolor = stov(autocvar_hud_contents_slime_color);
+                       incontent = 1;
+                       break;
+
+               default:
+                       liquidalpha = 0;
+                       liquidcolor = '0 0 0';
+                       incontent = 0;
+                       break;
        }
 
-       if(checkextension("DP_CSQC_MINFPS_QUALITY"))
-               view_quality = getproperty(VF_MINFPS_QUALITY);
+       if(incontent) // fade in/out at different speeds so you can do e.g. instant fade when entering water and slow when leaving it.
+       { // also lets delcare previous values for blending properties, this way it isn't reset until after you have entered a different content
+               contentfadetime = autocvar_hud_contents_fadeintime;
+               liquidalpha_prev = liquidalpha;
+               liquidcolor_prev = liquidcolor;
+       }
        else
-               view_quality = 1;
+               contentfadetime = autocvar_hud_contents_fadeouttime;
 
-       button_attack2 = PHYS_INPUT_BUTTON_ATCK2(this);
-       button_zoom = PHYS_INPUT_BUTTON_ZOOM(this);
+       contentalpha_temp = bound(0, drawframetime / max(0.0001, contentfadetime), 1);
+       contentavgalpha = contentavgalpha * (1 - contentalpha_temp) + incontent * contentalpha_temp;
 
-       vf_size = getpropertyvec(VF_SIZE);
-       vf_min = getpropertyvec(VF_MIN);
-       vid_width = vf_size.x;
-       vid_height = vf_size.y;
+       if(contentavgalpha)
+               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);
+
+       if(autocvar_hud_postprocessing)
+       {
+               if(autocvar_hud_contents_blur && contentavgalpha)
+               {
+                       content_blurpostprocess.x = 1;
+                       content_blurpostprocess.y = contentavgalpha * autocvar_hud_contents_blur;
+                       content_blurpostprocess.z = contentavgalpha * autocvar_hud_contents_blur_alpha;
+               }
+               else
+               {
+                       content_blurpostprocess.x = 0;
+                       content_blurpostprocess.y = 0;
+                       content_blurpostprocess.z = 0;
+               }
+       }
+}
+
+// visual pain effects on the screen
+// provides some effects to the postprocessing function
+void HUD_Damage()
+{
+       if(!autocvar_hud_damage || STAT(FROZEN))
+               return;
 
-       vector reticle_pos = '0 0 0', reticle_size = '0 0 0';
        vector splash_pos = '0 0 0', splash_size = '0 0 0';
+       splash_size.x = max(vid_conwidth, vid_conheight);
+       splash_size.y = max(vid_conwidth, vid_conheight);
+       splash_pos.x = (vid_conwidth - splash_size.x) / 2;
+       splash_pos.y = (vid_conheight - splash_size.y) / 2;
 
-       WaypointSprite_Load();
+       float myhealth_flash_temp;
+       myhealth = STAT(HEALTH);
 
-       CSQCPlayer_SetCamera();
+       // fade out
+       myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
+       // add new damage
+       myhealth_flash = bound(0, myhealth_flash + dmg_take * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
 
-       if(player_localentnum <= maxclients) // is it a client?
-               current_player = player_localentnum - 1;
-       else // then player_localentnum is the vehicle I'm driving
-               current_player = player_localnum;
-       myteam = entcs_GetTeam(current_player);
+       float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
+       pain_threshold = autocvar_hud_damage_pain_threshold;
+       pain_threshold_lower = autocvar_hud_damage_pain_threshold_lower;
+       pain_threshold_lower_health = autocvar_hud_damage_pain_threshold_lower_health;
 
-       if(myteam != prev_myteam)
+       if(pain_threshold_lower && myhealth < pain_threshold_lower_health)
        {
-               myteamcolors = colormapPaletteColor(myteam, 1);
-               FOREACH(hud_panels, true, it.update_time = time);
-               prev_myteam = myteam;
+               pain_threshold = pain_threshold - max(autocvar_hud_damage_pain_threshold_pulsating_min, fabs(sin(M_PI * time / autocvar_hud_damage_pain_threshold_pulsating_period))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
        }
 
-       ticrate = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
-
-       float is_dead = (STAT(HEALTH) <= 0);
+       myhealth_flash_temp = bound(0, myhealth_flash - pain_threshold, 1);
 
-       // FIXME do we need this hack?
-       if(isdemo())
+       if(myhealth_prev < 1)
        {
-               // in demos, input_buttons do not work
-               button_zoom = (autocvar__togglezoom == "-");
+               if(myhealth >= 1)
+               {
+                       myhealth_flash = 0; // just spawned, clear the flash immediately
+                       myhealth_flash_temp = 0;
+               }
+               else
+               {
+                       myhealth_flash += autocvar_hud_damage_fade_rate * frametime; // dead
+               }
        }
-       else if(button_zoom
-               && autocvar_cl_unpress_zoom_on_death
-               && (spectatee_status >= 0)
-               && (is_dead || intermission))
+
+       if(spectatee_status == -1 || intermission)
        {
-               // no zoom while dead or in intermission please
-               localcmd("-zoom\n");
-               button_zoom = false;
+               myhealth_flash = 0; // observing, or match ended
+               myhealth_flash_temp = 0;
        }
 
-       // abused multiple places below
-       entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1));
-       if(!local_player)
-               local_player = this; // fall back!
+       myhealth_prev = myhealth;
 
-       // event chase camera
-       if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped
+       // IDEA: change damage color/picture based on player model for robot/alien species?
+       // pro: matches model better
+       // contra: it's not red because blood is red, but because red is an alarming color, so red should stay
+       // maybe different reddish pics?
+       if(autocvar_cl_gentle_damage || autocvar_cl_gentle)
        {
-               if(STAT(CAMERA_SPECTATOR))
+               if(autocvar_cl_gentle_damage == 2)
                {
-                       if(spectatee_status > 0)
-                       {
-                               if(!autocvar_chase_active)
-                               {
-                                       cvar_set("chase_active", "-2");
-                                       goto skip_eventchase_death;
-                               }
-                       }
-                       else if(autocvar_chase_active == -2)
-                               cvar_set("chase_active", "0");
-
-                       if(autocvar_chase_active == -2)
-                               goto skip_eventchase_death;
+                       if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
+                               myhealth_gentlergb = randomvec();
                }
-               else if(autocvar_chase_active == -2)
-                       cvar_set("chase_active", "0");
-
-               bool vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
+               else
+                       myhealth_gentlergb = stov(autocvar_hud_damage_gentle_color);
 
-               float vehicle_viewdist = 0;
-               vector vehicle_viewofs = '0 0 0';
+               if(myhealth_flash_temp > 0)
+                       drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
+       }
+       else if(myhealth_flash_temp > 0)
+               drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
 
-               if(vehicle_chase)
+       if(autocvar_hud_postprocessing) // we still need to set this anyway even when chase_active is set, this way it doesn't get stuck on.
+       {
+               if(autocvar_hud_damage_blur && myhealth_flash_temp)
                {
-                       if(hud != HUD_BUMBLEBEE_GUN)
-                       {
-                               Vehicle info = Vehicles_from(hud);
-                               vehicle_viewdist = info.height;
-                               vehicle_viewofs = info.view_ofs;
-                               if(vehicle_viewdist < 0) // when set below 0, this vehicle doesn't use third person view (gunner slots)
-                                       vehicle_chase = false;
-                       }
-                       else
-                               vehicle_chase = false;
+                       damage_blurpostprocess.x = 1;
+                       damage_blurpostprocess.y = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur;
+                       damage_blurpostprocess.z = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur_alpha;
                }
+               else
+               {
+                       damage_blurpostprocess.x = 0;
+                       damage_blurpostprocess.y = 0;
+                       damage_blurpostprocess.z = 0;
+               }
+       }
+}
 
-               int eventchase = WantEventchase(this, vehicle_chase);
-               if (eventchase)
+void View_PostProcessing()
+{
+       float e1 = (autocvar_hud_postprocessing_maxbluralpha != 0);
+       float e2 = (autocvar_hud_powerup != 0);
+       if(autocvar_hud_postprocessing && (e1 || e2)) // TODO: Remove this code and re-do the postprocess handling in the engine, where it properly belongs.
+       {
+               // enable or disable rendering types if they are used or not
+               if(cvar("r_glsl_postprocess_uservec1_enable") != e1) { cvar_set("r_glsl_postprocess_uservec1_enable", ftos(e1)); }
+               if(cvar("r_glsl_postprocess_uservec2_enable") != e2) { cvar_set("r_glsl_postprocess_uservec2_enable", ftos(e2)); }
+
+               // blur postprocess handling done first (used by hud_damage and hud_contents)
+               if((damage_blurpostprocess.x || content_blurpostprocess.x))
                {
-                       vector current_view_origin_override = '0 0 0';
-                       vector view_offset_override = '0 0 0';
-                       float chase_distance_override = 0;
-                       bool custom_eventchase = MUTATOR_CALLHOOK(CustomizeEventchase, this);
-                       if(custom_eventchase)
+                       float blurradius = bound(0, damage_blurpostprocess.y + content_blurpostprocess.y, autocvar_hud_postprocessing_maxblurradius);
+                       float bluralpha = bound(0, damage_blurpostprocess.z + content_blurpostprocess.z, autocvar_hud_postprocessing_maxbluralpha);
+                       if(blurradius != old_blurradius || bluralpha != old_bluralpha) // reduce cvar_set spam as much as possible
                        {
-                               current_view_origin_override = M_ARGV(0, vector);
-                               view_offset_override = M_ARGV(1, vector);
-                               chase_distance_override = M_ARGV(0, float);
+                               cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(blurradius), " ", ftos(bluralpha), " 0 0"));
+                               old_blurradius = blurradius;
+                               old_bluralpha = bluralpha;
                        }
-                       eventchase_running = true;
+               }
+               else if(cvar_string("r_glsl_postprocess_uservec1") != "0 0 0 0") // reduce cvar_set spam as much as possible
+               {
+                       cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");
+                       old_blurradius = 0;
+                       old_bluralpha = 0;
+               }
 
-                       // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
-                       vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org);
-                       if (custom_eventchase)
-                               current_view_origin = current_view_origin_override;
+               // edge detection postprocess handling done second (used by hud_powerup)
+               float sharpen_intensity = 0, strength_finished = STAT(STRENGTH_FINISHED), invincible_finished = STAT(INVINCIBLE_FINISHED);
+               if (strength_finished - time > 0) { sharpen_intensity += (strength_finished - time); }
+               if (invincible_finished - time > 0) { sharpen_intensity += (invincible_finished - time); }
 
-                       // detect maximum viewoffset and use it
-                       vector view_offset = autocvar_cl_eventchase_viewoffset;
-                       if(vehicle_chase)
-                       {
-                               if(vehicle_viewofs)
-                                       view_offset = vehicle_viewofs;
-                               else
-                                       view_offset = autocvar_cl_eventchase_vehicle_viewoffset;
-                       }
-                       if (custom_eventchase)
-                               view_offset = view_offset_override;
+               sharpen_intensity = bound(0, ((STAT(HEALTH) > 0) ? sharpen_intensity : 0), 5); // Check to see if player is alive (if not, set 0) - also bound to fade out starting at 5 seconds.
 
-                       if(view_offset)
+               if(autocvar_hud_powerup && sharpen_intensity > 0)
+               {
+                       if(sharpen_intensity != old_sharpen_intensity) // reduce cvar_set spam as much as possible
                        {
-                               WarpZone_TraceLine(current_view_origin, current_view_origin + view_offset + ('0 0 1' * autocvar_cl_eventchase_maxs.z), MOVE_WORLDONLY, this);
-                               if(trace_fraction == 1) { current_view_origin += view_offset; }
-                               else { current_view_origin.z += max(0, (trace_endpos.z - current_view_origin.z) - autocvar_cl_eventchase_maxs.z); }
+                               cvar_set("r_glsl_postprocess_uservec2", strcat(ftos((sharpen_intensity / 5) * autocvar_hud_powerup), " ", ftos(-sharpen_intensity * autocvar_hud_powerup), " 0 0"));
+                               old_sharpen_intensity = sharpen_intensity;
                        }
+               }
+               else if(cvar_string("r_glsl_postprocess_uservec2") != "0 0 0 0") // reduce cvar_set spam as much as possible
+               {
+                       cvar_set("r_glsl_postprocess_uservec2", "0 0 0 0");
+                       old_sharpen_intensity = 0;
+               }
 
-                       // We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
-                       // Ideally, there should be another way to enable third person cameras, such as through setproperty()
-                       // -1 enables chase_active while marking it as set by this code, and not by the user (which would be 1)
-                       if(!autocvar_chase_active) { cvar_set("chase_active", "-1"); }
+               if(cvar("r_glsl_postprocess") == 0)
+                       cvar_set("r_glsl_postprocess", "2");
+       }
+       else if(cvar("r_glsl_postprocess") == 2)
+               cvar_set("r_glsl_postprocess", "0");
+}
 
-                       // make the camera smooth back
-                       float chase_distance = autocvar_cl_eventchase_distance;
-                       if(vehicle_chase)
-                       {
-                               if(vehicle_viewofs)
-                                       chase_distance = vehicle_viewdist;
-                               else
-                                       chase_distance = autocvar_cl_eventchase_vehicle_distance;
-                       }
-                       if (custom_eventchase)
-                               chase_distance = chase_distance_override;
+void View_Lock()
+{
+       if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || QuickMenu_IsOpened())))
+       {
+               setproperty(VF_ORIGIN, freeze_org);
+               setproperty(VF_ANGLES, freeze_ang);
+       }
+       else
+       {
+               freeze_org = getpropertyvec(VF_ORIGIN);
+               freeze_ang = getpropertyvec(VF_ANGLES);
+       }
+}
 
-                       if(autocvar_cl_eventchase_speed && eventchase_current_distance < chase_distance)
-                               eventchase_current_distance += autocvar_cl_eventchase_speed * (chase_distance - eventchase_current_distance) * frametime; // slow down the further we get
-                       else if(eventchase_current_distance != chase_distance)
-                               eventchase_current_distance = chase_distance;
+void View_DemoCamera()
+{
+       if(camera_active) // Camera for demo playback
+       {
+               if(autocvar_camera_enable)
+                       CSQC_Demo_Camera();
+               else
+               {
+                       cvar_set("chase_active", ftos(chase_active_backup));
+                       cvar_set("cl_demo_mousegrab", "0");
+                       camera_active = false;
+               }
+       }
+       else
+       {
+#ifdef CAMERATEST
+               if(autocvar_camera_enable)
+#else
+               if(autocvar_camera_enable && isdemo())
+#endif
+               {
+                       // Enable required Darkplaces cvars
+                       chase_active_backup = autocvar_chase_active;
+                       cvar_set("chase_active", "2");
+                       cvar_set("cl_demo_mousegrab", "1");
+                       camera_active = true;
+                       camera_mode = false;
+               }
+       }
+}
 
-                       vector forward, right, up;
-                       MAKE_VECTORS(view_angles, forward, right, up);
+#ifdef BLURTEST
+void View_BlurTest()
+{
+       if(time > blurtest_time0 && time < blurtest_time1)
+       {
+               float t = (time - blurtest_time0) / (blurtest_time1 - blurtest_time0);
+               float r = t * blurtest_radius;
+               float f = 1 / (t ** blurtest_power) - 1;
 
-                       vector eventchase_target_origin = (current_view_origin - (forward * eventchase_current_distance));
-                       WarpZone_TraceBox(current_view_origin, autocvar_cl_eventchase_mins, autocvar_cl_eventchase_maxs, eventchase_target_origin, MOVE_WORLDONLY, this);
+               cvar_set("r_glsl_postprocess", "1");
+               cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(r), " ", ftos(f), " 0 0"));
+       }
+       else
+       {
+               cvar_set("r_glsl_postprocess", "0");
+               cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");
+       }
+}
+#endif
 
-                       // If the boxtrace fails, revert back to line tracing.
-                       if(!local_player.viewloc)
-                       if(trace_startsolid)
-                       {
-                               eventchase_target_origin = (current_view_origin - (forward * eventchase_current_distance));
-                               WarpZone_TraceLine(current_view_origin, eventchase_target_origin, MOVE_WORLDONLY, this);
-                               setproperty(VF_ORIGIN, (trace_endpos - (forward * autocvar_cl_eventchase_mins.z)));
-                       }
-                       else { setproperty(VF_ORIGIN, trace_endpos); }
+void View_CheckButtonStatus()
+{
+       float is_dead = (STAT(HEALTH) <= 0);
 
-                       if(!local_player.viewloc)
-                               setproperty(VF_ANGLES, WarpZone_TransformVAngles(WarpZone_trace_transform, view_angles));
-               }
+       // FIXME do we need this hack?
+       if(isdemo())
+       {
+               // in demos, input_buttons do not work
+               button_zoom = (autocvar__togglezoom == "-");
+       }
+       else if(button_zoom
+               && autocvar_cl_unpress_zoom_on_death
+               && (spectatee_status >= 0)
+               && (is_dead || intermission))
+       {
+               // no zoom while dead or in intermission please
+               localcmd("-zoom\n");
+               button_zoom = false;
+       }
 
-               if (eventchase <= 0 && autocvar_chase_active < 0) // time to disable chase_active if it was set by this code
+       if(autocvar_fov <= 59.5)
+       {
+               if(!zoomscript_caught)
                {
-                       eventchase_running = false;
-                       cvar_set("chase_active", "0");
-                       eventchase_current_distance = 0; // start from 0 next time
+                       localcmd("+button9\n");
+                       zoomscript_caught = 1;
                }
        }
-       // workaround for camera stuck between player's legs when using chase_active 1
-       // because the engine stops updating the chase_active camera when the game ends
-       else if(intermission)
+       else
        {
-               cvar_settemp("chase_active", "-1");
-               eventchase_current_distance = 0;
+               if(zoomscript_caught)
+               {
+                       localcmd("-button9\n");
+                       zoomscript_caught = 0;
+               }
        }
 
-       LABEL(skip_eventchase_death);
-
-       // do lockview after event chase camera so that it still applies whenever necessary.
-       if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || QuickMenu_IsOpened())))
+       if(active_minigame && HUD_MinigameMenu_IsOpened())
        {
-               setproperty(VF_ORIGIN, freeze_org);
-               setproperty(VF_ANGLES, freeze_ang);
+               if(!minigame_wasactive)
+               {
+                       localcmd("+button12\n");
+                       minigame_wasactive = true;
+               }
        }
-       else
+       else if(minigame_wasactive)
        {
-               freeze_org = getpropertyvec(VF_ORIGIN);
-               freeze_ang = getpropertyvec(VF_ANGLES);
+               localcmd("-button12\n");
+               minigame_wasactive = false;
        }
 
-       WarpZone_FixView();
-       //WarpZone_FixPMove();
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               entity wepent = viewmodels[slot];
+
+               if(wepent.last_switchweapon != wepent.switchweapon)
+               {
+                       weapontime = time;
+                       wepent.last_switchweapon = wepent.switchweapon;
+                       if(slot == 0 && button_zoom && autocvar_cl_unpress_zoom_on_weapon_switch)
+                       {
+                               localcmd("-zoom\n");
+                               button_zoom = false;
+                       }
+                       if(slot == 0 && autocvar_cl_unpress_attack_on_weapon_switch)
+                       {
+                               localcmd("-fire\n");
+                               localcmd("-fire2\n");
+                               button_attack2 = false;
+                       }
+               }
+               if(wepent.last_activeweapon != wepent.activeweapon)
+               {
+                       wepent.last_activeweapon = wepent.activeweapon;
+
+                       entity e = wepent.activeweapon;
+                       if(e.netname != "")
+                               localcmd(strcat("\ncl_hook_activeweapon ", e.netname), "\n");
+                       else if(slot == 0)
+                               localcmd("\ncl_hook_activeweapon none\n");
+               }
+       }
+}
 
-       vector ov_org = '0 0 0';
-       vector ov_mid = '0 0 0';
-       vector ov_worldmin = '0 0 0';
-       vector ov_worldmax = '0 0 0';
+bool ov_enabled;
+float oldr_nearclip;
+float oldr_farclip_base;
+float oldr_farclip_world;
+float oldr_novis;
+float oldr_useportalculling;
+float oldr_useinfinitefarclip;
+vector ov_org = '0 0 0';
+vector ov_mid = '0 0 0';
+vector ov_worldmin = '0 0 0';
+vector ov_worldmax = '0 0 0';
+
+void View_Ortho()
+{
+       ov_org = '0 0 0';
+       ov_mid = '0 0 0';
+       ov_worldmin = '0 0 0';
+       ov_worldmax = '0 0 0';
        if(autocvar_cl_orthoview)
        {
                ov_worldmin = mi_picmin;
@@ -1888,6 +2277,84 @@ void CSQC_UpdateView(entity this, float w, float h)
                }
                ov_enabled = false;
        }
+}
+
+void View_UpdateFov()
+{
+       vector fov;
+       if(autocvar_cl_orthoview)
+               fov = GetOrthoviewFOV(ov_worldmin, ov_worldmax, ov_mid, ov_org);
+       else if(csqcplayer.viewloc)
+               fov = GetViewLocationFOV(110); // enforce 110 fov, so things don't look odd
+       else
+               fov = GetCurrentFov(autocvar_fov);
+
+       setproperty(VF_FOV, fov);
+}
+
+void CSQC_UpdateView(entity this, float w, float h)
+{
+       TC(int, w); TC(int, h);
+
+       execute_next_frame();
+
+       ++framecount;
+
+       stats_get();
+       hud = STAT(HUD);
+
+       ReplicateVars(false);
+       if (ReplicateVars_NOT_SENDING())
+               ReplicateVars_DELAY(0.8 + random() * 0.4); // no need to check cvars every frame
+
+       HUD_Scale_Disable();
+
+       if(autocvar__hud_showbinds_reload) // menu can set this one
+       {
+               db_close(binddb);
+               binddb = db_create();
+               cvar_set("_hud_showbinds_reload", "0");
+       }
+
+       if(checkextension("DP_CSQC_MINFPS_QUALITY"))
+               view_quality = getproperty(VF_MINFPS_QUALITY);
+       else
+               view_quality = 1;
+
+       button_attack2 = PHYS_INPUT_BUTTON_ATCK2(this);
+       button_zoom = PHYS_INPUT_BUTTON_ZOOM(this);
+
+       vector vf_size = getpropertyvec(VF_SIZE);
+       vector vf_min = getpropertyvec(VF_MIN);
+       vid_width = vf_size.x;
+       vid_height = vf_size.y;
+
+       WaypointSprite_Load();
+
+       CSQCPlayer_SetCamera();
+
+       if(player_localentnum <= maxclients) // is it a client?
+               current_player = player_localentnum - 1;
+       else // then player_localentnum is the vehicle I'm driving
+               current_player = player_localnum;
+       myteam = entcs_GetTeam(current_player);
+
+       ticrate = STAT(MOVEVARS_TICRATE) * STAT(MOVEVARS_TIMESCALE);
+
+       // abused multiple places below
+       entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1));
+       if(!local_player)
+               local_player = this; // fall back!
+
+       View_EventChase(local_player);
+
+       // do lockview after event chase camera so that it still applies whenever necessary.
+       View_Lock();
+
+       WarpZone_FixView();
+       //WarpZone_FixPMove();
+
+       View_Ortho();
 
        // run viewmodel_draw before updating view_angles to the angles calculated by WarpZone_FixView
        // viewmodel_draw needs to use the view_angles set by the engine on every CSQC_UpdateView call
@@ -1899,23 +2366,8 @@ void CSQC_UpdateView(entity this, float w, float h)
        view_angles = getpropertyvec(VF_ANGLES);
        MAKE_VECTORS(view_angles, view_forward, view_right, view_up);
 
-#ifdef BLURTEST
-       if(time > blurtest_time0 && time < blurtest_time1)
-       {
-               float r, t;
-
-               t = (time - blurtest_time0) / (blurtest_time1 - blurtest_time0);
-               r = t * blurtest_radius;
-               f = 1 / (t ** blurtest_power) - 1;
-
-               cvar_set("r_glsl_postprocess", "1");
-               cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(r), " ", ftos(f), " 0 0"));
-       }
-       else
-       {
-               cvar_set("r_glsl_postprocess", "0");
-               cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");
-       }
+#ifdef BLURTEST
+       View_BlurTest();
 #endif
 
        TargetMusic_Advance();
@@ -1948,72 +2400,10 @@ void CSQC_UpdateView(entity this, float w, float h)
 
        Announcer();
 
-       fov = autocvar_fov;
-       if(fov <= 59.5)
-       {
-               if(!zoomscript_caught)
-               {
-                       localcmd("+button9\n");
-                       zoomscript_caught = 1;
-               }
-       }
-       else
-       {
-               if(zoomscript_caught)
-               {
-                       localcmd("-button9\n");
-                       zoomscript_caught = 0;
-               }
-       }
-
-       if(active_minigame && HUD_MinigameMenu_IsOpened())
-       {
-               if(!minigame_wasactive)
-               {
-                       localcmd("+button12\n");
-                       minigame_wasactive = true;
-               }
-       }
-       else if(minigame_wasactive)
-       {
-               localcmd("-button12\n");
-               minigame_wasactive = false;
-       }
+       View_CheckButtonStatus();
 
        ColorTranslateMode = autocvar_cl_stripcolorcodes;
 
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-       {
-               entity wepent = viewmodels[slot];
-
-               if(wepent.last_switchweapon != wepent.switchweapon)
-               {
-                       weapontime = time;
-                       wepent.last_switchweapon = wepent.switchweapon;
-                       if(slot == 0 && button_zoom && autocvar_cl_unpress_zoom_on_weapon_switch)
-                       {
-                               localcmd("-zoom\n");
-                               button_zoom = false;
-                       }
-                       if(slot == 0 && autocvar_cl_unpress_attack_on_weapon_switch)
-                       {
-                               localcmd("-fire\n");
-                               localcmd("-fire2\n");
-                               button_attack2 = false;
-                       }
-               }
-               if(wepent.last_activeweapon != wepent.activeweapon)
-               {
-                       wepent.last_activeweapon = wepent.activeweapon;
-
-                       e = wepent.activeweapon;
-                       if(e.netname != "")
-                               localcmd(strcat("\ncl_hook_activeweapon ", e.netname), "\n");
-                       else if(slot == 0)
-                               localcmd("\ncl_hook_activeweapon none\n");
-               }
-       }
-
        // ALWAYS Clear Current Scene First
        clearscene();
 
@@ -2033,37 +2423,9 @@ void CSQC_UpdateView(entity this, float w, float h)
        vid_conheight = autocvar_vid_conheight;
        vid_pixelheight = autocvar_vid_pixelheight;
 
-       if(autocvar_cl_orthoview) { setproperty(VF_FOV, GetOrthoviewFOV(ov_worldmin, ov_worldmax, ov_mid, ov_org)); }
-       else if(csqcplayer.viewloc) { setproperty(VF_FOV, GetViewLocationFOV(110)); } // enforce 110 fov, so things dont look odd
-       else { setproperty(VF_FOV, GetCurrentFov(fov)); }
+       View_UpdateFov();
 
-       if(camera_active) // Camera for demo playback
-       {
-               if(autocvar_camera_enable)
-                       CSQC_Demo_Camera();
-               else
-               {
-                       cvar_set("chase_active", ftos(chase_active_backup));
-                       cvar_set("cl_demo_mousegrab", "0");
-                       camera_active = false;
-               }
-       }
-       else
-       {
-#ifdef CAMERATEST
-               if(autocvar_camera_enable)
-#else
-               if(autocvar_camera_enable && isdemo())
-#endif
-               {
-                       // Enable required Darkplaces cvars
-                       chase_active_backup = autocvar_chase_active;
-                       cvar_set("chase_active", "2");
-                       cvar_set("cl_demo_mousegrab", "1");
-                       camera_active = true;
-                       camera_mode = false;
-               }
-       }
+       View_DemoCamera();
 
        // Draw the Crosshair
        setproperty(VF_DRAWCROSSHAIR, 0); //Make sure engine crosshairs are always hidden
@@ -2088,337 +2450,11 @@ void CSQC_UpdateView(entity this, float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright)
-       if (!(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT))
-       {
-               // apply night vision effect
-               vector tc_00, tc_01, tc_10, tc_11;
-               vector rgb = '0 0 0';
-
-               if(!nightvision_noise)
-               {
-                       nightvision_noise = new(nightvision_noise);
-               }
-               if(!nightvision_noise2)
-               {
-                       nightvision_noise2 = new(nightvision_noise2);
-               }
-
-               // color tint in yellow
-               drawfill('0 0 0', autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', '0.5 1 0.3', 1, DRAWFLAG_MODULATE);
-
-               // draw BG
-               a = Noise_Pink(nightvision_noise, frametime * 1.5) * 0.05 + 0.15;
-               rgb = '1 1 1';
-               tc_00 = '0 0 0' + '0.2 0 0' * sin(time * 0.3) + '0 0.3 0' * cos(time * 0.7);
-               tc_01 = '0 2.25 0' + '0.6 0 0' * cos(time * 1.2) - '0 0.3 0' * sin(time * 2.2);
-               tc_10 = '1.5 0 0' - '0.2 0 0' * sin(time * 0.5) + '0 0.5 0' * cos(time * 1.7);
-               //tc_11 = '1 1 0' + '0.6 0 0' * sin(time * 0.6) + '0 0.3 0' * cos(time * 0.1);
-               tc_11 = tc_01 + tc_10 - tc_00;
-               R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE);
-               R_PolygonVertex('0 0 0', tc_00, rgb, a);
-               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
-               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
-               R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
-               R_EndPolygon();
-
-               // draw FG
-               a = Noise_Pink(nightvision_noise2, frametime * 0.1) * 0.05 + 0.12;
-               rgb = '0.3 0.6 0.4' + '0.1 0.4 0.2' * Noise_White(nightvision_noise2, frametime);
-               tc_00 = '0 0 0' + '1 0 0' * Noise_White(nightvision_noise2, frametime) + '0 1 0' * Noise_White(nightvision_noise2, frametime);
-               tc_01 = tc_00 + '0 3 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.2);
-               tc_10 = tc_00 + '2 0 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.3);
-               tc_11 = tc_01 + tc_10 - tc_00;
-               R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE);
-               R_PolygonVertex('0 0 0', tc_00, rgb, a);
-               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
-               R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
-               R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
-               R_EndPolygon();
-       }
-
-       if(autocvar_cl_reticle && !MUTATOR_CALLHOOK(DrawReticle))
-       {
-               string reticle_image = string_null;
-               bool wep_zoomed = false;
-               for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-               {
-                       entity wepe = viewmodels[slot];
-                       Weapon wep = wepe.activeweapon;
-                       if(wep != WEP_Null && wep.wr_zoom)
-                       {
-                               bool do_zoom = wep.wr_zoom(wep, NULL);
-                               if(!reticle_image && wep.w_reticle && wep.w_reticle != "")
-                                       reticle_image = wep.w_reticle;
-                               wep_zoomed += do_zoom;
-                       }
-               }
-               // Draw the aiming reticle for weapons that use it
-               // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use
-               // It must be a persisted float for fading out to work properly (you let go of the zoom button for
-               // the view to go back to normal, so reticle_type would become 0 as we fade out)
-               if(spectatee_status || is_dead || hud != HUD_NORMAL || local_player.viewloc)
-               {
-                       // no zoom reticle while dead
-                       reticle_type = 0;
-               }
-               else if(wep_zoomed && autocvar_cl_reticle_weapon)
-               {
-                       if(reticle_image) { reticle_type = 2; }
-                       else { reticle_type = 0; }
-               }
-               else if(button_zoom || zoomscript_caught)
-               {
-                       // normal zoom
-                       reticle_type = 1;
-               }
-
-               if(reticle_type)
-               {
-                       if(autocvar_cl_reticle_stretch)
-                       {
-                               reticle_size.x = vid_conwidth;
-                               reticle_size.y = vid_conheight;
-                               reticle_pos.x = 0;
-                               reticle_pos.y = 0;
-                       }
-                       else
-                       {
-                               reticle_size.x = max(vid_conwidth, vid_conheight);
-                               reticle_size.y = max(vid_conwidth, vid_conheight);
-                               reticle_pos.x = (vid_conwidth - reticle_size.x) / 2;
-                               reticle_pos.y = (vid_conheight - reticle_size.y) / 2;
-                       }
-
-                       if(zoomscript_caught)
-                               f = 1;
-                       else
-                               f = current_zoomfraction;
-
-                       if(f)
-                       {
-                               switch(reticle_type)
-                               {
-                                       case 1: drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_normal_alpha, DRAWFLAG_NORMAL); break;
-                                       case 2: if(reticle_image) drawpic(reticle_pos, reticle_image, reticle_size, '1 1 1', f * autocvar_cl_reticle_weapon_alpha, DRAWFLAG_NORMAL); break;
-                               }
-                       }
-               }
-       }
-       else
-       {
-               if(reticle_type != 0) { reticle_type = 0; }
-       }
-
-
-       // improved polyblend
-       if(autocvar_hud_contents && !MUTATOR_CALLHOOK(HUD_Contents))
-       {
-               float contentalpha_temp, incontent, liquidalpha, contentfadetime;
-               vector liquidcolor;
-
-               switch(pointcontents(view_origin))
-               {
-                       case CONTENT_WATER:
-                               liquidalpha = autocvar_hud_contents_water_alpha;
-                               liquidcolor = stov(autocvar_hud_contents_water_color);
-                               incontent = 1;
-                               break;
-
-                       case CONTENT_LAVA:
-                               liquidalpha = autocvar_hud_contents_lava_alpha;
-                               liquidcolor = stov(autocvar_hud_contents_lava_color);
-                               incontent = 1;
-                               break;
-
-                       case CONTENT_SLIME:
-                               liquidalpha = autocvar_hud_contents_slime_alpha;
-                               liquidcolor = stov(autocvar_hud_contents_slime_color);
-                               incontent = 1;
-                               break;
-
-                       default:
-                               liquidalpha = 0;
-                               liquidcolor = '0 0 0';
-                               incontent = 0;
-                               break;
-               }
-
-               if(incontent) // fade in/out at different speeds so you can do e.g. instant fade when entering water and slow when leaving it.
-               { // also lets delcare previous values for blending properties, this way it isn't reset until after you have entered a different content
-                       contentfadetime = autocvar_hud_contents_fadeintime;
-                       liquidalpha_prev = liquidalpha;
-                       liquidcolor_prev = liquidcolor;
-               }
-               else
-                       contentfadetime = autocvar_hud_contents_fadeouttime;
-
-               contentalpha_temp = bound(0, drawframetime / max(0.0001, contentfadetime), 1);
-               contentavgalpha = contentavgalpha * (1 - contentalpha_temp) + incontent * contentalpha_temp;
-
-               if(contentavgalpha)
-                       drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);
-
-               if(autocvar_hud_postprocessing)
-               {
-                       if(autocvar_hud_contents_blur && contentavgalpha)
-                       {
-                               content_blurpostprocess.x = 1;
-                               content_blurpostprocess.y = contentavgalpha * autocvar_hud_contents_blur;
-                               content_blurpostprocess.z = contentavgalpha * autocvar_hud_contents_blur_alpha;
-                       }
-                       else
-                       {
-                               content_blurpostprocess.x = 0;
-                               content_blurpostprocess.y = 0;
-                               content_blurpostprocess.z = 0;
-                       }
-               }
-       }
-
-       if(autocvar_hud_damage && !STAT(FROZEN))
-       {
-               splash_size.x = max(vid_conwidth, vid_conheight);
-               splash_size.y = max(vid_conwidth, vid_conheight);
-               splash_pos.x = (vid_conwidth - splash_size.x) / 2;
-               splash_pos.y = (vid_conheight - splash_size.y) / 2;
-
-               float myhealth_flash_temp;
-               myhealth = STAT(HEALTH);
-
-               // fade out
-               myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
-               // add new damage
-               myhealth_flash = bound(0, myhealth_flash + dmg_take * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
-
-               float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
-               pain_threshold = autocvar_hud_damage_pain_threshold;
-               pain_threshold_lower = autocvar_hud_damage_pain_threshold_lower;
-               pain_threshold_lower_health = autocvar_hud_damage_pain_threshold_lower_health;
-
-               if(pain_threshold_lower && myhealth < pain_threshold_lower_health)
-               {
-                       pain_threshold = pain_threshold - max(autocvar_hud_damage_pain_threshold_pulsating_min, fabs(sin(M_PI * time / autocvar_hud_damage_pain_threshold_pulsating_period))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
-               }
-
-               myhealth_flash_temp = bound(0, myhealth_flash - pain_threshold, 1);
-
-               if(myhealth_prev < 1)
-               {
-                       if(myhealth >= 1)
-                       {
-                               myhealth_flash = 0; // just spawned, clear the flash immediately
-                               myhealth_flash_temp = 0;
-                       }
-                       else
-                       {
-                               myhealth_flash += autocvar_hud_damage_fade_rate * frametime; // dead
-                       }
-               }
-
-               if(spectatee_status == -1 || intermission)
-               {
-                       myhealth_flash = 0; // observing, or match ended
-                       myhealth_flash_temp = 0;
-               }
-
-               myhealth_prev = myhealth;
-
-               // IDEA: change damage color/picture based on player model for robot/alien species?
-               // pro: matches model better
-               // contra: it's not red because blood is red, but because red is an alarming color, so red should stay
-               // maybe different reddish pics?
-               if(autocvar_cl_gentle_damage || autocvar_cl_gentle)
-               {
-                       if(autocvar_cl_gentle_damage == 2)
-                       {
-                               if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
-                                       myhealth_gentlergb = randomvec();
-                       }
-                       else
-                               myhealth_gentlergb = stov(autocvar_hud_damage_gentle_color);
-
-                       if(myhealth_flash_temp > 0)
-                               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
-               }
-               else if(myhealth_flash_temp > 0)
-                       drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
-
-               if(autocvar_hud_postprocessing) // we still need to set this anyway even when chase_active is set, this way it doesn't get stuck on.
-               {
-                       if(autocvar_hud_damage_blur && myhealth_flash_temp)
-                       {
-                               damage_blurpostprocess.x = 1;
-                               damage_blurpostprocess.y = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur;
-                               damage_blurpostprocess.z = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur_alpha;
-                       }
-                       else
-                       {
-                               damage_blurpostprocess.x = 0;
-                               damage_blurpostprocess.y = 0;
-                               damage_blurpostprocess.z = 0;
-                       }
-               }
-       }
-
-       float e1 = (autocvar_hud_postprocessing_maxbluralpha != 0);
-       float e2 = (autocvar_hud_powerup != 0);
-       if(autocvar_hud_postprocessing && (e1 || e2)) // TODO: Remove this code and re-do the postprocess handling in the engine, where it properly belongs.
-       {
-               // enable or disable rendering types if they are used or not
-               if(cvar("r_glsl_postprocess_uservec1_enable") != e1) { cvar_set("r_glsl_postprocess_uservec1_enable", ftos(e1)); }
-               if(cvar("r_glsl_postprocess_uservec2_enable") != e2) { cvar_set("r_glsl_postprocess_uservec2_enable", ftos(e2)); }
-
-               // blur postprocess handling done first (used by hud_damage and hud_contents)
-               if((damage_blurpostprocess.x || content_blurpostprocess.x))
-               {
-                       float blurradius = bound(0, damage_blurpostprocess.y + content_blurpostprocess.y, autocvar_hud_postprocessing_maxblurradius);
-                       float bluralpha = bound(0, damage_blurpostprocess.z + content_blurpostprocess.z, autocvar_hud_postprocessing_maxbluralpha);
-                       if(blurradius != old_blurradius || bluralpha != old_bluralpha) // reduce cvar_set spam as much as possible
-                       {
-                               cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(blurradius), " ", ftos(bluralpha), " 0 0"));
-                               old_blurradius = blurradius;
-                               old_bluralpha = bluralpha;
-                       }
-               }
-               else if(cvar_string("r_glsl_postprocess_uservec1") != "0 0 0 0") // reduce cvar_set spam as much as possible
-               {
-                       cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");
-                       old_blurradius = 0;
-                       old_bluralpha = 0;
-               }
-
-               // edge detection postprocess handling done second (used by hud_powerup)
-               float sharpen_intensity = 0, strength_finished = STAT(STRENGTH_FINISHED), invincible_finished = STAT(INVINCIBLE_FINISHED);
-               if (strength_finished - time > 0) { sharpen_intensity += (strength_finished - time); }
-               if (invincible_finished - time > 0) { sharpen_intensity += (invincible_finished - time); }
-
-               sharpen_intensity = bound(0, ((STAT(HEALTH) > 0) ? sharpen_intensity : 0), 5); // Check to see if player is alive (if not, set 0) - also bound to fade out starting at 5 seconds.
-
-               if(autocvar_hud_powerup && sharpen_intensity > 0)
-               {
-                       if(sharpen_intensity != old_sharpen_intensity) // reduce cvar_set spam as much as possible
-                       {
-                               cvar_set("r_glsl_postprocess_uservec2", strcat(ftos((sharpen_intensity / 5) * autocvar_hud_powerup), " ", ftos(-sharpen_intensity * autocvar_hud_powerup), " 0 0"));
-                               old_sharpen_intensity = sharpen_intensity;
-                       }
-               }
-               else if(cvar_string("r_glsl_postprocess_uservec2") != "0 0 0 0") // reduce cvar_set spam as much as possible
-               {
-                       cvar_set("r_glsl_postprocess_uservec2", "0 0 0 0");
-                       old_sharpen_intensity = 0;
-               }
-
-               if(cvar("r_glsl_postprocess") == 0)
-                       cvar_set("r_glsl_postprocess", "2");
-       }
-       else if(cvar("r_glsl_postprocess") == 2)
-               cvar_set("r_glsl_postprocess", "0");
-
-       /*if(ISGAMETYPE(CTF))
-         {
-         ctf_view();
-         } else */
+       View_NightVision();
+       DrawReticle(local_player);
+       HUD_Contents();
+       HUD_Damage();
+       View_PostProcessing();
 
        // draw 2D entities
        IL_EACH(g_drawables_2d, it.draw2d, it.draw2d(it));
index f3c1f4139fff3543ca272c7a750a3cd3328422b5..448361d05f2075d992d3f47a11e83fba5964c439 100644 (file)
@@ -20,3 +20,5 @@ const int CURSOR_NORMAL = 0;
 const int CURSOR_MOVE = 1;
 const int CURSOR_RESIZE = 2;
 const int CURSOR_RESIZE2 = 3;
+
+float drawtime;
index 25c008d260d12329b2e16aed6dfdf97fdaf0973d..088aefea09a0479c2061e483491923090653df60 100644 (file)
@@ -11,8 +11,8 @@ string campaign_gametype[CAMPAIGN_MAX_ENTRIES];
 string campaign_mapname[CAMPAIGN_MAX_ENTRIES];
 float campaign_bots[CAMPAIGN_MAX_ENTRIES];
 float campaign_botskill[CAMPAIGN_MAX_ENTRIES];
-float campaign_fraglimit[CAMPAIGN_MAX_ENTRIES];
-float campaign_timelimit[CAMPAIGN_MAX_ENTRIES];
+string campaign_fraglimit[CAMPAIGN_MAX_ENTRIES];
+string campaign_timelimit[CAMPAIGN_MAX_ENTRIES];
 string campaign_mutators[CAMPAIGN_MAX_ENTRIES];
 string campaign_shortdesc[CAMPAIGN_MAX_ENTRIES];
 string campaign_longdesc[CAMPAIGN_MAX_ENTRIES];
index 4f099b53301010a383b9efaa5a27d9e2e5ceebaf..8bac6f35ee05678647caf62ec410df13bf5da770 100644 (file)
@@ -58,8 +58,8 @@ float CampaignFile_Load(int offset, float n)
                                CAMPAIGN_GETARG; campaign_mapname[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_bots[campaign_entries] = stof(a);
                                CAMPAIGN_GETARG; campaign_botskill[campaign_entries] = stof(a);
-                               CAMPAIGN_GETARG; campaign_fraglimit[campaign_entries] = stof(a);
-                               CAMPAIGN_GETARG; campaign_timelimit[campaign_entries] = stof(a);
+                               CAMPAIGN_GETARG; campaign_fraglimit[campaign_entries] = strzone(a);
+                               CAMPAIGN_GETARG; campaign_timelimit[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_mutators[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_shortdesc[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_longdesc[campaign_entries] = strzone(strreplace("\\n", "\n", a));
@@ -91,6 +91,8 @@ void CampaignFile_Unload()
                {
                        strfree(campaign_gametype[i]);
                        strfree(campaign_mapname[i]);
+                       strfree(campaign_fraglimit[i]);
+                       strfree(campaign_timelimit[i]);
                        strfree(campaign_mutators[i]);
                        strfree(campaign_shortdesc[i]);
                        strfree(campaign_longdesc[i]);
index dcd8d958422b660a941e639fbb23d6eb82de838a..2c34fea44a50813493007c2c2cedc1f88840025a 100644 (file)
@@ -169,7 +169,7 @@ void GenericCommand_qc_curl(int request, int argc)
        }
 }
 
-GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt")
+GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt", false)
 {
        switch(request)
        {
@@ -532,16 +532,16 @@ void GenericCommand_(int request)
 */
 
 // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
-GENERIC_COMMAND(addtolist, "Add a string to a cvar") { GenericCommand_addtolist(request, arguments); }
-GENERIC_COMMAND(maplist, "Automatic control of maplist") { GenericCommand_maplist(request, arguments); }
-GENERIC_COMMAND(nextframe, "Execute the given command next frame of this VM") { GenericCommand_nextframe(request, command); }
-GENERIC_COMMAND(qc_curl, "Queries a URL") { GenericCommand_qc_curl(request, arguments); }
-GENERIC_COMMAND(removefromlist, "Remove a string from a cvar") { GenericCommand_removefromlist(request, arguments); }
-GENERIC_COMMAND(restartnotifs, "Re-initialize all notifications") { GenericCommand_restartnotifs(request); }
-GENERIC_COMMAND(rpn, "RPN calculator") { GenericCommand_rpn(request, arguments, command); }
-GENERIC_COMMAND(settemp, "Temporarily set a value to a cvar which is restored later") { GenericCommand_settemp(request, arguments); }
-GENERIC_COMMAND(settemp_restore, "Restore all cvars set by settemp command") { GenericCommand_settemp_restore(request); }
-GENERIC_COMMAND(runtest, "Run unit tests") { GenericCommand_runtest(request, arguments); }
+GENERIC_COMMAND(addtolist, "Add a string to a cvar", true) { GenericCommand_addtolist(request, arguments); }
+GENERIC_COMMAND(maplist, "Automatic control of maplist", true) { GenericCommand_maplist(request, arguments); }
+GENERIC_COMMAND(nextframe, "Execute the given command next frame of this VM", true) { GenericCommand_nextframe(request, command); }
+GENERIC_COMMAND(qc_curl, "Queries a URL", true) { GenericCommand_qc_curl(request, arguments); }
+GENERIC_COMMAND(removefromlist, "Remove a string from a cvar", true) { GenericCommand_removefromlist(request, arguments); }
+GENERIC_COMMAND(restartnotifs, "Re-initialize all notifications", false) { GenericCommand_restartnotifs(request); }
+GENERIC_COMMAND(rpn, "RPN calculator", true) { GenericCommand_rpn(request, arguments, command); }
+GENERIC_COMMAND(settemp, "Temporarily set a value to a cvar which is restored later", false) { GenericCommand_settemp(request, arguments); }
+GENERIC_COMMAND(settemp_restore, "Restore all cvars set by settemp command", false) { GenericCommand_settemp_restore(request); }
+GENERIC_COMMAND(runtest, "Run unit tests", false) { GenericCommand_runtest(request, arguments); }
 
 void GenericCommand_macro_help()
 {
index 9868e2490afc54a4affeedf5216b4782d402f188..a6f669fd91e04c461a2710837ae760e070c9523a 100644 (file)
@@ -6,14 +6,17 @@ REGISTRY(GENERIC_COMMANDS, BITS(7))
 REGISTER_REGISTRY(GENERIC_COMMANDS)
 REGISTRY_SORT(GENERIC_COMMANDS)
 
-#define GENERIC_COMMAND(id, description) \
+.bool m_menubased; // switch to tell whether this alias should be registered as a menu or client based command
+
+#define GENERIC_COMMAND(id, description, menubased) \
        CLASS(genericcommand_##id, Command) \
                ATTRIB(genericcommand_##id, m_name, string, #id); \
        ATTRIB(genericcommand_##id, m_description, string, description); \
+       ATTRIB(genericcommand_##id, m_menubased, bool, menubased); \
        ENDCLASS(genericcommand_##id) \
     REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
        METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
 
 STATIC_INIT(GENERIC_COMMANDS_aliases) {
-       FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu")));
+       FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, ((it.m_menubased) ? "qc_cmd_svmenu" : "qc_cmd_svcl"))));
 }
index 0998fad9dbd4ea4ea02ed815840ff18a8b3f548f..4165d3dddac289b34a2ffc42ed9f09dccd259b8b 100644 (file)
@@ -53,6 +53,12 @@ float rpn_popf() { return stof(rpn_pop()); }
 void rpn_pushf(float f) { return rpn_push(sprintf("%.9g", f)); }
 void rpn_setf(float f) { return rpn_set(sprintf("%.9g", f)); }
 
+SHUTDOWN(_rpndb)
+{
+       if(rpn_db)
+               db_close(rpn_db);
+}
+
 void GenericCommand_rpn(int request, int argc, string command)
 {
        switch(request)
index 05064ca96742c395ab0beb863f6bffb186549867..c95bb2d73cf95e458a66485679e06b74f79357e5 100644 (file)
@@ -197,7 +197,7 @@ bool autocvar_debugdraw;
 #endif
 
 
-GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
+GENERIC_COMMAND(bufstr_get, "Examine a string buffer object", false)
 {
        switch (request)
        {
@@ -219,7 +219,7 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
 }
 
 
-GENERIC_COMMAND(version, "Print the current version")
+GENERIC_COMMAND(version, "Print the current version", false)
 {
        switch (request)
        {
@@ -241,7 +241,7 @@ GENERIC_COMMAND(version, "Print the current version")
 #ifdef CSQC
 void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517;
 #endif
-GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars")
+GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars", false)
 {
        switch (request)
        {
@@ -332,7 +332,7 @@ STATIC_INIT(TRACE_ENT)
 #endif
 
 
-GENERIC_COMMAND(find, "Search through entities for matching classname")
+GENERIC_COMMAND(find, "Search through entities for matching classname", false)
 {
        switch (request)
        {
@@ -363,7 +363,7 @@ GENERIC_COMMAND(find, "Search through entities for matching classname")
 }
 
 
-GENERIC_COMMAND(findat, "Search through entities for matching origin")
+GENERIC_COMMAND(findat, "Search through entities for matching origin", false)
 {
        switch (request)
        {
index 68c245db4a7df2674b7ceb79ddd061234b3ff7fd..79d31eb46bc5efdb473e4322a02b985101511401 100644 (file)
@@ -285,7 +285,7 @@ void effectinfo_dump(int fh, bool alsoprint)
     #undef WRITE
 }
 
-GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt")
+GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt", false)
 {
     switch (request) {
         case CMD_REQUEST_COMMAND: {
index 589e343c8df91ae795a94c1375903c429ae17296..359d3d8a532641c82a189b7d37855d1ec6293b3d 100644 (file)
@@ -19,22 +19,25 @@ REPLICATE(cvar_cl_casings, bool, "cl_casings");
 #ifdef SVQC
 void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner, .entity weaponentity)
 {
-       if (!(CS(casingowner).cvar_cl_casings))
-               return;
-
-    entity wep = casingowner.(weaponentity);
-    vector org = casingowner.origin + casingowner.view_ofs + wep.spawnorigin.x * v_forward - wep.spawnorigin.y * v_right + wep.spawnorigin.z * v_up;
-
-    if (!sound_allowed(MSG_BROADCAST, casingowner))
-        casingtype |= 0x80;
-
-    WriteHeader(MSG_ALL, casings);
-    WriteByte(MSG_ALL, casingtype);
-    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);
-    WriteByte(MSG_ALL, ang.z * 256 / 360);
+       entity wep = casingowner.(weaponentity);
+       vector org = casingowner.origin + casingowner.view_ofs + wep.spawnorigin.x * v_forward - wep.spawnorigin.y * v_right + wep.spawnorigin.z * v_up;
+
+       FOREACH_CLIENT(true, {
+               if (!(CS(it).cvar_cl_casings))
+                       continue;
+
+               msg_entity = it;
+               if (!sound_allowed(MSG_ONE, it))
+                       casingtype |= 0x80; // silent
+
+               WriteHeader(MSG_ONE, casings);
+               WriteByte(MSG_ONE, casingtype);
+               WriteVector(MSG_ONE, org);
+               WriteShort(MSG_ONE, compressShortVector(vel)); // actually compressed velocity
+               WriteByte(MSG_ONE, ang.x * 256 / 360);
+               WriteByte(MSG_ONE, ang.y * 256 / 360);
+               WriteByte(MSG_ONE, ang.z * 256 / 360);
+       });
 }
 #endif
 
@@ -153,6 +156,7 @@ NET_HANDLE(casings, bool isNew)
     casing.velocity = casing.velocity + 2 * prandomvec();
     casing.avelocity = '0 250 0' + 100 * prandomvec();
     set_movetype(casing, MOVETYPE_BOUNCE);
+    casing.bouncefactor = 0.25;
     settouch(casing, Casing_Touch);
     casing.move_time = time;
     casing.event_damage = Casing_Damage;
index 4653f4a956084108ac62bc36e9eb4b006389da1e..9fc46ff67537b6cbf42d9a33e03e467feda2772b 100644 (file)
                                if (GetPlayerSoundSampleField_notFound) field = GetVoiceMessageSampleField(key);
                                if (GetPlayerSoundSampleField_notFound)
                                {
-                                       LOG_TRACEF("Invalid sound info field: %s", key);
+                                       LOG_TRACEF("Invalid sound info field in player sound file '%s': %s", f, key);
                                        continue;
                                }
                                string file = argv(1);
index 8b1570f030053124aae84b13ee04ba92394ff471..b5631ed5fd246774277adb823dae760d31700b9d 100644 (file)
@@ -40,11 +40,11 @@ REGISTER_PLAYERSOUND(pain75)
 
 .bool instanceOfVoiceMessage;
 .int m_playersoundvt;
-#define REGISTER_VOICEMSG(id, vt) \
+#define REGISTER_VOICEMSG(id, vt, listed) \
        .string _playersound_##id; \
        REGISTER(PlayerSounds, playersound, id, m_id, new_pure(VoiceMessage)) \
        { \
-               this.instanceOfVoiceMessage = true; \
+               this.instanceOfVoiceMessage = listed; \
                this.m_playersoundstr = #id; \
                this.m_playersoundfld = _playersound_##id; \
                this.m_playersoundvt = vt; \
@@ -57,30 +57,30 @@ const int VOICETYPE_LASTATTACKER_ONLY = 13;
 const int VOICETYPE_AUTOTAUNT = 14;
 const int VOICETYPE_TAUNT = 15;
 
-REGISTER_VOICEMSG(attack, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(attackinfive, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(coverme, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(defend, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(freelance, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(incoming, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(meet, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(needhelp, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(seenflag, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(taunt, VOICETYPE_TAUNT)
-REGISTER_VOICEMSG(teamshoot, VOICETYPE_LASTATTACKER)
-
-// reserved sound names for the future (some models lack sounds for them):
-// _VOICEMSG(flagcarriertakingdamage)
-// _VOICEMSG(getflag)
-// reserved sound names for the future (ALL models lack sounds for them):
-// _VOICEMSG(affirmative)
-// _VOICEMSG(attacking)
-// _VOICEMSG(defending)
-// _VOICEMSG(roaming)
-// _VOICEMSG(onmyway)
-// _VOICEMSG(droppedflag)
-// _VOICEMSG(negative)
-// _VOICEMSG(seenenemy)
+REGISTER_VOICEMSG(attack, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(attackinfive, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(coverme, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(defend, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(freelance, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(incoming, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(meet, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(needhelp, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(seenflag, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(taunt, VOICETYPE_TAUNT, true)
+REGISTER_VOICEMSG(teamshoot, VOICETYPE_LASTATTACKER, true)
+
+//NOTE: some models lack sounds for these:
+REGISTER_VOICEMSG(flagcarriertakingdamage, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(getflag, VOICETYPE_TEAMRADIO, false)
+//NOTE: ALL models lack sounds for these (only available in default sounds currently):
+REGISTER_VOICEMSG(affirmative, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(attacking, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(defending, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(roaming, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(onmyway, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(droppedflag, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(negative, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(seenenemy, VOICETYPE_TEAMRADIO, false)
 
 .string m_globalsoundstr;
 REGISTRY(GlobalSounds, BITS(8) - 1)
index 03b2ec9d1d428a3c7dfce3b0d3cbcb2d5fe05bd1..aa05ea337b9bc2077315d6c94afe1b26f1dbe673 100644 (file)
@@ -1235,7 +1235,7 @@ void ctf_DelayedFlagSetup(entity this) // called after a flag is placed on a map
 
 .bool pushable;
 
-void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc
+void ctf_FlagSetup(int teamnum, entity flag) // called when spawning a flag entity on the map as a spawnfunc
 {
        // main setup
        flag.ctf_worldflagnext = ctf_worldflaglist; // link flag into ctf_worldflaglist
@@ -1243,8 +1243,8 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
 
        setattachment(flag, NULL, "");
 
-       flag.netname = strzone(sprintf("%s%s^7 flag", Team_ColorCode(teamnumber), Team_ColorName_Upper(teamnumber)));
-       flag.team = teamnumber;
+       flag.netname = strzone(sprintf("%s%s^7 flag", Team_ColorCode(teamnum), Team_ColorName_Upper(teamnum)));
+       flag.team = teamnum;
        flag.classname = "item_flag_team";
        flag.target = "###item###"; // for finding the nearest item using findnearest
        flag.flags = FL_ITEM | FL_NOTARGET;
@@ -1274,24 +1274,24 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
        if(autocvar_g_ctf_score_ignore_fields)
                flag.cnt = flag.score_assist = flag.score_team_capture = flag.score_capture = flag.score_drop = flag.score_pickup = flag.score_return = 0;
 
-       string teamname = Static_Team_ColorName_Lower(teamnumber);
+       string teamname = Static_Team_ColorName_Lower(teamnum);
        // appearence
        if(!flag.scale)                         { flag.scale = FLAG_SCALE; }
        if(flag.skin == 0)                      { flag.skin = cvar(sprintf("g_ctf_flag_%s_skin", teamname)); }
        if(flag.model == "")            { flag.model = cvar_string(sprintf("g_ctf_flag_%s_model", teamname)); }
-       if (flag.toucheffect == "") { flag.toucheffect = EFFECT_FLAG_TOUCH(teamnumber).eent_eff_name; }
-       if (flag.passeffect == "")      { flag.passeffect = EFFECT_PASS(teamnumber).eent_eff_name; }
-       if (flag.capeffect == "")       { flag.capeffect = EFFECT_CAP(teamnumber).eent_eff_name; }
+       if (flag.toucheffect == "") { flag.toucheffect = EFFECT_FLAG_TOUCH(teamnum).eent_eff_name; }
+       if (flag.passeffect == "")      { flag.passeffect = EFFECT_PASS(teamnum).eent_eff_name; }
+       if (flag.capeffect == "")       { flag.capeffect = EFFECT_CAP(teamnum).eent_eff_name; }
 
        // sounds
 #define X(s,b) \
                if(flag.s == "") flag.s = b; \
                precache_sound(flag.s);
 
-       X(snd_flag_taken,               strzone(SND(CTF_TAKEN(teamnumber))))
-       X(snd_flag_returned,    strzone(SND(CTF_RETURNED(teamnumber))))
-       X(snd_flag_capture,     strzone(SND(CTF_CAPTURE(teamnumber))))
-       X(snd_flag_dropped,     strzone(SND(CTF_DROPPED(teamnumber))))
+       X(snd_flag_taken,               strzone(SND(CTF_TAKEN(teamnum))))
+       X(snd_flag_returned,    strzone(SND(CTF_RETURNED(teamnum))))
+       X(snd_flag_capture,     strzone(SND(CTF_CAPTURE(teamnum))))
+       X(snd_flag_dropped,     strzone(SND(CTF_DROPPED(teamnum))))
        X(snd_flag_respawn,     strzone(SND(CTF_RESPAWN)))
        X(snd_flag_touch,               strzone(SND(CTF_TOUCH)))
        X(snd_flag_pass,                strzone(SND(CTF_PASS)))
@@ -1309,7 +1309,7 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
 
        if(autocvar_g_ctf_flag_glowtrails)
        {
-               switch(teamnumber)
+               switch(teamnum)
                {
                        case NUM_TEAM_1: flag.glow_color = 251; break;
                        case NUM_TEAM_2: flag.glow_color = 210; break;
@@ -1325,7 +1325,7 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
        if(autocvar_g_ctf_fullbrightflags) { flag.effects |= EF_FULLBRIGHT; }
        if(autocvar_g_ctf_dynamiclights)
        {
-               switch(teamnumber)
+               switch(teamnum)
                {
                        case NUM_TEAM_1: flag.effects |= EF_RED; break;
                        case NUM_TEAM_2: flag.effects |= EF_BLUE; break;
@@ -1387,7 +1387,7 @@ void havocbot_ctf_calculate_middlepoint()
                // for symmetrical editing of waypoints
                entity f1 = ctf_worldflaglist;
                entity f2 = f1.ctf_worldflagnext;
-               float m = -(f1.origin.y - f2.origin.y) / (f1.origin.x - f2.origin.x);
+               float m = -(f1.origin.y - f2.origin.y) / (max(f1.origin.x - f2.origin.x, FLOAT_EPSILON));
                float q = havocbot_middlepoint.y - m * havocbot_middlepoint.x;
                havocbot_symmetry_axis_m = m;
                havocbot_symmetry_axis_q = q;
index 54f6268e36da53d537e2effef2c5c72c62afadbf..89060694a6e365292951cedd4e885d50a876b10b 100644 (file)
@@ -472,15 +472,18 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
        if(!round_handler_IsRoundStarted())
                return true;
 
-       int n;
        entity player = M_ARGV(0, entity);
        //if (STAT(FROZEN, player) == FROZEN_NORMAL)
        //if(player.freezetag_frozen_timeout > 0 && time < player.freezetag_frozen_timeout)
                //player.iceblock.alpha = ICE_MIN_ALPHA + (ICE_MAX_ALPHA - ICE_MIN_ALPHA) * (player.freezetag_frozen_timeout - time) / (player.freezetag_frozen_timeout - player.freezetag_frozen_time);
 
+       if (!(frametime && IS_PLAYER(player)))
+               return true;
+
        entity reviving_players_last = NULL;
        entity reviving_players_first = NULL;
 
+       int n;
        if(player.freezetag_frozen_timeout > 0 && time >= player.freezetag_frozen_timeout)
                n = -1;
        else
index 0b8144deb7d5ae5cf147f2a326bbc727a55510c5..f3c140fd11472c37437644e22aa3c5fe56db721f 100644 (file)
@@ -350,6 +350,12 @@ MUTATOR_HOOKFUNCTION(ka, GiveFragsForKill)
        return true; // you deceptive little bugger ;3 This needs to be true in order for this function to even count.
 }
 
+MUTATOR_HOOKFUNCTION(ka, Scores_CountFragsRemaining)
+{
+       // announce remaining frags, but only when timed scoring is off
+       return !autocvar_g_keepaway_score_timepoints;
+}
+
 MUTATOR_HOOKFUNCTION(ka, PlayerPreThink)
 {
        entity player = M_ARGV(0, entity);
index 6f12f3cc0deba003059fb4207497a15362c0ed6b..9675634ec7b5c64780e8707421028ef821b7b11f 100644 (file)
@@ -313,15 +313,15 @@ void ons_DelayedLinkSetup(entity this)
 // Main Control Point Functions
 // =============================
 
-int ons_ControlPoint_CanBeLinked(entity cp, int teamnumber)
+int ons_ControlPoint_CanBeLinked(entity cp, int teamnum)
 {
-       if(cp.aregensneighbor & BIT(teamnumber)) return 2;
-       if(cp.arecpsneighbor & BIT(teamnumber)) return 1;
+       if(cp.aregensneighbor & BIT(teamnum)) return 2;
+       if(cp.arecpsneighbor & BIT(teamnum)) return 1;
 
        return 0;
 }
 
-int ons_ControlPoint_Attackable(entity cp, int teamnumber)
+int ons_ControlPoint_Attackable(entity cp, int teamnum)
        // -2: SAME TEAM, attackable by enemy!
        // -1: SAME TEAM!
        // 0: off limits
@@ -339,16 +339,16 @@ int ons_ControlPoint_Attackable(entity cp, int teamnumber)
        else if(cp.goalentity)
        {
                // if there's already an icon built, nothing happens
-               if(cp.team == teamnumber)
+               if(cp.team == teamnum)
                {
-                       a = ons_ControlPoint_CanBeLinked(cp, teamnumber);
+                       a = ons_ControlPoint_CanBeLinked(cp, teamnum);
                        if(a) // attackable by enemy?
                                return -2; // EMERGENCY!
                        return -1;
                }
                // we know it can be linked, so no need to check
                // but...
-               a = ons_ControlPoint_CanBeLinked(cp, teamnumber);
+               a = ons_ControlPoint_CanBeLinked(cp, teamnum);
                if(a == 2) // near our generator?
                        return 3; // EMERGENCY!
                return 1;
@@ -356,9 +356,9 @@ int ons_ControlPoint_Attackable(entity cp, int teamnumber)
        else
        {
                // free point
-               if(ons_ControlPoint_CanBeLinked(cp, teamnumber))
+               if(ons_ControlPoint_CanBeLinked(cp, teamnum))
                {
-                       a = ons_ControlPoint_CanBeLinked(cp, teamnumber); // why was this here NUM_TEAM_1 + NUM_TEAM_2 - t
+                       a = ons_ControlPoint_CanBeLinked(cp, teamnum); // why was this here NUM_TEAM_1 + NUM_TEAM_2 - t
                        if(a == 2)
                                return 4; // GET THIS ONE NOW!
                        else
@@ -1063,16 +1063,16 @@ void onslaught_generator_touch(entity this, entity toucher)
 void ons_GeneratorSetup(entity gen) // called when spawning a generator entity on the map as a spawnfunc
 {
        // declarations
-       int teamnumber = gen.team;
+       int teamnum = gen.team;
 
        // main setup
        gen.ons_worldgeneratornext = ons_worldgeneratorlist; // link generator into ons_worldgeneratorlist
        ons_worldgeneratorlist = gen;
 
-       gen.netname = sprintf("%s generator", Team_ColoredFullName(teamnumber));
+       gen.netname = sprintf("%s generator", Team_ColoredFullName(teamnum));
        gen.classname = "onslaught_generator";
        gen.solid = SOLID_BBOX;
-       gen.team_saved = teamnumber;
+       gen.team_saved = teamnum;
        IL_PUSH(g_saved_team, gen);
        set_movetype(gen, MOVETYPE_NONE);
        gen.lasthealth = gen.max_health = autocvar_g_onslaught_gen_health;
@@ -1094,7 +1094,7 @@ void ons_GeneratorSetup(entity gen) // called when spawning a generator entity o
        // model handled by CSQC
        setsize(gen, GENERATOR_MIN, GENERATOR_MAX);
        setorigin(gen, (gen.origin + CPGEN_SPAWN_OFFSET));
-       gen.colormap = 1024 + (teamnumber - 1) * 17;
+       gen.colormap = 1024 + (teamnum - 1) * 17;
 
        // generator placement
        droptofloor(gen);
index 7a9b192a5a7b041e313c807dd464b04d3e0c3e98..0800ae10fd1623edd71da495808ae2e20ef0024c 100644 (file)
@@ -67,7 +67,7 @@ float ons_notification_time[17];
 // declarations for functions used outside gamemode_onslaught.qc
 void ons_Generator_UpdateSprite(entity e);
 void ons_ControlPoint_UpdateSprite(entity e);
-bool ons_ControlPoint_Attackable(entity cp, int teamnumber);
+bool ons_ControlPoint_Attackable(entity cp, int teamnum);
 
 // CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet
 float ons_captureshield_force; // push force of the shield
index 3ff4a54155a3cccaf0ea91b69a38a02ac90c15dc..3ae473503db46e24d8f8877a2fb05cd998142082 100644 (file)
@@ -19,7 +19,7 @@ STATIC_INIT(Items) { FOREACH(Items, true, it.m_id = i); }
 
 void Dump_Items();
 
-GENERIC_COMMAND(dumpitems, "Dump all items to the console") {
+GENERIC_COMMAND(dumpitems, "Dump all items to the console", false) {
     switch (request) {
         case CMD_REQUEST_COMMAND: {
             Dump_Items();
index 017ada75c0288df84ce093b80dffefa8316a810c..9f0a43a0750959f08d1847886e09e88ea017673d 100644 (file)
@@ -42,7 +42,7 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
             .int fld = inv_items[it.m_id];
             int prev = this.(fld);
             int next = this.(fld) = ReadByte();
-            LOG_TRACEF("%s: %.0f -> %.0f", it.m_name, prev, next);
+            LOG_DEBUGF("%s: %.0f -> %.0f", it.m_name, prev, next);
         }
     }
     return true;
index 3e6478b2db50ca25a54716a137d75ca7ba01e4e6..64ab8dacaafa1c5f1748765566f7d00ef56bc90c 100644 (file)
@@ -9,10 +9,10 @@
     #include <common/monsters/_mod.qh>
 #endif
 
-bool autocvar_g_mapinfo_ignore_warnings;
 #ifdef MENUQC
-#define WARN_COND (!autocvar_g_mapinfo_ignore_warnings)
+#define WARN_COND false
 #else
+bool autocvar_g_mapinfo_ignore_warnings;
 #define WARN_COND (!autocvar_g_mapinfo_ignore_warnings && MapInfo_Map_bspname == mi_shortname)
 #endif
 
@@ -843,12 +843,6 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet
                                fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(it), _MapInfo_GetDefaultEx(it)));
                        });
 
-                       if(fexists(strcat("scripts/", pFilename, ".arena")))
-                               fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n");
-
-                       if(fexists(strcat("scripts/", pFilename, ".defi")))
-                               fputs(fh, "settemp_for_type all sv_vq3compat 1\n");
-
                        fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n");
                        fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
                        fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n");
@@ -1147,7 +1141,8 @@ string MapInfo_FixName(string s)
 int MapInfo_CurrentFeatures()
 {
        int req = 0;
-       if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_overkill") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball")))
+    // TODO: find a better way to check if weapons are required on the map
+       if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_overkill") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball") || cvar("g_ca")))
                req |= MAPINFO_FEATURE_WEAPONS;
        return req;
 }
index 32926d4908cfa8fff4941f31773a3725ccb90bbc..e92af677cc565dabd71a4177c94b17983f0ab6a0 100644 (file)
@@ -343,7 +343,7 @@ spawnfunc(func_breakable)
                this.dmg_force = 200;
 
        this.mdl = this.model;
-       SetBrushEntityModel(this);
+       SetBrushEntityModel(this, true);
 
        if(this.spawnflags & BREAKABLE_NODAMAGE)
                this.use = func_breakable_destroy;
index 56bfd4148d70bf7cde682bec1c83d4fb0f633d3a..423ac5e7b6d927f9fa2f8cdd42cf9797fe6b2f56 100644 (file)
@@ -206,6 +206,9 @@ spawnfunc(func_button)
        if (!this.lip)
                this.lip = 4;
 
+       if(this.wait == -1 && autocvar_sv_q3defragcompat)
+               this.wait = 0.1; // compatibility for q3df: "instant" return
+
     if(this.noise != "")
         precache_sound(this.noise);
 
index c765a4293b9e79c34fc5d922b6846058ebb3b440..644194c3541e982bba19d9108f451e2fa9399616 100644 (file)
@@ -36,7 +36,7 @@ spawnfunc(func_rain)
        this.angles = '0 0 0';
        set_movetype(this, MOVETYPE_NONE);
        this.solid = SOLID_NOT;
-       SetBrushEntityModel(this);
+       SetBrushEntityModel(this, true);
        if (!this.cnt)
        {
                this.cnt = 12;
@@ -76,7 +76,7 @@ spawnfunc(func_snow)
        this.angles = '0 0 0';
        set_movetype(this, MOVETYPE_NONE);
        this.solid = SOLID_NOT;
-       SetBrushEntityModel(this);
+       SetBrushEntityModel(this, true);
        if (!this.cnt)
        {
                this.cnt = 12;
index 44a13522a4c5b348dcf0bb224c5775b342c72292..18d033663eaff85541fadfffe49dcbf849370484 100644 (file)
@@ -168,7 +168,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 #define G_MODEL_INIT(ent,sol) \
        if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
        if(!ent.scale) ent.scale = ent.modelscale; \
-       SetBrushEntityModel(ent); \
+       SetBrushEntityModel(ent,true); \
        ent.use = g_model_setcolormaptoactivator; \
        InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
        if(!ent.solid) ent.solid = (sol); \
@@ -177,7 +177,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 #define G_CLIENTMODEL_INIT(ent,sol) \
        if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
        if(!ent.scale) ent.scale = ent.modelscale; \
-       SetBrushEntityModel(ent); \
+       SetBrushEntityModel(ent,true); \
        ent.use = g_clientmodel_use; \
        InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
        if(!ent.solid) ent.solid = (sol); \
index f9e50dcf8f19d819509c9c6a460050da0a120954..9adccb4924e3721a91ae31c4c6a4d90ff458e442 100644 (file)
@@ -398,7 +398,7 @@ void ApplyMinMaxScaleAngles(entity e)
                setsize(e, e.mins, e.maxs);
 }
 
-void SetBrushEntityModel(entity this)
+void SetBrushEntityModel(entity this, bool with_lod)
 {
        if(this.model != "")
        {
@@ -412,26 +412,11 @@ void SetBrushEntityModel(entity this)
                }
                else
                        _setmodel(this, this.model); // no precision needed
-               InitializeEntity(this, LODmodel_attach, INITPRIO_FINDTARGET);
-       }
-       setorigin(this, this.origin);
-       ApplyMinMaxScaleAngles(this);
-}
+               if(with_lod)
+                       InitializeEntity(this, LODmodel_attach, INITPRIO_FINDTARGET);
 
-void SetBrushEntityModelNoLOD(entity this)
-{
-       if(this.model != "")
-       {
-               precache_model(this.model);
-               if(this.mins != '0 0 0' || this.maxs != '0 0 0')
-               {
-                       vector mi = this.mins;
-                       vector ma = this.maxs;
-                       _setmodel(this, this.model); // no precision needed
-                       setsize(this, mi, ma);
-               }
-               else
-                       _setmodel(this, this.model); // no precision needed
+               if(endsWith(this.model, ".obj")) // WORKAROUND: darkplaces currently rotates .obj models on entities incorrectly, we need to add 180 degrees to the Y axis
+                       this.angles_y = anglemods(this.angles_y - 180);
        }
        setorigin(this, this.origin);
        ApplyMinMaxScaleAngles(this);
@@ -553,7 +538,7 @@ void InitTrigger(entity this)
 // to mean no restrictions, so use a yaw of 360 instead.
        SetMovedir(this);
        this.solid = SOLID_TRIGGER;
-       SetBrushEntityModelNoLOD(this);
+       SetBrushEntityModel(this, false);
        set_movetype(this, MOVETYPE_NONE);
        this.modelindex = 0;
        this.model = "";
@@ -565,7 +550,7 @@ void InitSolidBSPTrigger(entity this)
 // to mean no restrictions, so use a yaw of 360 instead.
        SetMovedir(this);
        this.solid = SOLID_BSP;
-       SetBrushEntityModelNoLOD(this);
+       SetBrushEntityModel(this, false);
        set_movetype(this, MOVETYPE_NONE); // why was this PUSH? -div0
 //     this.modelindex = 0;
        this.model = "";
@@ -576,7 +561,7 @@ bool InitMovingBrushTrigger(entity this)
 // trigger angles are used for one-way touches.  An angle of 0 is assumed
 // to mean no restrictions, so use a yaw of 360 instead.
        this.solid = SOLID_BSP;
-       SetBrushEntityModel(this);
+       SetBrushEntityModel(this, true);
        set_movetype(this, MOVETYPE_PUSH);
        if(this.modelindex == 0)
        {
index 861d73e72f28d6522ea9c488d91a6ae465f6a87d..c1d4d06e56f276cc1bff37f9d93e7e250f01788b 100644 (file)
@@ -115,9 +115,7 @@ void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed,
 #ifdef SVQC
 void ApplyMinMaxScaleAngles(entity e);
 
-void SetBrushEntityModel(entity this);
-
-void SetBrushEntityModelNoLOD(entity this);
+void SetBrushEntityModel(entity this, bool with_lod);
 
 int autocvar_loddebug;
 .string lodtarget1;
index ccdf2c7d0b96a291086be949e2c53db8180b725d..8c21c509c5643419bb937d1d4170a81d711f12df 100644 (file)
@@ -25,7 +25,7 @@ void trigger_hurt_touch(entity this, entity toucher)
                if (toucher.triggerhurttime < time)
                {
                        EXACTTRIGGER_TOUCH(this, toucher);
-                       toucher.triggerhurttime = time + ((autocvar_sv_vq3compat && !(this.spawnflags & HURT_SLOW)) ? 0.1 : 1);
+                       toucher.triggerhurttime = time + ((autocvar_sv_q3defragcompat && !(this.spawnflags & HURT_SLOW)) ? 0.1 : 1);
 
                        entity own;
                        own = this.enemy;
@@ -66,7 +66,7 @@ spawnfunc(trigger_hurt)
        this.use = trigger_hurt_use;
        this.enemy = world; // I hate you all
        if (!this.dmg)
-               this.dmg = ((autocvar_sv_vq3compat) ? 5 : 10000);
+               this.dmg = ((autocvar_sv_q3defragcompat) ? 5 : 10000);
        if (this.message == "")
                this.message = "was in the wrong place";
        if (this.message2 == "")
index f438fbf01f5f8295032f45aa8e76647825377b04..2c160eae95e8a05e75f1ead2512b81c257716242 100644 (file)
@@ -36,8 +36,8 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity p
        torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5;
 
        grav = PHYS_GRAVITY(NULL);
-       if(pushed_entity && PHYS_ENTGRAVITY(pushed_entity))
-               grav *= PHYS_ENTGRAVITY(pushed_entity);
+       if(pushed_entity && pushed_entity.gravity)
+               grav *= pushed_entity.gravity;
 
        zdist = torg.z - org.z;
        sdist = vlen(torg - org - zdist * '0 0 1');
@@ -135,9 +135,9 @@ bool jumppad_push(entity this, entity targ)
 
        vector org = targ.origin;
 #ifdef SVQC
-       if(autocvar_sv_vq3compat)
+       if(autocvar_sv_q3defragcompat)
 #elif defined(CSQC)
-       if(STAT(VQ3COMPAT))
+       if(STAT(Q3DEFRAGCOMPAT))
 #endif
        {
                org.z += targ.mins_z;
index c71dc3794822d5f41094411a7a6f3242b904219f..df915a649695c34ade16a31051dc9bdb6ce02b32 100644 (file)
@@ -176,6 +176,9 @@ spawnfunc(trigger_multiple)
                this.wait = 0;
        this.use = multi_use;
 
+       if(this.wait == -1 && autocvar_sv_q3defragcompat)
+               this.wait = 0.1; // compatibility for q3df: "instant" return
+
        EXACTTRIGGER_INIT;
 
        this.team_saved = this.team;
index b684af15255e66efc70d9580e34f90c3dea825f4..d9a51c05e9a4649718deac200f0e5f4beeff9b6a 100644 (file)
@@ -66,6 +66,7 @@ METHOD(SpiderAttack, wr_think, void(SpiderAttack thiswep, entity actor, .entity
                        actor.anim_finished = time + 1;
                }
         if (isPlayer) actor.enemy = Monster_FindTarget(actor);
+        monster_makevectors(actor, actor.enemy);
         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);
index d07669af0ea1861edcb230d86cc27cb151b5d8d7..4de122e8494419205178cc87dc74f77957699c7f 100644 (file)
@@ -18,6 +18,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity
     TC(WyvernAttack, thiswep);
     if (fire & 1)
     if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, weaponentity, false, 1.2)) {
+       monster_makevectors(actor, actor.enemy);
         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.attack_finished_single[0] = time + 1.2;
index cf858487058de2bbeac734fff836481bae3e4504..6ee9574d057ed13876ea96d22e8ac7bc1dd72f42 100644 (file)
@@ -112,3 +112,11 @@ MUTATOR_HOOKABLE(WeaponSound, EV_WeaponSound);
     /**/          o(string, MUTATOR_ARGV_1_string) \
     /**/
 MUTATOR_HOOKABLE(WeaponModel, EV_WeaponModel);
+
+/** decides whether a player can crouch or not */
+#define EV_PlayerCanCrouch(i, o) \
+    /** player */      i(entity, MUTATOR_ARGV_0_entity) \
+    /** do_crouch */   i(bool, MUTATOR_ARGV_1_bool) \
+    /**/               o(bool, MUTATOR_ARGV_1_bool) \
+    /**/
+MUTATOR_HOOKABLE(PlayerCanCrouch, EV_PlayerCanCrouch);
index 768808db71f1cb41d9acf29090865a5c7d35a09c..16e6308acf9d39e466c350241b96d3ece7f990e6 100644 (file)
@@ -1,4 +1,2 @@
 // generated file; do not modify
-#ifdef SVQC
-    #include <common/mutators/mutator/bloodloss/sv_bloodloss.qc>
-#endif
+#include <common/mutators/mutator/bloodloss/bloodloss.qc>
index e6ad248c622d6aaad3d8f0e2b93744037e9c5577..b1d45e2791b07d3e3d1b8572fed442328348f863 100644 (file)
@@ -1,4 +1,2 @@
 // generated file; do not modify
-#ifdef SVQC
-    #include <common/mutators/mutator/bloodloss/sv_bloodloss.qh>
-#endif
+#include <common/mutators/mutator/bloodloss/bloodloss.qh>
diff --git a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc
new file mode 100644 (file)
index 0000000..2a0ebec
--- /dev/null
@@ -0,0 +1,70 @@
+#include "bloodloss.qh"
+
+#ifdef GAMEQC
+#ifdef SVQC
+REGISTER_MUTATOR(bloodloss, autocvar_g_bloodloss);
+#elif defined(CSQC)
+REGISTER_MUTATOR(bloodloss, true);
+#endif
+
+#ifdef SVQC
+.float bloodloss_timer;
+
+MUTATOR_HOOKFUNCTION(bloodloss, PlayerPreThink)
+{
+       entity player = M_ARGV(0, entity);
+
+       if(game_stopped)
+               return; // during intermission, the player's health changes to strange values for the engine, let's not cause damage during this phase!
+
+       if(IS_PLAYER(player))
+       if(GetResource(player, RES_HEALTH) <= autocvar_g_bloodloss && !IS_DEAD(player) && time >= player.bloodloss_timer)
+       {
+               if(player.vehicle)
+                       vehicles_exit(player.vehicle, VHEF_RELEASE); // TODO: boots player out of their vehicle each health rot tick!
+               if(player.event_damage)
+                       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;
+       }
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss, PlayerCanCrouch)
+{
+       entity player = M_ARGV(0, entity);
+       if(GetResource(player, RES_HEALTH) <= autocvar_g_bloodloss)
+               M_ARGV(1, bool) = true; // do_crouch
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump)
+{
+       entity player = M_ARGV(0, entity);
+
+       if(GetResource(player, RES_HEALTH) <= autocvar_g_bloodloss)
+               return true;
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsString)
+{
+       M_ARGV(0, string) = strcat(M_ARGV(0, string), ":bloodloss");
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsPrettyString)
+{
+       M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Blood loss");
+}
+#endif
+
+#ifdef CSQC
+MUTATOR_HOOKFUNCTION(bloodloss, PlayerCanCrouch)
+{
+       if(STAT(HEALTH) <= STAT(BLOODLOSS))
+               M_ARGV(1, bool) = true; // do_crouch
+}
+MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump)
+{
+       if(STAT(HEALTH) <= STAT(BLOODLOSS))
+               return true;
+}
+#endif
+
+#endif
diff --git a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc b/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc
deleted file mode 100644 (file)
index a89691d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "sv_bloodloss.qh"
-
-float autocvar_g_bloodloss;
-REGISTER_MUTATOR(bloodloss, autocvar_g_bloodloss);
-
-.float bloodloss_timer;
-
-MUTATOR_HOOKFUNCTION(bloodloss, PlayerPreThink)
-{
-       entity player = M_ARGV(0, entity);
-
-       if(IS_PLAYER(player))
-       if(GetResource(player, RES_HEALTH) <= autocvar_g_bloodloss && !IS_DEAD(player))
-       {
-               PHYS_INPUT_BUTTON_CROUCH(player) = true;
-
-               if(time >= player.bloodloss_timer)
-               {
-                       if(player.vehicle)
-                               vehicles_exit(player.vehicle, VHEF_RELEASE);
-                       if(player.event_damage)
-                               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;
-               }
-       }
-}
-
-MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump)
-{
-       entity player = M_ARGV(0, entity);
-
-       if(GetResource(player, RES_HEALTH) <= autocvar_g_bloodloss)
-               return true;
-}
-
-MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsString)
-{
-       M_ARGV(0, string) = strcat(M_ARGV(0, string), ":bloodloss");
-}
-
-MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsPrettyString)
-{
-       M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Blood loss");
-}
diff --git a/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qh b/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qh
deleted file mode 100644 (file)
index 6f70f09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
index 0c9b8890189c7337f774db335c7555c5d40eaea2..a65532307c1132a56680e3a9988289d276cf38fd 100644 (file)
@@ -57,6 +57,7 @@ REGISTER_BUFF(BASH) {
     this.m_color = '1 0.39 0';
 }
 BUFF_SPAWNFUNCS(bash, BUFF_BASH)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler, BUFF_BASH)
 
 REGISTER_BUFF(VAMPIRE) {
     this.m_name = _("Vampire");
index 256af90affb3650cfc444b0e9d33827af1504ab1..f1a14916611f244ae9878afb0f19b3368dfeef5a 100644 (file)
@@ -227,7 +227,8 @@ void buff_NewType(entity ent)
        FOREACH(Buffs, buff_Available(it),
        {
                // if it's already been chosen, give it a lower priority
-               RandomSelection_AddEnt(it, max(0.2, 1 / it.buff_seencount), 1);
+               float myseencount = (it.buff_seencount > 0) ? it.buff_seencount : 1; // no division by zero please!
+               RandomSelection_AddEnt(it, max(0.2, 1 / myseencount), 1);
        });
        entity newbuff = RandomSelection_chosen_ent;
        newbuff.buff_seencount += 1; // lower chances of seeing this buff again soon
@@ -271,7 +272,7 @@ void buff_Think(entity this)
        {
                buff_SetCooldown(this, autocvar_g_buffs_cooldown_respawn + frametime);
                this.owner = NULL;
-               if(autocvar_g_buffs_randomize)
+               if(autocvar_g_buffs_randomize && (!teamplay || autocvar_g_buffs_randomize_teamplay))
                        buff_NewType(this);
 
                if(autocvar_g_buffs_random_location || (this.spawnflags & 64))
@@ -315,7 +316,7 @@ void buff_Waypoint_Reset(entity this)
 
 void buff_Reset(entity this)
 {
-       if(autocvar_g_buffs_randomize)
+       if(autocvar_g_buffs_randomize && (!teamplay || autocvar_g_buffs_randomize_teamplay))
                buff_NewType(this);
        this.owner = NULL;
        buff_SetCooldown(this, autocvar_g_buffs_cooldown_activate);
index 671a524f9eea2132f773c333c35b06ee3d02431d..88efc94ebb298e7df9158a872a274abb22e14fce 100644 (file)
@@ -9,6 +9,7 @@ float autocvar_g_buffs_waypoint_distance;
 bool autocvar_g_buffs_pickup_anyway = false;
 float autocvar_g_buffs_pickup_delay = 0.7;
 bool autocvar_g_buffs_randomize;
+bool autocvar_g_buffs_randomize_teamplay = true;
 float autocvar_g_buffs_random_lifetime;
 bool autocvar_g_buffs_random_location;
 int autocvar_g_buffs_random_location_attempts;
index 67e3d4ad1c02ccb86afa812b194ada6bf25e43c2..510fcf92e19345ca2d371d574f598af356a849df 100644 (file)
@@ -1347,44 +1347,47 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
                }
        }
 
-       int n = 0;
-
-       IntrusiveList reviving_players = NULL;
-
-       if(player.freezetag_frozen_timeout > 0 && time >= player.freezetag_frozen_timeout)
-               n = -1;
-       else if (STAT(FROZEN, player) == FROZEN_TEMP_DYING)
+       if (frametime && IS_PLAYER(player))
        {
-               vector revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
-               n = 0;
-               FOREACH_CLIENT(IS_PLAYER(it) && IS_REVIVING(player, it, revive_extra_size), {
-                       if (!reviving_players)
-                               reviving_players = IL_NEW();
-                       IL_PUSH(reviving_players, it);
-                       ++n;
-               });
-       }
+               int n = 0;
 
-       if (n > 0 && STAT(FROZEN, player) == FROZEN_TEMP_DYING) // OK, there is at least one teammate reviving us
-       {
-               STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
-               SetResource(player, RES_HEALTH, max(1, STAT(REVIVE_PROGRESS, player) * start_health));
+               IntrusiveList reviving_players = NULL;
 
-               if(STAT(REVIVE_PROGRESS, player) >= 1)
+               if(player.freezetag_frozen_timeout > 0 && time >= player.freezetag_frozen_timeout)
+                       n = -1;
+               else if (STAT(FROZEN, player) == FROZEN_TEMP_DYING)
                {
-                       Unfreeze(player, false);
-
-                       entity first = IL_FIRST(reviving_players);
-                       Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_REVIVED, first.netname);
-                       Send_Notification(NOTIF_ONE, first, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname);
+                       vector revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
+                       n = 0;
+                       FOREACH_CLIENT(IS_PLAYER(it) && IS_REVIVING(player, it, revive_extra_size), {
+                               if (!reviving_players)
+                                       reviving_players = IL_NEW();
+                               IL_PUSH(reviving_players, it);
+                               ++n;
+                       });
                }
 
-               IL_EACH(reviving_players, true, {
-                       STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
-               });
+               if (n > 0 && STAT(FROZEN, player) == FROZEN_TEMP_DYING) // OK, there is at least one teammate reviving us
+               {
+                       STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
+                       SetResource(player, RES_HEALTH, max(1, STAT(REVIVE_PROGRESS, player) * start_health));
+
+                       if(STAT(REVIVE_PROGRESS, player) >= 1)
+                       {
+                               Unfreeze(player, false);
+
+                               entity first = IL_FIRST(reviving_players);
+                               Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_REVIVED, first.netname);
+                               Send_Notification(NOTIF_ONE, first, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname);
+                       }
+
+                       IL_EACH(reviving_players, true, {
+                               STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
+                       });
+               }
+               if (reviving_players)
+                       IL_DELETE(reviving_players);
        }
-       if (reviving_players)
-               IL_DELETE(reviving_players);
 }
 
 MUTATOR_HOOKFUNCTION(nades, PlayerPhysics_UpdateStats)
index c462a7e2b7c869398e733019a107f69049d16472..519159d917b386b9488261845caeed486f4f378c 100644 (file)
@@ -23,10 +23,12 @@ vector PlayerTouchWall(entity this)
 
        float dist = 10, max_normal = 0.2, scaler = 100;
        vector start = this.origin;
-       TRACE(start + v_forward * scaler)
-       TRACE(start - v_forward * scaler)
-       TRACE(start + v_right * scaler)
-       TRACE(start - v_right * scaler)
+       vector forward, right, _up;
+       MAKE_VECTORS(this.angles, forward, right, _up);
+       TRACE(start + forward * scaler)
+       TRACE(start - forward * scaler)
+       TRACE(start + right * scaler)
+       TRACE(start - right * scaler)
 #undef TRACE
        return '0 0 0';
 }
index a9e1c5f57dd2996c7f5c6cf79b365cd11de84d60..0b4fe28ff33bfde36cb81653d0cac7ac3c291ae5 100644 (file)
@@ -296,7 +296,7 @@ void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, ve
     v4 = Rotate(v4, rot) + org;
 
     // draw them
-    R_BeginPolygon(pic, f);
+    R_BeginPolygon(pic, f, true);
     R_PolygonVertex(v1, '0 0 0', rgb, a);
     R_PolygonVertex(v2, '1 0 0', rgb, a);
     R_PolygonVertex(v3, '1 1 0', rgb, a);
@@ -306,7 +306,7 @@ void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, ve
 
 void drawquad(vector o, vector ri, vector up, string pic, vector rgb, float a, float f)
 {
-    R_BeginPolygon(pic, f);
+    R_BeginPolygon(pic, f, true);
     R_PolygonVertex(o, '0 0 0', rgb, a);
     R_PolygonVertex(o + ri, '1 0 0', rgb, a);
     R_PolygonVertex(o + up + ri, '1 1 0', rgb, a);
@@ -354,7 +354,7 @@ vector drawspritearrow(vector o, float ang, vector rgb, float a, float t)
     vector borderX = eX * (size+borderDiag);
     vector borderY = eY * (size+borderDiag+border);
 
-    R_BeginPolygon("", DRAWFLAG_NORMAL);
+    R_BeginPolygon("", DRAWFLAG_NORMAL, true);
     R_PolygonVertex(o,                                  '0 0 0', '0 0 0', a);
     R_PolygonVertex(o + Rotate(arrowY  - borderX, ang), '0 0 0', '0 0 0', a);
     R_PolygonVertex(o + Rotate(borderY - borderX, ang), '0 0 0', '0 0 0', a);
@@ -362,7 +362,7 @@ vector drawspritearrow(vector o, float ang, vector rgb, float a, float t)
     R_PolygonVertex(o + Rotate(arrowY  + borderX, ang), '0 0 0', '0 0 0', a);
     R_EndPolygon();
 
-    R_BeginPolygon("", DRAWFLAG_ADDITIVE);
+    R_BeginPolygon("", DRAWFLAG_ADDITIVE, true);
     R_PolygonVertex(o + Rotate(eY * borderDiag, ang), '0 0 0', rgb, a);
     R_PolygonVertex(o + Rotate(arrowY - arrowX, ang), '0 0 0', rgb, a);
     R_PolygonVertex(o + Rotate(arrowY + arrowX, ang), '0 0 0', rgb, a);
index ee39b1881ab100937221ae3604d1cac68bb817ae..7c341293b958fba3bc963d59eaa65f727553ec79 100644 (file)
@@ -160,7 +160,7 @@ void Create_Notification_Entity_Choice(entity notif,
 
 void Dump_Notifications(int fh, bool alsoprint);
 
-GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt")
+GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt", false)
 {
        switch (request)
        {
@@ -864,8 +864,8 @@ REGISTRY_END(Notifications)
 void ReplicateVars(bool would_destroy)
 {
        if (!would_destroy)
-               FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
-                       string cvarname = sprintf("notification_%s", Get_Notif_CvarName(it));
+               FOREACH(Notifications, it.nent_type == MSG_CHOICE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
+                       string cvarname = strcat("notification_", Get_Notif_CvarName(it));
                        // NOTE: REPLICATE_SIMPLE can return;
                        REPLICATE_SIMPLE(it.cvar_value, cvarname);
                });
index 8eb2277d54ad9cd2b98c2d9dc5d2199725245c7c..bbd86d62e3f0a25074751573f0322b9341f17fa6 100644 (file)
@@ -54,7 +54,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepno
        if(applygravity)
        {
                this.move_didgravity = 1;
-               grav = dt * (PHYS_ENTGRAVITY(this) ? PHYS_ENTGRAVITY(this) : 1) * PHYS_GRAVITY(this);
+               grav = dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
 
                if(!GAMEPLAYFIX_NOGRAVITYONGROUND || !IS_ONGROUND(this))
                {
@@ -324,10 +324,13 @@ void _Movetype_CheckWaterTransition(entity ent)  // SV_CheckWaterTransition
 
 void _Movetype_Impact(entity this, entity oth)  // SV_Impact
 {
-       if(gettouch(this))
+       if(!this && !oth)
+               return;
+
+       if(this.solid != SOLID_NOT && gettouch(this))
                gettouch(this)(this, oth);
 
-       if(gettouch(oth))
+       if(oth.solid != SOLID_NOT && gettouch(oth))
                gettouch(oth)(oth, this);
 }
 
@@ -414,16 +417,20 @@ bool _Movetype_TestEntityPosition(vector ofs)  // SV_TestEntityPosition
     entity this = _Movetype_TestEntityPosition_ent;
        vector org = this.origin + ofs;
 
-       int cont = this.dphitcontentsmask;
-       this.dphitcontentsmask = DPCONTENTS_SOLID;
+       //int cont = this.dphitcontentsmask;
+       //this.dphitcontentsmask = DPCONTENTS_SOLID;
        tracebox(org, this.mins, this.maxs, org, ((this.move_movetype == MOVETYPE_FLY_WORLDONLY) ? MOVE_WORLDONLY : MOVE_NOMONSTERS), this);
-       this.dphitcontentsmask = cont;
+       //this.dphitcontentsmask = cont;
 
        if(trace_startsolid)
                return true;
 
        if(vdist(trace_endpos - this.origin, >, 0.0001))
-               this.origin = trace_endpos;
+       {
+               tracebox(trace_endpos, this.mins, this.maxs, trace_endpos, MOVE_NOMONSTERS, this);
+               if(!trace_startsolid)
+                       this.origin = trace_endpos;
+       }
        return false;
 }
 
@@ -434,6 +441,7 @@ int _Movetype_UnstickEntity(entity this)  // SV_UnstickEntity
            return UNSTICK_FINE;
        }
        #define X(v) if (_Movetype_TestEntityPosition(v))
+       X('0  0  -1') X(' 0  0  1')
        X('-1  0  0') X(' 1  0  0')
        X(' 0 -1  0') X(' 0  1  0')
        X('-1 -1  0') X(' 1 -1  0')
@@ -443,7 +451,7 @@ int _Movetype_UnstickEntity(entity this)  // SV_UnstickEntity
         #define X(i) \
             if (_Movetype_TestEntityPosition('0 0 -1' * i)) \
             if (_Movetype_TestEntityPosition('0 0 1' * i))
-        X(1) X(2) X(3) X(4) X(5) X(6) X(7) X(8)
+        X(2) X(3) X(4) X(5) X(6) X(7) X(8)
         X(9) X(10) X(11) X(12) X(13) X(14) X(15) X(16)
         X(17)
         #undef X
@@ -455,7 +463,7 @@ int _Movetype_UnstickEntity(entity this)  // SV_UnstickEntity
        }
        LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)",
                etof(this), this.classname, vtos(this.origin));
-       _Movetype_LinkEdict(this, true);
+       _Movetype_LinkEdict(this, false);
        return UNSTICK_FIXED;
 }
 
@@ -526,12 +534,10 @@ bool _Movetype_PushEntity(entity this, vector push, bool failonstartsolid, bool
 
        vector last_origin = this.origin;
 
-       if(dolink)
-               _Movetype_LinkEdict(this, true);
+       _Movetype_LinkEdict(this, dolink);
 
-       if(trace_fraction < 1)
-               if(this.solid >= SOLID_TRIGGER && trace_ent && (!IS_ONGROUND(this) || (this.groundentity != trace_ent)))
-                       _Movetype_Impact(this, trace_ent);
+       if((this.solid >= SOLID_TRIGGER && trace_fraction < 1 && (!IS_ONGROUND(this) || this.groundentity != trace_ent)))
+               _Movetype_Impact(this, trace_ent);
 
        return (this.origin == last_origin); // false if teleported by touch
 }
@@ -657,12 +663,14 @@ void Movetype_Physics_MatchServer(entity this, bool sloppy)
        Movetype_Physics_MatchTicrate(this, TICRATE, sloppy);
 }
 
+// saved .move_*
 .vector tic_origin;
 .vector tic_velocity;
 .int tic_flags;
 .vector tic_avelocity;
 .vector tic_angles;
 
+// saved .*
 .vector tic_saved_origin;
 .vector tic_saved_velocity;
 .int tic_saved_flags;
@@ -670,6 +678,8 @@ void Movetype_Physics_MatchServer(entity this, bool sloppy)
 .vector tic_saved_angles;
 void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Physics_Entity
 {
+       // this hack exists to contain the physics feature
+       // (so entities can place themselves in the world and not need to update .tic_* themselves)
 #define X(s) \
        if(this.(s) != this.tic_saved_##s) \
                this.tic_##s = this.(s)
@@ -681,19 +691,15 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
        X(angles);
 #undef X
 
+       this.flags = this.tic_flags;
+       this.velocity = this.tic_velocity;
+       setorigin(this, this.tic_origin);
+       this.avelocity = this.tic_avelocity;
+       this.angles = this.tic_angles;
+
        if(tr <= 0)
        {
-               this.flags = this.tic_flags;
-               this.velocity = this.tic_velocity;
-               this.origin = this.tic_origin;
-               this.avelocity = this.tic_avelocity;
-               this.angles = this.tic_angles;
                Movetype_Physics_NoMatchServer(this);
-               this.tic_origin = this.origin;
-               this.tic_velocity = this.velocity;
-               this.tic_avelocity = this.avelocity;
-               this.tic_angles = this.angles;
-               this.tic_flags = this.flags;
 
                this.tic_saved_flags = this.flags;
                this.tic_saved_velocity = this.velocity;
@@ -712,23 +718,27 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
        if(!this.move_didgravity)
                this.move_didgravity = ((this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS) && !(this.tic_flags & FL_ONGROUND));
 
-       for (int i = 0; i < n; ++i)
+       for (int j = 0; j < n; ++j)
        {
-               this.flags = this.tic_flags;
-               this.velocity = this.tic_velocity;
-               setorigin(this, this.tic_origin);
-               this.avelocity = this.tic_avelocity;
-               this.angles = this.tic_angles;
                _Movetype_Physics_Frame(this, tr);
-               this.tic_origin = this.origin;
-               this.tic_velocity = this.velocity;
-               this.tic_avelocity = this.avelocity;
-               this.tic_angles = this.angles;
-               this.tic_flags = this.flags;
                if(wasfreed(this))
                        return;
        }
 
+       // update the physics fields
+       this.tic_origin = this.origin;
+       this.tic_velocity = this.velocity;
+       this.tic_avelocity = this.avelocity;
+       this.tic_angles = this.angles;
+       this.tic_flags = this.flags;
+
+       // restore their actual values
+       this.flags = this.tic_saved_flags;
+       this.velocity = this.tic_saved_velocity;
+       setorigin(this, this.tic_saved_origin);
+       //this.avelocity = this.tic_saved_avelocity;
+       this.angles = this.tic_saved_angles;
+
        this.avelocity = this.tic_avelocity;
 
        if(dt > 0 && this.move_movetype != MOVETYPE_NONE && !(this.tic_flags & FL_ONGROUND))
@@ -740,7 +750,7 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
                {
                        this.velocity_z -= (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE ? 0.5 : 1)
                            * dt
-                           * (this.gravity ? this.gravity : 1)
+                           * ((this.gravity) ? this.gravity : 1)
                            * PHYS_GRAVITY(this);
                }
 
@@ -752,16 +762,16 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
                }
                else
                {
-                       vector oldorg = this.origin;
-                       this.origin = this.tic_origin;
+                       setorigin(this, this.tic_origin);
                        _Movetype_PushEntityTrace(this, dt * this.velocity);
-                       this.origin = oldorg;
                        if(!trace_startsolid)
                                setorigin(this, trace_endpos);
+                       else
+                               setorigin(this, this.tic_saved_origin);
                }
 
                if(this.move_didgravity > 0 && GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE)
-                       this.velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
+                       this.velocity_z -= 0.5 * dt * ((this.gravity) ? this.gravity : 1) * PHYS_GRAVITY(this);
        }
        else
        {
@@ -770,6 +780,8 @@ void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)  // SV_Ph
                setorigin(this, this.tic_origin);
        }
 
+       this.flags = this.tic_flags;
+
        this.tic_saved_flags = this.flags;
        this.tic_saved_velocity = this.velocity;
        this.tic_saved_origin = this.origin;
index 51da5e730c1169de3b2552b93953d0b68b0720b2..0c8bc694850a40fe3aac357936ab7067231606f7 100644 (file)
@@ -19,8 +19,13 @@ const int WATERLEVEL_SUBMERGED = 3;
 #define GAMEPLAYFIX_STEPMULTIPLETIMES(s)    STAT(GAMEPLAYFIX_STEPMULTIPLETIMES)
 #define GAMEPLAYFIX_UNSTICKPLAYERS(s)       STAT(GAMEPLAYFIX_UNSTICKPLAYERS)
 #define GAMEPLAYFIX_WATERTRANSITION(s)                 STAT(GAMEPLAYFIX_WATERTRANSITION)
+#define GAMEPLAYFIX_SLIDEMOVEPROJECTILES(s) STAT(GAMEPLAYFIX_SLIDEMOVEPROJECTILES)
+#define GAMEPLAYFIX_GRENADEBOUNCESLOPES(s)     STAT(GAMEPLAYFIX_GRENADEBOUNCESLOPES)
+#define GAMEPLAYFIX_NOAIRBORNCORPSE(s)                 STAT(GAMEPLAYFIX_NOAIRBORNCORPSE)
+#define NOAIRBORNCORPSE_ALLOWSUSPENDED(s)      STAT(NOAIRBORNCORPSE_ALLOWSUSPENDED)
 #define UPWARD_VELOCITY_CLEARS_ONGROUND(s)  STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND)
 
+
 #define PHYS_STEPHEIGHT(s)                  STAT(MOVEVARS_STEPHEIGHT)
 #define PHYS_NOSTEP(s)                      STAT(NOSTEP)
 #define PHYS_JUMPSTEP(s)                    STAT(MOVEVARS_JUMPSTEP)
index fc3de0859bba0a22e91c87afec51e63384d8fd59..772eb1b070c59a2be0df4aa72df5bc904e115838 100644 (file)
@@ -2,19 +2,26 @@
 
 void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
 {
-       if (IS_ONGROUND(this))
+       if(IS_ONGROUND(this))
        {
-               if (this.velocity.z >= 1 / 32 && UPWARD_VELOCITY_CLEARS_ONGROUND(this))
+               if(this.velocity.z >= (1 / 32) && UPWARD_VELOCITY_CLEARS_ONGROUND(this))
                {
+                       // don't stick to ground if onground and moving upward
                        UNSET_ONGROUND(this);
                }
-               else if (!this.groundentity)
+               else if(!this.groundentity || !GAMEPLAYFIX_NOAIRBORNCORPSE(this))
                {
                        return;
                }
-               else if (this.move_suspendedinair && wasfreed(this.groundentity))
+               else if(this.move_suspendedinair && wasfreed(this.groundentity))
                {
                        this.groundentity = NULL;
+                       if(NOAIRBORNCORPSE_ALLOWSUSPENDED(this))
+                               return;
+               }
+               else if(boxesoverlap(this.absmin, this.absmax, this.groundentity.absmin, this.groundentity.absmax))
+               {
+                       // don't slide if still touching the groundentity
                        return;
                }
        }
@@ -23,35 +30,37 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
 
        _Movetype_CheckVelocity(this);
 
-       /*if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS)
+       if(this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS)
        {
-               this.move_didgravity = 1;
+               this.move_didgravity = true;
                this.velocity_z -= (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE ? 0.5 : 1)
                    * dt
-                   * (this.gravity ? this.gravity : 1)
+                   * ((this.gravity) ? this.gravity : 1)
                    * PHYS_GRAVITY(this);
-       }*/
+       }
 
-       if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS)
+       /*if (this.move_movetype == MOVETYPE_BOUNCE || this.move_movetype == MOVETYPE_TOSS)
        {
                this.move_didgravity = true;
                this.velocity_z -= (((this.gravity) ? this.gravity : 1) * PHYS_GRAVITY(this) * dt);
-       }
+       }*/
 
        this.angles = this.angles + this.avelocity * dt;
 
        float movetime = dt;
-       for (int bump = 0; bump < MAX_CLIP_PLANES && movetime > 0; ++bump)
+       for (int bump = 0; bump < MAX_CLIP_PLANES && movetime > 0; bump++)
        {
                vector move = this.velocity * movetime;
-               _Movetype_PushEntity(this, move, true, false);
+               if(!_Movetype_PushEntity(this, move, true, true))
+                       return;
                if (wasfreed(this))
                        return;
 
                if (trace_startsolid)
                {
                        _Movetype_UnstickEntity(this);
-                       _Movetype_PushEntity(this, move, false, false);
+                       if(!_Movetype_PushEntity(this, move, true, true))
+                               return;
                        if (wasfreed(this))
                                return;
                }
@@ -63,28 +72,36 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
 
                if (this.move_movetype == MOVETYPE_BOUNCEMISSILE)
                {
-                       this.velocity = _Movetype_ClipVelocity(this.velocity, trace_plane_normal, 2.0);
+                       float bouncefac = (!this.bouncefactor) ? 1.0 : this.bouncefactor;
+                       this.velocity = _Movetype_ClipVelocity(this.velocity, trace_plane_normal, 1 + bouncefac);
                        UNSET_ONGROUND(this);
+                       if(!GAMEPLAYFIX_SLIDEMOVEPROJECTILES(this))
+                               movetime = 0;
                }
                else if (this.move_movetype == MOVETYPE_BOUNCE)
                {
-                       float bouncefac = this.bouncefactor;     if (!bouncefac)  bouncefac = 0.5;
-                       float bstop = this.bouncestop; if (!bstop) bstop = 60 / 800;
-                       bstop *= (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
+                       float bouncefac = (!this.bouncefactor) ? 0.5 : this.bouncefactor;
+                       float bstop = (!this.bouncestop) ? (60 / 800) : this.bouncestop;
+                       float grav = ((this.gravity) ? this.gravity : 1);
 
                        this.velocity = _Movetype_ClipVelocity(this.velocity, trace_plane_normal, 1 + bouncefac);
 
                        float d = trace_plane_normal * this.velocity;
-                       if (trace_plane_normal.z > 0.7 && d < bstop && d > -bstop)
+                       if(!GAMEPLAYFIX_GRENADEBOUNCESLOPES(this))
+                               d = this.velocity.z;
+                       if (trace_plane_normal.z > 0.7 && d < PHYS_GRAVITY(this) * bstop * grav)
                        {
                                SET_ONGROUND(this);
                                this.groundentity = trace_ent;
                                this.velocity = '0 0 0';
                                this.avelocity = '0 0 0';
+                               movetime = 0;
                        }
                        else
                        {
                                UNSET_ONGROUND(this);
+                               if(!GAMEPLAYFIX_SLIDEMOVEPROJECTILES(this))
+                                       movetime = 0;
                        }
                }
                else
@@ -98,24 +115,27 @@ void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
                                        this.move_suspendedinair = true;
                                this.velocity = '0 0 0';
                                this.avelocity = '0 0 0';
+                               movetime = 0;
                        }
                        else
                        {
                                UNSET_ONGROUND(this);
+                               if(!GAMEPLAYFIX_SLIDEMOVEPROJECTILES(this))
+                                       movetime = 0;
                        }
                }
 
                // DP revision 8905 (just, WHY...)
-               if (this.move_movetype == MOVETYPE_BOUNCEMISSILE)
-                       break;
+               //if (this.move_movetype == MOVETYPE_BOUNCEMISSILE)
+                       //break;
 
                // DP revision 8918 (WHY...)
-               if (IS_ONGROUND(this))
-                       break;
+               //if (IS_ONGROUND(this))
+                       //break;
        }
 
-       //if (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE && this.move_didgravity > 0 && !IS_ONGROUND(this))
-       //      this.velocity_z -= 0.5 * dt * (this.gravity ? this.gravity : 1) * PHYS_GRAVITY(this);
+       if (GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE && this.move_didgravity > 0 && !IS_ONGROUND(this))
+               this.velocity_z -= 0.5 * dt * ((this.gravity) ? this.gravity : 1) * PHYS_GRAVITY(this);
 
        _Movetype_CheckWaterTransition(this);
 }
index 5ba6e82685b3204ce2caa5da04c5862253f0c974..16cb27aeca0181d435d680fe56c69da21ccec1b9 100644 (file)
@@ -53,13 +53,13 @@ void Physics_UpdateStats(entity this)
             : 0;
           STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
         }
-       bool vq3compat = autocvar_sv_vq3compat && autocvar_sv_vq3compat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences
-       STAT(PL_MIN, this) = (vq3compat) ? '-15 -15 -24' : autocvar_sv_player_mins;
-       STAT(PL_MAX, this) = (vq3compat) ? '15 15 32' : autocvar_sv_player_maxs;
-       STAT(PL_VIEW_OFS, this) = (vq3compat) ? '0 0 26' : autocvar_sv_player_viewoffset;
-       STAT(PL_CROUCH_MIN, this) = (vq3compat) ? '-15 -15 -24' : autocvar_sv_player_crouch_mins;
-       STAT(PL_CROUCH_MAX, this) = (vq3compat) ? '15 15 16' : autocvar_sv_player_crouch_maxs;
-       STAT(PL_CROUCH_VIEW_OFS, this) = (vq3compat) ? '0 0 12' : autocvar_sv_player_crouch_viewoffset;
+       bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences
+       STAT(PL_MIN, this) = (q3dfcompat) ? '-15 -15 -20' : autocvar_sv_player_mins;
+       STAT(PL_MAX, this) = (q3dfcompat) ? '15 15 36' : autocvar_sv_player_maxs;
+       STAT(PL_VIEW_OFS, this) = (q3dfcompat) ? '0 0 26' : autocvar_sv_player_viewoffset;
+       STAT(PL_CROUCH_MIN, this) = (q3dfcompat) ? '-15 -15 -20' : autocvar_sv_player_crouch_mins;
+       STAT(PL_CROUCH_MAX, this) = (q3dfcompat) ? '15 15 20' : autocvar_sv_player_crouch_maxs;
+       STAT(PL_CROUCH_VIEW_OFS, this) = (q3dfcompat) ? '0 0 12' : autocvar_sv_player_crouch_viewoffset;
 
        // old stats
        // fix some new settings
@@ -145,6 +145,9 @@ void PM_ClientMovement_UpdateStatus(entity this)
                do_crouch = false;
     }
 
+    MUTATOR_CALLHOOK(PlayerCanCrouch, this, do_crouch);
+    do_crouch = M_ARGV(1, bool);
+
        if (do_crouch) {
                if (!IS_DUCKED(this)) {
                        SET_DUCKED(this);
@@ -687,13 +690,12 @@ void PM_check_slick(entity this)
        if(!IS_ONGROUND(this))
                return;
 
-       if(!PHYS_SLICK_APPLYGRAVITY(this))
-               return;
-
+       trace_dphitq3surfaceflags = 0;
        tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this);
        if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
        {
-               UNSET_ONGROUND(this);
+               if(PHYS_SLICK_APPLYGRAVITY(this))
+                       UNSET_ONGROUND(this);
                SET_ONSLICK(this);
        }
        else
index cf272e5635a1eb66e72ec90810b864b10eff9f27..511ac46e66eedc7a8b35ce447b328b56f1a89ff7 100644 (file)
@@ -490,6 +490,21 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest)
        }
 }
 
+SHUTDOWN(PlayerStats_PlayerBasic_Shutdown)
+{
+       if(PS_B_IN_DB >= 0)
+       {
+               db_close(PS_B_IN_DB);
+               PS_B_IN_DB = -1;
+       }
+
+       if(PS_GR_OUT_DB >= 0)
+       {
+               db_close(PS_GR_OUT_DB);
+               PS_GR_OUT_DB = -1;
+       }
+}
+
 void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer)
 {
        // determine whether we should retrieve playerbasic information again
index d27dd0ed1f775038bb904e57327876a84d45314d..d41a097d6d642419ecd4f8218e071774ca516f47 100644 (file)
@@ -4,7 +4,7 @@
 //float PS_PM_IN_DB = -1;   // playerstats_prematch_in_db      // db for info COLLECTED at the beginning of a match
 int PS_GR_OUT_DB = -1;  // playerstats_gamereport_out_db   // db of info SENT at the end of a match
 //float PS_GR_IN_DB = -1;   // playerstats_gamereport_in_db    // db for info COLLECTED at the end of a match
-int PS_B_IN_DB = -1;    // playerstats_playerbasic_in_db   // db for info COLLECTED for basic player info (ELO)
+float PS_B_IN_DB = -1;    // playerstats_playerbasic_in_db   // db for info COLLECTED for basic player info (ELO)
 #endif
 
 #ifdef MENUQC
index 488d44220b19e46ca047d18e11511e3d2d223e0b..7d2aae5f42b70dd2c3e09f9fe2a8533a7a5f396c 100644 (file)
@@ -193,6 +193,10 @@ int autocvar_sv_gameplayfix_stepdown = 2;
 int autocvar_sv_gameplayfix_stepmultipletimes = 1;
 int autocvar_sv_gameplayfix_unstickplayers = 1;
 int autocvar_sv_gameplayfix_fixedcheckwatertransition = 1;
+int autocvar_sv_gameplayfix_slidemoveprojectiles = 1;
+int autocvar_sv_gameplayfix_grenadebouncedownslopes = 1;
+int autocvar_sv_gameplayfix_noairborncorpse = 1;
+int autocvar_sv_gameplayfix_noairborncorpse_allowsuspendeditems = 1;
 #endif
 REGISTER_STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, int, autocvar_sv_gameplayfix_downtracesupportsongroundflag)
 REGISTER_STAT(GAMEPLAYFIX_EASIERWATERJUMP, int, autocvar_sv_gameplayfix_easierwaterjump)
@@ -201,6 +205,10 @@ REGISTER_STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, int, autocvar_sv_gameplayfix_stepmu
 REGISTER_STAT(GAMEPLAYFIX_UNSTICKPLAYERS, int, autocvar_sv_gameplayfix_unstickplayers)
 REGISTER_STAT(GAMEPLAYFIX_UPVELOCITYCLEARSONGROUND, int, autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag)
 REGISTER_STAT(GAMEPLAYFIX_WATERTRANSITION, int, autocvar_sv_gameplayfix_fixedcheckwatertransition)
+REGISTER_STAT(GAMEPLAYFIX_SLIDEMOVEPROJECTILES, int, autocvar_sv_gameplayfix_slidemoveprojectiles)
+REGISTER_STAT(GAMEPLAYFIX_GRENADEBOUNCESLOPES, int, autocvar_sv_gameplayfix_grenadebouncedownslopes)
+REGISTER_STAT(GAMEPLAYFIX_NOAIRBORNCORPSE, int, autocvar_sv_gameplayfix_noairborncorpse)
+REGISTER_STAT(NOAIRBORNCORPSE_ALLOWSUSPENDED, int, autocvar_sv_gameplayfix_noairborncorpse_allowsuspendeditems)
 
 REGISTER_STAT(MOVEVARS_JUMPSTEP, int, cvar("sv_jumpstep"))
 REGISTER_STAT(NOSTEP, int, cvar("sv_nostep"))
@@ -280,6 +288,11 @@ REGISTER_STAT(WALLJUMP_DELAY, float, autocvar_g_walljump_delay)
 REGISTER_STAT(WALLJUMP_FORCE, float, autocvar_g_walljump_force)
 REGISTER_STAT(LASTWJ, float)
 
+#ifdef SVQC
+float autocvar_g_bloodloss;
+#endif
+REGISTER_STAT(BLOODLOSS, float, autocvar_g_bloodloss)
+
 // freeze tag, clan arena
 REGISTER_STAT(REDALIVE, int)
 REGISTER_STAT(BLUEALIVE, int)
@@ -306,9 +319,9 @@ bool autocvar_sv_slick_applygravity;
 REGISTER_STAT(SLICK_APPLYGRAVITY, bool, autocvar_sv_slick_applygravity)
 
 #ifdef SVQC
-bool autocvar_sv_vq3compat;
+bool autocvar_sv_q3defragcompat;
 #endif
-REGISTER_STAT(VQ3COMPAT, bool, autocvar_sv_vq3compat)
+REGISTER_STAT(Q3DEFRAGCOMPAT, bool, autocvar_sv_q3defragcompat)
 
 #ifdef SVQC
 #include "physics/movetypes/movetypes.qh"
index 9d595b9591df90326e8d188c17ef2abfdc94f6ee..1029f7865682df59cdde8d83500552bd0503a8b7 100644 (file)
@@ -88,20 +88,18 @@ void ItemDraw(entity this)
             this.onground_time = time + 0.5;
         }
     }
-    else if (autocvar_cl_animate_items)
+    else if (autocvar_cl_animate_items && !this.item_simple) // no bobbing applied to simple items, for consistency's sake (no visual difference between ammo and weapons)
     {
         if(this.ItemStatus & ITS_ANIMATE1)
         {
-               if(!this.item_simple)
-               this.angles += this.avelocity * frametime;
+               this.angles += this.avelocity * frametime;
             float fade_in = bound(0, time - this.onground_time, 1);
             setorigin(this, this.oldorigin + fade_in * ('0 0 10' + '0 0 8' * sin((time - this.onground_time) * 2)));
         }
 
         if(this.ItemStatus & ITS_ANIMATE2)
         {
-               if(!this.item_simple)
-               this.angles += this.avelocity * frametime;
+               this.angles += this.avelocity * frametime;
             float fade_in = bound(0, time - this.onground_time, 1);
             setorigin(this, this.oldorigin + fade_in * ('0 0 8' + '0 0 4' * sin((time - this.onground_time) * 3)));
         }
@@ -186,9 +184,8 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
 
         Item_SetAlpha(this);
 
-        if(autocvar_cl_fullbright_items)
-            if(this.ItemStatus & ITS_ALLOWFB)
-                this.effects |= EF_FULLBRIGHT;
+        if(this.ItemStatus & ITS_ALLOWFB)
+           this.effects |= EF_FULLBRIGHT;
 
         if(this.ItemStatus & ITS_GLOW)
         {
index 5c916866f8691f840d34f43ccdf39a51a7d5f95c..7b0d760df6e61afe908d4aaaf17b3263d1f022ca 100644 (file)
@@ -36,7 +36,6 @@ bool   autocvar_cl_items_nofade;
 float  autocvar_cl_animate_items = 1;
 float  autocvar_cl_ghost_items = 0.45;
 vector autocvar_cl_ghost_items_color = '-1 -1 -1';
-float  autocvar_cl_fullbright_items = 0;
 vector autocvar_cl_weapon_stay_color = '2 0.5 0.5';
 float  autocvar_cl_weapon_stay_alpha = 0.75;
 float  autocvar_cl_simple_items = 0;
index 3d0528a2511825742d89fd27ac0ecfc727a1d440..9dedc89cb780253a184b45ed3f1dba2da1744d9b 100644 (file)
@@ -57,7 +57,7 @@ REGISTRY_CHECK(Turrets)
        #define TR_CONFIG_END()
 #endif
 
-GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt")
+GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt", false)
 {
     switch(request)
     {
index d9b9efcde36444c8d06b804b5dd60ad80c0ec237..3b7513013dc036475976c872d628ec572d8a4b67 100644 (file)
@@ -444,7 +444,7 @@ STATIC_INIT(compressShortVector)
                l *= f;
        }
 
-       if(cvar("developer"))
+       if(cvar("developer") > 0)
        {
                LOG_TRACE("Verifying vector compression table...");
                for(i = 0x0F00; i < 0xFFFF; ++i)
index 66b5bec883392c1527a1adb229e209c798355996..1b9e9063bdb88452688303dbbe71b0d1f105a7c2 100644 (file)
@@ -59,6 +59,8 @@ METHOD(RaptorFlare, wr_think, void(entity thiswep, entity actor, .entity weapone
     entity veh = player.vehicle;
     if (fire & 2)
     if (!isPlayer || weapon_prepareattack(thiswep, player, weaponentity, true, autocvar_g_vehicle_raptor_flare_refire)) {
+        vector forward, right, up;
+        MAKE_VECTORS(player.v_angle, forward, right, up);
         for(int i = 0; i < 3; ++i) {
             entity _flare = spawn();
             setmodel(_flare, MDL_VEH_RAPTOR_FLARE);
@@ -67,7 +69,7 @@ METHOD(RaptorFlare, wr_think, void(entity thiswep, entity actor, .entity weapone
             setorigin(_flare, actor.origin - '0 0 16');
             set_movetype(_flare, MOVETYPE_TOSS);
             _flare.gravity = 0.15;
-            _flare.velocity = 0.25 * actor.velocity + (v_forward + randomvec() * 0.25)* -500;
+            _flare.velocity = 0.25 * actor.velocity + (forward + randomvec() * 0.25)* -500;
             setthink(_flare, raptor_flare_think);
             _flare.nextthink = time;
             _flare.owner = veh ? veh : player;
index 0be413f0fb0071fad8974f2022e50cea7a1bf838..131e7b49efa03a21044d505f157f768cea70ad47 100644 (file)
@@ -38,7 +38,7 @@ STATIC_INIT(WeaponPickup) { FOREACH(Weapons, true, it.m_pickup = NEW(WeaponPicku
 #define WepSet_FromWeapon(it) ((it).m_wepset)
 WepSet _WepSet_FromWeapon(int i);
 
-GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt") // WEAPONTODO: make this work with other progs than just server
+GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt", false) // WEAPONTODO: make this work with other progs than just server
 {
     switch(request)
     {
index 5948d6a12e2831e0fcaf2f340cd7ae781ee72ce7..ae2dbf07dfeda4f47c1b70d63ce7322364251c88 100644 (file)
@@ -809,7 +809,7 @@ void Draw_ArcBeam_callback(vector start, vector hit, vector end)
                Draw_CylindricLine(start, end, thickness, beam.beam_image, 0.25, -time * 3, beam.beam_color, beam.beam_alpha, DRAWFLAG_NORMAL, transformed_view_org);
        else
        {
-               R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL); // DRAWFLAG_ADDITIVE
+               R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL, false); // DRAWFLAG_ADDITIVE
                R_PolygonVertex(
                        top,
                        '0 0.5 0' + ('0 0.5 0' * (thickness / beam.beam_thickness)),
@@ -892,10 +892,9 @@ void Draw_ArcBeam(entity this)
                // into a weapon system for client code.
 
                // find where we are aiming
-               makevectors(((autocvar_chase_active) ? warpzone_save_view_angles : view_angles));
-               vector forward = v_forward;
-               vector right = v_right;
-               vector up = v_up;
+               vector myviewangle = ((autocvar_chase_active) ? warpzone_save_view_angles : view_angles);
+               vector forward, right, up;
+               MAKE_VECTORS(myviewangle, forward, right, up);
                entity wepent = viewmodels[this.beam_slot];
 
                if(autocvar_chase_active)
@@ -911,11 +910,6 @@ void Draw_ArcBeam(entity this)
                else
                        { start_pos = this.origin; }
 
-               int v_shot_idx;  // used later
-               (v_shot_idx = gettagindex(wepent, "shot")) || (v_shot_idx = gettagindex(wepent, "tag_shot"));
-               if(v_shot_idx && this.beam_usevieworigin == 2)
-                       start_pos = gettaginfo(wepent, v_shot_idx) - '0 0 2';
-
                // trace forward with an estimation
                WarpZone_TraceLine(
                        start_pos,
@@ -924,6 +918,11 @@ void Draw_ArcBeam(entity this)
                        this
                );
 
+               int v_shot_idx;  // used later
+               (v_shot_idx = gettagindex(wepent, "shot")) || (v_shot_idx = gettagindex(wepent, "tag_shot"));
+               if(v_shot_idx && this.beam_usevieworigin == 2)
+                       start_pos = gettaginfo(wepent, v_shot_idx) - '0 0 2';
+
                // untransform in case our trace went through a warpzone
                vector end_pos = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
 
@@ -956,6 +955,8 @@ void Draw_ArcBeam(entity this)
                {
                        this.beam_dir = wantdir;
                        this.beam_initialized = true;
+
+                       this.beam_muzzleentity.drawmask = MASK_NORMAL; // NOTE: this works around the muzzle entity flashing on the middle of the screen for a frame
                }
 
                if(this.beam_dir != wantdir)
@@ -972,7 +973,7 @@ void Draw_ArcBeam(entity this)
                                // if the angle is greater than maxangle, force the blendfactor to make this the maximum factor
                                float blendfactor = bound(
                                        0,
-                                       (1 - (this.beam_returnspeed * frametime)),
+                                       (1 - (this.beam_returnspeed * dt)),
                                        min(this.beam_maxangle / angle, 1)
                                );
                                this.beam_dir = normalize((wantdir * (1 - blendfactor)) + (this.beam_dir * blendfactor));
@@ -982,7 +983,7 @@ void Draw_ArcBeam(entity this)
                                // the radius is not too far yet, no worries :D
                                float blendfactor = bound(
                                        0,
-                                       (1 - (this.beam_returnspeed * frametime)),
+                                       (1 - (this.beam_returnspeed * dt)),
                                        1
                                );
                                this.beam_dir = normalize((wantdir * (1 - blendfactor)) + (this.beam_dir * blendfactor));
@@ -1132,7 +1133,7 @@ void Draw_ArcBeam(entity this)
                        this.beam_hiteffect,
                        last_origin,
                        beamdir * -1,
-                       frametime * 2
+                       dt * 2
                );
        }
        if(this.beam_hitlight[0])
@@ -1153,7 +1154,7 @@ void Draw_ArcBeam(entity this)
                        this.beam_muzzleeffect,
                        original_start_pos + wantdir * 20,
                        wantdir * 1000,
-                       frametime * 0.1
+                       dt * 0.1
                );
        }
        if(this.beam_muzzlelight[0])
@@ -1206,7 +1207,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
                flash = spawn();
                flash.owner = this;
                flash.effects = EF_ADDITIVE | EF_FULLBRIGHT;
-               flash.drawmask = MASK_NORMAL;
+               //flash.drawmask = MASK_NORMAL;
                flash.solid = SOLID_NOT;
                flash.avelocity_z = 5000;
                setattachment(flash, this, "");
index 0e482d8ae82db239dbdd14160070da41befea332..44b73fb05ab3a3db2d121ee585abe14700902c3b 100644 (file)
@@ -43,7 +43,7 @@ void Porto_Draw(entity this)
                        dir = reflect(dir, trace_plane_normal);
                        pos = trace_endpos;
                        wepent.polyline[++idx] = pos;
-                       if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
+                       if ((trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) || (trace_dphitcontents & DPCONTENTS_PLAYERCLIP))
                        {
                                n += 1;
                                continue;
index 74986f9cc96be069154ee8c5dd35419cf07c6b85..f38c34b19791182d9127b58a6459d12d8cc332db 100644 (file)
@@ -712,14 +712,14 @@ void Draw_Shockwave(entity this)
                if(counter >= 1)
                {
                        // draw from shot origin to min spread radius
-                       R_BeginPolygon("", DRAWFLAG_NORMAL);
+                       R_BeginPolygon("", DRAWFLAG_NORMAL, false);
                        R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(this.sw_shotorg, '0 0 0', sw_color, a);
                        R_EndPolygon();
 
                        // draw from min spread radius to max spread radius
-                       R_BeginPolygon("", DRAWFLAG_NORMAL);
+                       R_BeginPolygon("", DRAWFLAG_NORMAL, false);
                        R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
@@ -734,14 +734,14 @@ void Draw_Shockwave(entity this)
                if((counter + 1) == divisions)
                {
                        // draw from shot origin to min spread radius
-                       R_BeginPolygon("", DRAWFLAG_NORMAL);
+                       R_BeginPolygon("", DRAWFLAG_NORMAL, false);
                        R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(this.sw_shotorg, '0 0 0', sw_color, a);
                        R_EndPolygon();
 
                        // draw from min spread radius to max spread radius
-                       R_BeginPolygon("", DRAWFLAG_NORMAL);
+                       R_BeginPolygon("", DRAWFLAG_NORMAL, false);
                        R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
                        R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
index f73ade3d12ea58ea6f5652554909505c0a335f79..a5af98d2ce9ac5ce8ee5a5d2c9abffa10f35da95 100644 (file)
@@ -360,11 +360,9 @@ void sys_phys_simulate(entity this, float dt)
                        // apply edge friction
                        const float f2 = vlen2(vec2(this.velocity));
                        if (f2 > 0) {
-                               trace_dphitq3surfaceflags = 0;
-                               tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this);
                                // TODO: apply edge friction
                                // apply ground friction
-                               const int realfriction = (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
+                               const int realfriction = (IS_ONSLICK(this))
                                    ? PHYS_FRICTION_SLICK(this)
                                        : PHYS_FRICTION(this);
 
index f2677fe3a3b5eabdc2acd394fbb5fc38deb659bc..2ada204dbfd39bdd235085b8a79cc55e379ed27b 100644 (file)
@@ -1,3 +1,6 @@
+For more information, see https://gitlab.com/xonotic/xonotic/-/wikis/Translating
+
+
 How to make the .po template:
 
 find . -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f- --from-code utf-8
index 04b96bc9974974cf98656754bf9aeb1b0583502a..2af309c02e2a2c364973127c210c70c5f5f4dbb4 100644 (file)
@@ -207,6 +207,303 @@ bool CSQCPlayer_IsLocalPlayer(entity this)
        return (this == csqcplayer);
 }
 
+float stairsmoothz;
+float autocvar_cl_stairsmoothspeed = 200;
+float autocvar_cl_smoothviewheight = 0.05;
+float smooth_prevtime;
+float viewheightavg;
+vector CSQCPlayer_ApplySmoothing(entity this, vector v)
+{
+       float smoothtime = bound(0, time - smooth_prevtime, 0.1);
+       smooth_prevtime = max(smooth_prevtime, drawtime); // drawtime is the previous frame's time at this point
+
+       if(this.csqcmodel_teleported || !(this.pmove_flags & PMF_ONGROUND) || autocvar_cl_stairsmoothspeed <= 0)
+               stairsmoothz = v.z;
+       else
+       {
+               if(stairsmoothz < v.z)
+                       v.z = stairsmoothz = bound(v.z - PHYS_STEPHEIGHT(this), stairsmoothz + smoothtime * autocvar_cl_stairsmoothspeed, v.z);
+               else if(stairsmoothz > v.z)
+                       v.z = stairsmoothz = bound(v.z, stairsmoothz - smoothtime * autocvar_cl_stairsmoothspeed, v.z + PHYS_STEPHEIGHT(this));
+       }
+
+       float viewheight = bound(0, (time - smooth_prevtime) / max(0.0001, autocvar_cl_smoothviewheight), 1);
+       viewheightavg = viewheightavg * (1 - viewheight) + this.view_ofs.z * viewheight;
+       v.z += viewheightavg;
+
+       smooth_prevtime = time;
+
+       return v;
+}
+
+bool autocvar_v_deathtilt;
+float autocvar_v_deathtiltangle;
+void CSQCPlayer_ApplyDeathTilt(entity this)
+{
+       if(!this.csqcmodel_isdead || !autocvar_v_deathtilt)
+               return;
+       view_angles.z = autocvar_v_deathtiltangle;
+}
+
+float autocvar_v_idlescale;
+float autocvar_v_ipitch_cycle;
+float autocvar_v_iyaw_cycle;
+float autocvar_v_iroll_cycle;
+float autocvar_v_ipitch_level;
+float autocvar_v_iyaw_level;
+float autocvar_v_iroll_level;
+void CSQCPlayer_ApplyIdleScaling(entity this)
+{
+       if(!autocvar_v_idlescale)
+               return;
+       view_angles.x += autocvar_v_idlescale * sin(time * autocvar_v_ipitch_cycle) * autocvar_v_ipitch_level;
+       view_angles.y += autocvar_v_idlescale * sin(time * autocvar_v_iyaw_cycle) * autocvar_v_iyaw_level;
+       view_angles.z += autocvar_v_idlescale * sin(time * autocvar_v_iroll_cycle) * autocvar_v_iroll_level;
+       //setproperty(VF_CL_VIEWANGLES, view_angles); // update view angles as well so we can aim
+}
+
+float autocvar_cl_bob = 0;
+float autocvar_cl_bobcycle = 0.5;
+float autocvar_cl_bob_limit = 7;
+float autocvar_cl_bob_limit_heightcheck = 0;
+float autocvar_cl_bob_velocity_limit = 400;
+float autocvar_cl_bobup = 0.5;
+float autocvar_cl_bobfall = 0.05;
+float autocvar_cl_bobfallcycle = 3;
+float autocvar_cl_bobfallminspeed = 200;
+float autocvar_cl_bob2 = 0;
+float autocvar_cl_bob2cycle = 1;
+float autocvar_cl_bob2smooth = 0.05;
+float bobfall_swing;
+float bobfall_speed;
+float bob2_smooth;
+vector CSQCPlayer_ApplyBobbing(entity this, vector v)
+{
+       if(this.csqcmodel_isdead)
+               return v;
+
+       // bounded XY speed, used by several effects below
+       float bob, cycle;
+
+       // vertical view bobbing code
+       if(autocvar_cl_bob && autocvar_cl_bobcycle)
+       {
+               float bob_limit = autocvar_cl_bob_limit;
+
+               if(autocvar_cl_bob_limit_heightcheck)
+               {
+                       // use traces to determine what range the view can bob in, and scale down the bob as needed
+                       vector bob_height_check_dest = v;
+                       bob_height_check_dest.z += autocvar_cl_bob_limit * 1.1;
+                       traceline(v, bob_height_check_dest, MOVE_NOMONSTERS, NULL);
+                       float trace1fraction = trace_fraction;
+
+                       bob_height_check_dest = v;
+                       bob_height_check_dest.z += autocvar_cl_bob_limit * -0.5;
+                       traceline(v, bob_height_check_dest, MOVE_NOMONSTERS, NULL);
+                       float trace2fraction = trace_fraction;
+
+                       bob_limit *= min(trace1fraction, trace2fraction);
+               }
+
+               // LordHavoc: figured out bobup: the time at which the sin is at 180
+               // degrees (which allows lengthening or squishing the peak or valley)
+               cycle = time / autocvar_cl_bobcycle;
+               cycle -= rint(cycle);
+               if(cycle < autocvar_cl_bobup)
+                       cycle = sin(M_PI * cycle / autocvar_cl_bobup);
+               else
+                       cycle = sin(M_PI + M_PI * (cycle - autocvar_cl_bobup) / (1.0 - autocvar_cl_bobup));
+               // bob is proportional to velocity in the xy plane
+               // (don't count Z, or jumping messes it up)
+               float xyspeed = bound(0, sqrt(this.velocity.x * this.velocity.x + this.velocity.y * this.velocity.y), autocvar_cl_bob_velocity_limit);
+               bob = xyspeed * autocvar_cl_bob;
+               bob = bound(0, bob, bob_limit);
+               bob = bob * 0.3 + bob * 0.7 * cycle;
+               v.z += bob;
+       }
+
+       // horizontal view bobbing code
+       if(autocvar_cl_bob2 && autocvar_cl_bob2cycle)
+       {
+               cycle = time / autocvar_cl_bob2cycle;
+               cycle -= rint(cycle);
+               if(cycle < 0.5)
+                       cycle = cos(M_PI * cycle / 0.5); // cos looks better here with the other view bobbing using sin
+               else
+                       cycle = cos(M_PI + M_PI * (cycle - 0.5) / 0.5);
+               bob = autocvar_cl_bob2 * cycle;
+
+               // this value slowly decreases from 1 to 0 when we stop touching the ground.
+               // The cycle is later multiplied with it so the view smooths back to normal
+               if(IS_ONGROUND(this) && !(input_buttons & BIT(1))) // also block the effect while the jump button is pressed, to avoid twitches when bunny-hopping
+                       bob2_smooth = 1;
+               else
+               {
+                       if(bob2_smooth > 0)
+                               bob2_smooth -= bound(0, autocvar_cl_bob2smooth, 1);
+                       else
+                               bob2_smooth = 0;
+               }
+
+               // calculate the front and side of the player between the X and Y axes
+               makevectors(view_angles);
+               // now get the speed based on those angles. The bounds should match the same value as xyspeed's
+               float side = bound(-autocvar_cl_bob_velocity_limit, (this.velocity * v_right) * bob2_smooth, autocvar_cl_bob_velocity_limit);
+               float front = bound(-autocvar_cl_bob_velocity_limit, (this.velocity * v_forward) * bob2_smooth, autocvar_cl_bob_velocity_limit);
+               v_forward = v_forward * bob;
+               v_right = v_right * bob;
+               // we use side with forward and front with right, so the bobbing goes
+               // to the side when we walk forward and to the front when we strafe
+               vector bob2vel;
+               bob2vel.x = side * v_forward.x + front * v_right.x + 0 * v_up.x;
+               bob2vel.y = side * v_forward.y + front * v_right.y + 0 * v_up.y;
+               bob2vel.z = side * v_forward.z + front * v_right.z + 0 * v_up.z;
+               v.x += bob2vel.x;
+               v.y += bob2vel.y;
+       }
+
+       // fall bobbing code
+       // causes the view to swing down and back up when touching the ground
+       if(autocvar_cl_bobfall && autocvar_cl_bobfallcycle)
+       {
+               if(!IS_ONGROUND(this))
+               {
+                       bobfall_speed = bound(-400, this.velocity.z, 0) * bound(0, autocvar_cl_bobfall, 0.1);
+                       if(this.velocity.z < -autocvar_cl_bobfallminspeed)
+                               bobfall_swing = 1;
+                       else
+                               bobfall_swing = 0; // really?
+               }
+               else
+               {
+                       bobfall_swing = max(0, bobfall_swing - autocvar_cl_bobfallcycle * frametime);
+                       float bobfall = sin(M_PI * bobfall_swing) * bobfall_speed;
+                       v.z += bobfall;
+               }
+       }
+
+       return v;
+}
+
+float autocvar_cl_rollangle;
+float autocvar_cl_rollspeed;
+float CSQCPlayer_CalcRoll(entity this)
+{
+       makevectors(view_angles);
+       float side = (this.velocity * v_right);
+       float sign = (side < 0) ? -1 : 1;
+       side = fabs(side);
+
+       if(side < autocvar_cl_rollspeed)
+               side = side * autocvar_cl_rollangle / autocvar_cl_rollspeed;
+       else
+               side = autocvar_cl_rollangle;
+
+       return side * sign;
+}
+
+float autocvar_chase_back;
+float autocvar_chase_up;
+bool autocvar_chase_overhead;
+float autocvar_chase_pitchangle;
+vector CSQCPlayer_ApplyChase(entity this, vector v)
+{
+       vector forward;
+       vector chase_dest;
+
+       if(autocvar_chase_overhead)
+       {
+               view_angles.x = 0;
+               makevectors(view_angles);
+               forward = v_forward;
+               vector up = v_up;
+               // trace a little further so it hits a surface more consistently (to avoid 'snapping' on the edge of the range)
+               chase_dest.x = v.x - forward.x * autocvar_chase_back + up.x * autocvar_chase_up;
+               chase_dest.y = v.y - forward.y * autocvar_chase_back + up.y * autocvar_chase_up;
+               chase_dest.z = v.z - forward.z * autocvar_chase_back + up.z * autocvar_chase_up;
+
+               // trace from first person view location to our chosen third person view location
+               traceline(v, chase_dest, MOVE_NOMONSTERS, NULL);
+
+               vector bestvieworg = trace_endpos;
+               vector offset = '0 0 0';
+               for(offset.x = -16; offset.x <= 16; offset.x += 8)
+               {
+                       for(offset.y = -16; offset.y <= 16; offset.y += 8)
+                       {
+                               makevectors(view_angles);
+                               up = v_up;
+                               chase_dest.x = v.x - forward.x * autocvar_chase_back + up.x * autocvar_chase_up + offset.x;
+                               chase_dest.y = v.y - forward.y * autocvar_chase_back + up.y * autocvar_chase_up + offset.y;
+                               chase_dest.z = v.z - forward.z * autocvar_chase_back + up.z * autocvar_chase_up + offset.z;
+                               traceline(v, chase_dest, MOVE_NOMONSTERS, NULL);
+                               if(bestvieworg.z > trace_endpos.z)
+                                       bestvieworg.z = trace_endpos.z;
+                       }
+               }
+               bestvieworg.z -= 8;
+               v = bestvieworg;
+
+               view_angles.x = autocvar_chase_pitchangle;
+               //setproperty(VF_CL_VIEWANGLES, view_angles); // update view angles as well so we can aim
+       }
+       else
+       {
+               makevectors(view_angles);
+               forward = v_forward;
+               // trace a little further so it hits a surface more consistently (to avoid 'snapping' on the edge of the range)
+               float cdist = -autocvar_chase_back - 8;
+               chase_dest.x = v.x + forward.x * cdist;
+               chase_dest.y = v.y + forward.y * cdist;
+               chase_dest.z = v.z + forward.z * cdist + autocvar_chase_up;
+               traceline(v, chase_dest, MOVE_NOMONSTERS, NULL);
+               v.x = 1 * trace_endpos.x + 8 * forward.x + 4 * trace_plane_normal.x;
+               v.y = 1 * trace_endpos.y + 8 * forward.y + 4 * trace_plane_normal.y;
+               v.z = 1 * trace_endpos.z + 8 * forward.z + 4 * trace_plane_normal.z;
+       }
+
+#if 0
+       tracebox(v, '-4 -4 -4', '4 4 4', v - v_forward * autocvar_chase_back, MOVE_NORMAL, this);
+       v = trace_endpos;
+       tracebox(v, '-4 -4 -4', '4 4 4', v + v_up * autocvar_chase_up, MOVE_NORMAL, this);
+       v = trace_endpos;
+#endif
+       return v;
+}
+
+void CSQCPlayer_CalcRefdef(entity this)
+{
+       vector vieworg = this.origin;
+       if(intermission)
+       {
+               // just update view offset, don't need to do anything else
+               vieworg.z += this.view_ofs.z;
+       }
+       else
+       {
+               vieworg = CSQCPlayer_ApplySmoothing(this, vieworg);
+               if(autocvar_chase_active)
+                       vieworg = CSQCPlayer_ApplyChase(this, vieworg);
+               else
+               {
+                       // angles
+                       CSQCPlayer_ApplyDeathTilt(this);
+                       view_angles = view_angles + view_punchangle;
+                       view_angles.z += CSQCPlayer_CalcRoll(this);
+                       // TODO? we don't have damage time accessible here
+                       // origin
+                       vieworg = vieworg + view_punchvector;
+                       vieworg = CSQCPlayer_ApplyBobbing(this, vieworg);
+               }
+               CSQCPlayer_ApplyIdleScaling(this);
+       }
+       setproperty(VF_ORIGIN, vieworg);
+       setproperty(VF_ANGLES, view_angles);
+}
+
+bool autocvar_cl_useenginerefdef = true;
+
 /** Called once per CSQC_UpdateView() */
 void CSQCPlayer_SetCamera()
 {
@@ -285,13 +582,21 @@ void CSQCPlayer_SetCamera()
                        InterpolateOrigin_Do(view);
                        view.view_ofs = '0 0 1' * vh;
                }
-               int refdefflags = 0;
-               if (view.csqcmodel_teleported) refdefflags |= REFDEFFLAG_TELEPORTED;
-               if (input_buttons & BIT(1)) refdefflags |= REFDEFFLAG_JUMPING;
-               // note: these two only work in WIP2, but are harmless in WIP1
-               if (PHYS_HEALTH(NULL) <= 0 && PHYS_HEALTH(NULL) != -666 && PHYS_HEALTH(NULL) != -2342) refdefflags |= REFDEFFLAG_DEAD;
-               if (intermission) refdefflags |= REFDEFFLAG_INTERMISSION;
-               V_CalcRefdef(view, refdefflags); // TODO? uses .health stat in the engine when this isn't called here, may be broken!
+               if(autocvar_cl_useenginerefdef)
+               {
+                       int refdefflags = 0;
+                       if (view.csqcmodel_teleported) refdefflags |= REFDEFFLAG_TELEPORTED;
+                       if (input_buttons & BIT(1)) refdefflags |= REFDEFFLAG_JUMPING;
+                       // note: these two only work in WIP2, but are harmless in WIP1
+                       if (PHYS_HEALTH(NULL) <= 0 && PHYS_HEALTH(NULL) != -666 && PHYS_HEALTH(NULL) != -2342) refdefflags |= REFDEFFLAG_DEAD;
+                       if (intermission) refdefflags |= REFDEFFLAG_INTERMISSION;
+                       V_CalcRefdef(view, refdefflags); // TODO? uses .health stat in the engine when this isn't called here, may be broken!
+               }
+               else
+               {
+                       CSQCPlayer_CalcRefdef(view);
+               }
+                       
        }
        else
        {
index 2bf480a8782aed99c16167731c5f38efd1300fcd..dbac8b8b190f90a6923ee30239ba4a9b7429c185 100644 (file)
@@ -26,7 +26,7 @@
                C = to + thickdir * (thickness / 2);
                D = to - thickdir * (thickness / 2);
 
-               R_BeginPolygon(texture, drawflag);
+               R_BeginPolygon(texture, drawflag, false);
                R_PolygonVertex(A, '0 0 0' + shift * '1 0 0', rgb, theAlpha);
                R_PolygonVertex(B, '0 1 0' + shift * '1 0 0', rgb, theAlpha);
                R_PolygonVertex(C, '0 1 0' + (shift + length_tex) * '1 0 0', rgb, theAlpha);
index cbdf55375922de5420b3c81c51b244acf7f3c024..0f609cae8a98b524b86c8cd2245cc814bc190b8f 100644 (file)
@@ -8,7 +8,7 @@
 string prvm_language;
 
 /**
- * @deprecated prefer _("translated")
+ * @deprecated prefer _("translated") - GMQCC's -ftranslatable-strings feature
  */
 ERASEABLE
 string language_filename(string s)
index 94a58d0ca486636e9a917429b677f4aeb726f204..16875c8bc3e233224cc484b49a8efa63ed5f4932 100644 (file)
@@ -6,7 +6,7 @@ void print_assertfailed_severe(string expr);
 void print_assertfailed_fatal(string expr);
 
 #define assert(expr, ...) _assert(print_assertfailed_severe, expr, __VA_ARGS__)
-#define devassert(...) MACRO_BEGIN if (autocvar_developer) assert(__VA_ARGS__); MACRO_END
+#define devassert(...) MACRO_BEGIN if (autocvar_developer > 0) assert(__VA_ARGS__); MACRO_END
 
 #define assert_once(expr, ...) \
        MACRO_BEGIN \
@@ -17,10 +17,10 @@ void print_assertfailed_fatal(string expr);
                        __once = true; \
                } \
        MACRO_END
-#define devassert_once(...) MACRO_BEGIN if (autocvar_developer) assert_once(__VA_ARGS__); MACRO_END
+#define devassert_once(...) MACRO_BEGIN if (autocvar_developer > 0) assert_once(__VA_ARGS__); MACRO_END
 
 #define demand(expr, ...) _assert(print_assertfailed_fatal, expr, __VA_ARGS__)
-#define devdemand(...) MACRO_BEGIN if (autocvar_developer) demand(__VA_ARGS__); MACRO_END
+#define devdemand(...) MACRO_BEGIN if (autocvar_developer > 0) demand(__VA_ARGS__); MACRO_END
 
 #define _assert(f, expr, then) \
        MACRO_BEGIN \
index 1b58eb1b9fcf75d0ddd7196843a6cb5be402d695..0cfe564f0792461ed0264663041eae2340cdc5f8 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <common/command/_mod.qh>
 
-GENERIC_COMMAND(mx, "Send a matrix command") {
+GENERIC_COMMAND(mx, "Send a matrix command", false) {
     switch (argv(1)) {
         case "user":
             strcpy(matrix_user, substring(command, argv_start_index(2), -1));
index 9abeb1bcce330e1e20ede401e5e624c2d0370eae..70e17e6cf0b2ddc9146c3bbf52fec8d0d88f078b 100644 (file)
@@ -328,7 +328,7 @@ CLASS(Object)
        {
                TC(Object, this);
                string s = _("No description");
-               if (cvar("developer"))
+               if (cvar("developer") > 0)
                {
                        for (int i = 0, n = numentityfields(); i < n; ++i)
                        {
index a88bde462934134f3585707eff76e81303e8d6c2..019194a6d55df61e608e4fe9d6c126fb73ed08ad 100644 (file)
@@ -59,7 +59,7 @@
                                store.fld = field; \
                        }
        #elif defined(CSQC)
-               float ReplicateVars_time;
+               noref float ReplicateVars_time;
                #define ReplicateVars_NOT_SENDING() (time > ReplicateVars_time)
                #define ReplicateVars_DELAY(t) ReplicateVars_time = time + t
                #define ReplicateVars_DELAY_1FRAME() ReplicateVars_time = time
                        }
 
                #define REPLICATE_SIMPLE(field, cvarname) MACRO_BEGIN \
-                       if (ReplicateVars_NOT_SENDING() && field != cvar(cvarname)) \
+                       if (ReplicateVars_NOT_SENDING()) \
                        { \
-                               localcmd(strcat("cl_cmd sendcvar ", cvarname, "\n")); \
-                               ReplicateVars_DELAY_1FRAME(); \
-                               field = cvar(cvarname); \
-                               return; \
+                               float thecvar = cvar(cvarname); \
+                               if(field != thecvar) \
+                               { \
+                                       localcmd(strcat("cl_cmd sendcvar ", cvarname, "\n")); \
+                                       ReplicateVars_DELAY_1FRAME(); \
+                                       field = thecvar; \
+                                       return; \
+                               } \
                        } \
                MACRO_END
        #endif
index e0ec96b8ec0c43872992e12523329c0be74e8f5d..e1879890e8521dfe9c5173c209aee501c89da628 100644 (file)
@@ -17,8 +17,8 @@ void profile(string s)
 }
 
 #define _STATIC_INIT(func, where) \
-       ACCUMULATE void _static_##func##profile() { profile(#func); } \
-       ACCUMULATE_FUNCTION(where, _static_##func##profile) \
+       /* ACCUMULATE void _static_##func##profile() { profile(#func); } */ \
+       /* ACCUMULATE_FUNCTION(where, _static_##func##profile) */ \
        ACCUMULATE void _static_##func(); \
        ACCUMULATE_FUNCTION(where, _static_##func) \
        void _static_##func()
index b57f41af2b4927d466dd64f4533f0c7103db6511..5a2b53b69f3796da2c23802c617567d221ddbeb6 100644 (file)
@@ -11,7 +11,42 @@ USING(vectori, vector);
 const int STATS_ENGINE_RESERVE = 32;
 // must be listed in ascending order
 #define MAGIC_STATS(_, x) \
+       _(x, MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, 220) \
+       _(x, MOVEVARS_AIRCONTROL_PENALTY, 221) \
+       _(x, MOVEVARS_AIRSPEEDLIMIT_NONQW, 222) \
+       _(x, MOVEVARS_AIRSTRAFEACCEL_QW, 223) \
+       _(x, MOVEVARS_AIRCONTROL_POWER, 224) \
+       _(x, MOVEFLAGS, 225) \
+       _(x, MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, 226) \
+       _(x, MOVEVARS_WARSOWBUNNY_ACCEL, 227) \
+       _(x, MOVEVARS_WARSOWBUNNY_TOPSPEED, 228) \
+       _(x, MOVEVARS_WARSOWBUNNY_TURNACCEL, 229) \
+       _(x, MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, 230) \
+       _(x, MOVEVARS_AIRSTOPACCELERATE, 231) \
+       _(x, MOVEVARS_AIRSTRAFEACCELERATE, 232) \
+       _(x, MOVEVARS_MAXAIRSTRAFESPEED, 233) \
+       _(x, MOVEVARS_AIRCONTROL, 234) \
+       _(x, FRAGLIMIT, 235) \
+       _(x, TIMELIMIT, 236) \
+       _(x, MOVEVARS_WALLFRICTION, 237) \
+       _(x, MOVEVARS_FRICTION, 238) \
+       _(x, MOVEVARS_WATERFRICTION, 239) \
+       _(x, MOVEVARS_TICRATE, 240) \
        _(x, MOVEVARS_TIMESCALE, 241) \
+       _(x, MOVEVARS_GRAVITY, 242) \
+       _(x, MOVEVARS_STOPSPEED, 243) \
+       _(x, MOVEVARS_MAXSPEED, 244) \
+       _(x, MOVEVARS_SPECTATORMAXSPEED, 245) \
+       _(x, MOVEVARS_ACCELERATE, 246) \
+       _(x, MOVEVARS_AIRACCELERATE, 247) \
+       _(x, MOVEVARS_WATERACCELERATE, 248) \
+       _(x, MOVEVARS_ENTGRAVITY, 249) \
+       _(x, MOVEVARS_JUMPVELOCITY, 250) \
+       _(x, MOVEVARS_EDGEFRICTION, 251) \
+       _(x, MOVEVARS_MAXAIRSPEED, 252) \
+       _(x, MOVEVARS_STEPHEIGHT, 253) \
+       _(x, MOVEVARS_AIRACCEL_QW, 254) \
+       _(x, MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, 255) \
        /**/
 
 int g_magic_stats_hole = 0;
@@ -117,10 +152,12 @@ int g_magic_stats_hole = 0;
                        addstat_##T(STAT_##id.m_id, fld); \
                }
        void GlobalStats_update(entity this) {}
+       void GlobalStats_updateglobal() {}
     /** TODO: do we want the global copy to update? */
     #define REGISTER_STAT_3(id, T, expr) \
        REGISTER_STAT_2(id, T); \
        ACCUMULATE void GlobalStats_update(entity this) { STAT(id, this) = (expr); } \
+       ACCUMULATE void GlobalStats_updateglobal() { entity this = STATS; STAT(id, this) = (expr); } \
        STATIC_INIT(worldstat_##id) { entity this = STATS; STAT(id, this) = (expr); }
 #else
        #define REGISTER_STAT_2(id, type)
index f195574449379ceec441847d1605267878b38789..891235def666700cc2a0865d8809d9512a1b43ac 100644 (file)
@@ -50,7 +50,7 @@ void m_gamestatus()
        gamestatus = 0;
        if (isserver()) gamestatus |= GAME_ISSERVER;
        if (clientstate() == CS_CONNECTED || isdemo()) gamestatus |= GAME_CONNECTED;
-       if (cvar("developer")) gamestatus |= GAME_DEVELOPER;
+       if (cvar("developer") > 0) gamestatus |= GAME_DEVELOPER;
 }
 
 void m_init()
@@ -73,7 +73,7 @@ void m_init()
 #endif
 
        // list all game dirs (TEST)
-       if (cvar("developer"))
+       if (cvar("developer") > 0)
        {
                for (int i = 0; ; ++i)
                {
index a3ad36355d9cece13deb37c750054cfe8794d0d2..0f64aefdbc1a207248f7d1b29e206610b8d7c18e 100644 (file)
@@ -183,6 +183,9 @@ void XonoticCampaignList_resizeNotify(entity me, vector relOrigin, vector relSiz
 
        me.checkMarkOrigin = eY + eX * (me.columnCheckMarkOrigin + me.columnCheckMarkSize) - me.checkMarkSize;
 
+       me.typeIconOrigin = vec3(me.columnPreviewSize - me.checkMarkSize.x, me.checkMarkOrigin.y, 0);
+       me.typeIconSize = me.checkMarkSize;
+
        rewrapCampaign(me.columnNameSize, me.rowsPerItem - 3, me.emptyLineHeight, me.realFontSize);
 }
 void XonoticCampaignList_doubleClickListBoxItem(entity me, float i, vector where)
@@ -226,6 +229,10 @@ void XonoticCampaignList_drawListBoxItem(entity me, int i, vector absSize, bool
        else
                draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
 
+       s = strcat("/gfx/menu/", cvar_string("menu_skin"), "/gametype_", campaign_gametype[i]);
+       if(i <= me.campaignIndex && draw_PictureSize(s) != '0 0 0')
+               draw_Picture(me.typeIconOrigin, s, me.typeIconSize, '1 1 1', 1);
+
        if(i < me.campaignIndex)
                draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
        if(i <= me.campaignIndex)
index 298e27587466697572311d048684b11a2dc21db9..d6c674e8d6343ef21cf9722ebecd0cab9e1d2290 100644 (file)
@@ -23,6 +23,8 @@ CLASS(XonoticCampaignList, XonoticListBox)
        ATTRIB(XonoticCampaignList, columnCheckMarkSize, float, 0);
        ATTRIB(XonoticCampaignList, checkMarkOrigin, vector, '0 0 0');
        ATTRIB(XonoticCampaignList, checkMarkSize, vector, '0 0 0');
+       ATTRIB(XonoticCampaignList, typeIconOrigin, vector, '0 0 0');
+       ATTRIB(XonoticCampaignList, typeIconSize, vector, '0 0 0');
        ATTRIB(XonoticCampaignList, realUpperMargin1, float, 0);
        ATTRIB(XonoticCampaignList, realUpperMargin2, float, 0);
 
index 33fe3575a8bde07be1326970f232e4087667cf6d..eac6f754d8082755219a8ce81c3f91ba0fad97c6 100644 (file)
@@ -161,17 +161,19 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_dodging", _("Dodging"),
-                       _("Enable dodging")));
+                       _("Enable dodging (quick acceleration in a given direction). Double-tap a directional key to dodge")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_touchexplode", _("Touch explode")));
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_touchexplode", _("Touch explode"),
+                        _("An explosion occurs when two players collide")));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_cloaked", _("Cloaked"),
                        _("All players are almost invisible")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_buffs", _("Buffs")));
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_buffs", _("Buffs"),
+                        _("Enable buff pickups (random bonuses like Medic, Invisible, etc.) on the maps that support it")));
                        e.cvarOffValue = "-1"; // TODO: make this a radio button?
        me.TR(me);
                me.TDempty(me, 0.2);
@@ -185,7 +187,7 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                s = makeXonoticSlider_T(10, 50, 1, "g_bloodloss",
-                       _("Amount of health below which your player gets stunned because of blood loss"));
+                       _("Amount of health below which players start bleeding out (health rots and they can't jump)"));
                me.TD(me, 1, 1.8, e = makeXonoticSliderCheckBox(0, 1, s, _("Blood loss")));
                        setDependent(e, "g_instagib", 0, 0);
        me.TR(me);
@@ -194,7 +196,7 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                s = makeXonoticSlider_T(80, 400, 8, "sv_gravity",
-                       _("Make things fall to the ground slower, lower value means lower gravity"));
+                       _("Make things fall to the ground slower (percentage of normal gravity)"));
                        s.valueDigits = 0;
                        s.valueDisplayMultiplier = 0.125; // show gravity in percent
                me.TD(me, 1, 1.8, e = makeXonoticSliderCheckBox(800, 1, s, _("Low gravity")));
@@ -207,22 +209,25 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_grappling_hook", _("Grappling hook"),
-                       _("Players spawn with the grappling hook")));
+                       _("Players spawn with the grappling hook. Press the 'hook' key to use it")));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_jetpack", _("Jetpack"),
-                       _("Players spawn with the jetpack")));
+                       _("Players spawn with the jetpack. Double-tap 'jump' or press the 'jetpack' key to use it")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_invincible_projectiles", _("Invincible Projectiles")));
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_invincible_projectiles", _("Invincible Projectiles"),
+                        _("Projectiles can't be destroyed. However, Electro combos still work")));
                        setDependent(e, "g_instagib", 0, 0);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_new_toys", _("New Toys")));
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_new_toys", _("New Toys"),
+                        _("Some weapon spawns will be randomly replaced with new weapons: Heavy Laser Assault Cannon, Mine Layer, Rifle, T.A.G. Seeker")));
                        setDependentWeird(e, checkCompatibility_newtoys);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_rocket_flying", _("Rocket Flying")));
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_rocket_flying", _("Rocket Flying"),
+                        _("Devastator rockets can be detonated instantly (otherwise, there's a short delay). This allows players to fire and detonate a Devastator rocket while in the air for a strong mid-air boost even while moving fast")));
                        setDependent(e, "g_instagib", 0, 0);
        me.TR(me);
                me.TDempty(me, 0.2);
index e68b967a0f69a06b888beb214920dbcfd6373eac..3f5b18712ea8263b277e72a4624a2ae0af65dd21 100644 (file)
@@ -11,7 +11,7 @@ void XonoticQuitDialog_fill(entity me)
                me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Are you sure you want to quit?")));
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticCommandButton_T(_("Yes"), '1 0 0', "echo ]quit\nquit", 0,
+               me.TD(me, 1, 1, e = makeXonoticCommandButton_T(_("Yes"), '1 0 0', "echo ]quitquit", 0,
                        _("Back to work...")));
                me.TD(me, 1, 1, e = makeXonoticButton_T(_("No"), '0 1 0',
                        _("I got some more fragging to do!")));
index 7af8c550032b3dec7e6368f19b6ada4cfe8099d7..1f8c6d81cffc6cb9f8460358a67a2b2f35075412 100644 (file)
@@ -172,7 +172,7 @@ void XonoticAudioSettingsTab_fill(entity me)
                        e.sendCvars = true;
        me.TR(me);
        me.TR(me);
-               if(cvar("developer"))
+               if(cvar("developer") > 0)
                        me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
 
        me.gotoRC(me, me.rows - 1, 0);
index a9375327ec2e9735b2ea65db1e1632cc44edc5e1..9841f66ff3f83313b093daa686083838b0e8b967 100644 (file)
@@ -39,8 +39,8 @@ void XonoticEffectsSettingsTab_fill(entity me)
        float n;
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Quality preset:")));
-               n = 5 + 2 * boolean(cvar("developer"));
-               if(cvar("developer"))
+               n = 5 + 2 * boolean(cvar("developer") > 0);
+               if(cvar("developer") > 0)
                {
                        me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^OMG!")), '1 0 1', "exec effects-omg.cfg", 0));
                                e.applyButton = effectsApplyButton;
@@ -55,7 +55,7 @@ void XonoticEffectsSettingsTab_fill(entity me)
                        e.applyButton = effectsApplyButton;
                me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultra")), '0 0 0', "exec effects-ultra.cfg", 0));
                        e.applyButton = effectsApplyButton;
-               if(cvar("developer"))
+               if(cvar("developer") > 0)
                {
                        me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultimate")), '0.5 0 0', "exec effects-ultimate.cfg", 0));
                                e.applyButton = effectsApplyButton;
@@ -87,7 +87,7 @@ void XonoticEffectsSettingsTab_fill(entity me)
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:")));
                        setDependent(e, "r_showsurfaces", 0, 0);
                me.TD(me, 1, 2, e = makeXonoticPicmipSlider());
-                       if(cvar("developer"))
+                       if(cvar("developer") > 0)
                                e.addValue(e, ZCTX(_("RES^Leet")), "1337");
                        e.addValue(e, ZCTX(_("RES^Lowest")), "3");
                        e.addValue(e, ZCTX(_("RES^Very low")), "2");
@@ -125,10 +125,11 @@ void XonoticEffectsSettingsTab_fill(entity me)
                        }
                }
        me.TR(me);
-               if(cvar("developer"))
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1, e = makeXonoticCheckBoxEx_T(1, 0, "r_sky", _("Show skyboxes"), _("Disable skyboxes for performance and visibility")));
+               if(cvar("developer") > 0)
                {
-                       me.TDempty(me, 0.2);
-                       me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(3, 0, "r_showsurfaces", _("Show surfaces"),
+                       me.TD(me, 1, 1, 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.")));
                }
        me.TR(me);
index 0b3a9ff6c4402253b2a30fb8ab277ab41b6a3c3d..ed21eeae0b46d996abb396b337a54192532b7eb8 100644 (file)
@@ -24,7 +24,6 @@ void XonoticGameViewSettingsTab_fill(entity me)
 
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
-               makeMulti(e, "crosshair_hittest_showimpact");
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_eventchase_death", _("Slide to third person upon death")));
@@ -49,7 +48,6 @@ void XonoticGameViewSettingsTab_fill(entity me)
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
-               makeMulti(e, "crosshair_hittest_showimpact");
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance")));
index 8eac7301abc705df0d96c214107ddb7683b5957a..5c77faffb501ed0ca2aebf740dd8d559548b94d4 100644 (file)
@@ -3,6 +3,7 @@
 #include "weaponslist.qh"
 #include "commandbutton.qh"
 #include "textlabel.qh"
+#include "textslider.qh"
 #include "checkbox.qh"
 #include "button.qh"
 #include "radiobutton.qh"
@@ -72,6 +73,18 @@ void XonoticGameWeaponsSettingsTab_fill(entity me)
                me.TD(me, 1, 1.0, e = makeXonoticRadioButton_T(1, "cl_gunalign", "3", _("Right align"),
                        _("Position of the weapon model; requires reconnect")));
                        setDependent(e, "r_drawviewmodel", 1, 1);
+       me.TR(me);
+                       me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Weapon model opacity:")));
+                               setDependent(e, "r_drawviewmodel", 1, 1);
+
+                       me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_viewmodel_alpha"));
+                               setDependent(e, "r_drawviewmodel", 1, 1);
+                               e.addValue(e, "15%", "0.15");
+                               e.addValue(e, "25%", "0.25");
+                               e.addValue(e, "50%", "0.5");
+                               e.addValue(e, "75%", "0.75");
+                               e.addValue(e, "100%", "1");
+                               e.configureXonoticTextSliderValues(e);
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.2);
index ca812d30415bd23c46802c36c0359cc41e0e3bd2..1033919f4f7a2e3ce2490c7444512c2670a20b65 100644 (file)
@@ -40,10 +40,6 @@ void XonoticMiscSettingsTab_fill(entity me)
                        e.addValue(e, _("Fast ADSL"), "40000");
                        e.addValue(e, _("Broadband"), "66666");
                        e.configureXonoticTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:")));
-               me.TD(me, 1, 2, e = makeXonoticSlider_T(30, 180, 5, "cl_netfps",
-                       _("How many input packets to send to the server each second")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Server queries/s:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 10, "net_slist_queriespersecond"));
@@ -64,7 +60,7 @@ void XonoticMiscSettingsTab_fill(entity me)
                e.addValue(e, strzone(_("Unlimited")), "0");
                e.configureXonoticTextSliderValues(e);
        me.TR(me);
-               if(cvar("developer"))
+               if(cvar("developer") > 0)
                {
                        me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:")));
                        me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping"));
index 0e524b6e23852cedf80e6c5c3e66e3841ac430ef..305567b7d7b5b01a0a87dd6ca4a42ef5b3ebdc6a 100644 (file)
@@ -62,7 +62,7 @@ void XonoticVideoSettingsTab_fill(entity me)
                        _("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate")));
 
        me.TR(me);
-               if(cvar("developer"))
+               if(cvar("developer") > 0)
                {
                        me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "v_flipped", _("Flip view horizontally"),
                                _("Poor man's left handed mode")));
@@ -162,7 +162,7 @@ void XonoticVideoSettingsTab_fill(entity me)
                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")));
                        setDependent(e, "vid_gl20", 1, 1);
-       if(cvar("developer"))
+       if(cvar("developer") > 0)
        {
                me.TR(me);
                        me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_psycho", _("Psycho coloring (easter egg)")));
index dc39346aa61f962f323964e81b05eccec083dc4f..b2ae8c0ba9269752bbeddf82c4beb723d5cf8e70 100644 (file)
@@ -128,8 +128,8 @@ void XonoticSingleplayerDialog_fill(entity me)
        me.gotoRC(me, me.rows - 2, 0);
                me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Campaign Difficulty:")));
                me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "-2", ZCTX(_("CSKL^Easy"))));
-               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "-1", ZCTX(_("CSKL^Medium"))));
-               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "0", ZCTX(_("CSKL^Hard"))));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "0", ZCTX(_("CSKL^Medium"))));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "2", ZCTX(_("CSKL^Hard"))));
                me.TR(me);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Singleplayer!"), '0 0 0'));
                        e.onClick = CampaignList_LoadMap;
index 72639fcb1ca93ddd504d34c262d3a5d8854ace78..5e2b1bf81785df0b4f9189345b7d9f718567a1a1 100644 (file)
@@ -11,13 +11,13 @@ 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"));
-       if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")),      "0.25 250 0"); }
+       if(cvar("developer") > 0) { 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");
        me.addValue(me,                         ZCTX(_("PART^Normal")),   "1.0 1000 1");
        me.addValue(me,                         ZCTX(_("PART^High")),     "1.5 1500 1");
        me.addValue(me,                         ZCTX(_("PART^Ultra")),    "2.0 2000 2");
-       if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^Ultimate")), "3.0 3000 2"); }
+       if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PART^Ultimate")), "3.0 3000 2"); }
        me.configureXonoticTextSliderValues(me);
 }
 void XonoticParticlesSlider_loadCvars(entity me)
index c203a93030a6e986ca646ee5298a9cf6ba891c36..a126b9e5da2713f68fc1cf4f952950a035aadec8 100644 (file)
@@ -705,7 +705,7 @@ int GameType_GetCount()
        #define GAMETYPE(id) ++i;
        GAMETYPES
        #undef GAMETYPE
-       #define GAMETYPE(it) { if (dev) ++i; }
+       #define GAMETYPE(it) { if (dev > 0) ++i; }
        HIDDEN_GAMETYPES
        #undef GAMETYPE
        return i;
index a783d72314a7a1c571014ce6b5cbe70d2d0ac440..8213aaddec322cb0cf4f547b058c9c90adf3d72e 100644 (file)
@@ -39,6 +39,7 @@ float autocvar_g_balance_falldamage_deadminspeed;
 float autocvar_g_balance_falldamage_factor;
 int autocvar_g_balance_falldamage_maxdamage;
 float autocvar_g_balance_falldamage_minspeed;
+bool autocvar_g_balance_falldamage_onlyvertical;
 int autocvar_g_balance_firetransfer_damage;
 int autocvar_g_balance_firetransfer_time;
 float autocvar_g_balance_fuel_limit;
@@ -92,7 +93,7 @@ float autocvar_g_ballistics_density_corpse;
 float autocvar_g_ballistics_density_player;
 float autocvar_g_ballistics_mindistance;
 bool autocvar_g_ballistics_penetrate_clips = true;
-float autocvar_g_ballistics_solidpenetration_exponent = 0.25;
+float autocvar_g_ballistics_solidpenetration_exponent = 1;
 float autocvar_g_ban_default_bantime;
 float autocvar_g_ban_default_masksize;
 float autocvar_g_ban_sync_interval;
@@ -528,4 +529,4 @@ bool autocvar_sv_showspectators;
 bool autocvar_g_weaponswitch_debug;
 bool autocvar_g_weaponswitch_debug_alternate;
 bool autocvar_g_allow_checkpoints;
-bool autocvar_sv_vq3compat_changehitbox = false;
+bool autocvar_sv_q3defragcompat_changehitbox = false;
index 40afed17990b7e93c40e41e194b5893054c54911..cb83896c22317169767e72ca953da029a0852e47 100644 (file)
@@ -170,6 +170,26 @@ void bot_setnameandstuff(entity this)
        }
        else
        {
+               entity balance = TeamBalance_CheckAllowedTeams(NULL);
+               TeamBalance_GetTeamCounts(balance, NULL);
+               int smallest_team = -1;
+               int smallest_count = -1;
+               if (teamplay)
+               {
+                       for (int i = 1; i <= AvailableTeams(); ++i)
+                       {
+                               // NOTE if (autocvar_g_campaign && autocvar_g_campaign_forceteam == i)
+                               // TeamBalance_GetNumberOfPlayers(balance, i); returns the number of players + 1
+                               // since it keeps a spot for the real player in the desired team
+                               int count = TeamBalance_GetNumberOfPlayers(balance, i);
+                               if (smallest_count < 0 || count < smallest_count)
+                               {
+                                       smallest_team = i;
+                                       smallest_count = count;
+                               }
+                       }
+               }
+               TeamBalance_Destroy(balance);
                RandomSelection_Init();
                while((readfile = fgets(file)))
                {
@@ -177,18 +197,33 @@ void bot_setnameandstuff(entity this)
                                continue;
                        if(substring(readfile, 0, 1) == "#")
                                continue;
+                       // NOTE if the line is empty tokenizebyseparator(readfile, "\t")
+                       // will create 1 empty token because there's no separator (bug?)
+                       if (readfile == "")
+                               continue;
                        tokens = tokenizebyseparator(readfile, "\t");
                        if(tokens == 0)
                                continue;
                        s = argv(0);
-                       prio = 1;
+                       prio = 0;
+                       bool conflict = false;
                        FOREACH_CLIENT(IS_BOT_CLIENT(it), {
-                               if(s == it.cleanname)
+                               if (s == it.cleanname)
                                {
-                                       prio = 0;
+                                       conflict = true;
                                        break;
                                }
                        });
+                       if (!conflict)
+                               prio += 1;
+                       if (teamplay && !(autocvar_bot_vs_human && AvailableTeams() == 2))
+                       {
+                               int forced_team = stof(argv(5));
+                               if (!Team_IsValidIndex(forced_team))
+                                       forced_team = 0;
+                               if (!forced_team || forced_team == smallest_team)
+                                       prio += 2;
+                       }
                        RandomSelection_AddString(readfile, 1, prio);
                }
                readfile = RandomSelection_chosen_string;
@@ -211,7 +246,10 @@ void bot_setnameandstuff(entity this)
        if(argv(4) != "" && stof(argv(4)) >= 0) bot_pants = argv(4);
        else bot_pants = ftos(floor(random() * 15));
 
-       this.bot_forced_team = stof(argv(5));
+       if (teamplay && !(autocvar_bot_vs_human && AvailableTeams() == 2))
+               this.bot_forced_team = stof(argv(5));
+       else
+               this.bot_forced_team = 0;
 
        prio = 6;
 
index 01352d0e4d94ba4702fdb727a8818dc1e946d02b..5457211d84d2305bfa70ba1cd74a694a61239fbe 100644 (file)
@@ -239,6 +239,9 @@ bool navigation_checkladders(entity e, vector org, vector m1, vector m2, vector
        return false;
 }
 
+// Unfortuntely we can't use trace_inwater since it doesn't hold the fraction of the total
+// distance that was traveled before impact as the description in the engine (collision.h) says.
+// It would have helped to speed up tracewalk underwater
 vector resurface_limited(vector org, float lim, vector m1)
 {
        if (WETFEET(org + eZ * (lim - org.z)))
index 7a40f18e8df56f6e1eacf6e0f242b08b316ee9e6..c09d8f81d4fc927bdabe934b27ac86a9e0f3dcab 100644 (file)
@@ -470,7 +470,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
                        }
                        else
                        {
-                               if(autocvar_developer)
+                               if(autocvar_developer > 0)
                                {
                                        LOG_INFO("A generated waypoint is stuck in solid at ", vtos(w.origin));
                                        backtrace("Waypoint stuck");
index 76e2cdeb8480069230118925719d77d9e105ae5b..f0fcea6abf62def2f2d8cabf03556955cf7dbd7d 100644 (file)
@@ -98,11 +98,7 @@ void CampaignPreInit()
                return;
        }
 
-       baseskill = autocvar_g_campaign_skill;
-       baseskill = baseskill + campaign_botskill[0];
-       if(baseskill < 0)
-               baseskill = 0;
-
+       baseskill = max(0, autocvar_g_campaign_skill + campaign_botskill[0]);
        campaign_forcewin = false;
 
        cvar_set("sv_public", "0");
@@ -161,16 +157,28 @@ void CampaignPostInit()
        if(autocvar__campaign_testrun)
        {
                cvar_set("fraglimit", "0");
+               cvar_set("leadlimit", "0");
                cvar_set("timelimit", "0.01");
                cvar_set_normal("fraglimit", "0");
+               cvar_set_normal("leadlimit", "0");
                cvar_set_normal("timelimit", "0.01");
        }
        else
        {
-               cvar_set("fraglimit", ftos(campaign_fraglimit[0]));
-               cvar_set("timelimit", ftos(campaign_timelimit[0]));
-               cvar_set_normal("fraglimit", ftos(campaign_fraglimit[0]));
-               cvar_set_normal("timelimit", ftos(campaign_timelimit[0]));
+               // "default" uses implicit values, "" or "0" means no limit
+               tokenizebyseparator(campaign_fraglimit[0], "+");
+               if(argv(0) != "default") {
+                       cvar_set("fraglimit", argv(0));
+                       cvar_set_normal("fraglimit", argv(0));
+               }
+               if(argv(1) != "default") {
+                       cvar_set("leadlimit", argv(1));
+                       cvar_set_normal("leadlimit", argv(1));
+               }
+               if(campaign_timelimit[0] != "default") {
+                       cvar_set("timelimit", campaign_timelimit[0]);
+                       cvar_set_normal("timelimit", campaign_timelimit[0]);
+               }
        }
 }
 
index 98616a76341f76ac901e838fdd7b81cb39478911..d79c630f206524489dba97099434b7c7320f2049 100644 (file)
@@ -25,6 +25,7 @@
 #include "campaign.qh"
 #include "command/common.qh"
 #include "scores_rules.qh"
+#include "weapons/common.qh"
 
 #include "bot/api.qh"
 
@@ -610,7 +611,8 @@ void PutPlayerInServer(entity this)
        this.respawn_flags = 0;
        this.respawn_time = 0;
        STAT(RESPAWN_TIME, this) = 0;
-       this.scale = autocvar_sv_player_scale;
+       bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox;
+       this.scale = ((q3dfcompat) ? 0.9 : autocvar_sv_player_scale);
        this.fade_time = 0;
        this.pain_frame = 0;
        this.pain_finished = 0;
@@ -713,10 +715,7 @@ void PutPlayerInServer(entity this)
        for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
                .entity weaponentity = weaponentities[slot];
-               entity oldwep = this.(weaponentity);
                CL_SpawnWeaponentity(this, weaponentity);
-               if(oldwep && oldwep.owner == this)
-                       this.(weaponentity).m_gunalign = oldwep.m_gunalign;
        }
        this.alpha = default_player_alpha;
        this.colormod = '1 1 1' * autocvar_g_player_brightness;
@@ -778,6 +777,7 @@ void PutPlayerInServer(entity this)
 
        if (CS(this).impulse) ImpulseCommands(this);
 
+       W_ResetGunAlign(this, CS(this).cvar_cl_gunalign);
        for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
                .entity weaponentity = weaponentities[slot];
@@ -1339,7 +1339,7 @@ void PrintToChat(entity client, string text)
 ERASEABLE
 void DebugPrintToChat(entity client, string text)
 {
-       if (autocvar_developer)
+       if (autocvar_developer > 0)
        {
                PrintToChat(client, text);
        }
@@ -1355,7 +1355,7 @@ void PrintToChatAll(string text)
 ERASEABLE
 void DebugPrintToChatAll(string text)
 {
-       if (autocvar_developer)
+       if (autocvar_developer > 0)
        {
                PrintToChatAll(text);
        }
@@ -1377,7 +1377,7 @@ void PrintToChatTeam(int team_num, string text)
 ERASEABLE
 void DebugPrintToChatTeam(int team_num, string text)
 {
-       if (autocvar_developer)
+       if (autocvar_developer > 0)
        {
                PrintToChatTeam(team_num, text);
        }
@@ -2085,6 +2085,7 @@ bool joinAllowed(entity this)
 
 .int items_added;
 .string shootfromfixedorigin;
+.bool dualwielding_prev;
 bool PlayerThink(entity this)
 {
        if (game_stopped || intermission_running) {
@@ -2187,6 +2188,15 @@ bool PlayerThink(entity this)
                stuffcmd(this, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin));
        }
 
+       // reset gun alignment when dual wielding status changes
+       // to ensure guns are always aligned right and left
+       bool dualwielding = W_DualWielding(this);
+       if(this.dualwielding_prev != dualwielding)
+       {
+               W_ResetGunAlign(this, CS(this).cvar_cl_gunalign);
+               this.dualwielding_prev = dualwielding;
+       }
+
        // LordHavoc: allow firing on move frames (sub-ticrate), this gives better timing on slow servers
        //if(frametime)
        {
@@ -2207,27 +2217,25 @@ bool PlayerThink(entity this)
                this.items |= this.items_added;
        }
 
-       player_regen(this);
-
-       // WEAPONTODO: Add a weapon request for this
-       // rot vortex charge to the charge limit
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       if (frametime)
        {
-               .entity weaponentity = weaponentities[slot];
-               if (WEP_CVAR(vortex, charge_rot_rate) && this.(weaponentity).vortex_charge > WEP_CVAR(vortex, charge_limit) && this.(weaponentity).vortex_charge_rottime < time)
-                       this.(weaponentity).vortex_charge = bound(WEP_CVAR(vortex, charge_limit), this.(weaponentity).vortex_charge - WEP_CVAR(vortex, charge_rot_rate) * frametime / W_TICSPERFRAME, 1);
-       }
+               // WEAPONTODO: Add a weapon request for this
+               // rot vortex charge to the charge limit
+               for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+               {
+                       .entity weaponentity = weaponentities[slot];
+                       if (WEP_CVAR(vortex, charge_rot_rate) && this.(weaponentity).vortex_charge > WEP_CVAR(vortex, charge_limit) && this.(weaponentity).vortex_charge_rottime < time)
+                               this.(weaponentity).vortex_charge = bound(WEP_CVAR(vortex, charge_limit), this.(weaponentity).vortex_charge - WEP_CVAR(vortex, charge_rot_rate) * frametime / W_TICSPERFRAME, 1);
+               }
 
-       if (frametime) player_anim(this);
+               player_regen(this);
+               player_anim(this);
+               this.dmg_team = max(0, this.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
+       }
 
-       // secret status
        secrets_setstatus(this);
-
-       // monsters status
        monsters_setstatus(this);
 
-       this.dmg_team = max(0, this.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
-
        return true;
 }
 
@@ -2457,7 +2465,7 @@ void PlayerPreThink (entity this)
                this.max_armorvalue = 0;
        }
 
-       if(IS_PLAYER(this))
+       if (frametime && IS_PLAYER(this))
        {
                if (STAT(FROZEN, this) == FROZEN_TEMP_REVIVING)
                {
index b611ab2665896975ab0b4ce15c24da2480f61190..90073beaaa2273e33a876264a85358aa71ac1b4e 100644 (file)
@@ -477,7 +477,7 @@ void ReadyRestart_force()
 void ReadyRestart()
 {
        if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || game_stopped || race_completing) localcmd("restart\n");
-       else localcmd("\nsv_hook_gamerestart\n");
+       else localcmd("\nsv_hook_readyrestart\n");
 
        // 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.
index 8205b81284d2811d618b38e6c8675aca3942482b..630b1ceb850702ff30eb1323ba559317cd97600e 100644 (file)
@@ -59,10 +59,7 @@ SPAWNFUNC_ITEM(item_armor_shard, ITEM_ArmorSmall)
 SPAWNFUNC_ITEM(item_enviro, ITEM_Shield)
 
 // medkit -> armor (we have no holdables)
-SPAWNFUNC_ITEM(holdable_medkit, ITEM_ArmorMega)
-
-// doubler -> strength
-SPAWNFUNC_ITEM(item_doubler, ITEM_Strength)
+SPAWNFUNC_ITEM(holdable_medkit, ITEM_ArmorBig)
 
 .float wait;
 .float delay;
@@ -233,6 +230,7 @@ spawnfunc(target_fragsFilter)
 }
 
 //spawnfunc(item_flight)       /* handled by buffs mutator */
+//spawnfunc(item_doubler)        /* handled by buffs mutator */
 //spawnfunc(item_haste)        /* handled by buffs mutator */
 //spawnfunc(item_health)       /* handled in t_quake.qc */
 //spawnfunc(item_health_large) /* handled in t_items.qc */
index b2b91bc02baf71cea1adf089e8236eea2a397667..aa970f4be3626a6ef4187417ad8c6f4a3f84769a 100644 (file)
@@ -359,9 +359,13 @@ void FireGrapplingHook(entity actor, .entity weaponentity)
        if(weaponLocked(actor)) return;
        if(actor.vehicle) return;
 
-       // TODO: offhand hook shoots from eye
+       int s = W_GunAlign(actor.(weaponentity), STAT(GUNALIGN, actor)) - 1;
+       vector vs = hook_shotorigin[s];
+       vector oldmovedir = actor.(weaponentity).movedir;
+       actor.(weaponentity).movedir = vs;
        W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', true, 0, SND_HOOK_FIRE, CH_WEAPON_B, 0, WEP_HOOK.m_id);
        Send_Effect(EFFECT_HOOK_MUZZLEFLASH, w_shotorg, '0 0 0', 1);
+       actor.(weaponentity).movedir = oldmovedir;
 
        entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
        missile.owner = missile.realowner = actor;
index 0c44a95f17bf5385372fb106e1dd4e37114930ee..c3dc5be39f605369ca208c79ec61490d9bdda3cd 100644 (file)
@@ -330,6 +330,7 @@ void cvar_changes_init()
                BADCVAR("g_balance_kill_delay");
                BADCVAR("g_buffs_pickup_anyway");
                BADCVAR("g_buffs_randomize");
+               BADCVAR("g_buffs_randomize_teamplay");
                BADCVAR("g_campcheck_distance");
                BADCVAR("g_ca_point_leadlimit");
                BADCVAR("g_ca_point_limit");
@@ -872,6 +873,12 @@ spawnfunc(worldspawn)
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1);
 
+       if(fexists(strcat("scripts/", mapname, ".arena")))
+               cvar_settemp("sv_q3acompat_machineshotgunswap", "1");
+
+       if(fexists(strcat("scripts/", mapname, ".defi")))
+               cvar_settemp("sv_q3defragcompat", "1");
+
        if(whichpack(strcat("maps/", mapname, ".cfg")) != "")
        {
                int fd = fopen(strcat("maps/", mapname, ".cfg"), FILE_READ);
@@ -2262,7 +2269,7 @@ void Shutdown()
                        else
                                db_save(ServerProgsDB, strcat("server.db", autocvar_sessionid));
                }
-               if(autocvar_developer)
+               if(autocvar_developer > 0)
                {
                        if(autocvar_sv_db_saveasdump)
                                db_dump(TemporaryDB, "server-temp.db");
index ded47a6387f97920ce32f2fa41851a7b8ec32dea..dd14a049e1bbb661464ab7bfb112c20ccf92c45f 100644 (file)
@@ -7,6 +7,7 @@
 #include "ipban.qh"
 #include <server/mutators/_mod.qh>
 #include "../common/t_items.qh"
+#include "mapvoting.qh"
 #include "resources.qh"
 #include "items.qh"
 #include "player.qh"
@@ -228,6 +229,30 @@ string AmmoNameFromWeaponentity(Weapon wep)
        return ammoitems;
 }
 
+string PlayerHealth(entity this)
+{
+       float myhealth = floor(GetResource(this, RES_HEALTH));
+       if(myhealth == -666)
+               return "spectating";
+       else if(myhealth == -2342 || (myhealth == 2342 && mapvote_initialized))
+               return "observing";
+       else if(myhealth <= 0 || IS_DEAD(this))
+               return "dead";
+       return ftos(myhealth);
+}
+
+string WeaponNameFromWeaponentity(entity this, .entity weaponentity)
+{
+       entity wepent = this.(weaponentity);
+       if(!wepent)
+               return "none";
+       else if(wepent.m_weapon != WEP_Null)
+               return wepent.m_weapon.m_name;
+       else if(wepent.m_switchweapon != WEP_Null)
+               return wepent.m_switchweapon.m_name;
+       return "none"; //Weapons_from(wepent.cnt).m_name;
+}
+
 string formatmessage(entity this, string msg)
 {
        float p, p1, p2;
@@ -281,11 +306,11 @@ string formatmessage(entity this, string msg)
                        case "\\":replacement = "\\"; break;
                        case "n": replacement = "\n"; break;
                        case "a": replacement = ftos(floor(GetResource(this, RES_ARMOR))); break;
-                       case "h": replacement = ftos(floor(GetResource(this, RES_HEALTH))); break;
+                       case "h": replacement = PlayerHealth(this); break;
                        case "l": replacement = NearestLocation(this.origin); break;
                        case "y": replacement = NearestLocation(cursor); break;
                        case "d": replacement = NearestLocation(this.death_origin); break;
-                       case "w": replacement = ((this.(weaponentity).m_weapon == WEP_Null) ? ((this.(weaponentity).m_switchweapon == WEP_Null) ? Weapons_from(this.(weaponentity).cnt) : this.(weaponentity).m_switchweapon) : this.(weaponentity).m_weapon).m_name; break;
+                       case "w": replacement = WeaponNameFromWeaponentity(this, weaponentity); break;
                        case "W": replacement = AmmoNameFromWeaponentity(this.(weaponentity).m_weapon); break;
                        case "x": replacement = ((cursor_ent.netname == "" || !cursor_ent) ? "nothing" : cursor_ent.netname); break;
                        case "s": replacement = ftos(vlen(this.velocity - this.velocity_z * '0 0 1')); break;
@@ -475,6 +500,8 @@ void GetCvars(entity this, entity store, int f)
                }
                if (s == "cl_allow_uidtracking")
                        PlayerStats_GameReport_AddPlayer(this);
+               //if (s == "cl_gunalign")
+                       //W_ResetGunAlign(this, store.cvar_cl_gunalign);
        }
 }
 
index 2374b4869bc6c5415c08c319a162850ca9871440..2b85a0476fe4f6e66d2d6e3d26f95f0a97b93155 100644 (file)
@@ -11,7 +11,7 @@
 #include <common/mapinfo.qh>
 #include <common/turrets/all.qh>
 
-#ifdef RELEASE
+#if 1
 #define cvar_string_normal builtin_cvar_string
 #define cvar_normal builtin_cvar
 #else
index 9e67050cb654b23c9847c8b2e94bda0f1898b106..9bf3f7c60283db691cbfa8430aeba0ad4a504aec 100644 (file)
@@ -369,7 +369,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
 
        if(attacker == this)
        {
-               // don't reset pushltime for this damage as it may be an attempt to
+               // don't reset pushltime for self damage as it may be an attempt to
                // escape a lava pit or similar
                //this.pushltime = 0;
                this.istypefrag = 0;
index 6f128716365933599e271f4294ef295a779ef8b8..bd5a8540e22937cd791fb569dd89a24590431e6a 100644 (file)
@@ -16,6 +16,7 @@
 #include "../lib/warpzone/common.qh"
 #include "../common/vehicles/vehicle.qh"
 #include "../common/vehicles/sv_vehicles.qh"
+#include <server/player.qh>
 
 #define PORTALS_ARE_NOT_SOLID
 
@@ -103,7 +104,7 @@ vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle)
 }
 
 .vector right_vector;
-float Portal_TeleportPlayer(entity teleporter, entity player)
+float Portal_TeleportPlayer(entity teleporter, entity player, entity portal_owner)
 {
        vector from, to, safe, step, transform, ang, newvel;
        float planeshift, s, t;
@@ -189,6 +190,12 @@ float Portal_TeleportPlayer(entity teleporter, entity player)
                if(time < teleporter.teleport_time + 1)
                        Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_ACHIEVEMENT_AMAZING);
        }
+       else if(player != portal_owner && IS_PLAYER(portal_owner) && IS_PLAYER(player))
+       {
+               player.pusher = portal_owner;
+               player.pushltime = time + autocvar_g_maxpushtime;
+               player.istypefrag = PHYS_INPUT_BUTTON_CHAT(player);
+       }
 
        if (!teleporter.enemy)
        {
@@ -317,7 +324,7 @@ void Portal_Touch(entity this, entity toucher)
        }
        */
 
-       if(Portal_TeleportPlayer(this, toucher))
+       if(Portal_TeleportPlayer(this, toucher, this.aiment))
                if(toucher.classname == "porto")
                        if(toucher.effects & EF_RED)
                                toucher.effects += EF_BLUE - EF_RED;
@@ -440,7 +447,7 @@ void Portal_Damage(entity this, entity inflictor, entity attacker, float damage,
                Portal_Remove(this, 1);
 }
 
-void Portal_Think_TryTeleportPlayer(entity this, entity e, vector g)
+void Portal_Think_TryTeleportPlayer(entity this, entity e, vector g, entity portal_owner)
 {
        if(!Portal_WillHitPlane(e.origin, e.mins, e.maxs, e.velocity + g, this.origin, v_forward, this.maxs.x))
                return;
@@ -449,7 +456,7 @@ void Portal_Think_TryTeleportPlayer(entity this, entity e, vector g)
        // already teleport him
        tracebox(e.origin, e.mins, e.maxs, e.origin + e.velocity * 2 * frametime, MOVE_NORMAL, e);
        if(trace_ent == this)
-               Portal_TeleportPlayer(this, e);
+               Portal_TeleportPlayer(this, e, portal_owner);
 }
 
 void Portal_Think(entity this)
@@ -479,13 +486,13 @@ void Portal_Think(entity this)
                                continue; // cannot go through someone else's portal
 
                if(it != o || time >= this.portal_activatetime)
-                       Portal_Think_TryTeleportPlayer(this, it, g);
+                       Portal_Think_TryTeleportPlayer(this, it, g, o);
 
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
            {
                .entity weaponentity = weaponentities[slot];
                if(it.(weaponentity).hook)
-                       Portal_Think_TryTeleportPlayer(this, it.(weaponentity).hook, g);
+                       Portal_Think_TryTeleportPlayer(this, it.(weaponentity).hook, g, o);
            }
        });
        this.solid = SOLID_TRIGGER;
index 54c9744332d5033ccbd5518f4f79b29dca36606c..ea89794357517cb79b5a83887712579e067dfc6b 100644 (file)
@@ -101,7 +101,6 @@ void CreatureFrame_FallDamage(entity this)
                return; // if the entity hasn't moved and isn't moving, then don't do anything
 
        // check for falling damage
-       float velocity_len = vlen(this.velocity);
        bool have_hook = false;
        for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
@@ -114,16 +113,24 @@ void CreatureFrame_FallDamage(entity this)
        }
        if(!have_hook)
        {
-               float dm = vlen(this.oldvelocity) - velocity_len; // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
+               float dm; // dm is the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
+               if(autocvar_g_balance_falldamage_onlyvertical)
+                       dm = fabs(this.oldvelocity.z) - vlen(this.velocity);
+               else
+                       dm = vlen(this.oldvelocity) - vlen(this.velocity);
                if (IS_DEAD(this))
                        dm = (dm - autocvar_g_balance_falldamage_deadminspeed) * autocvar_g_balance_falldamage_factor;
                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, DMG_NOWEP, this.origin, '0 0 0');
+               {
+                       tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this);
+                       if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODAMAGE))
+                               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)
+       if(autocvar_g_maxspeed > 0 && vdist(this.velocity, >, autocvar_g_maxspeed))
                Damage (this, NULL, NULL, 100000, DEATH_SHOOTING_STAR.m_id, DMG_NOWEP, this.origin, '0 0 0');
 }
 
@@ -239,6 +246,7 @@ void StartFrame()
        anticheat_startframe();
        MUTATOR_CALLHOOK(SV_StartFrame);
 
+       GlobalStats_updateglobal();
     FOREACH_CLIENT(true, GlobalStats_update(it));
     IL_EACH(g_players, IS_FAKE_CLIENT(it), PlayerPostThink(it));
 }
index ff9438e76d84b205679a05982d5b8bc1eb0b57f3..a7c7205c1fb5781bec8edf30adc0dfa5a2a3fc12 100644 (file)
@@ -496,8 +496,7 @@ entity TeamBalance_CheckAllowedTeams(entity for_whom)
        }
 
        // TODO: Balance quantity of bots across > 2 teams when bot_vs_human is set (and remove next line)
-       if (AvailableTeams() == 2)
-       if (autocvar_bot_vs_human && for_whom)
+       if (autocvar_bot_vs_human && AvailableTeams() == 2 && for_whom)
        {
                if (autocvar_bot_vs_human > 0)
                {
index 23a3ee67d6aa5ab8d2ba95d302f2b7514ecbdc39..93c49af9bddb7c7fe02cdd47018d5ce34a3758dd 100644 (file)
@@ -34,7 +34,7 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn)
        {
                if (wpn.spawnflags & WEP_FLAG_MUTATORBLOCKED)
                {
-                       LOG_WARNF("Attempted to spawn a mutator-blocked weapon rejected: prvm_edict server %i", this);
+                       //LOG_WARNF("Attempted to spawn a mutator-blocked weapon rejected: prvm_edict server %i", this);
                        startitem_failed = true;
                        return;
                }
index 6e74738c738eaf5a1bbabcf155bef94c74416ad2..0410c2f9ec45129c606efd30d0d7806fbbcc824d 100644 (file)
@@ -445,6 +445,28 @@ bool weaponLocked(entity player)
        return false;
 }
 
+void W_ResetGunAlign(entity player, int preferred_alignment)
+{
+       if(W_DualWielding(player))
+               preferred_alignment = 3; // right align, the second gun will default to left
+
+       // clear current weapon slots' alignments so we can redo the calculations!
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               .entity weaponentity = weaponentities[slot];
+               if (player.(weaponentity))
+                       player.(weaponentity).m_gunalign = 0;
+       }
+
+       // now set the new values
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               .entity weaponentity = weaponentities[slot];
+               if (player.(weaponentity))
+                       player.(weaponentity).m_gunalign = W_GunAlign(player.(weaponentity), preferred_alignment);
+       }
+}
+
 .bool hook_switchweapon;
 
 void W_WeaponFrame(Player actor, .entity weaponentity)
@@ -783,6 +805,8 @@ void W_Reload(entity actor, .entity weaponentity, float sent_ammo_min, Sound sen
                {
                        if (!(actor.items & IT_UNLIMITED_AMMO))
                        {
+                               if (autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0)
+                                       return; // in this case the primary weapon will do the switching when it runs out of ammo (TODO: do this same check but for other slots)
                                if (IS_REAL_CLIENT(actor) && actor.reload_complain < time)
                                {
                                        play2(actor, SND(UNAVAILABLE));
index 91879feb2a9a95548eb6008c500498bc79a07a09..986756aa510344405c4f27e9db7f9b57effef938 100644 (file)
@@ -23,6 +23,8 @@ void W_DropEvent(.void(Weapon, entity actor, .entity) event, entity player, floa
 
 void W_Reload(entity actor, .entity weaponentity, float sent_ammo_min, Sound sent_sound);
 
+void W_ResetGunAlign(entity player, int preferred_alignment);
+
 void W_WeaponFrame(Player actor, .entity weaponentity);
 
 float W_WeaponRateFactor(entity this);
index cb39b2a10ce1a16c1b5cb554be256a42e01c52f5..8b3f70a9414db5e046c8e240d40dcfc6d9a285bc 100644 (file)
@@ -34,3 +34,5 @@ g_spawn_near_teammate "!g_assault !g_freezetag"
 g_spawn_near_teammate_ignore_spawnpoint 1
 g_spawnshieldtime 0.5
 g_respawn_delay_forced 2
+
+g_ballistics_solidpenetration_exponent 0.25
index f87b86c8d99c4d4680e3497f194e90a28b219e8b..8901438e85a28e983c05eab5ffdff2b703871bc3 100644 (file)
@@ -10,7 +10,7 @@ electro_plasma_hull
 {
         {
        map textures/electro_plasma_hull.tga
-       alphaFunc GT0
+       alphaFunc GE128
        rgbGen Vertex
         }
 }
@@ -22,4 +22,4 @@ electro
                map textures/electronew.tga
                rgbgen lightingDiffuse
        }
-}
\ No newline at end of file
+}
index a6494cc088a0551d2856b8cfc8c4c3539cc49657..e940811df04e2b6c5193a5fa346887ff3b8c5639 100644 (file)
@@ -67,8 +67,8 @@ 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
+seta cl_spawn_point_dist_min 800
+seta cl_spawn_point_dist_max 1200
 
 freelook 1
 sensitivity 6
@@ -735,7 +735,7 @@ seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_c
 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"
 
-seta cl_viewmodel_alpha 0 "Maximum transparency of the view model, set to 0 to disable"
+seta cl_viewmodel_alpha 1 "Maximum opacity of the view model, use a value between 0 and 1"
 
 set debugdraw 0
 set debugdraw_filter ""
@@ -745,6 +745,9 @@ set debugtrace 0
 // FIXME remove this when the engine feature FINALLY MAYBE works
 r_glsl_skeletal 0
 
+// FIXME engine description mentions the default should be 1, but sets it to 2 anyway, breaks some maps
+r_useportalculling 1
+
 // 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)
@@ -796,7 +799,7 @@ r_shadow_glossintensity 1
 r_fullbright_directed 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
+r_water_refractdistort 0.003
 
 set cl_rainsnow_maxdrawdist 2048
 
@@ -854,7 +857,6 @@ seta cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides
 seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items (colormod format: 0 0 0 leaves the color unchanged, negative values allowed)"
 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) - items are more visible in shadows"
 set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0 (colormod format: 0 0 0 leaves the color unchanged, negative values allowed)"
 set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
 
index f44d9c96f969fa5853216a289a2d8c7e0bdeffb9..4fd0ee0c1488965a1eae4bd06164ab018a710b4e 100644 (file)
@@ -48,7 +48,7 @@ fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
 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
+seta g_campaign_skill 0 // -2 easy, 0 medium, 2 hard
 
 alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
 alias singleplayer_continue "set scmenu_campaign_goto -1"
index e66f051cd848ab7ae05a5544adc6c3f90e9b9cea..6e040d5b0f747abd3055f21cacfb5d1178f301e9 100644 (file)
@@ -19,6 +19,8 @@ set sv_ready_restart 0 "allow a map to be restarted once all players pressed the
 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"
 
+alias sv_hook_readyrestart
+
 //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)"
 
@@ -204,7 +206,7 @@ set g_weaponarena_random_with_blaster "1" "additionally, always provide the blas
 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 "allows players to use cl_fullbright_items"
+set g_fullbrightitems 0 "disables lighting effects on items, making them appear bright for visibility"
 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"
@@ -428,7 +430,7 @@ set g_ballistics_mindistance 2 "when shooting through walls thinner than this, t
 set g_ballistics_density_player 0.50 "how hard players are to shoot through compared to walls"
 set g_ballistics_density_corpse 0.10 "how hard corpses are to shoot through compared to walls"
 set g_ballistics_penetrate_clips 1 "allow ballistics to pass through weapon clips"
-set g_ballistics_solidpenetration_exponent 0.25 "how fast damage falls off when bullets pass through walls - 1 means linear, lower values mean slower initial falloff but faster once there's little solidpenetration left (damage_fraction = solidpen_fraction^exp for solidpen_fraction between 0 and 1)"
+set g_ballistics_solidpenetration_exponent 1 "how fast damage falls off when bullets pass through walls - 1 means linear, lower values mean slower initial falloff but faster once there's little solidpenetration left (damage_fraction = solidpen_fraction^exp for solidpen_fraction between 0 and 1)"
 
 sv_status_show_qcstatus 1 "Xonotic uses this field instead of frags"
 set g_full_getstatus_responses 0 "this currently breaks qstat"
@@ -485,7 +487,7 @@ 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 sv_vq3compat 0 "toggle for some compatibility hacks (for VQ3 and CPM map compatibility in mapinfo files)"
+set sv_q3defragcompat 0 "toggle for some compatibility hacks (for Q3DF map compatibility)"
 
 set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)"
 set g_movement_highspeed_q3_compat 0 "apply speed modifiers to air movement in a more Q3-compatible way (only apply speed buffs and g_movement_highspeed to max air speed, not to acceleration)"