Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
authorLyberta <lyberta@lyberta.net>
Thu, 29 Jun 2017 11:52:57 +0000 (14:52 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 29 Jun 2017 11:52:57 +0000 (14:52 +0300)
173 files changed:
.tx/merge-base
bal-wep-overkill.cfg
common.it.po
common.pl.po
common.sr.po
defaultXonotic.cfg
effects-high.cfg
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
languages.txt
physics.cfg
physicsCPMA.cfg
physicsFruit.cfg
physicsHavoc.cfg
physicsLeeStricklin-ModdedFruit.cfg
physicsLeeStricklin.cfg
physicsLeeStricklinOld.cfg
physicsLzd.cfg
physicsNexuiz10.cfg
physicsNexuiz11.cfg
physicsNexuiz151.cfg
physicsNexuiz151b.cfg
physicsNexuiz16rc1.cfg
physicsNexuiz20.cfg
physicsNexuiz25.cfg
physicsNexuiz26.cfg
physicsNoQWBunny-nexbased.cfg
physicsOverkill.cfg
physicsQ.cfg
physicsQ2.cfg
physicsQ2a.cfg
physicsQ3.cfg
physicsQBF.cfg
physicsQBFplus.cfg
physicsSamual.cfg
physicsWarsow.cfg
physicsWarsowClassicBunny.cfg
physicsWarsowDev.cfg
physicsX.cfg
physicsX010.cfg
physicsX07.cfg
physicsXDF.cfg
physicsXDFLight.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud/hud.qc
qcsrc/client/hud/hud.qh
qcsrc/client/hud/hud_config.qc
qcsrc/client/hud/panel/ammo.qc
qcsrc/client/hud/panel/centerprint.qc
qcsrc/client/hud/panel/healtharmor.qc
qcsrc/client/hud/panel/modicons.qc
qcsrc/client/hud/panel/notify.qc
qcsrc/client/hud/panel/powerups.qc
qcsrc/client/hud/panel/pressedkeys.qc
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/racetimer.qc
qcsrc/client/hud/panel/score.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/hud/panel/vote.qc
qcsrc/client/hud/panel/weapons.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qh
qcsrc/client/shownames.qc
qcsrc/client/view.qc
qcsrc/common/constants.qh
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/effects/all.inc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qh
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/minigames/minigame/pong.qc
qcsrc/common/minigames/minigames.qc
qcsrc/common/monsters/monster.qh
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/mage.qh
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/shambler.qh
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/spider.qh
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/monster/wyvern.qh
qcsrc/common/monsters/monster/zombie.qc
qcsrc/common/monsters/monster/zombie.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc
qcsrc/common/mutators/mutator/itemstime/itemstime.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/net_linked.qh
qcsrc/common/notifications/all.inc
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/physics/player.qh
qcsrc/common/stats.qh
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/target/_mod.inc
qcsrc/common/triggers/target/include.qc
qcsrc/common/triggers/target/kill.qc [new file with mode: 0644]
qcsrc/common/turrets/checkpoint.qc
qcsrc/common/turrets/config.qc
qcsrc/common/turrets/config.qh
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/sv_turrets.qh
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/util.qh
qcsrc/common/util.qh
qcsrc/common/vehicles/cl_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qh
qcsrc/common/vehicles/vehicle.qh
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qh
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qh
qcsrc/common/weapons/calculations.qc
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/config.qh
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/lib/_all.inc
qcsrc/lib/angle.qc
qcsrc/lib/bits.qh
qcsrc/lib/csqcmodel/cl_model.qc
qcsrc/lib/csqcmodel/cl_player.qc
qcsrc/lib/csqcmodel/net.qh [new file with mode: 0644]
qcsrc/lib/csqcmodel/sv_model.qc
qcsrc/lib/cvar.qh
qcsrc/lib/math.qh
qcsrc/lib/oo.qh
qcsrc/lib/spawnfunc.qh
qcsrc/lib/string.qh
qcsrc/lib/vector.qh
qcsrc/menu/draw.qh
qcsrc/server/autocvars.qh
qcsrc/server/bot/default/scripting.qh
qcsrc/server/client.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/radarmap.qh
qcsrc/server/compat/_mod.inc
qcsrc/server/compat/_mod.qh
qcsrc/server/compat/quake2.qc [new file with mode: 0644]
qcsrc/server/compat/quake2.qh [new file with mode: 0644]
qcsrc/server/compat/quake3.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/mapvoting.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_invasion.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/pathlib.qh
qcsrc/server/pathlib/utility.qc
qcsrc/server/player.qc
qcsrc/server/round_handler.qc
qcsrc/server/scores.qc
qcsrc/server/scores.qh
qcsrc/server/spawnpoints.qc
qcsrc/server/sv_main.qc

index a73edd9b09c1d382e82a78349f2295a1dbbbd4e6..bae0563ae3bdda5d17f733d3f5910c1af6df7d76 100644 (file)
@@ -1 +1 @@
-Sat Jun  3 07:23:47 CEST 2017
+Thu Jun 29 07:24:55 CEST 2017
index d55cf92666795a8b1e7b610c4e98c337d474a33a..67cc81523f1f1d7db4021952f921fdabae9f77ec 100644 (file)
@@ -32,7 +32,7 @@ set g_balance_blaster_weaponstartoverride -1
 set g_balance_blaster_weaponthrowable 0
 // }}}
 // {{{ #2: Shotgun
-set g_balance_shotgun_primary_ammo 6.25
+set g_balance_shotgun_primary_ammo 3
 set g_balance_shotgun_primary_animtime 0.65
 set g_balance_shotgun_primary_bullets 10
 set g_balance_shotgun_primary_damage 17
@@ -40,7 +40,7 @@ set g_balance_shotgun_primary_force 80
 set g_balance_shotgun_primary_refire 0.75
 set g_balance_shotgun_primary_solidpenetration 3.8
 set g_balance_shotgun_primary_spread 0.07
-set g_balance_shotgun_reload_ammo 50
+set g_balance_shotgun_reload_ammo 24
 set g_balance_shotgun_reload_time 2
 set g_balance_shotgun_secondary 1
 set g_balance_shotgun_secondary_animtime 1.15
index 30e558629665a140f4cc836067878ca68ab58c77..cc153f5aafc7d8d67f2ccb9007985e0cbe8c83da 100644 (file)
@@ -14,7 +14,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-03-30 07:23+0200\n"
-"PO-Revision-Date: 2017-03-31 17:53+0000\n"
+"PO-Revision-Date: 2017-06-04 00:29+0000\n"
 "Last-Translator: Antonio <piuntn@gmail.com>\n"
 "Language-Team: Italian (http://www.transifex.com/team-xonotic/xonotic/"
 "language/it/)\n"
@@ -344,7 +344,7 @@ msgstr "ucciso bandiera, icona"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:804
 msgid "QMCMD^killed flagcarrier (l:%y^7)"
-msgstr "ucciso portatore bandiera (l:%y^7)"
+msgstr "ucciso portabandiera (l:%y^7)"
 
 #: qcsrc/client/hud/panel/quickmenu.qc:805
 #, c-format
@@ -778,8 +778,7 @@ msgstr "^3captime^7                  Tempo della cattura più veloce (CTF)\n"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:319
 msgid "^3fckills^7                  Number of flag carrier kills\n"
-msgstr ""
-"^3fckills^7                  Numero di uccisioni dei portatori di bandiera\n"
+msgstr "^3fckills^7                  Numero di uccisioni dei portabandiera\n"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:320
 msgid "^3returns^7                  Number of flag returns\n"
@@ -811,8 +810,7 @@ msgstr ""
 
 #: qcsrc/client/hud/panel/scoreboard.qc:326
 msgid "^3kckills^7                  Number of keys carrier kills\n"
-msgstr ""
-"^3kckills^7                  Numero di uccisioni di portatori di chiavi\n"
+msgstr "^3kckills^7                  Numero di uccisioni di portachiavi\n"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:327
 msgid "^3losses^7                   Number of times a key was lost\n"
@@ -841,8 +839,7 @@ msgstr "^3takes^7                    Numero di punti di dominio presi (DOM)\n"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:333
 msgid "^3bckills^7                  Number of ball carrier kills\n"
-msgstr ""
-"^3bckills^7                  Numbero di uccisioni di portatori di palla\n"
+msgstr "^3bckills^7                  Numbero di uccisioni di portapalla\n"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:334
 msgid ""
@@ -1770,7 +1767,7 @@ msgstr "Spingi"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:21
 msgid "Flag carrier"
-msgstr "Portatore bandiera"
+msgstr "Portabandiera"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:22
 msgid "Enemy carrier"
@@ -1778,7 +1775,7 @@ msgstr "Portatore nemico"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:23
 msgid "Dropped flag"
-msgstr "Bandiera persa"
+msgstr "Bandiera lasciata"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:24
 msgid "White base"
@@ -1825,7 +1822,7 @@ msgstr "Chiave lasciata"
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:42
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:43
 msgid "Key carrier"
-msgstr "Portatore chiave"
+msgstr "Portchiave"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:39
 msgid "Run here"
@@ -1838,7 +1835,7 @@ msgstr "Palla"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:46
 msgid "Ball carrier"
-msgstr "Portatore palla"
+msgstr "Portapalla"
 
 #: qcsrc/common/mutators/mutator/waypoints/all.inc:49
 msgid "Goal"
@@ -2604,7 +2601,7 @@ msgstr "^BG%s^BG ha perso il colpetto %s^BG!"
 #: qcsrc/common/notifications/all.inc:692
 #, c-format
 msgid "^BGYou dropped the %s^BG buff!"
-msgstr "^BGHai abbandonato il colpetto %s^BG!"
+msgstr "^BGHai lasciato il colpetto %s^BG!"
 
 #: qcsrc/common/notifications/all.inc:380
 #: qcsrc/common/notifications/all.inc:693
@@ -3446,8 +3443,7 @@ msgstr "^BGStallo! I nemici ora possono vederti nel radar!"
 #: qcsrc/common/notifications/all.inc:586
 msgid "^BGStalemate! Flag carriers can now be seen by enemies on radar!"
 msgstr ""
-"^BGStallo! I portatori di bandiera ora possono essere visti dai nemici nel "
-"radar!"
+"^BGStallo! I portabandiera ora possono essere visti dai nemici nel radar!"
 
 #: qcsrc/common/notifications/all.inc:590
 #, c-format
@@ -3845,7 +3841,7 @@ msgid ""
 "Help the key carriers to meet!"
 msgstr ""
 "^BGTutte le chiavi sono in mano alla tua squadra!\n"
-"Aiuta i portatori di chiavi a incontrarsi!"
+"Aiuta i portachiavi a incontrarsi!"
 
 #: qcsrc/common/notifications/all.inc:712
 msgid ""
@@ -3861,7 +3857,7 @@ msgid ""
 "Meet the other key carriers ^F4NOW^BG!"
 msgstr ""
 "^BGTutte le chiavi sono in mano alla tua squadra!\n"
-"Incxontra gli altri portatori di chiavi ^F4ORA^BG!"
+"Incxontra gli altri portachiavi ^F4ORA^BG!"
 
 #: qcsrc/common/notifications/all.inc:714
 msgid "^F4Round will start in ^COUNT"
index 9361db6d4b4b95af26f266e3022f72dd50572f9e..a1c9eb46f8f9f5d13e0f2dbd22b549b49e70c004 100644 (file)
@@ -19,8 +19,8 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-03-30 07:23+0200\n"
-"PO-Revision-Date: 2017-04-05 18:45+0000\n"
-"Last-Translator: Kriss Chr <kriss7475@gmail.com>\n"
+"PO-Revision-Date: 2017-06-28 19:15+0000\n"
+"Last-Translator: Amadeusz Sławiński <amade@asmblr.net>\n"
 "Language-Team: Polish (http://www.transifex.com/team-xonotic/xonotic/"
 "language/pl/)\n"
 "Language: pl\n"
@@ -28,7 +28,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n"
-"%100<12 || n%100>=14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n"
+"%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n"
 "%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
 
 #: qcsrc/client/hud/hud_config.qc:233
@@ -9236,7 +9236,7 @@ msgid ""
 "^1ERROR: Texture compression is required but not supported.\n"
 "^1Expect visual problems.\n"
 msgstr ""
-"^1BŁĄÐ:: Kompresja z tekstury jest wymagana, ale nie wspomagana.\n"
+"^1BŁĄD:: Kompresja z tekstury jest wymagana, ale nie wspomagana.\n"
 "^1Oczekuj problemów wizualnych.\n"
 
 #: qcsrc/menu/xonotic/util.qc:780
index e57071b8df884a71f9e54d0c2c73bd2077ded8c9..7ed1c9edebd4d7fca9c67e1e070256dca2c28478 100644 (file)
@@ -13,7 +13,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-03-30 07:23+0200\n"
-"PO-Revision-Date: 2017-05-21 11:21+0000\n"
+"PO-Revision-Date: 2017-06-17 17:00+0000\n"
 "Last-Translator: Марко М. Костић (Marko M. Kostić) <marko.m.kostic@gmail."
 "com>\n"
 "Language-Team: Serbian (http://www.transifex.com/team-xonotic/xonotic/"
@@ -1179,7 +1179,7 @@ msgstr "Игра на смрт"
 
 #: qcsrc/common/mapinfo.qh:99
 msgid "Score as many frags as you can"
-msgstr "Ð\94оÑ\81Ñ\82игниÑ\82е Ñ\88Ñ\82о Ð²Ð¸Ñ\88е Ñ\80окаÑ\9aа"
+msgstr "Ð\94оÑ\81Ñ\82игниÑ\82е Ñ\88Ñ\82о Ð²Ð¸Ñ\88е Ñ\84Ñ\80егова"
 
 #: qcsrc/common/mapinfo.qh:111
 msgid "Last Man Standing"
@@ -1208,7 +1208,7 @@ msgstr "Тркајте се за најбоље време."
 #: qcsrc/common/mapinfo.qh:184
 msgid "Help your team score the most frags against the enemy team"
 msgstr ""
-"Ð\9fомозиÑ\82е Ð²Ð°Ñ\88пÑ\98 ÐµÐºÐ¸Ð¿Ð¸ Ð´Ð° Ð¿Ð¾Ñ\81Ñ\82игне Ð½Ð°Ñ\98виÑ\88е Ñ\80окаÑ\9aа против непријатељске екипе"
+"Ð\9fомозиÑ\82е Ð²Ð°Ñ\88пÑ\98 ÐµÐºÐ¸Ð¿Ð¸ Ð´Ð° Ð¿Ð¾Ñ\81Ñ\82игне Ð½Ð°Ñ\98виÑ\88е Ñ\84Ñ\80егова против непријатељске екипе"
 
 #: qcsrc/common/mapinfo.qh:184
 msgid "Team Deathmatch"
@@ -3314,7 +3314,7 @@ msgstr ""
 #: qcsrc/common/notifications/all.inc:590
 #, c-format
 msgid "^K3%sYou fragged ^BG%s"
-msgstr "^K3%sРокнÑ\83ли сте играча ^BG%s"
+msgstr "^K3%sФÑ\80еговали сте играча ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:591
 #: qcsrc/common/notifications/all.inc:600
@@ -3326,7 +3326,7 @@ msgstr ""
 #: qcsrc/common/notifications/all.inc:592
 #, c-format
 msgid "^K1%sYou were fragged by ^BG%s"
-msgstr "^K1%sРокнÑ\83о вас је играч ^BG%s"
+msgstr "^K1%sФÑ\80еговао вас је играч ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:593
 #: qcsrc/common/notifications/all.inc:602
@@ -4021,31 +4021,31 @@ msgstr ""
 
 #: qcsrc/common/notifications/all.qh:444
 msgid "TRIPLE FRAG! "
-msgstr "ТРÐ\9eСТРУÐ\9aÐ\90 Ð Ð\9eÐ\9aÐ\8aÐ\90Ð\92Ð\90! "
+msgstr "ТРÐ\9eСТРУÐ\9aÐ\98 Ð¤Ð Ð\95Ð\93! "
 
 #: qcsrc/common/notifications/all.qh:445
 #, c-format
 msgid "%s^K1 made FIVE SCORES IN A ROW! %s^BG"
-msgstr ""
+msgstr "ИГРАЧ %s^K1 ЈЕ НАПРАВИО 5 ПОГОДАКА У НИЗУ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:445
 #, c-format
 msgid "%s^K1 unlocked RAGE! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је откључао БЕС! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:445
 msgid "RAGE! "
-msgstr "БЕСНИЛО! "
+msgstr "БЕС! "
 
 #: qcsrc/common/notifications/all.qh:446
 #, c-format
 msgid "%s^K1 made TEN SCORES IN A ROW! %s^BG"
-msgstr ""
+msgstr "ИГРАЧ %s^K1 ЈЕ НАПРАВИО 10 ПОГОДАКА У НИЗУ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:446
 #, c-format
 msgid "%s^K1 started a MASSACRE! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је започео МАСАКР! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:446
 msgid "MASSACRE! "
@@ -4054,12 +4054,12 @@ msgstr "МАСАКР! "
 #: qcsrc/common/notifications/all.qh:447
 #, c-format
 msgid "%s^K1 executed MAYHEM! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је извршио САКАЋЕЊЕ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:447
 #, c-format
 msgid "%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG"
-msgstr ""
+msgstr "ИГРАЧ %s^K1 ЈЕ НАПРАВИО 15 ПОГОДАКА У НИЗУ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:447
 msgid "MAYHEM! "
@@ -4068,12 +4068,12 @@ msgstr "САКАЋЕЊЕ! "
 #: qcsrc/common/notifications/all.qh:448
 #, c-format
 msgid "%s^K1 is a BERSERKER! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је ЛУДАК! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:448
 #, c-format
 msgid "%s^K1 made TWENTY SCORES IN A ROW! %s^BG"
-msgstr ""
+msgstr "ИГРАЧ %s^K1 ЈЕ НАПРАВИО 20 ПОГОДАКА У НИЗУ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:448
 msgid "BERSERKER! "
@@ -4082,12 +4082,12 @@ msgstr "ЛУДАК! "
 #: qcsrc/common/notifications/all.qh:449
 #, c-format
 msgid "%s^K1 inflicts CARNAGE! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је извршио ПОКОЉ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:449
 #, c-format
 msgid "%s^K1 made TWENTY FIVE SCORES IN A ROW! %s^BG"
-msgstr ""
+msgstr "ИГРАЧ %s^K1 ЈЕ НАПРАВИО 25 ПОГОДАКА У НИЗУ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:449
 msgid "CARNAGE! "
@@ -4096,12 +4096,12 @@ msgstr "ПОКОЉ! "
 #: qcsrc/common/notifications/all.qh:450
 #, c-format
 msgid "%s^K1 made THIRTY SCORES IN A ROW! %s^BG"
-msgstr ""
+msgstr "ИГРАЧ %s^K1 ЈЕ НАПРАВИО 30 ПОГОДАКА У НИЗУ! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:450
 #, c-format
 msgid "%s^K1 unleashes ARMAGEDDON! %s^BG"
-msgstr ""
+msgstr "Играч%s^K1 је започео АРМАГЕДОН! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:450
 msgid "ARMAGEDDON! "
@@ -4123,6 +4123,8 @@ msgid ""
 "\n"
 "(Health ^1%d^BG / Armor ^2%d^BG)%s"
 msgstr ""
+"\n"
+"(Здравље ^1%d^BG / Оклоп ^2%d^BG)%s"
 
 #: qcsrc/common/notifications/all.qh:468
 #, c-format
@@ -4130,6 +4132,8 @@ msgid ""
 "\n"
 "(^F4Dead^BG)%s"
 msgstr ""
+"\n"
+"(^F4Мртвих^BG)%s"
 
 #: qcsrc/common/notifications/all.qh:489 qcsrc/common/notifications/all.qh:502
 #, c-format
@@ -4160,22 +4164,22 @@ msgstr "Прва жртва! "
 #: qcsrc/common/notifications/all.qh:559
 #, c-format
 msgid "%s^K1 has %d frags in a row! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је направио %d фрегова у низу! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:560
 #, c-format
 msgid "%s^K1 made %d scores in a row! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је направио %d погодака у низу! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:578
 #, c-format
 msgid "%s^K1 drew first blood! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је пролио прву крв! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:579
 #, c-format
 msgid "%s^K1 got the first score! %s^BG"
-msgstr ""
+msgstr "Играч %s^K1 је остварио први погодак! %s^BG"
 
 #: qcsrc/common/notifications/all.qh:595
 #, c-format
@@ -5777,13 +5781,13 @@ msgstr "Неограничено"
 #: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:78
 #: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:128
 msgid "Frag limit:"
-msgstr "Ð\93Ñ\80аниÑ\86а Ñ\80окања:"
+msgstr "Ð\93Ñ\80аниÑ\86а Ñ\84Ñ\80еговања:"
 
 #: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:65
 #: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:66
 #: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:78
 msgid "The amount of frags needed before the match will end"
-msgstr "Ð\91Ñ\80оÑ\98 Ñ\80окаÑ\9aа потребних пре него што се игра заврши"
+msgstr "Ð\91Ñ\80оÑ\98 Ñ\84Ñ\80егова потребних пре него што се игра заврши"
 
 #: qcsrc/menu/xonotic/dialog_multiplayer_create.qc:67
 msgid "Capture limit:"
@@ -6596,7 +6600,7 @@ msgstr "Назад на посао..."
 
 #: qcsrc/menu/xonotic/dialog_quit.qc:17
 msgid "I got some more fragging to do!"
-msgstr "ХоÑ\9bÑ\83 Ð´Ð° Ñ\80Ð¾ÐºÐ°м још мало!"
+msgstr "ХоÑ\9bÑ\83 Ð´Ð° Ñ\84Ñ\80егÑ\83Ñ\98Ðµм још мало!"
 
 #: qcsrc/menu/xonotic/dialog_quit.qh:7
 msgid "Quit the game"
@@ -6961,7 +6965,7 @@ msgstr "Аутоматска ругања:"
 
 #: qcsrc/menu/xonotic/dialog_settings_audio.qc:166
 msgid "Automatically taunt enemies after fragging them"
-msgstr "Аутоматски се ругајте непријатељима након што их рокнете"
+msgstr "Аутоматски се ругајте непријатељима након што их изфрегујете"
 
 #: qcsrc/menu/xonotic/dialog_settings_audio.qc:168
 msgid "Sometimes"
@@ -7607,7 +7611,7 @@ msgstr "Да ли желите да покренете локалну игру 
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:24
 msgid "Frag Information"
-msgstr "Ð\9fодаÑ\86и Ð¾ Ñ\80окаÑ\9aÑ\83"
+msgstr "Ð\9fодаÑ\86и Ð¾ Ñ\84Ñ\80еговима"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:26
 msgid "Display information about killing sprees"
@@ -7651,11 +7655,12 @@ msgstr "Прикажи у засебном реду"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:58
 msgid "Add extra frag information to centerprint when available"
-msgstr "Прикажи додатне податке о рокању у средишњој поруци, када су доступни"
+msgstr ""
+"Прикажи додатне податке о фреговању у средишњој поруци, када су доступни"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:62
 msgid "Add frag location to death messages when available"
-msgstr "Ð\94одаÑ\98 Ð¿Ð¾Ð´Ð°Ñ\82ак Ð¾ Ð¼ÐµÑ\81Ñ\82Ñ\83 Ñ\80окаÑ\9aа Ñ\83 смртним порукама, када је доступан"
+msgstr "Ð\94одаÑ\98 Ð¿Ð¾Ð´Ð°Ñ\82ак Ð¾ Ð¼ÐµÑ\81Ñ\82Ñ\83 Ñ\84Ñ\80еговаÑ\9aа Ñ\83 Ð¿Ð¾смртним порукама, када је доступан"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_messages.qc:65
 msgid "Gamemode Settings"
@@ -7940,7 +7945,7 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:57
 msgid "Auto switch weapons on pickup"
-msgstr ""
+msgstr "Самостално промени оружје при купљењу"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:58
 msgid ""
@@ -7950,21 +7955,21 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:61
 msgid "Release attack buttons when you switch weapons"
-msgstr ""
+msgstr "Отпусти тастере за напад при промени оружја"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:64
 msgid "Draw 1st person weapon model"
-msgstr ""
+msgstr "Исцртај модел оружја из првог лица"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:65
 msgid "Draw the weapon model"
-msgstr ""
+msgstr "Исцртај модел оружја"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:69
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:72
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:75
 msgid "Position of the weapon model; requires reconnect"
-msgstr ""
+msgstr "Положај модела оружја, потребно поновно повезивање"
 
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qc:80
 msgid "Gun model swaying"
@@ -7977,73 +7982,73 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_settings_game_weapons.qh:7
 #: qcsrc/menu/xonotic/keybinder.qc:43
 msgid "Weapons"
-msgstr ""
+msgstr "Оружја"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:33
 msgid "Key Bindings"
-msgstr ""
+msgstr "Повези тастера"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:37
 msgid "Change key..."
-msgstr ""
+msgstr "Промени тастер..."
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:41
 msgid "Edit..."
-msgstr ""
+msgstr "Уреди..."
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:47
 msgid "Clear"
-msgstr ""
+msgstr "Очисти"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:52
 msgid "Reset all"
-msgstr ""
+msgstr "Ресетуј све"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:57
 msgid "Mouse"
-msgstr ""
+msgstr "Миш"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:59
 msgid "Sensitivity:"
-msgstr ""
+msgstr "Осетљивост:"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:61
 msgid "Mouse speed multiplier"
-msgstr ""
+msgstr "Чинилац брзине миша"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:63
 msgid "Smooth aiming"
-msgstr ""
+msgstr "Глатко циљање"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:64
 msgid "Smoothes the mouse movement, but makes aiming slightly less responsive"
-msgstr ""
+msgstr "Чини померање миша глатким али је онда циљање мање осетљиво"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:66
 msgid "Invert aiming"
-msgstr ""
+msgstr "Обрни циљање"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:67
 msgid "Invert mouse movement on the Y-axis"
-msgstr ""
+msgstr "Обрће померање миша по ипсилон оси"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:69
 msgid "Use system mouse positioning"
-msgstr ""
+msgstr "Користи системско позиционирање миша"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:74
 msgid "Enable built in mouse acceleration"
-msgstr ""
+msgstr "Омогући уграђено убрзање миша"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:78
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:82
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:85
 msgid "Disable system mouse acceleration"
-msgstr ""
+msgstr "Онемогући системско убрзање миша"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:79
 msgid "Make use of DGA mouse input"
-msgstr ""
+msgstr "Искористи DGA унос на мишу"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:93
 msgid "Pressing \"enter console\" key also closes it"
@@ -8055,41 +8060,41 @@ msgstr ""
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:96
 msgid "Automatically repeat jumping if holding jump"
-msgstr ""
+msgstr "Самостално понављај скакање ако се држи скакање"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:99
 msgid "Jetpack on jump:"
-msgstr ""
+msgstr "Ракетни појас при скоку:"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:101
 msgid "JPJUMP^Disabled"
-msgstr ""
+msgstr "JPJUMP^Онемогућен"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:102
 msgid "Air only"
-msgstr ""
+msgstr "Само у ваздуху"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:103
 msgid "JPJUMP^All"
-msgstr ""
+msgstr "JPJUMP^Све"
 
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:109
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:114
 #: qcsrc/menu/xonotic/dialog_settings_input.qc:119
 msgid "Use joystick input"
-msgstr ""
+msgstr "Користи унос преко џојстика"
 
 #: qcsrc/menu/xonotic/dialog_settings_input_userbind.qc:31
 msgid "Command when pressed:"
-msgstr ""
+msgstr "Наредба док је притиснут:"
 
 #: qcsrc/menu/xonotic/dialog_settings_input_userbind.qc:34
 msgid "Command when released:"
-msgstr ""
+msgstr "Наредба када је отпуштен:"
 
 #: qcsrc/menu/xonotic/dialog_settings_input_userbind.qc:40
 msgid "Cancel"
-msgstr ""
+msgstr "Откажи"
 
 #: qcsrc/menu/xonotic/dialog_settings_input_userbind.qh:7
 msgid "User defined key bind"
index ab7f0e56977f35b490484f1057e4d640ccea7868..1312d6fa299d1e125b890099581981de504c9bea 100644 (file)
@@ -229,6 +229,7 @@ seta cl_hitsound_max_pitch 1.5 "maximum pitch of hit sound"
 seta cl_hitsound_nom_damage 25 "damage amount at which hitsound bases pitch off"
 
 seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
+seta cl_eventchase_frozen 0 "camera goes into 3rd person mode when the player is frozen"
 seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
 seta cl_eventchase_distance 140 "final camera distance"
 seta cl_eventchase_generator_distance 400 "final camera distance while viewing generator explosion"
@@ -299,6 +300,7 @@ set sv_friction_slick 0.5
 set sv_slick_applygravity 0
 
 set sv_aircontrol_backwards 0 "apply forward aircontrol options to backward movement"
+set sv_aircontrol_sidewards 0 "apply forward aircontrol options to sideward movement"
 
 set sv_player_viewoffset "0 0 35" "view offset of the player model"
 set sv_player_mins "-16 -16 -24" "playermodel mins"
index a514ce5cb67d9f2eb563ff8d4220d3a510ee61f7..48c8253a3a2146538f1a9dfa6cc388f76b616ba4 100644 (file)
@@ -5,7 +5,7 @@ cl_particles 1
 cl_particles_quality 1.0
 cl_damageeffect 1
 cl_spawn_point_particles 1
-cl_playerdetailreduction 4.0
+cl_playerdetailreduction 4
 gl_flashblend 0
 gl_picmip -1
 mod_q3bsp_nolightmaps 0
index 5ebdeaeec999de16665fbadd76f228d2edd9ffd3..95726571679ae6e985e0391b10f43c8a8af6a63e 100644 (file)
@@ -29,7 +29,7 @@ seta hud_progressbar_acceleration_neg_color "0.86 0.35 0"
 seta hud_progressbar_vehicles_ammo1_color "0.77 0.67 0"
 seta hud_progressbar_vehicles_ammo2_color "0.86 0.35 0"
 
-seta _hud_panelorder "17 15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 18 23 19 20 21 22 23 24 "
+seta _hud_panelorder "17 15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 18 23 19 20 21 22 24 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.005000"
@@ -179,7 +179,7 @@ seta hud_panel_racetimer_bg_padding ""
 
 seta hud_panel_vote_pos "0.740000 0.690000"
 seta hud_panel_vote_size "0.190000 0.090000"
-seta hud_panel_vote_bg " "
+seta hud_panel_vote_bg "border_default"
 seta hud_panel_vote_bg_color ""
 seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
@@ -201,7 +201,7 @@ seta hud_panel_modicons_freezetag_layout "1"
 
 seta hud_panel_pressedkeys_pos "0.445000 0.710000"
 seta hud_panel_pressedkeys_size "0.110000 0.090000"
-seta hud_panel_pressedkeys_bg " "
+seta hud_panel_pressedkeys_bg "border_default"
 seta hud_panel_pressedkeys_bg_color ""
 seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
index 8f64ddebb6e943040a0c8458f64ecc02a22f4a2b..3f4fe39fabf84f5ca284a92daa19b42a20fefc30 100644 (file)
@@ -29,7 +29,7 @@ seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
 seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
 seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
 
-seta _hud_panelorder "17 15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 18 23 19 20 21 22 23 24 "
+seta _hud_panelorder "17 15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 18 23 19 20 21 22 24 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
index 31926d2f5ab9d906dfbf79f26d2e5d9e8441ebfe..609ab766de832baf1f9824963913af9994403639 100644 (file)
@@ -29,7 +29,7 @@ seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
 seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
 seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
 
-seta _hud_panelorder "17 10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 18 23 19 20 21 22 23 24 "
+seta _hud_panelorder "17 10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 18 23 19 20 21 22 24 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
index 380b65814864325977cb29475ce31d896ed71dd0..b7a7d20ab2d69e566c2dec5bdcaa8bebd5d60d55 100644 (file)
@@ -29,7 +29,7 @@ seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
 seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
 seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
 
-seta _hud_panelorder "17 15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 18 23 19 20 21 22 23 24 "
+seta _hud_panelorder "17 15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 18 23 19 20 21 22 24 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
index 96b4f508f50c1a193ad5dca91664274a96b6d781..ce818681191a21abeec552cf46522a092028e9d9 100644 (file)
@@ -29,7 +29,7 @@ seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
 seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
 seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
 
-seta _hud_panelorder "17 15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 18 23 19 20 21 22 23 24 "
+seta _hud_panelorder "17 15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 18 23 19 20 21 22 24 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
index ae786574f3bfcbd6a59ed889927f4d333617deb0..4159b01c7ddcc1fa0107dc399a29512f554ef460 100644 (file)
@@ -29,7 +29,7 @@ seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
 seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
 seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
 
-seta _hud_panelorder "17 15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 18 23 19 20 21 22 23 24 "
+seta _hud_panelorder "17 15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 18 23 19 20 21 22 24 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
index c88e0246f93c519ca0633963109dc58fc5572e4c..6835f8cbd8b614d875be6c5ade3c00ac076f2f91 100644 (file)
@@ -17,5 +17,5 @@ el    Greek "Ελληνική" 33%
 be    Belarusian "Беларуская" 62%
 bg    Bulgarian "Български" 68%
 ru    Russian "Русский" 100%
-sr    Serbian "Српски" 69%
+sr    Serbian "Српски" 71%
 uk    Ukrainian "Українська" 57%
index 1a38a7f617ad8f82d439ea85062c08f64a30b886..b3439d691308a215a59dc7286e0790fc7cd103bd 100644 (file)
@@ -29,6 +29,7 @@ set g_physics_xonotic_airaccel_sideways_friction 0
 set g_physics_xonotic_aircontrol 100
 set g_physics_xonotic_aircontrol_power 2
 set g_physics_xonotic_aircontrol_backwards 0
+set g_physics_xonotic_aircontrol_sidewards 0
 set g_physics_xonotic_aircontrol_penalty 0
 set g_physics_xonotic_warsowbunny_airforwardaccel 1.00001
 set g_physics_xonotic_warsowbunny_topspeed 925
@@ -58,6 +59,7 @@ set g_physics_nexuiz_airaccel_sideways_friction 0.35
 set g_physics_nexuiz_aircontrol 0
 set g_physics_nexuiz_aircontrol_power 2
 set g_physics_nexuiz_aircontrol_backwards 0
+set g_physics_nexuiz_aircontrol_sidewards 0
 set g_physics_nexuiz_aircontrol_penalty 0
 set g_physics_nexuiz_warsowbunny_airforwardaccel 1.00001
 set g_physics_nexuiz_warsowbunny_topspeed 925
@@ -87,6 +89,7 @@ set g_physics_quake_airaccel_sideways_friction 0
 set g_physics_quake_aircontrol 0
 set g_physics_quake_aircontrol_power 2
 set g_physics_quake_aircontrol_backwards 0
+set g_physics_quake_aircontrol_sidewards 0
 set g_physics_quake_aircontrol_penalty 0
 set g_physics_quake_warsowbunny_airforwardaccel 1.00001
 set g_physics_quake_warsowbunny_topspeed 925
@@ -116,6 +119,7 @@ set g_physics_warsow_airaccel_sideways_friction 0
 set g_physics_warsow_aircontrol 0
 set g_physics_warsow_aircontrol_power 2
 set g_physics_warsow_aircontrol_backwards 0
+set g_physics_warsow_aircontrol_sidewards 0
 set g_physics_warsow_aircontrol_penalty 0
 set g_physics_warsow_warsowbunny_airforwardaccel 1.00001
 set g_physics_warsow_warsowbunny_topspeed 925
@@ -145,6 +149,7 @@ set g_physics_defrag_airaccel_sideways_friction 0
 set g_physics_defrag_aircontrol 150
 set g_physics_defrag_aircontrol_power 2
 set g_physics_defrag_aircontrol_backwards 0
+set g_physics_defrag_aircontrol_sidewards 0
 set g_physics_defrag_aircontrol_penalty 0
 set g_physics_defrag_warsowbunny_airforwardaccel 1.00001
 set g_physics_defrag_warsowbunny_topspeed 925
@@ -174,6 +179,7 @@ set g_physics_quake3_airaccel_sideways_friction 0
 set g_physics_quake3_aircontrol 0
 set g_physics_quake3_aircontrol_power 2
 set g_physics_quake3_aircontrol_backwards 0
+set g_physics_quake3_aircontrol_sidewards 0
 set g_physics_quake3_aircontrol_penalty 0
 set g_physics_quake3_warsowbunny_airforwardaccel 1.00001
 set g_physics_quake3_warsowbunny_topspeed 925
@@ -203,6 +209,7 @@ set g_physics_vecxis_airaccel_sideways_friction 0.3
 set g_physics_vecxis_aircontrol 0
 set g_physics_vecxis_aircontrol_power 2
 set g_physics_vecxis_aircontrol_backwards 0
+set g_physics_vecxis_aircontrol_sidewards 0
 set g_physics_vecxis_aircontrol_penalty 0
 set g_physics_vecxis_warsowbunny_airforwardaccel 1.00001
 set g_physics_vecxis_warsowbunny_topspeed 925
@@ -232,6 +239,7 @@ set g_physics_quake2_airaccel_sideways_friction 0
 set g_physics_quake2_aircontrol 0
 set g_physics_quake2_aircontrol_power 2
 set g_physics_quake2_aircontrol_backwards 0
+set g_physics_quake2_aircontrol_sidewards 0
 set g_physics_quake2_aircontrol_penalty 0
 set g_physics_quake2_warsowbunny_airforwardaccel 1.00001
 set g_physics_quake2_warsowbunny_topspeed 925
@@ -261,6 +269,7 @@ set g_physics_bones_airaccel_sideways_friction 0
 set g_physics_bones_aircontrol 150
 set g_physics_bones_aircontrol_power 2
 set g_physics_bones_aircontrol_backwards 0
+set g_physics_bones_aircontrol_sidewards 0
 set g_physics_bones_aircontrol_penalty 0
 set g_physics_bones_warsowbunny_airforwardaccel 1.00001
 set g_physics_bones_warsowbunny_topspeed 925
@@ -290,6 +299,7 @@ set g_physics_overkill_airaccel_sideways_friction 0
 set g_physics_overkill_aircontrol 125
 set g_physics_overkill_aircontrol_power 2
 set g_physics_overkill_aircontrol_backwards 0
+set g_physics_overkill_aircontrol_sidewards 0
 set g_physics_overkill_aircontrol_penalty 180
 set g_physics_overkill_warsowbunny_airforwardaccel 1.00001
 set g_physics_overkill_warsowbunny_topspeed 925
index f2a4209c25eb44ee435273856d0c87720d7c00de..612a779dac5fb69ad978febcc0a3cbdc9b7279aa 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 150
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index efe5b46ac3854ad774019787a0391140e315de76..8e0a7f0fe73f8084a776eac1274dd255a71a5f9c 100644 (file)
@@ -23,6 +23,7 @@ sv_airstrafeaccel_qw -0.97
 sv_aircontrol 125
 sv_aircontrol_power 2.5
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 8d02ff46271260092d0fa52b2902adda3599965f..e5d431b3e7b6c7d3f5babb72291b6cd144a30361 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 61ce6557dfb15d7ac1b55d0128039c12d92e1507..81d54d2eede716dc852bde66054b6063b5130bf3 100644 (file)
@@ -32,6 +32,7 @@ sv_aircontrol 125
 sv_aircontrol_penalty 150
 sv_aircontrol_power 2.5
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 800
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 53ec90148e32aa7b1819454f57cba876ea759958..741224b1195736d1f0b1bcb35499eb8cdadbda0f 100644 (file)
@@ -32,6 +32,7 @@ sv_aircontrol 125
 sv_aircontrol_penalty 150
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 800
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 6a24567a93e518f68b347c6292d2e962c4279130..83689d1614e26474644270f2ecfd3ebbc5d28c55 100644 (file)
@@ -27,6 +27,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index f6f74cd21a9b88eabd7f1c278cf6f4ad320b6c98..de271c2987b5e75cce1b3b3293c1d8fdc8fef502 100644 (file)
@@ -25,6 +25,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 9292016afe5d483864082f9f87e0b01483635f70..28d7c7f2cebce23ea74fe1a0e9b4d5d9ba875008 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 660e7b818323ce0b654d4a58a9743c88d8897809..7633e5a28878384f09a1418796937a91d0cdb979 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 2c2e94c5f4dd7042ca9e041ed2244485ff500237..aaec2756f6bece0a7a24572766dd275b299cbddd 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 45a46cb46e24711f5cb5055b144af9a989efb399..3cd9df61ee398d349f77e55b87b43553f76c6b78 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 86f1c31c744679d6bd61a548f5882f1a038f8817..17b8de8e4c0a88138d661683a27e63e6f685f74b 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index fe461768851079b603981d8d90cd6d815be5a143..168ec2d349a65ebdd3256e7fca7992a4255244b7 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index ed45598a9bb4a31039f5bf1804b2f1c61c9282b9..6038e7b6af70ea7a654e9c2b5de3105db5a7bbb5 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 3f7cd58f18f35567b43d626ccb55a0e3cbed412f..cb088f9df067d3f0f8360c70941f58787057c707 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 77660a426a10abb2fa60168c63016f7e65eb5ef3..2b054788a1cf314fc17a257c3543c2acb15b500d 100644 (file)
@@ -33,6 +33,7 @@ sv_aircontrol 125
 sv_aircontrol_penalty 100
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index c40b755bf81868d2548fb1de4c9c321f3c698411..526f7e22226d4442519db20892e50c6e6ff5fb9c 100644 (file)
@@ -38,6 +38,7 @@ sv_aircontrol 125
 sv_aircontrol_penalty 180
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 900
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 609a8f3d30f6d7829fc779c6147b8bce79134a36..c880f511e4d678f7c958d047ef46062ed283da8e 100644 (file)
@@ -25,6 +25,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index a9fbe166da3bbe3321a7741d5eda482c3507295b..992cb3e62b7740b9015fe88233b9953be0212d47 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 87817dfcfd46a275d968daf57005c1d627be36ae..ce323269699ac3a5189d4ec5b399b4ffcb617d22 100644 (file)
@@ -25,6 +25,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 7363b216dea7e8e34be9dc4871066baae213bc9c..a6d46ca820ba0022beda3220eaa9e860bac5244e 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index adc9df69c97af22d1644dab9d4cec72a78882982..39b705637a312df7c3cbe1bf69da98c26a76aed0 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 596d6ca3b8ea78b2e524d60a423f56bc627b2f18..2e092b1230cb00afc2feb3607d529091385dcdf6 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 9041601e2fd601ea734d80b12440ea0a4d1ab728..8506e2255c5e54150ed95f66de075d9178402e85 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 5fbe22bab998900fd02a8e7ff24c1cebe9b2eb8f..1bd23b647f636fca8aa9d759a133c69bffff0e08 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 9 // activates warsow movement mode
 sv_warsowbunny_accel 0.1593
index 3b28d90999966f1cc73b4c04fbcbf639e4173f2b..985be7e95cf7a1fa82eec39bb8b67c0b6ea172e1 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 150
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index cf31a3f932790052f79df433b372a5f022cae33b..dff451087b10aacd24bb57504002da5d61a47717 100644 (file)
@@ -24,6 +24,7 @@ sv_aircontrol 0
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 6 // activates warsow movement mode
 sv_warsowbunny_accel 0.1585
index 2ef0689755b7814c6913b67a73a623fb000cf42b..6b154508ec63d798e0f2ba18eae78287e7f8f971 100644 (file)
@@ -39,6 +39,7 @@ sv_aircontrol 100
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 900
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 0dfe0b46c9970bf689e257c720dab1dd846ff9d2..9c5a7d334a214804d0a84a0daf2a18e768e70be8 100644 (file)
@@ -32,6 +32,7 @@ sv_aircontrol 125
 sv_aircontrol_penalty 150
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 800
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 132aa9eff68cec24fde30da5dfb24bfb2becc04f..1fd86cd8000140b33d0af6001cd0b513ef26a794 100644 (file)
@@ -38,6 +38,7 @@ sv_aircontrol 125
 sv_aircontrol_penalty 180
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 800
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index db55fd8491448367d7aa51a064394fb9bc836f69..e192ab47627b613e10f21974d0c1cdac813dc956 100644 (file)
@@ -30,6 +30,7 @@ sv_aircontrol 150
 sv_aircontrol_penalty 0
 sv_aircontrol_power 2
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 4d1f652bb81bbae8bfa7ba6c653d0300012cc5e5..24705deb89a93b23e972c173ec33c476577906c0 100644 (file)
@@ -30,6 +30,7 @@ sv_aircontrol 100
 sv_aircontrol_penalty 100
 sv_aircontrol_power 2.5
 sv_aircontrol_backwards 0
+sv_aircontrol_sidewards 0
 sv_airspeedlimit_nonqw 0
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
index 193b7ef7cae691955478d714797e2b41206e9dd9..d95958392bb9626e2cadba13cd6edf88394bdb98 100644 (file)
@@ -413,6 +413,7 @@ float autocvar_cl_hitsound_nom_damage = 25;
 float autocvar_cl_hitsound_antispam_time;
 int autocvar_cl_eventchase_death = 1;
 float autocvar_cl_eventchase_distance = 140;
+bool autocvar_cl_eventchase_frozen = false;
 float autocvar_cl_eventchase_speed = 1.3;
 vector autocvar_cl_eventchase_maxs = '12 12 8';
 vector autocvar_cl_eventchase_mins = '-12 -12 -8';
index 36de6b3f1622599438eda71ed03222b80ba4e2dd..f6469a58b429dbbb1c7bff6f0b1702f4f6d45273 100644 (file)
@@ -109,10 +109,7 @@ vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspe
                rows = ceil(item_count/columns);
        }
 
-       if(vertical)
-               return eX * best_rows + eY * best_columns;
-       else
-               return eX * best_columns + eY * best_rows;
+       return (vertical) ? vec2(best_rows, best_columns) : vec2(best_columns, best_rows);
 }
 
 /*
@@ -490,8 +487,9 @@ void calc_followmodel_ofs(entity view);
 void Hud_Dynamic_Frame()
 {
        vector ofs = '0 0 0';
-       hud_scale = '1 1 0';
-       hud_shift = '0 0 0';
+       hud_scale_current = '1 1 0';
+       hud_shift_current = '0 0 0';
+
        if (autocvar_hud_dynamic_follow)
        {
                entity view = CSQCModel_server2csqc(player_localentnum - 1);
@@ -508,12 +506,12 @@ void Hud_Dynamic_Frame()
                ofs.y = bound(-0.1, ofs.y, 0.1);
                ofs.z = bound(-0.1, ofs.z, 0.1);
 
-               hud_shift.x = ofs.y * vid_conwidth;
-               hud_shift.y = ofs.z * vid_conheight;
-               hud_shift.z = ofs.x;
+               hud_shift_current.x = ofs.y * vid_conwidth;
+               hud_shift_current.y = ofs.z * vid_conheight;
+               hud_shift_current.z = ofs.x;
 
-               hud_scale.x = (1 + hud_shift.z);
-               hud_scale.y = hud_scale.x;
+               hud_scale_current.x = (1 + hud_shift_current.z);
+               hud_scale_current.y = hud_scale_current.x;
        }
 
        if(autocvar_hud_dynamic_shake > 0)
@@ -550,16 +548,15 @@ void Hud_Dynamic_Frame()
 
                if(hud_dynamic_shake_factor > 0)
                {
-                       hud_shift.x += hud_dynamic_shake_realofs.x;
-                       hud_shift.y += hud_dynamic_shake_realofs.y;
+                       hud_shift_current.x += hud_dynamic_shake_realofs.x;
+                       hud_shift_current.y += hud_dynamic_shake_realofs.y;
                }
        }
 
        hud_scale_center.x = 0.5 * vid_conwidth;
        hud_scale_center.y = 0.5 * vid_conheight;
 
-       hud_scale_current = hud_scale;
-       hud_shift_current = hud_shift;
+       HUD_Scale_Disable();
 }
 
 void HUD_Main()
index 9f0f4e7bf0e9c5c1c5c77038450f71e435d98744..8eaef9068c3bb4f2e64abe72d136544e22773867 100644 (file)
@@ -11,12 +11,12 @@ REGISTRY(hud_panels, BITS(6))
 #define hud_panels_from(i) _hud_panels_from(i, NULL)
 REGISTER_REGISTRY(hud_panels)
 
-#define REGISTER_HUD_PANEL(id, draw_func, name, configflags, showflags) \
+#define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) \
        void draw_func(); \
        REGISTER(hud_panels, HUD_PANEL, id, m_id, new_pure(hud_panel)) { \
                this.panel_id = this.m_id; \
                this.panel_draw = draw_func; \
-               this.panel_name = #name; \
+               this.panel_name = strzone(strtolower(#id)); \
                this.panel_configflags = configflags; \
                this.panel_showflags = showflags; \
        }
@@ -31,7 +31,7 @@ REGISTER_REGISTRY(hud_panels)
                        panel.current_panel_bg, \
                        HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), \
                        panel_bg_color, panel_bg_alpha, \
-                       HUD_Scale('1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)) \
+                       HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) \
                ); \
 } MACRO_END
 
@@ -81,7 +81,7 @@ float resizeCorner; // 1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomrigh
 entity highlightedPanel;
 float highlightedAction; // 0 = nothing, 1 = move, 2 = resize
 
-const float BORDER_MULTIPLIER = 0.25;
+const float BORDER_MULTIPLIER = 4;
 float scoreboard_bottom;
 int weapon_accuracy[Weapons_MAX];
 
@@ -169,9 +169,9 @@ vector cl_followmodel_ofs;
 float cl_followmodel_time;
 
 vector hud_scale;
-vector hud_scale_current;
+vector hud_scale_current = '1 1 0';
 vector hud_shift;
-vector hud_shift_current;
+vector hud_shift_current = '0 0 0';
 vector hud_scale_center;
 
 float stringwidth_colors(string s, vector theSize);
@@ -206,31 +206,31 @@ int prev_p_health, prev_p_armor;
 
 void HUD_ItemsTime();
 
-REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        weapons,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // WEAPONS
-REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           ammo,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // AMMO
-REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       powerups,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // POWERUPS
-REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    healtharmor,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // HEALTHARMOR
-REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         notify,         PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // NOTIFY
-REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          timer,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // TIMER
-REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          radar,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RADAR
-REGISTER_HUD_PANEL(SCORE,           HUD_Score,          score,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // SCORE
-REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      racetimer,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RACETIMER
-REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           vote,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // VOTE
-REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       modicons,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // MODICONS
-REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    pressedkeys,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PRESSEDKEYS
-REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           chat,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // CHAT
-REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     engineinfo,     PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // ENGINEINFO
-REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   infomessages,   PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // INFOMESSAGES
-REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        physics,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PHYSICS
-REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    centerprint,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // CENTERPRINT
-REGISTER_HUD_PANEL(MINIGAME_BOARD,  HUD_MinigameBoard,  minigameboard,  PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAME_BOARD
-REGISTER_HUD_PANEL(MINIGAME_STATUS, HUD_MinigameStatus, minigamestatus, PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAME_STATUS
-REGISTER_HUD_PANEL(MINIGAME_HELP,   HUD_MinigameHelp,   minigamehelp,   PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAME_HELP
-REGISTER_HUD_PANEL(MINIGAME_MENU,   HUD_MinigameMenu,   minigamemenu,   PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // MINIGAME_MENU
-REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       mapvote,        PANEL_CONFIG_NO                          ,                                             PANEL_SHOW_MAPVOTE                     ) // MAPVOTE
-REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      itemstime,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // ITEMSTIME
-REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CONFIG_MAIN                        , PANEL_SHOW_MAINGAME                                                                ) // QUICKMENU
-REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    scoreboard,     PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
+REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // WEAPONS
+REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // AMMO
+REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // POWERUPS
+REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // HEALTHARMOR
+REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // NOTIFY
+REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // TIMER
+REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RADAR
+REGISTER_HUD_PANEL(SCORE,           HUD_Score,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // SCORE
+REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RACETIMER
+REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // VOTE
+REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // MODICONS
+REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PRESSEDKEYS
+REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // CHAT
+REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // ENGINEINFO
+REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // INFOMESSAGES
+REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PHYSICS
+REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // CENTERPRINT
+REGISTER_HUD_PANEL(MINIGAMEBOARD,   HUD_MinigameBoard,  PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEBOARD
+REGISTER_HUD_PANEL(MINIGAMESTATUS,  HUD_MinigameStatus, PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMESTATUS
+REGISTER_HUD_PANEL(MINIGAMEHELP,    HUD_MinigameHelp,   PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEHELP
+REGISTER_HUD_PANEL(MINIGAMEMENU,    HUD_MinigameMenu,   PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // MINIGAMEMENU
+REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       PANEL_CONFIG_NO                          ,                                             PANEL_SHOW_MAPVOTE                     ) // MAPVOTE
+REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // ITEMSTIME
+REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      PANEL_CONFIG_MAIN                        , PANEL_SHOW_MAINGAME                                                                ) // QUICKMENU
+REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
 // always add new panels to the end of list
 
 // Because calling lots of functions in QC apparently cuts fps in half on many machines:
@@ -356,7 +356,7 @@ REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    scoreboard,     PANEL_CO
                new_size.x = max_panel_width; \
                new_size.y = panel_size.y * (new_size.x / panel_size.x); \
        } \
-       vector new_pos = eX * (panel_bg_border + 0.5 * max_panel_width) + eY * 0.5 * vid_conheight - 0.5 * new_size; \
+       vector new_pos = vec2(panel_bg_border + 0.5 * max_panel_width, 0.5 * vid_conheight) - 0.5 * new_size; \
        panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * new_pos; \
        panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * new_size; \
 } MACRO_END
index 4897ba55176d6e4e47fa8ec5b9e508467c0199d3..073b2d0f7df3874fce2808f679f762b64b50342a 100644 (file)
@@ -5,12 +5,13 @@
 
 #define HUD_Write(s) fputs(fh, s)
 #define HUD_Write_Cvar(cvar) HUD_Write(strcat("seta ", cvar, " \"", cvar_string(cvar), "\"\n"))
-#define HUD_Write_PanelCvar(cvar_suf) HUD_Write_Cvar(strcat("hud_panel_", panel.panel_name, cvar_suf))
+#define HUD_Write_PanelCvar(cvar_suf) str = strcat("hud_panel_", panel.panel_name, cvar_suf), HUD_Write_Cvar(str)
 // Save the config
 void HUD_Panel_ExportCfg(string cfgname)
 {
        float fh;
        string filename = strcat("hud_", autocvar_hud_skin, "_", cfgname, ".cfg");
+       string str = "";
        fh = fopen(filename, FILE_WRITE);
        if(fh >= 0)
        {
@@ -71,157 +72,162 @@ void HUD_Panel_ExportCfg(string cfgname)
                        HUD_Write_PanelCvar("_bg_padding");
                        switch(panel) {
                                case HUD_PANEL_WEAPONS:
-                                       HUD_Write_PanelCvar("_accuracy");
-                                       HUD_Write_PanelCvar("_label");
-                                       HUD_Write_PanelCvar("_label_scale");
-                                       HUD_Write_PanelCvar("_complainbubble");
-                                       HUD_Write_PanelCvar("_complainbubble_padding");
-                                       HUD_Write_PanelCvar("_complainbubble_time");
-                                       HUD_Write_PanelCvar("_complainbubble_fadetime");
-                                       HUD_Write_PanelCvar("_complainbubble_color_outofammo");
-                                       HUD_Write_PanelCvar("_complainbubble_color_donthave");
-                                       HUD_Write_PanelCvar("_complainbubble_color_unavailable");
-                                       HUD_Write_PanelCvar("_ammo");
-                                       HUD_Write_PanelCvar("_ammo_color");
-                                       HUD_Write_PanelCvar("_ammo_alpha");
-                                       HUD_Write_PanelCvar("_aspect");
-                                       HUD_Write_PanelCvar("_timeout");
-                                       HUD_Write_PanelCvar("_timeout_effect");
-                                       HUD_Write_PanelCvar("_timeout_fadebgmin");
-                                       HUD_Write_PanelCvar("_timeout_fadefgmin");
-                                       HUD_Write_PanelCvar("_timeout_speed_in");
-                                       HUD_Write_PanelCvar("_timeout_speed_out");
-                                       HUD_Write_PanelCvar("_onlyowned");
-                                       HUD_Write_PanelCvar("_noncurrent_alpha");
-                                       HUD_Write_PanelCvar("_noncurrent_scale");
+                                       HUD_Write_Cvar("hud_panel_weapons_accuracy");
+                                       HUD_Write_Cvar("hud_panel_weapons_label");
+                                       HUD_Write_Cvar("hud_panel_weapons_label_scale");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble_padding");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble_time");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble_fadetime");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble_color_outofammo");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble_color_donthave");
+                                       HUD_Write_Cvar("hud_panel_weapons_complainbubble_color_unavailable");
+                                       HUD_Write_Cvar("hud_panel_weapons_ammo");
+                                       HUD_Write_Cvar("hud_panel_weapons_ammo_color");
+                                       HUD_Write_Cvar("hud_panel_weapons_ammo_alpha");
+                                       HUD_Write_Cvar("hud_panel_weapons_aspect");
+                                       HUD_Write_Cvar("hud_panel_weapons_timeout");
+                                       HUD_Write_Cvar("hud_panel_weapons_timeout_effect");
+                                       HUD_Write_Cvar("hud_panel_weapons_timeout_fadebgmin");
+                                       HUD_Write_Cvar("hud_panel_weapons_timeout_fadefgmin");
+                                       HUD_Write_Cvar("hud_panel_weapons_timeout_speed_in");
+                                       HUD_Write_Cvar("hud_panel_weapons_timeout_speed_out");
+                                       HUD_Write_Cvar("hud_panel_weapons_onlyowned");
+                                       HUD_Write_Cvar("hud_panel_weapons_noncurrent_alpha");
+                                       HUD_Write_Cvar("hud_panel_weapons_noncurrent_scale");
+                                       HUD_Write_Cvar("hud_panel_weapons_selection_radius");
+                                       HUD_Write_Cvar("hud_panel_weapons_selection_speed");
                                        break;
                                case HUD_PANEL_AMMO:
-                                       HUD_Write_PanelCvar("_onlycurrent");
-                                       HUD_Write_PanelCvar("_noncurrent_alpha");
-                                       HUD_Write_PanelCvar("_noncurrent_scale");
-                                       HUD_Write_PanelCvar("_iconalign");
-                                       HUD_Write_PanelCvar("_progressbar");
-                                       HUD_Write_PanelCvar("_progressbar_name");
-                                       HUD_Write_PanelCvar("_progressbar_xoffset");
-                                       HUD_Write_PanelCvar("_text");
+                                       HUD_Write_Cvar("hud_panel_ammo_onlycurrent");
+                                       HUD_Write_Cvar("hud_panel_ammo_noncurrent_alpha");
+                                       HUD_Write_Cvar("hud_panel_ammo_noncurrent_scale");
+                                       HUD_Write_Cvar("hud_panel_ammo_iconalign");
+                                       HUD_Write_Cvar("hud_panel_ammo_progressbar");
+                                       HUD_Write_Cvar("hud_panel_ammo_progressbar_name");
+                                       HUD_Write_Cvar("hud_panel_ammo_progressbar_xoffset");
+                                       HUD_Write_Cvar("hud_panel_ammo_text");
                                        break;
                                case HUD_PANEL_POWERUPS:
-                                       HUD_Write_PanelCvar("_iconalign");
-                                       HUD_Write_PanelCvar("_baralign");
-                                       HUD_Write_PanelCvar("_progressbar");
-                                       HUD_Write_PanelCvar("_text");
+                                       HUD_Write_Cvar("hud_panel_powerups_iconalign");
+                                       HUD_Write_Cvar("hud_panel_powerups_baralign");
+                                       HUD_Write_Cvar("hud_panel_powerups_progressbar");
+                                       HUD_Write_Cvar("hud_panel_powerups_text");
                                        break;
                                case HUD_PANEL_HEALTHARMOR:
-                                       HUD_Write_PanelCvar("_flip");
-                                       HUD_Write_PanelCvar("_iconalign");
-                                       HUD_Write_PanelCvar("_baralign");
-                                       HUD_Write_PanelCvar("_progressbar");
-                                       HUD_Write_PanelCvar("_progressbar_health");
-                                       HUD_Write_PanelCvar("_progressbar_armor");
-                                       HUD_Write_PanelCvar("_progressbar_gfx");
-                                       HUD_Write_PanelCvar("_progressbar_gfx_smooth");
-                                       HUD_Write_PanelCvar("_combined");
-                                       HUD_Write_PanelCvar("_text");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_combined");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_flip");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_iconalign");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_baralign");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_progressbar");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_progressbar_health");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_progressbar_armor");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_progressbar_gfx");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_progressbar_gfx_smooth");
+                                       HUD_Write_Cvar("hud_panel_healtharmor_text");
                                        break;
                                case HUD_PANEL_NOTIFY:
-                                       HUD_Write_PanelCvar("_flip");
-                                       HUD_Write_PanelCvar("_fontsize");
-                                       HUD_Write_PanelCvar("_time");
-                                       HUD_Write_PanelCvar("_fadetime");
-                                       HUD_Write_PanelCvar("_icon_aspect");
+                                       HUD_Write_Cvar("hud_panel_notify_flip");
+                                       HUD_Write_Cvar("hud_panel_notify_fontsize");
+                                       HUD_Write_Cvar("hud_panel_notify_time");
+                                       HUD_Write_Cvar("hud_panel_notify_fadetime");
+                                       HUD_Write_Cvar("hud_panel_notify_icon_aspect");
                                        break;
                                case HUD_PANEL_TIMER:
                                        break;
                                case HUD_PANEL_RADAR:
-                                       HUD_Write_PanelCvar("_foreground_alpha");
-                                       HUD_Write_PanelCvar("_rotation");
-                                       HUD_Write_PanelCvar("_zoommode");
-                                       HUD_Write_PanelCvar("_scale");
-                                       HUD_Write_PanelCvar("_maximized_scale");
-                                       HUD_Write_PanelCvar("_maximized_size");
-                                       HUD_Write_PanelCvar("_maximized_rotation");
-                                       HUD_Write_PanelCvar("_maximized_zoommode");
+                                       HUD_Write_Cvar("hud_panel_radar_foreground_alpha");
+                                       HUD_Write_Cvar("hud_panel_radar_rotation");
+                                       HUD_Write_Cvar("hud_panel_radar_zoommode");
+                                       HUD_Write_Cvar("hud_panel_radar_scale");
+                                       HUD_Write_Cvar("hud_panel_radar_maximized_scale");
+                                       HUD_Write_Cvar("hud_panel_radar_maximized_size");
+                                       HUD_Write_Cvar("hud_panel_radar_maximized_rotation");
+                                       HUD_Write_Cvar("hud_panel_radar_maximized_zoommode");
                                        break;
                                case HUD_PANEL_SCORE:
-                                       HUD_Write_PanelCvar("_rankings");
+                                       HUD_Write_Cvar("hud_panel_score_rankings");
                                        break;
                                case HUD_PANEL_VOTE:
-                                       HUD_Write_PanelCvar("_alreadyvoted_alpha");
+                                       HUD_Write_Cvar("hud_panel_vote_alreadyvoted_alpha");
                                        break;
                                case HUD_PANEL_MODICONS:
-                                       HUD_Write_PanelCvar("_ca_layout");
-                                       HUD_Write_PanelCvar("_dom_layout");
-                                       HUD_Write_PanelCvar("_freezetag_layout");
+                                       HUD_Write_Cvar("hud_panel_modicons_ca_layout");
+                                       HUD_Write_Cvar("hud_panel_modicons_dom_layout");
+                                       HUD_Write_Cvar("hud_panel_modicons_freezetag_layout");
                                        break;
                                case HUD_PANEL_PRESSEDKEYS:
-                                       HUD_Write_PanelCvar("_aspect");
-                                       HUD_Write_PanelCvar("_attack");
+                                       HUD_Write_Cvar("hud_panel_pressedkeys_aspect");
+                                       HUD_Write_Cvar("hud_panel_pressedkeys_attack");
                                        break;
                                case HUD_PANEL_ENGINEINFO:
-                                       HUD_Write_PanelCvar("_framecounter_time");
-                                       HUD_Write_PanelCvar("_framecounter_decimals");
+                                       HUD_Write_Cvar("hud_panel_engineinfo_framecounter_time");
+                                       HUD_Write_Cvar("hud_panel_engineinfo_framecounter_decimals");
                                        break;
                                case HUD_PANEL_INFOMESSAGES:
-                                       HUD_Write_PanelCvar("_flip");
+                                       HUD_Write_Cvar("hud_panel_infomessages_flip");
                                        break;
                                case HUD_PANEL_PHYSICS:
-                                       HUD_Write_PanelCvar("_speed_unit_show");
-                                       HUD_Write_PanelCvar("_speed_max");
-                                       HUD_Write_PanelCvar("_speed_vertical");
-                                       HUD_Write_PanelCvar("_topspeed");
-                                       HUD_Write_PanelCvar("_topspeed_time");
-                                       HUD_Write_PanelCvar("_acceleration_max");
-                                       HUD_Write_PanelCvar("_acceleration_vertical");
-                                       HUD_Write_PanelCvar("_flip");
-                                       HUD_Write_PanelCvar("_baralign");
-                                       HUD_Write_PanelCvar("_progressbar");
-                                       HUD_Write_PanelCvar("_acceleration_progressbar_mode");
-                                       HUD_Write_PanelCvar("_acceleration_progressbar_scale");
-                                       HUD_Write_PanelCvar("_acceleration_progressbar_nonlinear");
-                                       HUD_Write_PanelCvar("_text");
-                                       HUD_Write_PanelCvar("_text_scale");
+                                       HUD_Write_Cvar("hud_panel_physics_speed_unit_show");
+                                       HUD_Write_Cvar("hud_panel_physics_speed_max");
+                                       HUD_Write_Cvar("hud_panel_physics_speed_vertical");
+                                       HUD_Write_Cvar("hud_panel_physics_topspeed");
+                                       HUD_Write_Cvar("hud_panel_physics_topspeed_time");
+                                       HUD_Write_Cvar("hud_panel_physics_acceleration_max");
+                                       HUD_Write_Cvar("hud_panel_physics_acceleration_vertical");
+                                       HUD_Write_Cvar("hud_panel_physics_flip");
+                                       HUD_Write_Cvar("hud_panel_physics_baralign");
+                                       HUD_Write_Cvar("hud_panel_physics_progressbar");
+                                       HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_mode");
+                                       HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_scale");
+                                       HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_nonlinear");
+                                       HUD_Write_Cvar("hud_panel_physics_text");
+                                       HUD_Write_Cvar("hud_panel_physics_text_scale");
                                        break;
                                case HUD_PANEL_CENTERPRINT:
-                                       HUD_Write_PanelCvar("_align");
-                                       HUD_Write_PanelCvar("_flip");
-                                       HUD_Write_PanelCvar("_fontscale");
-                                       HUD_Write_PanelCvar("_time");
-                                       HUD_Write_PanelCvar("_fade_in");
-                                       HUD_Write_PanelCvar("_fade_out");
-                                       HUD_Write_PanelCvar("_fade_subsequent");
-                                       HUD_Write_PanelCvar("_fade_subsequent_passone");
-                                       HUD_Write_PanelCvar("_fade_subsequent_passone_minalpha");
-                                       HUD_Write_PanelCvar("_fade_subsequent_passtwo");
-                                       HUD_Write_PanelCvar("_fade_subsequent_passtwo_minalpha");
-                                       HUD_Write_PanelCvar("_fade_subsequent_minfontsize");
-                                       HUD_Write_PanelCvar("_fade_minfontsize");
+                                       HUD_Write_Cvar("hud_panel_centerprint_align");
+                                       HUD_Write_Cvar("hud_panel_centerprint_flip");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fontscale");
+                                       HUD_Write_Cvar("hud_panel_centerprint_time");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_in");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_out");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_subsequent");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_subsequent_passone");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_subsequent_passone_minalpha");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_subsequent_passtwo");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_subsequent_passtwo_minalpha");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_subsequent_minfontsize");
+                                       HUD_Write_Cvar("hud_panel_centerprint_fade_minfontsize");
                                        break;
                                case HUD_PANEL_ITEMSTIME:
-                                       HUD_Write_PanelCvar("_iconalign");
-                                       HUD_Write_PanelCvar("_progressbar");
-                                       HUD_Write_PanelCvar("_progressbar_name");
-                                       HUD_Write_PanelCvar("_progressbar_reduced");
-                                       HUD_Write_PanelCvar("_text");
-                                       HUD_Write_PanelCvar("_ratio");
-                                       HUD_Write_PanelCvar("_dynamicsize");
+                                       HUD_Write_Cvar("hud_panel_itemstime_iconalign");
+                                       HUD_Write_Cvar("hud_panel_itemstime_progressbar");
+                                       HUD_Write_Cvar("hud_panel_itemstime_progressbar_name");
+                                       HUD_Write_Cvar("hud_panel_itemstime_progressbar_reduced");
+                                       HUD_Write_Cvar("hud_panel_itemstime_text");
+                                       HUD_Write_Cvar("hud_panel_itemstime_ratio");
+                                       HUD_Write_Cvar("hud_panel_itemstime_dynamicsize");
+                                       break;
+                               case HUD_PANEL_MAPVOTE:
+                                       HUD_Write_Cvar("hud_panel_mapvote_highlight_border");
                                        break;
                                case HUD_PANEL_QUICKMENU:
-                                       HUD_Write_PanelCvar("_align");
+                                       HUD_Write_Cvar("hud_panel_quickmenu_align");
                                        break;
                                case HUD_PANEL_SCOREBOARD:
-                                       HUD_Write_PanelCvar("_fadeinspeed");
-                                       HUD_Write_PanelCvar("_fadeoutspeed");
-                                       HUD_Write_PanelCvar("_respawntime_decimals");
-                                       HUD_Write_PanelCvar("_table_bg_alpha");
-                                       HUD_Write_PanelCvar("_table_bg_scale");
-                                       HUD_Write_PanelCvar("_table_fg_alpha");
-                                       HUD_Write_PanelCvar("_table_fg_alpha_self");
-                                       HUD_Write_PanelCvar("_table_highlight");
-                                       HUD_Write_PanelCvar("_table_highlight_alpha");
-                                       HUD_Write_PanelCvar("_table_highlight_alpha_self");
-                                       HUD_Write_PanelCvar("_bg_teams_color_team");
-                                       HUD_Write_PanelCvar("_accuracy_doublerows");
-                                       HUD_Write_PanelCvar("_accuracy_nocolors");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_fadeinspeed");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_fadeoutspeed");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_respawntime_decimals");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_bg_alpha");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_bg_scale");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_fg_alpha");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_fg_alpha_self");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_highlight");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_highlight_alpha");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_table_highlight_alpha_self");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_bg_teams_color_team");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_accuracy_doublerows");
+                                       HUD_Write_Cvar("hud_panel_scoreboard_accuracy_nocolors");
                                        break;
                        }
                        HUD_Write("\n");
@@ -1229,11 +1235,11 @@ void HUD_Configure_DrawGrid()
                hud_configure_realGridSize.y = hud_configure_gridSize.y * vid_conheight;
                vector s;
                // x-axis
-               s = eX + eY * vid_conheight;
+               s = vec2(1, vid_conheight);
                for(i = 1; i < 1/hud_configure_gridSize.x; ++i)
                        drawfill(eX * i * hud_configure_realGridSize.x, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL);
                // y-axis
-               s = eY + eX * vid_conwidth;
+               s = vec2(vid_conwidth, 1);
                for(i = 1; i < 1/hud_configure_gridSize.y; ++i)
                        drawfill(eY * i * hud_configure_realGridSize.y, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL);
        }
@@ -1285,11 +1291,13 @@ const string hlBorder = "gfx/hud/default/border_highlighted";
 const string hlBorder2 = "gfx/hud/default/border_highlighted2";
 void HUD_Panel_HlBorder(float myBorder, vector color, float theAlpha)
 {
-       drawfill(panel_pos - '1 1 0' * myBorder, panel_size + '2 2 0' * myBorder, '0 0.5 1', .5 * theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder, hlBorder, '8 1 0' * hlBorderSize, eX * (panel_size.x + 2 * myBorder) + eY * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * (panel_size.y + 2 * myBorder - hlBorderSize), hlBorder, '8 1 0' * hlBorderSize, eX * (panel_size.x + 2 * myBorder) + eY * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * hlBorderSize, hlBorder2, '1 8 0' * hlBorderSize, eY * (panel_size.y + 2 * myBorder - 2 * hlBorderSize) + eX * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
-       drawpic_tiled(panel_pos - '1 1 0' * myBorder + eY * hlBorderSize + eX * (panel_size.x + 2 * myBorder - hlBorderSize), hlBorder2, '1 8 0' * hlBorderSize, eY * (panel_size.y + 2 * myBorder - 2 * hlBorderSize) + eX * hlBorderSize, color, theAlpha, DRAWFLAG_NORMAL);
+       vector pos = panel_pos - vec2(myBorder, myBorder);
+       drawfill(pos, panel_size + '2 2 0' * myBorder, '0 0.5 1', .5 * theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(pos, hlBorder, '8 1 0' * hlBorderSize, vec2(panel_size.x + 2 * myBorder, hlBorderSize), color, theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(pos + eY * (panel_size.y + 2 * myBorder - hlBorderSize), hlBorder, '8 1 0' * hlBorderSize, vec2(panel_size.x + 2 * myBorder, hlBorderSize), color, theAlpha, DRAWFLAG_NORMAL);
+       pos.y += hlBorderSize;
+       drawpic_tiled(pos, hlBorder2, '1 8 0' * hlBorderSize, vec2(hlBorderSize, panel_size.y + 2 * myBorder - 2 * hlBorderSize), color, theAlpha, DRAWFLAG_NORMAL);
+       drawpic_tiled(pos + eX * (panel_size.x + 2 * myBorder - hlBorderSize), hlBorder2, '1 8 0' * hlBorderSize, vec2(hlBorderSize, panel_size.y + 2 * myBorder - 2 * hlBorderSize), color, theAlpha, DRAWFLAG_NORMAL);
 }
 
 void HUD_Configure_PostDraw()
index 94545ac4bff69ea3511cb20866973709d190895a..7bae78cb6c5ab38385ea6a0b1cbdbc338be2a732 100644 (file)
@@ -150,7 +150,7 @@ void HUD_Ammo()
 
        rows = HUD_GetRowCount(total_ammo_count, mySize, 3);
        columns = ceil((total_ammo_count)/rows);
-       ammo_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
+       ammo_size = vec2(mySize.x / columns, mySize.y / rows);
 
        vector offset = '0 0 0';
        float newSize;
@@ -207,7 +207,7 @@ void HUD_Ammo()
                {
                        ammotype = GetAmmoFieldFromNum(i);
                        DrawAmmoItem(
-                               pos + eX * column * (ammo_size.x + offset.x) + eY * row * (ammo_size.y + offset.y),
+                               pos + vec2(column * (ammo_size.x + offset.x), row * (ammo_size.y + offset.y)),
                                ammo_size,
                                ammotype,
                                (wep.ammo_field == ammotype),
@@ -229,7 +229,7 @@ void HUD_Ammo()
 
                float f = bound(0, nade_statuschange_elapsedtime*2, 1);
 
-               DrawAmmoNades(pos + eX * column * (ammo_size.x + offset.x) + eY * row * (ammo_size.y + offset.y), ammo_size, nade_prevstatus < nade_cnt && nade_cnt != 0 && f < 1, f);
+               DrawAmmoNades(pos + vec2(column * (ammo_size.x + offset.x), row * (ammo_size.y + offset.y)), ammo_size, nade_prevstatus < nade_cnt && nade_cnt != 0 && f < 1, f);
        }
 
        draw_endBoldFont();
index f67cbffbd04d176160d072b1e6bddcbfe3e045b0..3c13fd9c2bdfe2d8724c37194796821e0f6bf675 100644 (file)
@@ -161,16 +161,16 @@ void HUD_CenterPrint ()
                if (hud_panel_radar_bottom >= 0.96 * vid_conheight)
                        return;
 
-               panel_pos = eY * hud_panel_radar_bottom + eX * 0.5 * (vid_conwidth - panel_size_x);
-               panel_size_y = min(panel_size_y, vid_conheight - hud_panel_radar_bottom);
+               panel_pos.x = 0.5 * (vid_conwidth - panel_size.x);
+               panel_pos.y = hud_panel_radar_bottom;
+               panel_size.y = min(panel_size.y, vid_conheight - hud_panel_radar_bottom);
        }
        else if(!autocvar__hud_configure && scoreboard_fade_alpha)
        {
                // move the panel below the scoreboard
                if (scoreboard_bottom >= 0.96 * vid_conheight)
                        return;
-               vector target_pos;
-               target_pos = eY * scoreboard_bottom + eX * 0.5 * (vid_conwidth - panel_size.x);
+               vector target_pos = vec2(0.5 * (vid_conwidth - panel_size.x), scoreboard_bottom);
                if(target_pos.y > panel_pos.y)
                {
                        panel_pos = panel_pos + (target_pos - panel_pos) * sqrt(scoreboard_fade_alpha);
index 69fced5320091bc933b715bb6de8d6b59e69173c..5e2bfd3a5505374d29473888d3c82e610e44b4b1 100644 (file)
@@ -110,7 +110,7 @@ void HUD_HealthArmor()
                        DrawNumIcon(pos, mySize, hp, biggercount, 0, iconalign, HUD_Get_Num_Color(hp, maxtotal), 1);
 
                if(fuel)
-                       HUD_Panel_DrawProgressBar(pos, eX * mySize.x + eY * 0.2 * mySize.y, "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+                       HUD_Panel_DrawProgressBar(pos, vec2(mySize.x, 0.2 * mySize.y), "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
        }
        else
        {
index b736dced60671a8025936d95b3c01dc844dabb6f..c3e91d3e9c7070838a2973d180f353459dbf69c0 100644 (file)
@@ -38,8 +38,8 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, int
 
        if(layout)
        {
-               drawpic_aspect_skin(myPos, pic, eX * 0.7 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(myPos + eX * 0.7 * mySize.x, ftos(stat), eX * 0.3 * mySize.x + eY * mySize.y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(myPos, pic, vec2(0.7 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(myPos + eX * 0.7 * mySize.x, ftos(stat), vec2(0.3 * mySize.x, mySize.y), color, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        else
                drawstring_aspect(myPos, ftos(stat), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -63,11 +63,12 @@ void HUD_Mod_CA(vector myPos, vector mySize)
 
        int i;
        float row = 0, column = 0;
-       vector pos, itemSize;
-       itemSize = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
+       vector pos = '0 0 0', itemSize;
+       itemSize = vec2(mySize.x / columns, mySize.y / rows);
        for(i=0; i<team_count; ++i)
        {
-               pos = myPos + eX * column * itemSize.x + eY * row * itemSize.y;
+               pos.x = myPos.x + column * itemSize.x;
+               pos.y = myPos.y + row * itemSize.y;
 
                DrawCAItem(pos, itemSize, aspect_ratio, layout, i);
 
@@ -320,7 +321,7 @@ void HUD_Mod_KH(vector pos, vector mySize)
        if(all_keys == 4 && mySize.x * 0.5 < mySize.y && mySize.y * 0.5 < mySize.x)
        {
                // Quadratic arrangement
-               slot_size = eX * mySize.x * 0.5 + eY * mySize.y * 0.5;
+               slot_size = vec2(mySize.x * 0.5, mySize.y * 0.5);
                KH_SLOTS[0] = pos;
                KH_SLOTS[1] = pos + eX * slot_size.x;
                KH_SLOTS[2] = pos + eY * slot_size.y;
@@ -331,14 +332,14 @@ void HUD_Mod_KH(vector pos, vector mySize)
                if(mySize.x > mySize.y)
                {
                        // Horizontal arrangement
-                       slot_size = eX * mySize.x / all_keys + eY * mySize.y;
+                       slot_size = vec2(mySize.x / all_keys, mySize.y);
                        for(i = 0; i < all_keys; ++i)
                                KH_SLOTS[i] = pos + eX * slot_size.x * i;
                }
                else
                {
                        // Vertical arrangement
-                       slot_size = eX * mySize.x + eY * mySize.y / all_keys;
+                       slot_size = vec2(mySize.x, mySize.y / all_keys);
                        for(i = 0; i < all_keys; ++i)
                                KH_SLOTS[i] = pos + eY * slot_size.y * i;
                }
@@ -432,10 +433,10 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
 
        if(mySize.x > mySize.y) {
                kaball_pos = pos + eX * 0.25 * mySize.x;
-               kaball_size = eX * 0.5 * mySize.x + eY * mySize.y;
+               kaball_size = vec2(0.5 * mySize.x, mySize.y);
        } else {
                kaball_pos = pos + eY * 0.25 * mySize.y;
-               kaball_size = eY * 0.5 * mySize.y + eX * mySize.x;
+               kaball_size = vec2(mySize.x, 0.5 * mySize.y);
        }
 
        float kaball_statuschange_elapsedtime = time - kaball_statuschange_time;
@@ -445,7 +446,7 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
                drawpic_aspect_skin_expanding(kaball_pos, "keepawayball_carrying", kaball_size, '1 1 1', panel_fg_alpha * kaball_alpha, DRAWFLAG_NORMAL, f);
 
        if(kaball)
-               drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos, "keepawayball_carrying", vec2(mySize.x, mySize.y), '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
 }
 
 
@@ -548,15 +549,19 @@ void HUD_Mod_Race(vector pos, vector mySize)
        if(mySize.x > mySize.y) {
                // text on left side
                squareSize = min(mySize.y, mySize.x/2);
-               textPos = pos + eX * 0.5 * max(0, mySize.x/2 - squareSize) + eY * 0.5 * (mySize.y - squareSize);
-               medalPos = pos + eX * 0.5 * max(0, mySize.x/2 - squareSize) + eX * 0.5 * mySize.x + eY * 0.5 * (mySize.y - squareSize);
+               vector ofs = vec2(0.5 * max(0, mySize.x/2 - squareSize), 0.5 * (mySize.y - squareSize));
+               textPos = pos + ofs;
+               ofs.y += 0.5 * mySize.x;
+               medalPos = pos + ofs;
        } else {
                // text on top
                squareSize = min(mySize.x, mySize.y/2);
-               textPos = pos + eY * 0.5 * max(0, mySize.y/2 - squareSize) + eX * 0.5 * (mySize.x - squareSize);
-               medalPos = pos + eY * 0.5 * max(0, mySize.y/2 - squareSize) + eY * 0.5 * mySize.y + eX * 0.5 * (mySize.x - squareSize);
+               vector ofs = vec2(0.5 * (mySize.x - squareSize), 0.5 * max(0, mySize.y/2 - squareSize));
+               textPos = pos + ofs;
+               ofs.y += 0.5 * mySize.y;
+               medalPos = pos + ofs;
        }
-       vector textSize = eX * squareSize + eY * 0.25 * squareSize;
+       vector textSize = vec2(squareSize, 0.25 * squareSize);
 
        race_showTime(_("Personal best"), textPos, eY * 0.25 * squareSize, t, textSize, time - crecordtime_change_time);
 
@@ -665,9 +670,9 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, in
                //draw the text
                color *= 0.5 + pps_ratio * (1 - 0.5); // half saturated color at min, full saturated at max
                if (layout == 2) // average pps
-                       drawstring_aspect(myPos + eX * mySize.y, ftos_decimals(stat, 2), eX * (2/3) * mySize.x + eY * mySize.y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(myPos + eX * mySize.y, ftos_decimals(stat, 2), vec2((2/3) * mySize.x, mySize.y), color, panel_fg_alpha, DRAWFLAG_NORMAL);
                else // percentage of average pps
-                       drawstring_aspect(myPos + eX * mySize.y, strcat( ftos(floor(pps_ratio*100 + 0.5)), "%" ), eX * (2/3) * mySize.x + eY * mySize.y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(myPos + eX * mySize.y, strcat( ftos(floor(pps_ratio*100 + 0.5)), "%" ), vec2((2/3) * mySize.x, mySize.y), color, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
 
        //draw the icon
@@ -694,10 +699,10 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
        int i;
        float row = 0, column = 0;
        vector pos, itemSize;
-       itemSize = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
+       itemSize = vec2(mySize.x / columns, mySize.y / rows);
        for(i=0; i<team_count; ++i)
        {
-               pos = myPos + eX * column * itemSize.x + eY * row * itemSize.y;
+               pos = myPos + vec2(column * itemSize.x, row * itemSize.y);
 
                DrawDomItem(pos, itemSize, aspect_ratio, layout, i);
 
index fda57026f742826def39e7f8b393499097697f2f..910113f4e083fd877ab5d31250b82ff2e678ba86 100644 (file)
@@ -83,7 +83,7 @@ void HUD_Notify()
        float name_maxwidth = panel_width_half - icon_width_half - size.x * NOTIFY_ICON_MARGIN;
 
        vector font_size = '0.5 0.5 0' * entry_height * autocvar_hud_panel_notify_fontsize;
-       vector icon_size = (eX * icon_aspect + eY) * entry_height;
+       vector icon_size = vec2(icon_aspect, 1) * entry_height;
        vector icon_left = eX * (panel_width_half - icon_width_half);
        vector attacker_right = eX * name_maxwidth;
        vector victim_left = eX * (size.x - name_maxwidth);
index 076ce918f14723dcde2e755308a3f4379fb885e0..608e48ce39856cabc5c3d1ee575ad29869b521dd 100644 (file)
@@ -167,7 +167,7 @@ void HUD_Powerups()
 
        // Draw items from linked list
        vector itemPos = pos;
-       vector itemSize = eX * (size.x / columns) + eY * (size.y / rows);
+       vector itemSize = vec2(size.x / columns, size.y / rows);
        vector textColor = '1 1 1';
 
        int fullSeconds = 0;
@@ -178,7 +178,7 @@ void HUD_Powerups()
        draw_beginBoldFont();
        for(entity item = powerupItems; item.count; item = item.chain)
        {
-               itemPos = eX * (pos.x + column * itemSize.x) + eY * (pos.y + row * itemSize.y);
+               itemPos = vec2(pos.x + column * itemSize.x, pos.y + row * itemSize.y);
 
                // Draw progressbar
                if(autocvar_hud_panel_powerups_progressbar)
index abb9ccef9aa56910fae3fd52fb1b3e5699e512ab..c659648d2eb9568948c1b58096254805a0b85baa 100644 (file)
@@ -49,8 +49,7 @@ void HUD_PressedKeys()
                mySize = newSize;
        }
 
-       vector keysize;
-       keysize = eX * mySize.x * (1/3.0) + eY * mySize.y * (1/(3.0 - !autocvar_hud_panel_pressedkeys_attack));
+       vector keysize = vec2(mySize.x / 3, mySize.y / (3 - !autocvar_hud_panel_pressedkeys_attack));
        int pressedkeys = STAT(PRESSED_KEYS);
 
        if(autocvar_hud_panel_pressedkeys_attack)
index 0940b0261587ba7faf051205365770b385ea5a0d..f17f3045941741796ed400629350a020f8020a8e 100644 (file)
@@ -528,7 +528,7 @@ void QuickMenu_Mouse()
                                color = '1 1 0.3';
                        else
                                color = '1 1 1';
-                       drawfill(panel_pos, eX * panel_size.x + eY * fontsize.y, color, .2, DRAWFLAG_NORMAL);
+                       drawfill(panel_pos, vec2(panel_size.x, fontsize.y), color, .2, DRAWFLAG_NORMAL);
 
                        if(!mouseClicked && (prevMouseClicked & S_MOUSE1))
                                QuickMenu_Page_ActiveEntry((entry_num < QUICKMENU_MAXLINES - 1) ? entry_num + 1 : 0);
@@ -552,7 +552,7 @@ void HUD_Quickmenu_DrawEntry(vector pos, string desc, string option, vector font
                        pic = strcat("gfx/hud/default/", option);
                vector option_size = '1 1 0' * fontsize.y * 0.8;
                desc_width -= option_size.x;
-               drawpic(pos + eX * desc_width + eY * (fontsize.y - option_size.y) / 2, pic, option_size, '1 1 1', panel_fg_alpha, DRAWFLAG_ADDITIVE);
+               drawpic(pos + vec2(desc_width, (fontsize.y - option_size.y) / 2), pic, option_size, '1 1 1', panel_fg_alpha, DRAWFLAG_ADDITIVE);
                desc_width -= fontsize.x / 4;
        }
        entry = textShortenToWidth(desc, desc_width, fontsize, stringwidth_colors);
@@ -682,7 +682,7 @@ void HUD_QuickMenu()
 
                if(QuickMenu_Page_ActivatedEntry_Time && time < QuickMenu_Page_ActivatedEntry_Time
                        && QuickMenu_Page_ActivatedEntry == i)
-                       drawfill(panel_pos, eX * panel_size.x + eY * fontsize.y, '0.5 1 0.5', .2, DRAWFLAG_NORMAL);
+                       drawfill(panel_pos, vec2(panel_size.x, fontsize.y), '0.5 1 0.5', .2, DRAWFLAG_NORMAL);
 
                panel_pos.y += fontsize.y;
        }
@@ -740,12 +740,19 @@ void HUD_QuickMenu()
 
 // useful to Translate a string inside the Command
 #define QUICKMENU_ENTRY_TC(title,command,text,translated_text) {\
-       if(prvm_language == "en") \
-               QUICKMENU_ENTRY(title, sprintf(command, text)) \
-       else if(!autocvar_hud_panel_quickmenu_translatecommands || translated_text == text) \
-               QUICKMENU_ENTRY(strcat("(en)", title), sprintf(command, text)) \
-       else \
-               QUICKMENU_ENTRY(strcat("(", prvm_language, ")", title), sprintf(command, translated_text)) \
+       if(prvm_language == "en") { \
+               tc_title = title; \
+               tc_cmd = sprintf(command, text); \
+       } \
+       else if(!autocvar_hud_panel_quickmenu_translatecommands || translated_text == text) { \
+               tc_title = strcat("(en)", title); \
+               tc_cmd = sprintf(command, text); \
+       } \
+       else { \
+               tc_title = strcat("(", prvm_language, ")", title); \
+               tc_cmd = sprintf(command, translated_text); \
+       } \
+       QUICKMENU_ENTRY(tc_title, tc_cmd) \
 }
 
 void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me)
@@ -781,6 +788,9 @@ void QuickMenu_Default(string target_submenu)
        if(target_submenu != "")
                QuickMenu_Buffer_Size = QUICKMENU_BUFFER_MAXENTRIES; // forbids load of next entries until target_submenu
 
+       string tc_title;
+       string tc_cmd;
+
        QUICKMENU_SMENU(CTX(_("QMCMD^Chat")), "Chat")
                QUICKMENU_ENTRY_TC(CTX(_("QMCMD^nice one")), "say %s", ":-) / nice one", CTX(_("QMCMD^:-) / nice one")))
                QUICKMENU_ENTRY_TC(CTX(_("QMCMD^good game")), "say %s", "good game", CTX(_("QMCMD^good game")))
index 5efbd00ceb99ccda756c6747bdf12d7e7c6fb953..2f54e2a37981bfa42c166fbe8ea18f1d7a5b7c42 100644 (file)
@@ -120,17 +120,21 @@ void HUD_RaceTimer ()
 
        float a, t;
        string s, forcetime;
+       vector str_pos;
 
        if(autocvar__hud_configure)
        {
                s = "0:13:37";
                draw_beginBoldFont();
-               drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               str_pos = pos + eX * 0.5 * (mySize.x - stringwidth(s, false, '1 1 0' * 0.6 * mySize.y));
+               drawstring(str_pos, s, '1 1 0' * 0.6 * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                draw_endBoldFont();
                s = _("^1Intermediate 1 (+15.42)");
-               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
+               str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
+               drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
                s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint");
-               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.80 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
+               str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.8 * mySize.y);
+               drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        else if(race_checkpointtime)
        {
@@ -155,15 +159,14 @@ void HUD_RaceTimer ()
                        {
                                a = bound(0, 2 - ((race_laptime + TIME_DECODE(race_nextbesttime)) - (time + TIME_DECODE(race_penaltyaccumulator))), 1);
                                if(a > 0) // next one?
-                               {
                                        s = MakeRaceString(race_nextcheckpoint, (time + TIME_DECODE(race_penaltyaccumulator)) - race_laptime, TIME_DECODE(race_nextbesttime), 0, race_nextbestname);
-                               }
                        }
                }
 
                if(s != "" && a > 0)
                {
-                       drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
+                       drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                if(race_penaltytime)
@@ -172,7 +175,8 @@ void HUD_RaceTimer ()
                        if(a > 0)
                        {
                                s = sprintf(_("^1PENALTY: %.1f (%s)"), race_penaltytime * 0.1, race_penaltyreason);
-                               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.8 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.8 * mySize.y);
+                               drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                        }
                }
 
@@ -181,7 +185,8 @@ void HUD_RaceTimer ()
                if(forcetime != "")
                {
                        a = bound(0, (time - race_checkpointtime) / 0.5, 1);
-                       drawstring_expanding(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(forcetime, false, '1 1 0' * 0.6 * mySize.y), forcetime, '1 1 0' * 0.6 * mySize.y, '1 1 1', panel_fg_alpha, 0, a);
+                       str_pos = pos + eX * 0.5 * (mySize.x - stringwidth(forcetime, false, '1 1 0' * 0.6 * mySize.y));
+                       drawstring_expanding(str_pos, forcetime, '1 1 0' * 0.6 * mySize.y, '1 1 1', panel_fg_alpha, 0, a);
                }
                else
                        a = 1;
@@ -189,7 +194,8 @@ void HUD_RaceTimer ()
                if(race_laptime && race_checkpoint != 255)
                {
                        s = TIME_ENCODED_TOSTRING(TIME_ENCODE(time + TIME_DECODE(race_penaltyaccumulator) - race_laptime));
-                       drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       str_pos = pos + eX * 0.5 * (mySize.x - stringwidth(s, false, '0.6 0.6 0' * mySize.y));
+                       drawstring(str_pos, s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                draw_endBoldFont();
@@ -200,13 +206,15 @@ void HUD_RaceTimer ()
                {
                        a = bound(0, 2 - (time - race_mycheckpointtime), 1);
                        s = MakeRaceString(race_mycheckpoint, TIME_DECODE(race_mycheckpointdelta), -(race_mycheckpointenemy == ""), race_mycheckpointlapsdelta, race_mycheckpointenemy);
-                       drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
+                       drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
                if(race_othercheckpointtime && race_othercheckpointenemy != "")
                {
                        a = bound(0, 2 - (time - race_othercheckpointtime), 1);
                        s = MakeRaceString(race_othercheckpoint, -TIME_DECODE(race_othercheckpointdelta), -(race_othercheckpointenemy == ""), race_othercheckpointlapsdelta, race_othercheckpointenemy);
-                       drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
+                       drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                if(race_penaltytime && !race_penaltyaccumulator)
@@ -219,7 +227,8 @@ void HUD_RaceTimer ()
                                        s = sprintf(_("^1PENALTY: %.1f (%s)"), (t - time) * 0.1, race_penaltyreason);
                                else
                                        s = sprintf(_("^2PENALTY: %.1f (%s)"), 0, race_penaltyreason);
-                               drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.2 * mySize.y) + eY * 0.6 * mySize.y, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               str_pos = pos + vec2(0.5 * (mySize.x - stringwidth(s, true, '1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
+                               drawcolorcodedstring(str_pos, s, '1 1 0' * 0.2 * mySize.y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
                        }
                }
        }
index 972e4effbee9db71c90b4228e177e5a1eb4f8108..24be15432d12f18e5d6766d01533f96bf7940bab 100644 (file)
@@ -35,8 +35,8 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        players_per_team = max(2, ceil((entries - 1) / team_count));
                        for(i=0; i<team_count; ++i) {
                                if (i == floor((entries - 2) / players_per_team) || (entries == 1 && i == 0))
-                                       HUD_Panel_DrawHighlight(pos + eX * score_size * i, eX * score_size + eY * fontsize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos + eX * score_size * i, ftos(175 - 23*i), eX * score_size + eY * fontsize.y, Team_ColorRGB(ColorByTeam(i)) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       HUD_Panel_DrawHighlight(pos + eX * score_size * i, vec2(score_size, fontsize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos + eX * score_size * i, ftos(175 - 23*i), vec2(score_size, fontsize.y), Team_ColorRGB(ColorByTeam(i)) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        first_pl = 1;
                        pos.y += fontsize.y;
@@ -50,7 +50,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        if (i == entries-1 && autocvar_hud_panel_score_rankings == 1)
                        {
                                rgb = '1 1 0';
-                               drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawfill(pos, vec2(mySize.x, fontsize.y), rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                s = entcs_GetName(player_localnum);
                                score = 7;
                        }
@@ -83,8 +83,8 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                                continue;
 
                        if (tm.team == myteam)
-                               drawfill(pos + eX * score_size * i, eX * score_size + eY * fontsize.y, '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores(ts_primary))), eX * score_size + eY * fontsize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawfill(pos + eX * score_size * i, vec2(score_size, fontsize.y), '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores(ts_primary))), vec2(score_size, fontsize.y), Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        ++i;
                }
                first_pl = 1;
@@ -190,12 +190,12 @@ void HUD_Score()
                                distribution_color = '1 0 0';
                                sign = "+";
                        }
-                       drawstring_aspect(pos + eX * 0.75 * mySize.x, strcat(sign, distrtimer), eX * 0.25 * mySize.x + eY * (1/3) * mySize.y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * 0.75 * mySize.x, strcat(sign, distrtimer), vec2(0.25 * mySize.x, (1/3) * mySize.y), distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                // race record display
                if (distribution <= 0)
-                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos, timer, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       HUD_Panel_DrawHighlight(pos, vec2(0.75 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(pos, timer, vec2(0.75 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                draw_endBoldFont();
        } else if (!teamplay) { // non-teamgames
                if ((spectatee_status == -1 && !autocvar__hud_configure) || autocvar_hud_panel_score_rankings)
@@ -238,7 +238,7 @@ void HUD_Score()
                        HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize.x + eY * mySize.y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eX * 0.75 * mySize.x, distribution_str, eX * 0.25 * mySize.x + eY * (1/3) * mySize.y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(pos + eX * 0.75 * mySize.x, distribution_str, vec2(0.25 * mySize.x, (1/3) * mySize.y), distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                draw_endBoldFont();
        } else { // teamgames
                float row, column, rows = 0, columns = 0;
@@ -253,7 +253,7 @@ void HUD_Score()
                {
                        rows = HUD_GetRowCount(team_count, mySize, 3);
                        columns = ceil(team_count/rows);
-                       score_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
+                       score_size = vec2(mySize.x / columns, mySize.y / rows);
 
                        float newSize;
                        if(score_size.x/score_size.y > 3)
@@ -272,7 +272,7 @@ void HUD_Score()
                        }
                }
                else
-                       score_size = eX * mySize.x*(1/4) + eY * mySize.y*(1/3);
+                       score_size = vec2(mySize.x / 4, mySize.y / 3);
 
                float max_fragcount;
                max_fragcount = -99;
@@ -293,7 +293,7 @@ void HUD_Score()
 
                        if (spectatee_status == -1)
                        {
-                               score_pos = pos + eX * column * (score_size.x + offset.x) + eY * row * (score_size.y + offset.y);
+                               score_pos = pos + vec2(column * (score_size.x + offset.x), row * (score_size.y + offset.y));
                                if (max_fragcount == score)
                                        HUD_Panel_DrawHighlight(score_pos, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                                drawstring_aspect(score_pos, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -306,12 +306,12 @@ void HUD_Score()
                        }
                        else if(tm.team == myteam) {
                                if (max_fragcount == score)
-                                       HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize.x + eY * mySize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       HUD_Panel_DrawHighlight(pos, vec2(0.75 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos, ftos(score), vec2(0.75 * mySize.x, mySize.y), Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        } else {
                                if (max_fragcount == score)
-                                       HUD_Panel_DrawHighlight(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawstring_aspect(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       HUD_Panel_DrawHighlight(pos + vec2(0.75 * mySize.x, (1/3) * rows * mySize.y), score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                               drawstring_aspect(pos + vec2(0.75 * mySize.x, (1/3) * rows * mySize.y), ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                                ++rows;
                        }
                }
index b8c9a3ea1579cae0e226eff1dc647572dd099c5b..e6e5f36495c79f90c23356f41737c48c8190f4b8 100644 (file)
@@ -725,10 +725,11 @@ string Scoreboard_FixColumnWidth(int i, string str)
                        sbt_fixcolumnwidth_iconlen = f;
        }
 
-       sbt_fixcolumnwidth_iconlen *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect
-
        if(sbt_fixcolumnwidth_iconlen != 0)
+       {
+               sbt_fixcolumnwidth_iconlen *= hud_fontsize.y / hud_fontsize.x; // fix icon aspect
                sbt_fixcolumnwidth_marginlen = stringwidth(" ", false, hud_fontsize);
+       }
        else
                sbt_fixcolumnwidth_marginlen = 0;
 
@@ -823,7 +824,7 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i
        bool is_spec = (entcs_GetTeam(pl.sv_entnum) == NUM_SPECTATOR);
 
        vector h_pos = item_pos;
-       vector h_size = eX * panel_size.x + eY * hud_fontsize.y * 1.25;
+       vector h_size = vec2(panel_size.x, hud_fontsize.y * 1.25);
        // alternated rows highlighting
        if(is_self)
                drawfill(h_pos, h_size, rgb, sbt_highlight_alpha_self, DRAWFLAG_NORMAL);
@@ -863,11 +864,11 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i
 
                tmp.x = sbt_field_size[i] + hud_fontsize.x;
                if(sbt_field_icon0 != "")
-                       drawpic(pos - tmp, sbt_field_icon0, eY * hud_fontsize.y + eX * hud_fontsize.x * sbt_fixcolumnwidth_iconlen, sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
+                       drawpic(pos - tmp, sbt_field_icon0, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
                if(sbt_field_icon1 != "")
-                       drawpic(pos - tmp, sbt_field_icon1, eY * hud_fontsize.y + eX * hud_fontsize.x * sbt_fixcolumnwidth_iconlen, sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
+                       drawpic(pos - tmp, sbt_field_icon1, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
                if(sbt_field_icon2 != "")
-                       drawpic(pos - tmp, sbt_field_icon2, eY * hud_fontsize.y + eX * hud_fontsize.x * sbt_fixcolumnwidth_iconlen, sbt_field_icon2_rgb, fg_alpha, DRAWFLAG_NORMAL);
+                       drawpic(pos - tmp, sbt_field_icon2, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon2_rgb, fg_alpha, DRAWFLAG_NORMAL);
        }
 
        if(sbt_field[i] == SP_SEPARATOR)
@@ -897,11 +898,11 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i
 
                        tmp.x = sbt_field_size[i];
                        if(sbt_field_icon0 != "")
-                               drawpic(pos - tmp, sbt_field_icon0, eY * hud_fontsize.y + eX * hud_fontsize.x * sbt_fixcolumnwidth_iconlen, sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, sbt_field_icon0, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
                        if(sbt_field_icon1 != "")
-                               drawpic(pos - tmp, sbt_field_icon1, eY * hud_fontsize.y + eX * hud_fontsize.x * sbt_fixcolumnwidth_iconlen, sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, sbt_field_icon1, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, fg_alpha, DRAWFLAG_NORMAL);
                        if(sbt_field_icon2 != "")
-                               drawpic(pos - tmp, sbt_field_icon2, eY * hud_fontsize.y + eX * hud_fontsize.x * sbt_fixcolumnwidth_iconlen, sbt_field_icon2_rgb, fg_alpha, DRAWFLAG_NORMAL);
+                               drawpic(pos - tmp, sbt_field_icon2, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon2_rgb, fg_alpha, DRAWFLAG_NORMAL);
                        pos.x -= sbt_field_size[i] + hud_fontsize.x;
                }
        }
@@ -914,7 +915,7 @@ vector Scoreboard_DrawOthers(vector item_pos, vector rgb, int this_team, entity
 {
        int i = 0;
        vector h_pos = item_pos;
-       vector h_size = eX * panel_size.x + eY * hud_fontsize.y * 1.25;
+       vector h_size = vec2(panel_size.x, hud_fontsize.y * 1.25);
 
        bool complete = (this_team == NUM_SPECTATOR);
 
@@ -1006,7 +1007,7 @@ vector Scoreboard_DrawOthers(vector item_pos, vector rgb, int this_team, entity
                pos.x += column_width;
                pos.x += hud_fontsize.x;
        }
-       return eX * item_pos.x + eY * (item_pos.y + i * hud_fontsize.y * 1.25);
+       return vec2(item_pos.x, item_pos.y + i * hud_fontsize.y * 1.25);
 }
 
 vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
@@ -1048,7 +1049,7 @@ vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
        }
 
        pos = panel_pos;
-       vector tmp = eX * panel_size.x + eY * 1.25 * hud_fontsize.y;
+       vector tmp = vec2(panel_size.x, 1.25 * hud_fontsize.y);
 
        // rounded header
        if (sbt_bg_alpha)
@@ -1185,11 +1186,11 @@ vector Scoreboard_AccuracyStats_Draw(vector pos, vector rgb, vector bg_size)
                // column highlighting
                for (int i = 0; i < columnns; ++i)
                        if ((i % 2) == 0)
-                               drawfill(pos + eX * weapon_width * rows * i, eY * height * rows + eX * weapon_width * rows, '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL);
+                               drawfill(pos + eX * weapon_width * rows * i, vec2(weapon_width * rows, height * rows), '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL);
 
                // row highlighting
                for (int i = 0; i < rows; ++i)
-                       drawfill(pos + eY * weapon_height + eY * height * i, eX * tmp.x + eY * hud_fontsize.y, rgb, sbt_highlight_alpha, DRAWFLAG_NORMAL);
+                       drawfill(pos + eY * (weapon_height + height * i), vec2(tmp.x, hud_fontsize.y), rgb, sbt_highlight_alpha, DRAWFLAG_NORMAL);
        }
 
        average_accuracy = 0;
@@ -1220,7 +1221,7 @@ vector Scoreboard_AccuracyStats_Draw(vector pos, vector rgb, vector bg_size)
                        weapon_alpha = 0.2 * sbt_fg_alpha;
 
                // weapon icon
-               drawpic_aspect_skin(tmpos, it.model2, eX * weapon_width + eY * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(tmpos, it.model2, vec2(weapon_width, weapon_height), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
                // the accuracy
                if (weapon_stats >= 0) {
                        weapons_with_stats += 1;
@@ -1235,7 +1236,7 @@ vector Scoreboard_AccuracyStats_Draw(vector pos, vector rgb, vector bg_size)
                        if(!autocvar_hud_panel_scoreboard_accuracy_nocolors)
                                rgb = Accuracy_GetColor(weapon_stats);
 
-                       drawstring(tmpos + eX * padding + eY * weapon_height, s, hud_fontsize, rgb, sbt_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring(tmpos + vec2(padding, weapon_height), s, hud_fontsize, rgb, sbt_fg_alpha, DRAWFLAG_NORMAL);
                }
                tmpos.x += weapon_width * rows;
                pos.x += weapon_width * rows;
@@ -1373,7 +1374,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz
 
        float ranksize = 3 * hud_fontsize.x;
        float timesize = 5 * hud_fontsize.x;
-       vector columnsize = eX * (ranksize + timesize + namesize + hud_fontsize.x) + eY * 1.25 * hud_fontsize.y;
+       vector columnsize = vec2(ranksize + timesize + namesize + hud_fontsize.x, 1.25 * hud_fontsize.y);
        int columns = max(1, floor((panel_size.x - 2 * panel_bg_padding) / columnsize.x));
        columns = min(columns, RANKINGS_RECEIVED_CNT);
 
@@ -1402,7 +1403,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz
        if (sbt_bg_alpha)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, panel_size, rgb, sbt_bg_alpha, DRAWFLAG_NORMAL);
 
-       vector text_ofs = eX * 0.5 * hud_fontsize.x + eY * (1.25 - 1) / 2 * hud_fontsize.y; // center text vertically
+       vector text_ofs = vec2(0.5 * hud_fontsize.x, (1.25 - 1) / 2 * hud_fontsize.y); // center text vertically
        string str = "";
        int column = 0, j = 0;
        for(i = 0; i < RANKINGS_RECEIVED_CNT; ++i)
@@ -1509,6 +1510,7 @@ void Scoreboard_Draw()
        vector pos = panel_pos;
        entity pl, tm;
        string str;
+       vector str_pos;
 
        // Heading
        vector sb_heading_fontsize;
@@ -1543,12 +1545,14 @@ void Scoreboard_Draw()
                        draw_beginBoldFont();
                        vector rgb = Team_ColorRGB(tm.team);
                        str = ftos(tm.(teamscores(ts_primary)));
-                       drawstring(pos + team_score_baseoffset - eX * stringwidth(str, false, hud_fontsize * 1.5), str, hud_fontsize * 1.5, rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       str_pos = pos + team_score_baseoffset - eX * stringwidth(str, false, hud_fontsize * 1.5);
+                       drawstring(str_pos, str, hud_fontsize * 1.5, rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        if(ts_primary != ts_secondary)
                        {
                                str = ftos(tm.(teamscores(ts_secondary)));
-                               drawstring(pos + team_score_baseoffset - eX * stringwidth(str, false, hud_fontsize) + eY * hud_fontsize.y * 1.5, str, hud_fontsize, rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
+                               str_pos = pos + team_score_baseoffset - vec2(stringwidth(str, false, hud_fontsize), hud_fontsize.y * 1.5);
+                               drawstring(str_pos, str, hud_fontsize, rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        draw_endBoldFont();
                        if(autocvar_hud_panel_scoreboard_bg_teams_color_team > 0)
index d974bee4bd3dca9fbf8b8307a0354d86b3fd211d..22f1678b6f034d1174028e97b5325c35c66a8809 100644 (file)
@@ -74,8 +74,8 @@ void HUD_Vote()
 
        if(uid2name_dialog)
        {
-               panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
-               panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
+               panel_pos = vec2(0.3 * vid_conwidth, 0.1 * vid_conheight);
+               panel_size = vec2(0.4 * vid_conwidth, 0.3 * vid_conheight);
        }
 
        vector pos, mySize;
@@ -115,20 +115,20 @@ void HUD_Vote()
        s = _("A vote has been called for:");
        if(uid2name_dialog)
                s = _("Allow servers to store and display your name?");
-       drawstring_aspect(pos, s, eX * mySize.x + eY * (2/8) * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawstring_aspect(pos, s, vec2(mySize.x, (2/8) * mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        s = textShortenToWidth(ColorTranslateRGB(vote_called_vote), mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors);
        if(autocvar__hud_configure)
                s = _("^1Configure the HUD");
-       drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, vec2(mySize.x, (1.75/8) * mySize.y), panel_fg_alpha, DRAWFLAG_NORMAL);
 
        // print the yes/no counts
        s = sprintf("^2%s ^7(%d)", getcommandkey_forcename(_("Yes"), "vyes"), vote_yescount);
-       drawcolorcodedstring_aspect(pos + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawcolorcodedstring_aspect(pos + eY * (4/8) * mySize.y, s, vec2(0.5 * mySize.x, (1.5/8) * mySize.y), panel_fg_alpha, DRAWFLAG_NORMAL);
        s = sprintf("^1%s ^7(%d)", getcommandkey_forcename(_("No"), "vno"), vote_nocount);
-       drawcolorcodedstring_aspect(pos + eX * 0.5 * mySize.x + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawcolorcodedstring_aspect(pos + vec2(0.5 * mySize.x, (4/8) * mySize.y), s, vec2(0.5 * mySize.x, (1.5/8) * mySize.y), panel_fg_alpha, DRAWFLAG_NORMAL);
 
        pos.y += (5/8) * mySize.y;
-       vector tmp_size = eX * mySize.x + eY * (3/8) * mySize.y;
+       vector tmp_size = vec2(mySize.x, (3/8) * mySize.y);
        // draw the progress bar backgrounds
        drawpic_skin(pos, "voteprogress_back", tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
index 69fd82c9e0d9d79a71890c6e6c3d88f82c334ecb..b4997467ee6a5547980a5c918dd9eaafec585a17 100644 (file)
@@ -407,7 +407,7 @@ void HUD_Weapons()
                }
 
                // figure out the drawing position of weapon
-               weapon_pos = (panel_pos + eX * column * weapon_size.x + eY * row * weapon_size.y);
+               weapon_pos = panel_pos + vec2(column * weapon_size.x, row * weapon_size.y);
 
                // update position of the currently selected weapon
                if(it == panel_switchweapon)
index a098bd7f9e3d02e3d4a5743248e6f3b2cadec466..c53943221107e129673cb40c09d8153c04211d52 100644 (file)
@@ -31,7 +31,7 @@
 
 void draw_cursor(vector pos, vector ofs, string img, vector col, float a)
 {
-       ofs = eX * (ofs.x * SIZE_CURSOR.x) + eY * (ofs.y * SIZE_CURSOR.y);
+       ofs = vec2(ofs.x * SIZE_CURSOR.x, ofs.y * SIZE_CURSOR.y);
        drawpic(pos - ofs, strcat(draw_currentSkin, img), SIZE_CURSOR, col, a, DRAWFLAG_NORMAL);
 }
 
index 7b07b680057196bb325bda90f4d4dd03fd8866a3..29728dfde6d07cd781c19ae75d199b038c1c1a85 100644 (file)
@@ -398,7 +398,7 @@ void MapVote_Draw()
 
        // higher than the image itself ratio for mapvote items to reserve space for long map names
        int item_aspect = (gametypevote) ? 3/1 : 5/3;
-       vector table_size = HUD_GetTableSize_BestItemAR(mv_num_maps, eX * (xmax - xmin) + eY * (ymax - ymin), item_aspect);
+       vector table_size = HUD_GetTableSize_BestItemAR(mv_num_maps, vec2(xmax - xmin, ymax - ymin), item_aspect);
        mv_columns = table_size.x;
        rows = table_size.y;
 
index cbb0e071dfb87f8eca4e210be493db8e69d95bc1..f23a3976b55c6fcaba36a0ec2d5301f80ab0ba8f 100644 (file)
@@ -45,8 +45,8 @@ float cvar_or(string cv, float v);
 vector project_3d_to_2d(vector vec);
 
 vector drawfontscale;
-#define draw_beginBoldFont()    MACRO_BEGIN { drawfont = FONT_USER + 2; } MACRO_END
-#define draw_endBoldFont()      MACRO_BEGIN { drawfont = FONT_USER + 1; } MACRO_END
+#define draw_beginBoldFont() drawfont = FONT_USER + 2
+#define draw_endBoldFont() drawfont = FONT_USER + 1
 
 float expandingbox_sizefactor_from_fadelerp(float fadelerp);
 
index 6920a98d197b9ce595298a0d454dd20accdb7839..ceaf0a6748741c424e0985bcd83f9dac9219591d 100644 (file)
@@ -74,7 +74,7 @@ void Draw_ShowNames(entity this)
                        vector eo = project_3d_to_2d(it.origin);
                        if (eo.z < 0 || eo.x < 0 || eo.y < 0 || eo.x > vid_conwidth || eo.y > vid_conheight) continue;
                        eo.z = 0;
-                       if (vdist(((eX * o.x + eY * o.y) - eo), <, autocvar_hud_shownames_antioverlap_distance)
+                       if (vdist((vec2(o) - eo), <, autocvar_hud_shownames_antioverlap_distance)
                            && vlen2(it.origin - view_origin) < vlen2(this.origin - view_origin))
                        {
                                overlap = 1;
@@ -135,8 +135,8 @@ void Draw_ShowNames(entity this)
        if (o.z >= 0)
        {
                o.z = 0;
-               vector mySize = (eX * autocvar_hud_shownames_aspect + eY) * autocvar_hud_shownames_fontsize;
-               vector myPos = o - '0.5 0 0' * mySize.x - '0 1 0' * mySize.y;
+               vector mySize = (vec2(autocvar_hud_shownames_aspect, 1)) * autocvar_hud_shownames_fontsize;
+               vector myPos = o - vec2(0.5 * mySize.x, mySize.y);
                // size scaling
                mySize.x *= resize;
                mySize.y *= resize;
@@ -147,17 +147,17 @@ void Draw_ShowNames(entity this)
                float namewidth = mySize.x;
                if (autocvar_hud_shownames_status && this.sameteam)
                {
-                       vector v = namepos + '0 1 0' * autocvar_hud_shownames_fontsize * resize;
-                       vector s = eX * 0.5 * mySize.x + eY * resize * autocvar_hud_shownames_statusbar_height;
+                       vector pos = namepos + eY * autocvar_hud_shownames_fontsize * resize;
+                       vector sz = vec2(0.5 * mySize.x, resize * autocvar_hud_shownames_statusbar_height);
                        if (this.healthvalue > 0)
                        {
-                               HUD_Panel_DrawProgressBar(v, s, "nametag_statusbar",
+                               HUD_Panel_DrawProgressBar(pos, sz, "nametag_statusbar",
                                        this.healthvalue / autocvar_hud_panel_healtharmor_maxhealth, false, 1, '1 0 0', a,
                                        DRAWFLAG_NORMAL);
                        }
                        if (this.armorvalue > 0)
                        {
-                               HUD_Panel_DrawProgressBar(v + eX * 0.5 * mySize.x, s, "nametag_statusbar",
+                               HUD_Panel_DrawProgressBar(pos + eX * 0.5 * mySize.x, sz, "nametag_statusbar",
                                        this.armorvalue / autocvar_hud_panel_healtharmor_maxarmor, false, 0, '0 1 0', a,
                                        DRAWFLAG_NORMAL);
                        }
index 6648b7ecbf557922991c0e7373caebefc3eef5b9..efdf2e108060e6b54753226af9fa0e09cd31bb73 100644 (file)
@@ -63,10 +63,9 @@ float autocvar_cl_leanmodel_highpass = 0.2;
 float autocvar_cl_leanmodel_lowpass = 0.05;
 
 #define avg_factor(avg_time) (1 - exp(-frametime / max(0.001, avg_time)))
-#define lowpass(value, frac, ref_store, ret) MACRO_BEGIN \
-{ \
-       ret = ref_store = ref_store * (1 - frac) + (value) * frac; \
-} MACRO_END
+
+#define lowpass(value, frac, ref_store, ret) \
+       ret = ref_store = ref_store * (1 - frac) + (value) * frac;
 
 #define lowpass_limited(value, frac, limit, ref_store, ret) MACRO_BEGIN \
 { \
@@ -772,6 +771,8 @@ bool WantEventchase(entity this)
                        return true;
                if(MUTATOR_CALLHOOK(WantEventchase, this))
                        return true;
+               if(autocvar_cl_eventchase_frozen && STAT(FROZEN))
+                       return true;
                if(autocvar_cl_eventchase_death && (STAT(HEALTH) <= 0))
                {
                        if(autocvar_cl_eventchase_death == 2)
@@ -1206,7 +1207,7 @@ void HUD_Crosshair(entity this)
                                        }
 
                                        ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
-                                       ring_inner_rgb = eX * autocvar_crosshair_ring_vortex_inner_color_red + eY * autocvar_crosshair_ring_vortex_inner_color_green + eZ * autocvar_crosshair_ring_vortex_inner_color_blue;
+                                       ring_inner_rgb = vec3(autocvar_crosshair_ring_vortex_inner_color_red, autocvar_crosshair_ring_vortex_inner_color_green, autocvar_crosshair_ring_vortex_inner_color_blue);
                                        ring_inner_image = "gfx/crosshair_ring_inner.tga";
 
                                        // draw the outer ring to show the current charge of the weapon
@@ -1386,29 +1387,33 @@ void HUD_Draw(entity this)
        if(!intermission)
        if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
        {
-               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
+               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
        }
        else if(STAT(FROZEN))
        {
-               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, ((STAT(REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * STAT(REVIVE_PROGRESS)) + ('0 1 1' * STAT(REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               vector col = '0.25 0.90 1';
+               if(STAT(REVIVE_PROGRESS))
+                       col += vec3(STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS));
+               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
        }
 
        HUD_Scale_Enable();
        if(!intermission)
        if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
        {
-               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(NADE_TIMER), '0.25 0.90 1' + ('1 0 0' * STAT(NADE_TIMER)) - ('0 1 1' * STAT(NADE_TIMER)), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
-               drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
+               vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
+               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
        }
        else if(STAT(CAPTURE_PROGRESS))
        {
-               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
-               drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
+               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
        }
        else if(STAT(REVIVE_PROGRESS))
        {
-               DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
-               drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
+               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
        }
        HUD_Scale_Disable();
 
@@ -2111,7 +2116,7 @@ void CSQC_UpdateView(entity this, float w, float h)
                contentavgalpha = contentavgalpha * (1 - contentalpha_temp) + incontent * contentalpha_temp;
 
                if(contentavgalpha)
-                       drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);
+                       drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);
 
                if(autocvar_hud_postprocessing)
                {
@@ -2187,13 +2192,13 @@ void CSQC_UpdateView(entity this, float w, float h)
                        if(autocvar_cl_gentle_damage == 2)
                        {
                                if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
-                                       myhealth_gentlergb = eX * random() + eY * random() + eZ * random();
+                                       myhealth_gentlergb = randomvec();
                        }
                        else
                                myhealth_gentlergb = stov(autocvar_hud_damage_gentle_color);
 
                        if(myhealth_flash_temp > 0)
-                               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
+                               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);
index e7c0f946bd5dc75692c4a849a5b1ac7a956934ba..98710d25b8d6f0e5ad9ff1141e9692f9ecd19a40 100644 (file)
@@ -256,6 +256,11 @@ vector autocvar_sv_player_crouch_maxs = '16 16 25';
 vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
 vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
 //vector autocvar_sv_player_headsize = '24 24 12';
+
+// temporary array used to dump weapon and turret settings
+const int MAX_CONFIG_SETTINGS = 256;
+string config_queue[MAX_CONFIG_SETTINGS];
+
 #endif
 
 
index 9c4909671e1408e5695fd572f7fbb6211de8c41e..9e96756ba52de4feb7709164226599e2a8d1632f 100644 (file)
        CSQCMODEL_PROPERTY_SCALED(BIT(12), float, ReadByte, WriteByte, scale, 16, 0, 255) \
        CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \
        CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \
-       CSQCMODEL_PROPERTY(BIT(15), int, ReadByte, WriteByte, multijump_count) \
+       CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, multijump_count) \
        CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype)
 // TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody
 
 // add hook function calls here
 #define CSQCPLAYER_HOOK_POSTCAMERASETUP() \
-       CSQCPlayer_SetViewLocation()
+       viewloc_SetViewLocation()
 
 // force updates of player entities this frequently (per second) even if unchanged
 #ifndef CSQCPLAYER_FORCE_UPDATES
index 060367a3c55594b33b46e094196330045bb3f911..7d2f1d592739b4777ba1c1ee2940f6ce72a8bed3 100644 (file)
@@ -153,6 +153,8 @@ EFFECT(0, ICEORGLASS,               "iceorglass")
 EFFECT(0, ICEFIELD,                 "icefield")
 EFFECT(0, FIREFIELD,                "firefield")
 EFFECT(0, HEALING,                  "healing_fx")
+EFFECT(0, ARMOR_REPAIR,             "armorrepair_fx")
+EFFECT(0, AMMO_REGEN,               "ammoregen_fx")
 EFFECT(1, LASER_BEAM_FAST,          "nex242_misc_laser_beam_fast")
 EFFECT(0, RESPAWN_GHOST,            "respawn_ghost")
 
index afbd31842978a332d81c4a3d914a2202799fddae..ae4d7a4913b3fb8afe2857b2470f179dc9bc0891 100644 (file)
@@ -1,6 +1,6 @@
 #include "onslaught.qh"
 
-#ifndef MENUQC
+#ifdef GAMEQC
 REGISTER_NET_LINKED(ENT_ONSCAMERA)
 #endif
 
index 5525c4d6a8f5d72e24acda5f2f96aae1b45b899a..223a81f7c4d4dfb6039a3ea6b2189b0df864dfd0 100644 (file)
@@ -143,8 +143,8 @@ void onslaught_updatelinks()
        {
                l.islinked = false;
                l.isshielded = true;
-               int i;
-               for(i = 0; i < 17; ++i) { l.isgenneighbor[i] = false; l.iscpneighbor[i] = false; }
+               l.aregensneighbor = 0;
+               l.arecpsneighbor = 0;
                LOG_DEBUG(etos(l), " (point) belongs to team ", ftos(l.team));
                l.sprite.SendFlags |= 16;
        }
@@ -188,9 +188,9 @@ void onslaught_updatelinks()
                                l.enemy.isshielded = false;
                        }
                        if(l.goalentity.classname == "onslaught_generator")
-                               l.enemy.isgenneighbor[l.goalentity.team] = true;
+                               l.enemy.aregensneighbor |= BIT(l.goalentity.team);
                        else
-                               l.enemy.iscpneighbor[l.goalentity.team] = true;
+                               l.enemy.arecpsneighbor |= BIT(l.goalentity.team);
                }
                if (l.enemy.islinked)
                {
@@ -200,9 +200,9 @@ void onslaught_updatelinks()
                                l.goalentity.isshielded = false;
                        }
                        if(l.enemy.classname == "onslaught_generator")
-                               l.goalentity.isgenneighbor[l.enemy.team] = true;
+                               l.goalentity.aregensneighbor |= BIT(l.enemy.team);
                        else
-                               l.goalentity.iscpneighbor[l.enemy.team] = true;
+                               l.goalentity.arecpsneighbor |= BIT(l.enemy.team);
                }
        }
        // now update the generators
@@ -328,8 +328,8 @@ void ons_DelayedLinkSetup(entity this)
 
 int ons_ControlPoint_CanBeLinked(entity cp, int teamnumber)
 {
-       if(cp.isgenneighbor[teamnumber]) { return 2; }
-       if(cp.iscpneighbor[teamnumber]) { return 1; }
+       if(cp.aregensneighbor & BIT(teamnumber)) return 2;
+       if(cp.arecpsneighbor & BIT(teamnumber)) return 1;
 
        return 0;
 }
@@ -841,7 +841,7 @@ void ons_camSetup(entity this)
        float best_trace_fraction = 0;
        while(ang.y < 360)
        {
-               dir = eX * cos(ang.y * DEG2RAD) + eY * sin(ang.y * DEG2RAD);
+               dir = vec2(cos(ang.y * DEG2RAD), sin(ang.y * DEG2RAD));
                dir *= 500;
                traceline(this.origin, this.origin - dir, MOVE_WORLDONLY, this);
                if(trace_fraction > best_trace_fraction)
@@ -1308,7 +1308,7 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale
                        continue;
 
                // Ignore owned controlpoints
-               if(!(cp2.isgenneighbor[this.team] || cp2.iscpneighbor[this.team]))
+               if(!((cp2.aregensneighbor & BIT(this.team)) || (cp2.arecpsneighbor & BIT(this.team))))
                        continue;
 
                // Count team mates interested in this control point
index 5f05f7658bbb14b101b596ab10e6a74551da96dd..0757d7bc6014645c37260a1620563ea066aca9bf 100644 (file)
@@ -70,8 +70,8 @@ bool ons_stalemate;
 
 .float teleport_antispam;
 
-.bool isgenneighbor[17];
-.bool iscpneighbor[17];
+.int aregensneighbor;
+.int arecpsneighbor;
 float ons_notification_time[17];
 
 .float ons_overtime_damagedelay;
index 42f8c514e9bf0166a53bbfdc7c0cad5ccec2f5d9..2e5b30c61cbfae9f5ef5935e4aa4a100e78dd515 100644 (file)
@@ -8,7 +8,7 @@ void minigame_hud_simpleboard(vector pos, vector mySize, string board_texture)
                                        panel.current_panel_bg,
                                        mySize + '1 1 0' * 2 * panel_bg_border,
                                        panel_bg_color, panel_bg_alpha,
-                                        '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));
+                                       '1 1 0' * BORDER_MULTIPLIER * panel_bg_border);
        drawpic(pos, board_texture, mySize, '1 1 1', panel_bg_alpha, DRAWFLAG_NORMAL);
 }
 
index 1a6d4ff52272e39e4204c9e892545e6688536f63..5b0ee3c5b5d8606ecec15f5b57e57734778bfd59 100644 (file)
@@ -427,7 +427,7 @@ void HUD_MinigameMenu_Open()
 // Handles mouse input on to minigame menu panel
 void HUD_MinigameMenu_MouseInput()
 {
-       panel = HUD_PANEL(MINIGAME_MENU);
+       panel = HUD_PANEL(MINIGAMEMENU);
 
        HUD_Panel_LoadCvars();
 
@@ -575,7 +575,7 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary
        {
                mousepos_x = nPrimary;
                mousepos_y = nSecondary;
-               if ( active_minigame && HUD_mouse_over(HUD_PANEL(MINIGAME_BOARD)) )
+               if ( active_minigame && HUD_mouse_over(HUD_PANEL(MINIGAMEBOARD)) )
                        active_minigame.minigame_event(active_minigame,"mouse_moved",mousepos);
                return true;
 
@@ -613,7 +613,7 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary
                        string action = bInputType == 0 ? "pressed" : "released";
                        if ( nPrimary >= K_MOUSE1 && nPrimary <= K_MOUSE16 )
                        {
-                               if ( HUD_mouse_over(HUD_PANEL(MINIGAME_BOARD)) )
+                               if ( HUD_mouse_over(HUD_PANEL(MINIGAMEBOARD)) )
                                        device = "mouse";
                        }
                        else
@@ -629,7 +629,7 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary
                if ( bInputType == 0 )
                {
                        if ( nPrimary == K_MOUSE1 && HUD_MinigameMenu_activeitem &&
-                               HUD_mouse_over(HUD_PANEL(MINIGAME_MENU)) )
+                               HUD_mouse_over(HUD_PANEL(MINIGAMEMENU)) )
                        {
                                HUD_MinigameMenu_Click(HUD_MinigameMenu_activeitem);
                                return true;
@@ -685,7 +685,7 @@ void HUD_Minigame_Mouse()
        if (!autocvar_hud_cursormode)
                update_mousepos();
 
-       if ( HUD_MinigameMenu_IsOpened() && HUD_mouse_over(HUD_PANEL(MINIGAME_MENU)) )
+       if ( HUD_MinigameMenu_IsOpened() && HUD_mouse_over(HUD_PANEL(MINIGAMEMENU)) )
                HUD_MinigameMenu_MouseInput();
 
        draw_cursor_normal(mousepos, '1 1 1', panel_fg_alpha);
index dd57fb5c66886c846458d3991ce1eef96f1707c2..55d41617da9c387a0146cb01c53a190751295089 100644 (file)
@@ -95,8 +95,8 @@ void pong_add_score(entity minigame, int team_thrower, int team_receiver, int de
 // get point in the box nearest to the given one (2D)
 vector box_nearest(vector box_min, vector box_max, vector p)
 {
-       return eX * ( p_x > box_max_x  ? box_max_x  : ( p_x < box_min_x ? box_min_x : p_x ) )
-               + eY * ( p_y > box_max_y  ? box_max_y  : ( p_y < box_min_y ? box_min_y : p_y ) );
+       return vec2( p.x > box_max.x  ? box_max.x  : ( p.x < box_min.x ? box_min.x : p.x ),
+               p.y > box_max.y  ? box_max.y  : ( p.y < box_min.y ? box_min.y : p.y ) );
 }
 
 void pong_paddle_bounce(entity ball, int pteam)
@@ -293,8 +293,8 @@ void pong_paddle_think(entity this)
 vector pong_team_to_box_halfsize(int nteam, float length, float width)
 {
        if ( nteam > 2 )
-               return eY*width/2 + eX*length/2;
-       return eX*width/2 + eY*length/2;
+               return vec2(length/2, width/2);
+       return vec2(width/2, length/2);
 }
 
 vector pong_team_to_paddlepos(int nteam)
index 227f3d9c63e42813798ecaf699a43ccebd55f5b1..6d14b258281f973a916b346ca9540776d75f7549 100644 (file)
@@ -26,8 +26,8 @@ int minigame_tile_number(string id)
 // Get relative position of the center of a given tile
 vector minigame_tile_pos(string id, int rows, int columns)
 {
-       return eX*(minigame_tile_letter(id)+0.5)/columns +
-              eY - eY*(minigame_tile_number(id)+0.5)/rows;
+       return vec2((minigame_tile_letter(id) + 0.5) / columns,
+               (1 - (minigame_tile_number(id) + 0.5) / rows));
 }
 
 // Get a tile name from indices
index 841e7ef4026f49e6443d6d0d1973a5a3f4a4f663..aba9c9aa9b66713607aa3f2c4d02412744b82e51 100644 (file)
@@ -48,8 +48,6 @@ CLASS(Monster, Object)
     METHOD(Monster, mr_think, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
     /** (SERVER) called when monster dies */
     METHOD(Monster, mr_death, bool(Monster this, entity actor)) { TC(Monster, this); return false; }
-    /** (BOTH) precaches models/sounds used by this monster */
-    METHOD(Monster, mr_precache, bool(Monster this)) { TC(Monster, this); return false; }
     /** (SERVER) called when monster is damaged */
     METHOD(Monster, mr_pain, float(Monster this, entity actor, float damage_take, entity attacker, float deathtype)) { TC(Monster, this); return damage_take; }
     /** (BOTH?) sets animations for monster */
index 251b1edc7ac786c27dde2df73c0e67b915c1ea12..f6f8b803ba69276f5d4bd0964285137b218b6348 100644 (file)
@@ -219,14 +219,14 @@ void M_Mage_Defend_Heal(entity this)
        FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_mage_heal_range, M_Mage_Defend_Heal_Check(this, it),
        {
                washealed = true;
-               string fx = "";
+               entity fx = EFFECT_Null;
                if(IS_PLAYER(it))
                {
                        switch(this.skin)
                        {
                                case 0:
                                        if(it.health < autocvar_g_balance_health_regenstable) it.health = bound(0, it.health + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_health_regenstable);
-                                       fx = EFFECT_HEALING.eent_eff_name;
+                                       fx = EFFECT_HEALING;
                                        break;
                                case 1:
                                        if(it.ammo_cells) it.ammo_cells = bound(it.ammo_cells, it.ammo_cells + 1, g_pickup_cells_max);
@@ -234,22 +234,22 @@ void M_Mage_Defend_Heal(entity this)
                                        if(it.ammo_rockets) it.ammo_rockets = bound(it.ammo_rockets, it.ammo_rockets + 1, g_pickup_rockets_max);
                                        if(it.ammo_shells) it.ammo_shells = bound(it.ammo_shells, it.ammo_shells + 2, g_pickup_shells_max);
                                        if(it.ammo_nails) it.ammo_nails = bound(it.ammo_nails, it.ammo_nails + 5, g_pickup_nails_max);
-                                       fx = "ammoregen_fx";
+                                       fx = EFFECT_AMMO_REGEN;
                                        break;
                                case 2:
                                        if(it.armorvalue < autocvar_g_balance_armor_regenstable)
                                        {
                                                it.armorvalue = bound(0, it.armorvalue + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_armor_regenstable);
-                                               fx = "armorrepair_fx";
+                                               fx = EFFECT_ARMOR_REPAIR;
                                        }
                                        break;
                                case 3:
                                        it.health = bound(0, it.health - ((it == this)  ? (autocvar_g_monster_mage_heal_self) : (autocvar_g_monster_mage_heal_allies)), autocvar_g_balance_health_regenstable);
-                                       fx = EFFECT_RAGE.eent_eff_name;
+                                       fx = EFFECT_RAGE;
                                        break;
                        }
 
-                       Send_Effect_(fx, it.origin, '0 0 0', 1);
+                       Send_Effect(fx, it.origin, '0 0 0', 1);
                }
                else
                {
@@ -464,10 +464,4 @@ METHOD(Mage, mr_setup, bool(Mage this, entity actor))
 
     return true;
 }
-
-METHOD(Mage, mr_precache, bool(Mage this))
-{
-    TC(Mage, this);
-    return true;
-}
 #endif
index 194b6b2b2d2da88ccff35d24151e8537ec6a8d8b..98fb7667341dc6e13a5cfc168e2d43e76258de6e 100644 (file)
@@ -17,11 +17,7 @@ CLASS(Mage, Monster)
     ATTRIB(Mage, monster_name, string, _("Mage"));
 ENDCLASS(Mage)
 
-REGISTER_MONSTER(MAGE, NEW(Mage)) {
-#ifdef GAMEQC
-    this.mr_precache(this);
-#endif
-}
+REGISTER_MONSTER(MAGE, NEW(Mage));
 
 #include <common/weapons/_all.qh>
 #include <common/items/_mod.qh>
index a5863623ecac3217e4ff92d038fa5b3fdaffd669..b03766bcf234b55d4753b5c65a1c2dddb1b91922 100644 (file)
@@ -116,11 +116,9 @@ void M_Shambler_Attack_Lightning_Think(entity this)
 
 void M_Shambler_Attack_Lightning(entity this)
 {
-       entity gren;
-
        monster_makevectors(this, this.enemy);
 
-       gren = new(grenade);
+       entity gren = new(grenade);
        gren.owner = gren.realowner = this;
        gren.bot_dodge = true;
        gren.bot_dodgerating = (autocvar_g_monster_shambler_attack_lightning_damage);
@@ -265,10 +263,4 @@ METHOD(Shambler, mr_setup, bool(Shambler this, entity actor))
 
     return true;
 }
-
-METHOD(Shambler, mr_precache, bool(Shambler this))
-{
-    TC(Shambler, this);
-    return true;
-}
 #endif
index fde28e9f46e7a87fe7d8756cc1943a9f252ef866..554fe5fe62a1d9dcbd7d41cfb8edc29bff185fdd 100644 (file)
@@ -17,8 +17,4 @@ CLASS(Shambler, Monster)
     ATTRIB(Shambler, monster_name, string, _("Shambler"));
 ENDCLASS(Shambler)
 
-REGISTER_MONSTER(SHAMBLER, NEW(Shambler)) {
-#ifdef GAMEQC
-    this.mr_precache(this);
-#endif
-}
+REGISTER_MONSTER(SHAMBLER, NEW(Shambler));
index 7ec7f95acb3ba9e17bb128dab4d41921bff18b69..a6551392075891911a85a9893a8e8c2cdf0dc62c 100644 (file)
@@ -18,16 +18,12 @@ void M_Spider_Attack_Web(entity this);
 
 REGISTER_MUTATOR(spiderweb, true);
 
-MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics_UpdateStats)
 {
-    entity player = M_ARGV(0, entity);
-
-       if (time >= player.spider_slowness)
-               return false;
-       PHYS_MAXSPEED(player) *= 0.5; // half speed while slow from spider
-       PHYS_MAXAIRSPEED(player) *= 0.5;
-       PHYS_AIRSPEEDLIMIT_NONQW(player) *= 0.5;
-       PHYS_AIRSTRAFEACCELERATE(player) *= 0.5;
+       entity player = M_ARGV(0, entity);
+
+       if(time < player.spider_slowness)
+               STAT(MOVEVARS_HIGHSPEED, player) *= 0.5;
 }
 
 MUTATOR_HOOKFUNCTION(spiderweb, MonsterMove)
@@ -242,10 +238,4 @@ METHOD(Spider, mr_setup, bool(Spider this, entity actor))
 
     return true;
 }
-
-METHOD(Spider, mr_precache, bool(Spider this))
-{
-    TC(Spider, this);
-    return true;
-}
 #endif
index cd7fa9e6becb8c72c195bea86cfe256cf8fcf69d..3a688de32efce0e1282543bd3e85a55d4563c26b 100644 (file)
@@ -17,11 +17,7 @@ CLASS(Spider, Monster)
     ATTRIB(Spider, monster_name, string, _("Spider"));
 ENDCLASS(Spider)
 
-REGISTER_MONSTER(SPIDER, NEW(Spider)) {
-#ifdef GAMEQC
-    this.mr_precache(this);
-#endif
-}
+REGISTER_MONSTER(SPIDER, NEW(Spider));
 
 #include <common/weapons/_all.qh>
 
index b4a76c99f1fb73e6d4011f65bf0b44a9001dff43..38df673dd1c161d267a4ceeee9b5c63edbf43ae5 100644 (file)
@@ -162,10 +162,4 @@ METHOD(Wyvern, mr_setup, bool(Wyvern this, entity actor))
 
     return true;
 }
-
-METHOD(Wyvern, mr_precache, bool(Wyvern this))
-{
-    TC(Wyvern, this);
-    return true;
-}
 #endif
index 012c9c2a5e8817913ae557781fae0ac9787f8ba9..2326b0dd1157c27a8cb39e0ee5610dad9e0eb25d 100644 (file)
@@ -17,11 +17,7 @@ CLASS(Wyvern, Monster)
     ATTRIB(Wyvern, monster_name, string, _("Wyvern"));
 ENDCLASS(Wyvern)
 
-REGISTER_MONSTER(WYVERN, NEW(Wyvern)) {
-#ifdef GAMEQC
-    this.mr_precache(this);
-#endif
-}
+REGISTER_MONSTER(WYVERN, NEW(Wyvern));
 
 #include <common/weapons/_all.qh>
 
index 6893d31b67c46baf8990eed25a60460743bad978..d5011c7f35ca726b0e074244d871b985a881caa0 100644 (file)
@@ -203,10 +203,4 @@ METHOD(Zombie, mr_setup, bool(Zombie this, entity actor))
 
     return true;
 }
-
-METHOD(Zombie, mr_precache, bool(Zombie this))
-{
-    TC(Zombie, this);
-    return true;
-}
 #endif
index dfa37556d46503667464f3a002de2b10d40399d3..1572a95ea0d34bd346cd0988604dc0fb029b682e 100644 (file)
@@ -17,8 +17,4 @@ CLASS(Zombie, Monster)
     ATTRIB(Zombie, monster_name, string, _("Zombie"));
 ENDCLASS(Zombie)
 
-REGISTER_MONSTER(ZOMBIE, NEW(Zombie)) {
-#ifdef GAMEQC
-    this.mr_precache(this);
-#endif
-}
+REGISTER_MONSTER(ZOMBIE, NEW(Zombie));
index 469dd7b9cd7d3ec41d609dc48def8cacb2825928..5307ccd2de7324b0cb9430d3b6481295f04b0dbe 100644 (file)
@@ -125,7 +125,7 @@ entity Monster_FindTarget(entity this)
        vector my_center = CENTER_OR_VIEWOFS(this);
 
        // find the closest acceptable target to pass to
-       FOREACH_ENTITY_RADIUS(this.origin, this.target_range, it.monster_attack,
+       IL_EACH(g_monster_targets, it.monster_attack && vdist(it.origin - this.origin, <, this.target_range),
        {
                if(Monster_ValidTarget(this, it))
                {
@@ -173,6 +173,8 @@ void monster_changeteam(entity this, int newteam)
        if(!teamplay) { return; }
 
        this.team = newteam;
+       if(!this.monster_attack)
+               IL_PUSH(g_monster_targets, this);
        this.monster_attack = true; // new team, activate attacking
        monster_setupcolors(this);
 
@@ -245,7 +247,7 @@ void Monster_Sound_Precache(string f)
        {
                if(tokenize_console(s) != 3)
                {
-                       LOG_TRACE("Invalid sound info line: ", s);
+                       //LOG_DEBUG("Invalid sound info line: ", s); // probably a comment, no need to spam warnings
                        continue;
                }
                PrecacheGlobalSound(strcat(argv(1), " ", argv(2)));
@@ -299,7 +301,7 @@ bool Monster_Sounds_Load(entity this, string f, int first)
        float fh = fopen(f, FILE_READ);
        if(fh < 0)
        {
-               LOG_TRACE("Monster sound file not found: ", f);
+               //LOG_DEBUG("Monster sound file not found: ", f); // no biggie, monster has no sounds, let's not spam it
                return false;
        }
        while((s = fgets(fh)))
@@ -565,7 +567,7 @@ vector Monster_Move_Target(entity this, entity targ)
                        || ((trace_fraction < 1) && (trace_ent != this.enemy)))
                {
                        this.enemy = NULL;
-                       this.pass_distance = 0;
+                       //this.pass_distance = 0;
                }
 
                if(this.enemy)
@@ -656,12 +658,13 @@ vector Monster_Move_Target(entity this, entity targ)
 
 void Monster_CalculateVelocity(entity this, vector to, vector from, float turnrate, float movespeed)
 {
-       float current_distance = vlen((('1 0 0' * to.x) + ('0 1 0' * to.y)) - (('1 0 0' * from.x) + ('0 1 0' * from.y))); // for the sake of this check, exclude Z axis
-       float initial_height = 0; //min(50, (targ_distance * tanh(20)));
-       float current_height = (initial_height * min(1, (this.pass_distance) ? (current_distance / this.pass_distance) : current_distance));
+       //float current_distance = vlen((('1 0 0' * to.x) + ('0 1 0' * to.y)) - (('1 0 0' * from.x) + ('0 1 0' * from.y))); // for the sake of this check, exclude Z axis
+       //float initial_height = 0; //min(50, (targ_distance * tanh(20)));
+       //float current_height = (initial_height * min(1, (this.pass_distance) ? (current_distance / this.pass_distance) : current_distance));
        //print("current_height = ", ftos(current_height), ", initial_height = ", ftos(initial_height), ".\n");
 
-       vector targpos;
+       vector targpos = to;
+#if 0
        if(current_height) // make sure we can actually do this arcing path
        {
                targpos = (to + ('0 0 1' * current_height));
@@ -677,6 +680,7 @@ void Monster_CalculateVelocity(entity this, vector to, vector from, float turnra
                }
        }
        else { targpos = to; }
+#endif
 
        //this.angles = normalize(('0 1 0' * to_y) - ('0 1 0' * from_y));
 
@@ -697,52 +701,11 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
        if(this.target2 && this.target2 != "" && this.goalentity.targetname != this.target2)
                this.goalentity = find(NULL, targetname, this.target2);
 
-       if(STAT(FROZEN, this) == 2)
-       {
-               this.revive_progress = bound(0, this.revive_progress + this.ticrate * this.revive_speed, 1);
-               this.health = max(1, this.revive_progress * this.max_health);
-               this.iceblock.alpha = bound(0.2, 1 - this.revive_progress, 1);
-
-               if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
-                       WaypointSprite_UpdateHealth(this.sprite, this.health);
-
-               movelib_brake_simple(this, stpspeed);
-               setanim(this, this.anim_idle, true, false, false);
-
-               this.enemy = NULL;
-               this.nextthink = time + this.ticrate;
-
-               if(this.revive_progress >= 1)
-                       Unfreeze(this);
-
-               return;
-       }
-       else if(STAT(FROZEN, this) == 3)
+       if(STAT(FROZEN, this))
        {
-               this.revive_progress = bound(0, this.revive_progress - this.ticrate * this.revive_speed, 1);
-               this.health = max(0, autocvar_g_nades_ice_health + (this.max_health-autocvar_g_nades_ice_health) * this.revive_progress );
-
-               if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
-                       WaypointSprite_UpdateHealth(this.sprite, this.health);
-
                movelib_brake_simple(this, stpspeed);
                setanim(this, this.anim_idle, true, false, false);
-
-               this.enemy = NULL;
-               this.nextthink = time + this.ticrate;
-
-               if(this.health < 1)
-               {
-                       Unfreeze(this);
-                       this.health = 0;
-                       if(this.event_damage)
-                               this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, this.origin, '0 0 0');
-               }
-
-               else if ( this.revive_progress <= 0 )
-                       Unfreeze(this);
-
-               return;
+               return; // no physics while frozen!
        }
 
        if(this.flags & FL_SWIM)
@@ -806,27 +769,6 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
        if(DIFF_TEAM(this.monster_follow, this))
                this.monster_follow = NULL;
 
-       if(time >= this.last_enemycheck)
-       {
-               if(!this.enemy)
-               {
-                       this.enemy = Monster_FindTarget(this);
-                       if(this.enemy)
-                       {
-                               WarpZone_RefSys_Copy(this.enemy, this);
-                               WarpZone_RefSys_AddInverse(this.enemy, this); // wz1^-1 ... wzn^-1 receiver
-                               this.moveto = WarpZone_RefSys_TransformOrigin(this.enemy, this, (0.5 * (this.enemy.absmin + this.enemy.absmax)));
-                               this.monster_moveto = '0 0 0';
-                               this.monster_face = '0 0 0';
-
-                               this.pass_distance = vlen((('1 0 0' * this.enemy.origin_x) + ('0 1 0' * this.enemy.origin_y)) - (('1 0 0' *  this.origin_x) + ('0 1 0' *  this.origin_y)));
-                               Monster_Sound(this, monstersound_sight, 0, false, CH_VOICE);
-                       }
-               }
-
-               this.last_enemycheck = time + 1; // check for enemies every second
-       }
-
        if(this.state == MONSTER_ATTACK_RANGED && IS_ONGROUND(this))
        {
                this.state = 0;
@@ -891,9 +833,6 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
                turny = bound(turny * -1, shortangle_f(real_angle.y, this.angles.y), turny);
                this.angles_y += turny;
        }
-
-       .entity weaponentity = weaponentities[0]; // TODO?
-       Monster_Attack_Check(this, this.enemy, weaponentity);
 }
 
 void Monster_Remove(entity this)
@@ -1205,6 +1144,64 @@ void Monster_Anim(entity this)
        */
 }
 
+void Monster_Frozen_Think(entity this)
+{
+       if(STAT(FROZEN, this) == 2)
+       {
+               this.revive_progress = bound(0, this.revive_progress + this.ticrate * this.revive_speed, 1);
+               this.health = max(1, this.revive_progress * this.max_health);
+               this.iceblock.alpha = bound(0.2, 1 - this.revive_progress, 1);
+
+               if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
+                       WaypointSprite_UpdateHealth(this.sprite, this.health);
+
+               if(this.revive_progress >= 1)
+                       Unfreeze(this);
+       }
+       else if(STAT(FROZEN, this) == 3)
+       {
+               this.revive_progress = bound(0, this.revive_progress - this.ticrate * this.revive_speed, 1);
+               this.health = max(0, autocvar_g_nades_ice_health + (this.max_health-autocvar_g_nades_ice_health) * this.revive_progress );
+
+               if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
+                       WaypointSprite_UpdateHealth(this.sprite, this.health);
+
+               if(this.health < 1)
+               {
+                       Unfreeze(this);
+                       this.health = 0;
+                       if(this.event_damage)
+                               this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, this.origin, '0 0 0');
+               }
+
+               else if ( this.revive_progress <= 0 )
+                       Unfreeze(this);
+       }
+       // otherwise, no revival!
+
+       this.enemy = NULL; // TODO: save enemy, and attack when revived?
+}
+
+void Monster_Enemy_Check(entity this)
+{
+       if(!this.enemy)
+       {
+               this.enemy = Monster_FindTarget(this);
+               if(this.enemy)
+               {
+                       WarpZone_RefSys_Copy(this.enemy, this);
+                       WarpZone_RefSys_AddInverse(this.enemy, this); // wz1^-1 ... wzn^-1 receiver
+                       // update move target immediately?
+                       this.moveto = WarpZone_RefSys_TransformOrigin(this.enemy, this, (0.5 * (this.enemy.absmin + this.enemy.absmax)));
+                       this.monster_moveto = '0 0 0';
+                       this.monster_face = '0 0 0';
+
+                       //this.pass_distance = vlen((('1 0 0' * this.enemy.origin_x) + ('0 1 0' * this.enemy.origin_y)) - (('1 0 0' *  this.origin_x) + ('0 1 0' *  this.origin_y)));
+                       Monster_Sound(this, monstersound_sight, 0, false, CH_VOICE);
+               }
+       }
+}
+
 void Monster_Think(entity this)
 {
        setthink(this, Monster_Think);
@@ -1216,10 +1213,23 @@ void Monster_Think(entity this)
                return;
        }
 
+       if(STAT(FROZEN, this))
+               Monster_Frozen_Think(this);
+       else if(time >= this.last_enemycheck)
+       {
+               Monster_Enemy_Check(this);
+               this.last_enemycheck = time + 1; // check for enemies every second
+       }
+
        Monster mon = Monsters_from(this.monsterid);
        if(mon.mr_think(mon, this))
+       {
                Monster_Move(this, this.speed2, this.speed, this.stopspeed);
 
+               .entity weaponentity = weaponentities[0]; // TODO?
+               Monster_Attack_Check(this, this.enemy, weaponentity);
+       }
+
        Monster_Anim(this);
 
        CSQCMODEL_AUTOUPDATE(this);
@@ -1261,7 +1271,11 @@ bool Monster_Spawn_Setup(entity this)
        Monster_Sounds_Update(this);
 
        if(teamplay)
+       {
+               if(!this.monster_attack)
+                       IL_PUSH(g_monster_targets, this);
                this.monster_attack = true; // we can have monster enemies in team games
+       }
 
        Monster_Sound(this, monstersound_spawn, 0, false, CH_VOICE);
 
@@ -1355,7 +1369,7 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
        this.candrop                    = true;
        this.view_ofs                   = '0 0 0.7' * (this.maxs_z * 0.5);
        this.oldtarget2                 = this.target2;
-       this.pass_distance              = 0;
+       //this.pass_distance            = 0;
        this.deadflag                   = DEAD_NO;
        this.spawn_time                 = time;
        this.gravity                    = 1;
index daf538cb30bbe7f78751763530d628f88ecec979..1eb7396332d493daffb81a6e883021c5189cbb0b 100644 (file)
@@ -49,7 +49,11 @@ CLASS(DamageText, Object)
         this.time_prev = time;
         setorigin(this, this.origin + dt * this.velocity);
         this.alpha -= dt * this.fade_rate;
-        if (this.alpha < 0) delete(this);
+        if (this.alpha < 0)
+        {
+            delete(this);
+            return;
+        }
         vector pos = project_3d_to_2d(this.origin) + autocvar_cl_damagetext_offset;
         if (pos.z >= 0 && this.m_size > 0) {
             pos.z = 0;
index 3ffeb93711d55fdea88d8af452fa4d991b0add21..472fc646dbd9858615d6b25c80156073ad7d09d9 100644 (file)
@@ -238,7 +238,7 @@ void DrawItemsTimeItem(vector myPos, vector mySize, float ar, string item_icon,
         if (autocvar_hud_panel_itemstime_progressbar_reduced)
         {
             p_pos = numpos;
-            p_size = eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y;
+            p_size = vec2(((ar - 1)/ar) * mySize.x, mySize.y);
         }
         else
         {
@@ -251,9 +251,9 @@ void DrawItemsTimeItem(vector myPos, vector mySize, float ar, string item_icon,
     if(autocvar_hud_panel_itemstime_text)
     {
         if(t > 0)
-            drawstring_aspect(numpos, ftos(t), eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+            drawstring_aspect(numpos, ftos(t), vec2(((ar - 1)/ar) * mySize.x, mySize.y), color, panel_fg_alpha, DRAWFLAG_NORMAL);
         else if(precache_pic("gfx/hud/default/checkmark")) // COMPAT: check if this image exists, as 0.8.1 clients lack it
-            drawpic_aspect_skin(numpos, "checkmark", eX * (ar - 1) * mySize_y + eY * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);
+            drawpic_aspect_skin(numpos, "checkmark", vec2((ar - 1) * mySize.y, mySize.y), '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);
         else // legacy code, if the image is missing just center the icon
             picpos.x = myPos.x + mySize.x / 2 - mySize.y / 2;
     }
@@ -332,7 +332,7 @@ void HUD_ItemsTime()
     rows = HUD_GetRowCount(count, mySize, ar);
     columns = ceil(count/rows);
 
-    vector itemstime_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
+    vector itemstime_size = vec2(mySize.x / columns, mySize.y / rows);
 
     vector offset = '0 0 0';
     float newSize;
@@ -420,7 +420,7 @@ LABEL(iteration)
             if (!(Item_ItemsTime_GetTime(id) > time))
                 continue;
 
-        DrawItemsTimeItem(pos + eX * column * (itemstime_size.x + offset.x) + eY * row * (itemstime_size.y + offset.y), itemstime_size, ar, icon, item_time, item_available, f);
+        DrawItemsTimeItem(pos + vec2(column * (itemstime_size.x + offset.x), row * (itemstime_size.y + offset.y)), itemstime_size, ar, icon, item_time, item_available, f);
         ++row;
         if (row >= rows)
         {
index da244ea1f78176de8cbb44d5b9d5d4e4e3bed267..052a132b93b1aea01e8bf0924947c9c31b253700 100644 (file)
@@ -133,7 +133,7 @@ void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expan
                DrawNadeProgressBar(myPos, mySize, bonusProgress, nadeColor);
 
                if(autocvar_hud_panel_ammo_text)
-                       drawstring_aspect(textPos, ftos(bonusNades), eX * (2/3) * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(textPos, ftos(bonusNades), vec2((2/3) * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                if(draw_expanding)
                        drawpic_aspect_skin_expanding(iconPos, nadeIcon, '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, expand_time);
index 9cd2094a68852b59b4775090bdf40ea124701543..de8cf8f92d9bb9095fe82f9e68147fe0631ca13e 100644 (file)
@@ -40,8 +40,6 @@ REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED)
 REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY)
 REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS)
 
-REGISTER_NET_LINKED(ENT_CLIENT_MODEL)
-
 REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE)
 REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA)
 REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED)
@@ -53,3 +51,5 @@ REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE)
 REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT)
 REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT)
 REGISTER_NET_LINKED(ENT_CLIENT_WALL)
+
+#include <lib/csqcmodel/net.qh>
index 9f3eb37c24a5dbb4f0177dbbef9c588f7c07ff3e..8b5edbf6f471f966874e83282abc5a00d788e610 100644 (file)
     MSG_CENTER_NOTIF(VEHICLE_ENTER_GUNNER,              N_ENABLE,    0, 0, "pass_key",       CPID_VEHICLES,          "0 0",  _("^BGPress ^F2%s^BG to enter the vehicle gunner"), "")
     MSG_CENTER_NOTIF(VEHICLE_ENTER_STEAL,               N_ENABLE,    0, 0, "pass_key",       CPID_VEHICLES,          "0 0",  _("^BGPress ^F2%s^BG to steal this vehicle"), "")
     MSG_CENTER_NOTIF(VEHICLE_STEAL,                     N_ENABLE,    0, 0, "",               CPID_VEHICLES_OTHER,    "0 0",  _("^F2The enemy is stealing one of your vehicles!\n^F4Stop them!"), "")
-    MSG_CENTER_NOTIF(VEHICLE_STEAL_SELF,                N_ENABLE,    0, 0, "",               CPID_VEHICLES_OTHER,    "4 0",  _("^F2You have stolen the enemy's vehicle, you are now visible on their radar!"), "")
+    MSG_CENTER_NOTIF(VEHICLE_STEAL_SELF,                N_ENABLE,    0, 0, "",               CPID_VEHICLES_OTHER,    "4 0",  _("^F2Intruder detected, disabling shields!"), "")
 
     MSG_CENTER_NOTIF(WEAPON_MINELAYER_LIMIT,            N_ENABLE,    0, 1, "f1",             CPID_Null,              "0 0",  _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
 
index 407a703cfc03c4c7aea711a0e4be505a42c58de7..995c65b4d322061a7f00d0b5f0899a4480af02a4 100644 (file)
@@ -1,16 +1,4 @@
 #include "movetypes.qh"
-#include "../player.qh"
-
-#if defined(CSQC)
-       #include <client/defs.qh>
-       #include <common/stats.qh>
-       #include <common/util.qh>
-       #include <lib/csqcmodel/common.qh>
-       #include <common/t_items.qh>
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include <server/autocvars.qh>
-#endif
 
 #ifdef SVQC
 void set_movetype(entity this, int mt)
@@ -48,7 +36,7 @@ void _Movetype_WallFriction(entity this, vector stepnormal)  // SV_WallFriction
 vector planes[MAX_CLIP_PLANES];
 int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight) // SV_FlyMove
 {
-       int blocked = 0, bumpcount;
+       int blocked = 0;
        int i, j, numplanes = 0;
        float time_left = dt, grav = 0;
        vector push;
@@ -73,7 +61,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
 
        original_velocity = primal_velocity = restore_velocity = this.velocity;
 
-       for(bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
+       for(int bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
        {
                if(this.velocity == '0 0 0')
                        break;
@@ -138,7 +126,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                                break;
                        }
                        float trace2_fraction = trace_fraction;
-                       steppush = '0 0 1' * (org_z - this.origin_z);
+                       steppush = '0 0 1' * (org.z - this.origin_z);
                        _Movetype_PushEntity(this, steppush, true);
                        if(trace_startsolid)
                        {
@@ -147,7 +135,7 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnorma
                        }
 
                        // accept the new position if it made some progress...
-                       if(fabs(this.origin_x - org_x) >= 0.03125 || fabs(this.origin_y - org_y) >= 0.03125)
+                       if(fabs(this.origin_x - org.x) >= 0.03125 || fabs(this.origin_y - org.y) >= 0.03125)
                        {
                                trace_endpos = this.origin;
                                time_left *= 1 - trace2_fraction;
index d26de7b964983d6c702c752fa20869ae35016a7f..712817386037581064666a4e9cd7ce5faca8590f 100644 (file)
@@ -7,6 +7,13 @@
 #define SET_ONSLICK(s)                                         ((s).flags |= FL_ONSLICK)
 #define UNSET_ONSLICK(s)                                       ((s).flags &= ~FL_ONSLICK)
 
+#define GAMEPLAYFIX_DOWNTRACEONGROUND(s)    STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, s)
+#define GAMEPLAYFIX_EASIERWATERJUMP(s)      STAT(GAMEPLAYFIX_EASIERWATERJUMP, s)
+#define GAMEPLAYFIX_STEPDOWN(s)             STAT(GAMEPLAYFIX_STEPDOWN, s)
+#define GAMEPLAYFIX_STEPMULTIPLETIMES(s)    STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
+#define GAMEPLAYFIX_UNSTICKPLAYERS(s)       STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
+#define GAMEPLAYFIX_WATERTRANSITION(s)                 STAT(GAMEPLAYFIX_WATERTRANSITION, s)
+
 #ifdef CSQC
 .float bouncestop;
 .float bouncefactor;
index 498852135b40fd0607ee78d1b86daff703e48ac5..71e7fa9d08c9032e14abe5bb9bdcd10824b84121 100644 (file)
@@ -1,5 +1,4 @@
 #include "toss.qh"
-#include "../player.qh"
 
 void _Movetype_Physics_Toss(entity this, float dt)  // SV_Physics_Toss
 {
index b8a14a4ce0fb79c80be015de0d0e471de1bb872c..56219b2c964ba4570c16dc697c04f4f5983ab2f6 100644 (file)
@@ -57,6 +57,7 @@ void Physics_UpdateStats(entity this, float maxspd_mod)
        STAT(MOVEVARS_AIRCONTROL, this) = Physics_ClientOption(this, "aircontrol", autocvar_sv_aircontrol);
        STAT(MOVEVARS_AIRCONTROL_POWER, this) = Physics_ClientOption(this, "aircontrol_power", autocvar_sv_aircontrol_power);
        STAT(MOVEVARS_AIRCONTROL_BACKWARDS, this) = Physics_ClientOption(this, "aircontrol_backwards", autocvar_sv_aircontrol_backwards);
+       STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, this) = Physics_ClientOption(this, "aircontrol_sidewards", autocvar_sv_aircontrol_sidewards);
        STAT(MOVEVARS_AIRCONTROL_PENALTY, this) = Physics_ClientOption(this, "aircontrol_penalty", autocvar_sv_aircontrol_penalty);
        STAT(MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, this) = Physics_ClientOption(this, "warsowbunny_airforwardaccel", autocvar_sv_warsowbunny_airforwardaccel);
        STAT(MOVEVARS_WARSOWBUNNY_TOPSPEED, this) = Physics_ClientOption(this, "warsowbunny_topspeed", autocvar_sv_warsowbunny_topspeed);
@@ -137,6 +138,11 @@ void CPM_PM_Aircontrol(entity this, float dt, vector wishdir, float wishspeed)
        float movity = IsMoveInDirection(this.movement, 0);
        if(PHYS_AIRCONTROL_BACKWARDS(this))
                movity += IsMoveInDirection(this.movement, 180);
+       if(PHYS_AIRCONTROL_SIDEWARDS(this))
+       {
+               movity += IsMoveInDirection(this.movement, 90);
+               movity += IsMoveInDirection(this.movement, -90);
+       }
 
        float k = 32 * (2 * movity - 1);
        if (k <= 0)
index 39cc573ee99d9bc96cff1177dd1b3c457d26cfa1..7c093c15d81eb061ac95ae6089c1ece0748c67b9 100644 (file)
@@ -29,14 +29,18 @@ float AdjustAirAccelQW(float accelqw, float factor);
 
 bool IsFlying(entity a);
 
-#define BUFFS_STAT(s)                       STAT(BUFFS, s)
+#define PHYS_PL_MAX(s)                                         STAT(PL_MAX, s)
+#define PHYS_PL_MIN(s)                                         STAT(PL_MIN, s)
+#define PHYS_PL_CROUCH_MAX(s)                          STAT(PL_CROUCH_MAX, s)
+#define PHYS_PL_CROUCH_MIN(s)                          STAT(PL_CROUCH_MIN, s)
+
+#define PHYS_PL_VIEWOFS(s)                                     STAT(PL_VIEW_OFS, s)
+#define PHYS_PL_CROUCH_VIEWOFS(s)                      STAT(PL_CROUCH_VIEW_OFS, s)
 
-#define GAMEPLAYFIX_DOWNTRACEONGROUND(s)    STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, s)
-#define GAMEPLAYFIX_EASIERWATERJUMP(s)      STAT(GAMEPLAYFIX_EASIERWATERJUMP, s)
-#define GAMEPLAYFIX_STEPDOWN(s)             STAT(GAMEPLAYFIX_STEPDOWN, s)
-#define GAMEPLAYFIX_STEPMULTIPLETIMES(s)    STAT(GAMEPLAYFIX_STEPMULTIPLETIMES, s)
-#define GAMEPLAYFIX_UNSTICKPLAYERS(s)       STAT(GAMEPLAYFIX_UNSTICKPLAYERS, s)
-#define GAMEPLAYFIX_WATERTRANSITION(s) STAT(GAMEPLAYFIX_WATERTRANSITION, s)
+#define PHYS_VIEWHEIGHT(s)                                     STAT(VIEWHEIGHT, s)
+#define PHYS_HEALTH(s)                                         STAT(HEALTH, s)
+
+#define BUFFS_STAT(s)                       STAT(BUFFS, s)
 
 #define PHYS_ACCELERATE(s)                  STAT(MOVEVARS_ACCELERATE, s)
 #define PHYS_AIRACCELERATE(s)               STAT(MOVEVARS_AIRACCELERATE, s)
@@ -47,6 +51,7 @@ bool IsFlying(entity a);
 #define PHYS_AIRCONTROL_PENALTY(s)          STAT(MOVEVARS_AIRCONTROL_PENALTY, s)
 #define PHYS_AIRCONTROL_POWER(s)            STAT(MOVEVARS_AIRCONTROL_POWER, s)
 #define PHYS_AIRCONTROL_BACKWARDS(s)        STAT(MOVEVARS_AIRCONTROL_BACKWARDS, s)
+#define PHYS_AIRCONTROL_SIDEWARDS(s)        STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, s)
 #define PHYS_AIRSPEEDLIMIT_NONQW(s)         STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, s)
 #define PHYS_AIRSTOPACCELERATE(s)           STAT(MOVEVARS_AIRSTOPACCELERATE, s)
 #define PHYS_AIRSTRAFEACCELERATE(s)         STAT(MOVEVARS_AIRSTRAFEACCELERATE, s)
index bea426a3412513f65256ab8a8ef73cfbf0feebc8..8b6b1cfdf6a12b4137a488ddd8503d50246d3c11 100644 (file)
@@ -297,6 +297,7 @@ REGISTER_STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, float)
 REGISTER_STAT(MOVEVARS_AIRSTRAFEACCEL_QW, float)
 REGISTER_STAT(MOVEVARS_AIRCONTROL_POWER, float)
 REGISTER_STAT(MOVEVARS_AIRCONTROL_BACKWARDS, bool)
+REGISTER_STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, bool)
 noref bool autocvar_sv_gameplayfix_nogravityonground;
 REGISTER_STAT(MOVEFLAGS, int, MOVEFLAG_VALID
                               | (autocvar_sv_gameplayfix_q2airaccelerate ? MOVEFLAG_Q2AIRACCELERATE : 0)
index 2746eabfc3fa048f681dd0ce0030075a6bdec8c3..5e03def2447d5132661edd66caa031f681b32f3e 100644 (file)
@@ -63,6 +63,8 @@ void Item_SetAlpha(entity this)
                this.colormod = this.glowmod = autocvar_cl_weapon_stay_color;
                this.alpha = autocvar_cl_weapon_stay_alpha;
        }
+
+       this.drawmask = ((this.alpha <= 0) ? 0 : MASK_NORMAL);
 }
 
 void ItemDraw(entity this)
@@ -127,9 +129,7 @@ void Item_PreDraw(entity this)
 {
        if(warpzone_warpzones_exist)
        {
-               // just incase warpzones were initialized last, reset these
-               //this.alpha = 1; // alpha is already set by the draw function
-               this.drawmask = MASK_NORMAL;
+               setpredraw(this, func_null); // no need to keep running this
                return;
        }
        float alph;
@@ -145,8 +145,8 @@ void Item_PreDraw(entity this)
                this.alpha = alph;
        if(alph <= 0)
                this.drawmask = 0;
-       else
-               this.drawmask = MASK_NORMAL;
+       //else
+               //this.drawmask = MASK_NORMAL; // reset by the setalpha function
 }
 
 void ItemRemove(entity this)
@@ -213,7 +213,7 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
 
         this.fade_end = ReadShort();
         this.fade_start = ReadShort();
-        if(this.fade_start && !autocvar_cl_items_nofade)
+        if(!warpzone_warpzones_exist && this.fade_start && !autocvar_cl_items_nofade)
                setpredraw(this, Item_PreDraw);
 
         if(this.mdl)
index 81a61019080174099569de31bfb87670605c3ea1..79c2feb4eab85b8115a0ddcd00270a26323d7c81 100644 (file)
@@ -271,7 +271,7 @@ void func_breakable_damage(entity this, entity inflictor, entity attacker, float
                this.takedamage = DAMAGE_NO;
                this.event_damage = func_null;
 
-               if(IS_CLIENT(attacker) && this.classname == "func_assault_destructible")
+               if(IS_CLIENT(attacker)) //&& this.classname == "func_assault_destructible")
                {
                        this.owner = attacker;
                        this.realowner = attacker;
index 71bd8c11e9c4865fb3f27b6142a697dca5b0c8aa..34c02ba79418fbd2ee5f9d6d3d980c13ea0fcb2b 100644 (file)
@@ -1,6 +1,7 @@
 // generated file; do not modify
 #include <common/triggers/target/changelevel.qc>
 #include <common/triggers/target/include.qc>
+#include <common/triggers/target/kill.qc>
 #include <common/triggers/target/levelwarp.qc>
 #include <common/triggers/target/location.qc>
 #include <common/triggers/target/music.qc>
index c643e47857374ea95411805f301221e4383ab229..4558b71bfcdfc519b97588b9a4f75bc114dad50f 100644 (file)
@@ -1,6 +1,7 @@
 #include "include.qh"
 
 #include "changelevel.qc"
+#include "kill.qc"
 #include "levelwarp.qc"
 #include "location.qc"
 #include "music.qc"
diff --git a/qcsrc/common/triggers/target/kill.qc b/qcsrc/common/triggers/target/kill.qc
new file mode 100644 (file)
index 0000000..a086bb3
--- /dev/null
@@ -0,0 +1,25 @@
+#include "location.qh"
+#ifdef SVQC
+
+void target_kill_use(entity this, entity actor, entity trigger)
+{
+       if(actor.takedamage == DAMAGE_NO)
+               return;
+
+       if(!actor.iscreature && !actor.damagedbytriggers)
+               return;
+
+       Damage(actor, this, trigger, 1000, DEATH_HURTTRIGGER.m_id, actor.origin, '0 0 0');
+}
+
+spawnfunc(target_kill)
+{
+    this.classname = "target_kill";
+
+    if (this.message == "")
+               this.message = "was in the wrong place";
+
+    this.use = target_kill_use;
+}
+
+#endif
index 6c246a75b83a5c8b6229f475c32c82bd173f1556..d9a20dc97c81d52104604e612e0d59c1b27ded74 100644 (file)
@@ -12,8 +12,6 @@
 #define checkpoint_cache_to   selected_player
 */
 
-.entity pathgoal;
-
 /*
 entity path_makeorcache(entity forwho,entity start, entity end)
 {
index 68cac084649dba3baa49ae258a438d25313d5444..7d1a81d490b1be213ad7d12faa20ca3d6e2d6355 100644 (file)
@@ -5,9 +5,9 @@
 
 void T_Config_Queue_Swap(float root, float child, entity pass)
 {
-       string oldroot = tur_config_queue[root];
-       tur_config_queue[root] = tur_config_queue[child];
-       tur_config_queue[child] = oldroot;
+       string oldroot = config_queue[root];
+       config_queue[root] = config_queue[child];
+       config_queue[child] = oldroot;
 }
 
 float T_Config_Queue_Compare(float root, float child, entity pass)
@@ -16,8 +16,8 @@ float T_Config_Queue_Compare(float root, float child, entity pass)
 
        for(i = 1; i <= 100; ++i)
        {
-               r = str2chr(tur_config_queue[root], i);
-               c = str2chr(tur_config_queue[child], i);
+               r = str2chr(config_queue[root], i);
+               c = str2chr(config_queue[child], i);
                if(r == c) { continue; }
                else if(c > r) { return -1; }
                else { return 1; }
@@ -32,8 +32,8 @@ void Dump_Turret_Settings()
        FOREACH(Turrets, it != TUR_Null, {
                // step 1: clear the queue
                TUR_CONFIG_COUNT = 0;
-               for(int j = 0; j <= MAX_TUR_CONFIG; ++j)
-                       { tur_config_queue[j] = string_null; }
+               for(int j = 0; j <= MAX_CONFIG_SETTINGS; ++j)
+                       config_queue[j] = string_null;
 
                // step 2: build new queue
                it.tr_config(it);
@@ -44,7 +44,7 @@ void Dump_Turret_Settings()
                // step 4: write queue
                TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, it.turret_name))
                for(int j = 0; j <= TUR_CONFIG_COUNT; ++j)
-                       { TUR_CONFIG_WRITETOFILE(tur_config_queue[j]) }
+                       TUR_CONFIG_WRITETOFILE(config_queue[j])
                TUR_CONFIG_WRITETOFILE("// }}}\n")
 
                // step 5: debug info
@@ -54,8 +54,8 @@ void Dump_Turret_Settings()
 
        // clear queue now that we're finished
        TUR_CONFIG_COUNT = 0;
-       for(int j = 0; j <= MAX_TUR_CONFIG; ++j)
-               { tur_config_queue[j] = string_null; }
+       for(int j = 0; j <= MAX_CONFIG_SETTINGS; ++j)
+               config_queue[j] = string_null;
 
        // extra information
        LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (Turrets_COUNT - 1), totalsettings));
index caa68a86487dcd3780eb9c277f93aab8eacaa635..ac09e9e37248f3f5320a1df3267f758820140126 100644 (file)
@@ -6,10 +6,7 @@ void Dump_Turret_Settings();
 float tur_config_file;
 float tur_config_alsoprint;
 
-const int MAX_TUR_CONFIG = 256;
 float TUR_CONFIG_COUNT;
-string tur_config_queue[MAX_TUR_CONFIG];
-
 #define TUR_CONFIG_WRITETOFILE(a) { \
        fputs(tur_config_file, a); \
        if(tur_config_alsoprint) { LOG_INFO(a); } }
index ae8cd5323b49dfcd6a3789089e1396bf601a0b56..b9250f0a8853671261b64fb2558c0df2047581aa 100644 (file)
@@ -789,7 +789,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl
        }
 
        // Can we even aim this thing?
-       tvt_thadv = angleofs3(e_turret.tur_head.origin, e_turret.angles + e_turret.tur_head.angles, e_target);
+       tvt_thadv = angleofs3(e_turret.tur_head.origin, e_turret.angles + e_turret.tur_head.angles, e_target.origin);
        tvt_tadv = shortangle_vxy(angleofs(e_turret, e_target), e_turret.angles);
        tvt_thadf = vlen(tvt_thadv);
        tvt_tadf = vlen(tvt_tadv);
index 62759c058f3df63b37713919baf4f55a9c8314ee..edd06bd6db0f846bb793f1d950dbdfd7f4eaa529 100644 (file)
@@ -94,6 +94,8 @@ bool turret_initialize(entity this, Turret tur);
 
 .entity pathcurrent;
 
+.entity pathgoal;
+
 float turret_count;
 
 // debugging
index cf53508b6f63adca3314782182b8739c9bba5b17..403a0ddf6c2bedcefa2a23b8e20d993710137786 100644 (file)
@@ -140,10 +140,9 @@ spawnfunc(turret_ewheel) { if(!turret_initialize(this, TUR_EWHEEL)) delete(this)
 
 METHOD(EWheel, tr_think, void(EWheel thistur, entity it))
 {
-    float vz;
     vector wish_angle, real_angle;
 
-    vz = it.velocity_z;
+    float vz = it.velocity_z;
 
     it.angles_x = anglemods(it.angles_x);
     it.angles_y = anglemods(it.angles_y);
@@ -198,8 +197,9 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it))
 
     it.iscreature                              = true;
     it.teleportable                    = TELEPORT_NORMAL;
-    it.damagedbycontents               = true;
-    IL_PUSH(g_damagedbycontents, it);
+    if(!it.damagedbycontents)
+        IL_PUSH(g_damagedbycontents, it);
+    it.damagedbycontents        = true;
     set_movetype(it, MOVETYPE_WALK);
     it.solid                                   = SOLID_SLIDEBOX;
     it.takedamage                              = DAMAGE_AIM;
index 5f52695bafe7b2df5d9c26e8c6f74ffaa78b73b0..be207b711e85748328723a6d31e2919bf5cc6403 100644 (file)
@@ -1,9 +1,4 @@
 #pragma once
 
-float shortangle_f(float ang1, float ang2);
-float anglemods(float v);
 float turret_tag_fire_update(entity this);
-vector shortangle_vxy(vector ang1, vector ang2);
-vector angleofs(entity from, entity to);
-vector angleofs3(vector from, vector from_a, entity to);
 void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype);
index 13c4c0900817d5f8298df91435c3dcfc9c6e2c28..a5ca2cf350208dc694074282f2f26aa9bcbf8014 100644 (file)
@@ -105,9 +105,6 @@ void get_mi_min_max_texcoords(float mode);
 float almost_equals(float a, float b);
 float almost_in_bounds(float a, float b, float c);
 
-float power2of(float e);
-float log2of(float e);
-
 vector rgb_to_hsl(vector rgb);
 vector hsl_to_rgb(vector hsl);
 vector rgb_to_hsv(vector rgb);
@@ -159,16 +156,6 @@ vector healtharmor_applydamage(float a, float armorblock, int deathtype, float d
 
 string getcurrentmod();
 
-#ifdef GAMEQC
-#ifdef CSQC
-int ReadInt24_t();
-#else
-void WriteInt24_t(float dest, float val);
-void WriteInt48_t(float dest, vector val);
-void WriteInt72_t(float dest, vector val);
-#endif
-#endif
-
 float float2range11(float f);
 float float2range01(float f);
 
@@ -259,7 +246,9 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
 #define fprintf(file, ...) fputs(file, sprintf(__VA_ARGS__))
 #define bprintf(...) bprint(sprintf(__VA_ARGS__))
 
+#ifdef GAMEQC
 string CCR(string input);
+#endif
 
 #ifdef GAMEQC
        #ifdef CSQC
index afb48c918b89f74e353d3c2f624ecfafdb69e65d..b2f87821eea414ca4b6eb764663571d4d1826c4c 100644 (file)
@@ -33,13 +33,14 @@ void AuxiliaryXhair_Draw2D(entity this)
        if (scoreboard_active)
                return;
 
-       vector size = draw_getimagesize(this.axh_image) * autocvar_cl_vehicles_crosshair_size;
-       vector pos = project_3d_to_2d(this.origin) - 0.5 * size;
+       vector pos = project_3d_to_2d(this.origin);
 
        if (!(pos.z < 0 || pos.x < 0 || pos.y < 0 || pos.x > vid_conwidth || pos.y > vid_conheight))
        {
+               vector size = draw_getimagesize(this.axh_image) * autocvar_cl_vehicles_crosshair_size;
+               pos.x -= 0.5 * size.x;
+               pos.y -= 0.5 * size.y;
                pos.z = 0;
-               size.z = 0;
                drawpic(pos, this.axh_image, size, this.colormod, autocvar_crosshair_alpha * this.alpha, this.axh_drawflag);
        }
 
index 659b3c148d005c6a1a618772361020779519ecbb..47991b42391a902793e4cf62a4f815d8c38653a1 100644 (file)
@@ -403,12 +403,14 @@ vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string
        return vtag;
 }
 
-void vehicles_reset_colors(entity this)
+void vehicles_reset_colors(entity this, entity player)
 {
        int eff = 0, cmap;
        const vector cmod = '0 0 0';
        if(this.team && teamplay)
                cmap = 1024 + (this.team - 1) * 17;
+       else if(player)
+               cmap = player.colormap;
        else
                cmap = 1024;
        if(autocvar_g_nodepthtestplayers)
@@ -419,25 +421,25 @@ void vehicles_reset_colors(entity this)
        // Find all ents attacked to main model and setup effects, colormod etc.
        FOREACH_ENTITY_ENT(tag_entity, this,
        {
-               if(it != this.vehicle_shieldent)
-               {
-                       it.effects = eff;
-                       it.colormod = cmod;
-                       it.colormap = cmap;
-                       it.alpha = 1;
-               }
+               if(it == this.vehicle_shieldent)
+                       continue;
+
+               it.effects = eff;
+               it.colormod = cmod;
+               it.colormap = cmap;
+               it.alpha = 1;
        });
 
        // Also check head tags
        FOREACH_ENTITY_ENT(tag_entity, this.tur_head,
        {
-               if(it != this.vehicle_shieldent)
-               {
-                       it.effects = eff;
-                       it.colormod = cmod;
-                       it.colormap = cmap;
-                       it.alpha = 1;
-               }
+               if(it == this.vehicle_shieldent)
+                       continue;
+
+               it.effects = eff;
+               it.colormod = cmod;
+               it.colormap = cmap;
+               it.alpha = 1;
        });
 
        this.vehicle_hudmodel.effects  = this.effects  = eff; // | EF_LOWPRECISION;
@@ -449,6 +451,9 @@ void vehicles_reset_colors(entity this)
        this.avelocity = '0 0 0';
        this.velocity  = '0 0 0';
        this.effects   = eff;
+
+       Vehicle info = Vehicles_from(this.vehicleid);
+       info.vr_setcolors(info, this);
 }
 
 void vehicles_clearreturn(entity veh)
@@ -572,7 +577,7 @@ void vehicle_use(entity this, entity actor, entity trigger)
                else
                {
                        vehicles_setreturn(this);
-                       vehicles_reset_colors(this);
+                       vehicles_reset_colors(this, actor);
                }
        }
 }
@@ -780,6 +785,7 @@ vector vehicles_findgoodexit(entity this, entity player, vector prefer_spot)
        return this.origin;
 }
 
+.int old_vehicle_flags;
 void vehicles_exit(entity vehic, bool eject)
 {
        entity player = vehic.owner;
@@ -858,6 +864,10 @@ void vehicles_exit(entity vehic, bool eject)
 
        vehic.team = vehic.tur_head.team;
 
+       if(vehic.old_vehicle_flags & VHF_SHIELDREGEN)
+               vehic.vehicle_flags |= VHF_SHIELDREGEN;
+       vehic.old_vehicle_flags = 0;
+
        sound (vehic, CH_TRIGGER_SINGLE, SND_Null, 1, ATTEN_NORM);
        vehic.vehicle_hudmodel.viewmodelforclient = vehic;
        vehic.phase = time + 1;
@@ -865,7 +875,7 @@ void vehicles_exit(entity vehic, bool eject)
        vehic.vehicle_exit(vehic, eject);
 
        vehicles_setreturn(vehic);
-       vehicles_reset_colors(vehic);
+       vehicles_reset_colors(vehic, NULL);
        vehic.owner = NULL;
 
        CSQCMODEL_AUTOINIT(vehic);
@@ -964,6 +974,10 @@ void vehicles_enter(entity pl, entity veh)
 
                Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_STEAL_SELF);
 
+               veh.vehicle_shield = 0;
+               veh.old_vehicle_flags = veh.vehicle_flags; // make a backup just so we're not permanently crippling this vehicle
+               veh.vehicle_flags &= ~VHF_SHIELDREGEN;
+
                if (autocvar_g_vehicles_steal_show_waypoint) {
                        entity wp = WaypointSprite_Spawn(WP_VehicleIntruder, 0, 0, pl, '0 0 68', NULL, veh.team, veh, wps_intruder, true, RADARICON_DANGER);
                        wp.colormod = Team_ColorRGB(pl.team);
@@ -1031,6 +1045,8 @@ void vehicles_enter(entity pl, entity veh)
        veh.team = pl.team;
        veh.flags -= FL_NOTARGET;
 
+       vehicles_reset_colors(veh, pl);
+
        if (IS_REAL_CLIENT(pl))
        {
                Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_ENTER);
@@ -1144,11 +1160,12 @@ void vehicles_spawn(entity this)
            }
        });
 
-       vehicles_reset_colors(this);
 
        Vehicle info = Vehicles_from(this.vehicleid);
        info.vr_spawn(info, this);
 
+       vehicles_reset_colors(this, NULL);
+
        CSQCMODEL_AUTOINIT(this);
 }
 
index 948427db33e0923c8c28af0ddbf61845a2369e32..653532b43dd9ce1f8a143e51770c06120359a9f0 100644 (file)
@@ -20,12 +20,12 @@ float autocvar_g_vehicles_thinkrate = 0.1;
 
 AUTOCVAR(g_vehicles_teams, bool, true, "allow team specific vehicles");
 float autocvar_g_vehicles_teleportable;
-float autocvar_g_vehicles_vortex_damagerate = 0.5;
-float autocvar_g_vehicles_machinegun_damagerate = 0.5;
+float autocvar_g_vehicles_vortex_damagerate = 0.75;
+float autocvar_g_vehicles_machinegun_damagerate = 0.75;
 float autocvar_g_vehicles_rifle_damagerate = 0.75;
-float autocvar_g_vehicles_vaporizer_damagerate = 0.001;
+float autocvar_g_vehicles_vaporizer_damagerate = 0.5;
 float autocvar_g_vehicles_tag_damagerate = 5;
-float autocvar_g_vehicles_weapon_damagerate = 1;
+float autocvar_g_vehicles_weapon_damagerate = 2;
 
 .float vehicle_last_trace;
 
index 4e3b7b8729f374a104a449cd9ac0943ae40de8b6..5b30b845e1a8d67b18d08fddc4970900e01c276c 100644 (file)
@@ -51,6 +51,8 @@ CLASS(Vehicle, Object)
     METHOD(Vehicle, vr_spawn, void(Vehicle this, entity instance)) { }
     /** (SERVER) called when a vehicle hits something */
     METHOD(Vehicle, vr_impact, void(Vehicle this, entity instance)) { }
+    /** (SERVER) called when a vehicle's colors are being reset, so modules can be updated */
+    METHOD(Vehicle, vr_setcolors, void(Vehicle this, entity instance)) { }
     /** (CLIENT) logic to run every frame */
     METHOD(Vehicle, vr_hud, void(Vehicle this)) { }
     /** (CLIENT) logic to run every frame */
index b62eac09af0cb173b1de76a1e51595b448f7bdac..01488e624e2c0781580f8fd782dc1cc7e14b2f17 100644 (file)
@@ -11,7 +11,7 @@ float autocvar_g_vehicle_racer_thinkrate = 0.05; // TODO: any higher causes it t
 
 float autocvar_g_vehicle_racer_speed_afterburn = 3000;
 // energy consumed per second
-float autocvar_g_vehicle_racer_afterburn_cost = 100;
+float autocvar_g_vehicle_racer_afterburn_cost = 130;
 
 float autocvar_g_vehicle_racer_waterburn_cost = 5;
 float autocvar_g_vehicle_racer_waterburn_speed = 750;
@@ -29,8 +29,8 @@ float autocvar_g_vehicle_racer_downforce = 0.01;
 
 float autocvar_g_vehicle_racer_speed_forward = 650;
 float autocvar_g_vehicle_racer_speed_strafe = 650;
-float autocvar_g_vehicle_racer_springlength = 70;
-float autocvar_g_vehicle_racer_upforcedamper = 10;
+float autocvar_g_vehicle_racer_springlength = 90;
+float autocvar_g_vehicle_racer_upforcedamper = 2;
 float autocvar_g_vehicle_racer_friction = 0.45;
 
 float autocvar_g_vehicle_racer_water_time = 5;
@@ -47,8 +47,8 @@ float autocvar_g_vehicle_racer_turnspeed = 220;
 float autocvar_g_vehicle_racer_pitchspeed = 125;
 
 float autocvar_g_vehicle_racer_energy = 100;
-float autocvar_g_vehicle_racer_energy_regen = 50;
-float autocvar_g_vehicle_racer_energy_regen_pause = 1;
+float autocvar_g_vehicle_racer_energy_regen = 90;
+float autocvar_g_vehicle_racer_energy_regen_pause = 0.35;
 
 float autocvar_g_vehicle_racer_health = 200;
 float autocvar_g_vehicle_racer_health_regen = 0;
@@ -59,7 +59,7 @@ float autocvar_g_vehicle_racer_shield_regen = 30;
 float autocvar_g_vehicle_racer_shield_regen_pause = 1;
 
 bool autocvar_g_vehicle_racer_rocket_locktarget = true;
-float autocvar_g_vehicle_racer_rocket_locking_time = 0.9;
+float autocvar_g_vehicle_racer_rocket_locking_time = 0.35;
 float autocvar_g_vehicle_racer_rocket_locking_releasetime = 0.5;
 float autocvar_g_vehicle_racer_rocket_locked_time = 4;
 
@@ -75,7 +75,7 @@ float autocvar_g_vehicle_racer_bouncefactor = 0.25;
 // if != 0, New veloctiy after bounce = 0 if new velocity < this
 float autocvar_g_vehicle_racer_bouncestop = 0;
 // "minspeed_for_pain speedchange_to_pain_factor max_damage"
-vector autocvar_g_vehicle_racer_bouncepain = '60 0.75 300';
+vector autocvar_g_vehicle_racer_bouncepain = '200 0.15 150';
 
 .float racer_watertime;
 
index f8b18a86ff03aec6a5c1d3efe8519d37c558ee80..3bd712011622ab35700b19e42d398825eef05e1f 100644 (file)
@@ -16,7 +16,7 @@ void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
 #endif
 
 #ifdef SVQC
-float autocvar_g_vehicle_racer_cannon_cost = 2;
+float autocvar_g_vehicle_racer_cannon_cost = 1.5;
 float autocvar_g_vehicle_racer_cannon_damage = 15;
 float autocvar_g_vehicle_racer_cannon_radius = 100;
 float autocvar_g_vehicle_racer_cannon_refire = 0.05;
index 5424d1cdf5cd132479d44fdcf407efb2c8f0bfef..da556c4fc5a53a2fe991fcbf5ced0ee9562c5f24 100644 (file)
@@ -17,9 +17,9 @@ float autocvar_g_vehicle_raptor_pitchspeed = 50;
 float autocvar_g_vehicle_raptor_pitchlimit = 45;
 
 float autocvar_g_vehicle_raptor_speed_forward = 1700;
-float autocvar_g_vehicle_raptor_speed_strafe = 900;
-float autocvar_g_vehicle_raptor_speed_up = 1700;
-float autocvar_g_vehicle_raptor_speed_down = 1700;
+float autocvar_g_vehicle_raptor_speed_strafe = 2200;
+float autocvar_g_vehicle_raptor_speed_up = 2300;
+float autocvar_g_vehicle_raptor_speed_down = 2000;
 float autocvar_g_vehicle_raptor_friction = 2;
 
 bool autocvar_g_vehicle_raptor_swim = false;
@@ -29,7 +29,7 @@ float autocvar_g_vehicle_raptor_cannon_turnlimit = 20;
 float autocvar_g_vehicle_raptor_cannon_pitchlimit_up = 12;
 float autocvar_g_vehicle_raptor_cannon_pitchlimit_down = 32;
 
-float autocvar_g_vehicle_raptor_cannon_locktarget = 0;
+bool autocvar_g_vehicle_raptor_cannon_locktarget = true;
 float autocvar_g_vehicle_raptor_cannon_locking_time = 0.2;
 float autocvar_g_vehicle_raptor_cannon_locking_releasetime = 0.45;
 float autocvar_g_vehicle_raptor_cannon_locked_time = 1;
@@ -39,11 +39,11 @@ float autocvar_g_vehicle_raptor_energy = 100;
 float autocvar_g_vehicle_raptor_energy_regen = 25;
 float autocvar_g_vehicle_raptor_energy_regen_pause = 0.25;
 
-float autocvar_g_vehicle_raptor_health = 150;
+float autocvar_g_vehicle_raptor_health = 250;
 float autocvar_g_vehicle_raptor_health_regen = 0;
 float autocvar_g_vehicle_raptor_health_regen_pause = 0;
 
-float autocvar_g_vehicle_raptor_shield = 75;
+float autocvar_g_vehicle_raptor_shield = 200;
 float autocvar_g_vehicle_raptor_shield_regen = 25;
 float autocvar_g_vehicle_raptor_shield_regen_pause = 1.5;
 
@@ -794,10 +794,10 @@ METHOD(Raptor, vr_crosshair, void(Raptor thisveh, entity player))
             where = project_3d_to_2d(trace_endpos);
 
             setorigin(dropmark, trace_endpos);
-            tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size;
 
             if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
             {
+                tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size;
                 where.x -= tmpSize.x * 0.5;
                 where.y -= tmpSize.y * 0.5;
                 where.z = 0;
@@ -811,10 +811,10 @@ METHOD(Raptor, vr_crosshair, void(Raptor thisveh, entity player))
             if(dropmark.cnt > time)
             {
                 where = project_3d_to_2d(dropmark.origin);
-                tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size * 1.25;
 
                 if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
                 {
+                    tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size * 1.25;
                     where.x -= tmpSize.x * 0.5;
                     where.y -= tmpSize.y * 0.5;
                     where.z = 0;
index 199d9cfa47d8debf5d1d6b7d459af1b4cca7b9ad..8cca16a4cf556beb6bdde962e8170bd089d34113 100644 (file)
@@ -8,9 +8,9 @@ void spiderbot_rocket_do(entity this);
 
 #ifdef SVQC
 // 400 (x2) DPS
-float autocvar_g_vehicle_spiderbot_minigun_damage = 24;
+float autocvar_g_vehicle_spiderbot_minigun_damage = 16;
 float autocvar_g_vehicle_spiderbot_minigun_refire = 0.06;
-float autocvar_g_vehicle_spiderbot_minigun_spread = 0.015;
+float autocvar_g_vehicle_spiderbot_minigun_spread = 0.012;
 int autocvar_g_vehicle_spiderbot_minigun_ammo_cost = 1;
 int autocvar_g_vehicle_spiderbot_minigun_ammo_max = 100;
 int autocvar_g_vehicle_spiderbot_minigun_ammo_regen = 40;
index 367bab6afb26c5aba16179d96fae28096b765827..513af5209d670cac485f046342922c5e003c0bf3 100644 (file)
@@ -90,15 +90,11 @@ vector solve_cubic_pq(float p, float q)
                // cos(a)
                // cos(a + 2pi/3)
                // cos(a + 4pi/3)
-               return
-                       u *
-                       (
-                               '1 0 0' * cos(a + 2.0/3.0*M_PI)
-                               +
-                               '0 1 0' * cos(a + 4.0/3.0*M_PI)
-                               +
-                               '0 0 1' * cos(a)
-                       );
+               return u * vec3(
+                       cos(a + 2.0/3.0*M_PI),
+                       cos(a + 4.0/3.0*M_PI),
+                       cos(a)
+               );
        }
        else if(D == 0)
        {
@@ -107,17 +103,15 @@ vector solve_cubic_pq(float p, float q)
                        return '0 0 0';
                u = 3*q/p;
                v = -u/2;
-               if(u >= v)
-                       return '1 1 0' * v + '0 0 1' * u;
-               else
-                       return '0 1 1' * v + '1 0 0' * u;
+               return (u >= v) ? vec3(v, v, u) : vec3(u, v, v);
        }
        else
        {
                // cardano
-               u = cbrt(-q/2.0 + sqrt(D));
-               v = cbrt(-q/2.0 - sqrt(D));
-               return '1 1 1' * (u + v);
+               //u = cbrt(-q/2.0 + sqrt(D));
+               //v = cbrt(-q/2.0 - sqrt(D));
+               a = cbrt(-q/2.0 + sqrt(D)) + cbrt(-q/2.0 - sqrt(D));
+               return vec3(a, a, a);
        }
 }
 vector solve_cubic_abcd(float a, float b, float c, float d)
@@ -137,11 +131,7 @@ vector solve_cubic_abcd(float a, float b, float c, float d)
 
 vector findperpendicular(vector v)
 {
-       vector p;
-       p.x = v.z;
-       p.y = -v.x;
-       p.z = v.y;
-       return normalize(cliptoplane(p, v));
+       return normalize(cliptoplane(vec3(v.z, -v.x, v.y), v));
 }
 
 #ifdef SVQC
index 4f6177b478f17bc870366358618c21d44133f3a7..7f87388db13b3b1964a360597b45ea013b28373b 100644 (file)
 
 void W_Config_Queue_Swap(int root, int child, entity pass)
 {
-       string oldroot = wep_config_queue[root];
-       wep_config_queue[root] = wep_config_queue[child];
-       wep_config_queue[child] = oldroot;
+       string oldroot = config_queue[root];
+       config_queue[root] = config_queue[child];
+       config_queue[child] = oldroot;
 }
 
 float W_Config_Queue_Compare(int root, int child, entity pass)
 {
-       return strcmp(wep_config_queue[root], wep_config_queue[child]);
+       return strcmp(config_queue[root], config_queue[child]);
 }
 
 void Dump_Weapon_Settings()
@@ -28,8 +28,8 @@ void Dump_Weapon_Settings()
        FOREACH(Weapons, it != WEP_Null, {
                // step 1: clear the queue
                WEP_CONFIG_COUNT = 0;
-               for (int x = 0; x <= MAX_WEP_CONFIG; ++x)
-                       { wep_config_queue[x] = string_null; }
+               for (int x = 0; x <= MAX_CONFIG_SETTINGS; ++x)
+                       config_queue[x] = string_null;
 
                // step 2: build new queue
                it.wr_config(it);
@@ -44,7 +44,7 @@ void Dump_Weapon_Settings()
                        it.m_name,
                        ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) ? " (MUTATOR WEAPON)" : "")
                ));
-               for (int x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(wep_config_queue[x]); }
+               for (int x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(config_queue[x]); }
                WEP_CONFIG_WRITETOFILE("// }}}\n");
 
                // step 5: debug info
@@ -55,8 +55,8 @@ void Dump_Weapon_Settings()
 
        // clear queue now that we're finished
        WEP_CONFIG_COUNT = 0;
-       for(int x = 0; x <= MAX_WEP_CONFIG; ++x)
-               { wep_config_queue[x] = string_null; }
+       for(int x = 0; x <= MAX_CONFIG_SETTINGS; ++x)
+               config_queue[x] = string_null;
 
        // extra information
        LOG_INFO(sprintf("Totals: %d weapons, %d settings\n", totalweapons, totalsettings));
index 753147307b3a253e9fb86b5b056bcbdab222c096..9489843654f89db445a844973a14b6cd270f8e65 100644 (file)
@@ -9,12 +9,9 @@ void Dump_Weapon_Settings();
 int wep_config_file;
 bool wep_config_alsoprint;
 
-const int MAX_WEP_CONFIG = 256;
 int WEP_CONFIG_COUNT;
-string wep_config_queue[MAX_WEP_CONFIG];
-
 #define WEP_CONFIG_QUEUE(a) { \
-       wep_config_queue[WEP_CONFIG_COUNT] = a; \
+       config_queue[WEP_CONFIG_COUNT] = a; \
        ++WEP_CONFIG_COUNT; }
 
 #define WEP_CONFIG_WRITETOFILE(a) MACRO_BEGIN { \
index 69fcc1d07e508931746209e70f2f6a7815cef8d5..634fbf812cc8133ef060ec68c697eeeefd034ae5 100644 (file)
@@ -195,6 +195,7 @@ const int WEP_FLAG_MUTATORBLOCKED = 0x200; // hides from impulse 99 etc. (mutato
 const int WEP_TYPE_MELEE_PRI      = 0x400; // primary attack is melee swing (for animation)
 const int WEP_TYPE_MELEE_SEC      = 0x800; // secondary attack is melee swing (for animation)
 const int WEP_FLAG_DUALWIELD      = 0x1000; // weapon can be dual wiel