[nexuiz-commits] r8302 - in branches/nexuiz-2.0: . data data/gfx/hud data/maps data/maps/soylent data/maps/strength data/qcsrc/client data/qcsrc/common data/qcsrc/menu data/qcsrc/menu/item data/qcsrc/menu/nexuiz data/qcsrc/server data/qcsrc/server/bot data/qcsrc/server/vehicles data/sound/weapons misc/tools server/rcon2irc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Nov 21 09:34:06 EST 2009
Author: div0
Date: 2009-11-21 09:34:05 -0500 (Sat, 21 Nov 2009)
New Revision: 8302
Added:
branches/nexuiz-2.0/data/gfx/hud/sb_accuracy_bar.tga
branches/nexuiz-2.0/data/physicsLzd.cfg
branches/nexuiz-2.0/data/qcsrc/client/tuba.qc
branches/nexuiz-2.0/data/qcsrc/common/mathlib.qc
branches/nexuiz-2.0/data/qcsrc/common/mathlib.qh
branches/nexuiz-2.0/data/sound/weapons/gauntlet_fire.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-1.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-10.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-11.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-12.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-13.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-14.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-15.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-16.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-17.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-18.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-2.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-3.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-4.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-5.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-6.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-7.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-8.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-9.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote0.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote1.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote10.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote11.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote12.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote13.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote14.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote15.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote16.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote17.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote18.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote19.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote2.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote20.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote21.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote22.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote23.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote24.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote25.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote26.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote27.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote3.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote4.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote5.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote6.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote7.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote8.ogg
branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote9.ogg
branches/nexuiz-2.0/server/rcon2irc/showlogins.pl
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/balance.cfg
branches/nexuiz-2.0/data/balance25.cfg
branches/nexuiz-2.0/data/balanceHavoc.cfg
branches/nexuiz-2.0/data/balanceNexrun.cfg
branches/nexuiz-2.0/data/balanceSamual.cfg
branches/nexuiz-2.0/data/defaultNexuiz.cfg
branches/nexuiz-2.0/data/effectinfo.txt
branches/nexuiz-2.0/data/input-tuba.cfg
branches/nexuiz-2.0/data/maps/aggressor.mapinfo
branches/nexuiz-2.0/data/maps/aneurysm.mapinfo
branches/nexuiz-2.0/data/maps/basement.mapinfo
branches/nexuiz-2.0/data/maps/bleach.mapinfo
branches/nexuiz-2.0/data/maps/darkzone.mapinfo
branches/nexuiz-2.0/data/maps/desertfactory.mapinfo
branches/nexuiz-2.0/data/maps/dieselpower.mapinfo
branches/nexuiz-2.0/data/maps/downer.mapinfo
branches/nexuiz-2.0/data/maps/eggandbacon.mapinfo
branches/nexuiz-2.0/data/maps/evilspace.mapinfo
branches/nexuiz-2.0/data/maps/farewell.mapinfo
branches/nexuiz-2.0/data/maps/final_rage.mapinfo
branches/nexuiz-2.0/data/maps/reslimed.mapinfo
branches/nexuiz-2.0/data/maps/ruiner.mapinfo
branches/nexuiz-2.0/data/maps/runningman.mapinfo
branches/nexuiz-2.0/data/maps/runningman_1on1remix.mapinfo
branches/nexuiz-2.0/data/maps/silvercity.mapinfo
branches/nexuiz-2.0/data/maps/skyway.mapinfo
branches/nexuiz-2.0/data/maps/slimepit.mapinfo
branches/nexuiz-2.0/data/maps/soylent.bsp
branches/nexuiz-2.0/data/maps/soylent.mapinfo
branches/nexuiz-2.0/data/maps/soylent/lm_0000.tga
branches/nexuiz-2.0/data/maps/soylent/lm_0001.tga
branches/nexuiz-2.0/data/maps/soylent/lm_0002.tga
branches/nexuiz-2.0/data/maps/soylent/lm_0003.tga
branches/nexuiz-2.0/data/maps/soylent/lm_0004.tga
branches/nexuiz-2.0/data/maps/soylent/lm_0005.tga
branches/nexuiz-2.0/data/maps/starship.mapinfo
branches/nexuiz-2.0/data/maps/stormkeep.mapinfo
branches/nexuiz-2.0/data/maps/stormkeep2.mapinfo
branches/nexuiz-2.0/data/maps/strength.bsp
branches/nexuiz-2.0/data/maps/strength.mapinfo
branches/nexuiz-2.0/data/maps/strength/lm_0000.tga
branches/nexuiz-2.0/data/maps/strength/lm_0001.tga
branches/nexuiz-2.0/data/maps/strength/lm_0002.tga
branches/nexuiz-2.0/data/maps/strength/lm_0003.tga
branches/nexuiz-2.0/data/maps/strength/lm_0004.tga
branches/nexuiz-2.0/data/maps/strength/lm_0005.tga
branches/nexuiz-2.0/data/maps/strength/lm_0006.tga
branches/nexuiz-2.0/data/maps/strength/lm_0007.tga
branches/nexuiz-2.0/data/maps/strength/lm_0008.tga
branches/nexuiz-2.0/data/maps/strength/lm_0009.tga
branches/nexuiz-2.0/data/maps/strength/lm_0010.tga
branches/nexuiz-2.0/data/maps/strength/lm_0011.tga
branches/nexuiz-2.0/data/maps/strength/lm_0012.tga
branches/nexuiz-2.0/data/maps/strength/lm_0013.tga
branches/nexuiz-2.0/data/maps/strength/lm_0014.tga
branches/nexuiz-2.0/data/maps/strength/lm_0015.tga
branches/nexuiz-2.0/data/maps/strength/lm_0016.tga
branches/nexuiz-2.0/data/maps/strength/lm_0017.tga
branches/nexuiz-2.0/data/maps/strength/lm_0018.tga
branches/nexuiz-2.0/data/maps/strength/lm_0019.tga
branches/nexuiz-2.0/data/maps/strength/lm_0020.tga
branches/nexuiz-2.0/data/maps/strength/lm_0021.tga
branches/nexuiz-2.0/data/maps/strength/lm_0022.tga
branches/nexuiz-2.0/data/maps/strength/lm_0023.tga
branches/nexuiz-2.0/data/maps/strength/lm_0024.tga
branches/nexuiz-2.0/data/maps/strength/lm_0025.tga
branches/nexuiz-2.0/data/maps/strength/lm_0026.tga
branches/nexuiz-2.0/data/maps/strength/lm_0027.tga
branches/nexuiz-2.0/data/maps/toxic.mapinfo
branches/nexuiz-2.0/data/maps/warfare.mapinfo
branches/nexuiz-2.0/data/physics10.cfg
branches/nexuiz-2.0/data/physics11.cfg
branches/nexuiz-2.0/data/physics151.cfg
branches/nexuiz-2.0/data/physics151b.cfg
branches/nexuiz-2.0/data/physics16rc1.cfg
branches/nexuiz-2.0/data/physics20.cfg
branches/nexuiz-2.0/data/physics25.cfg
branches/nexuiz-2.0/data/physics26.cfg
branches/nexuiz-2.0/data/physicsCPMA.cfg
branches/nexuiz-2.0/data/physicsHavoc.cfg
branches/nexuiz-2.0/data/physicsNexrun.cfg
branches/nexuiz-2.0/data/physicsNexrun_dm.cfg
branches/nexuiz-2.0/data/physicsQ.cfg
branches/nexuiz-2.0/data/physicsQ2.cfg
branches/nexuiz-2.0/data/physicsQ2a.cfg
branches/nexuiz-2.0/data/physicsQ3.cfg
branches/nexuiz-2.0/data/physicsQBF.cfg
branches/nexuiz-2.0/data/physicsQBFplus.cfg
branches/nexuiz-2.0/data/physicsSamual.cfg
branches/nexuiz-2.0/data/physicsWarsow.cfg
branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg
branches/nexuiz-2.0/data/physicsWarsowDev.cfg
branches/nexuiz-2.0/data/qcsrc/client/Main.qc
branches/nexuiz-2.0/data/qcsrc/client/View.qc
branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc
branches/nexuiz-2.0/data/qcsrc/client/csqc_constants.qc
branches/nexuiz-2.0/data/qcsrc/client/miscfunctions.qc
branches/nexuiz-2.0/data/qcsrc/client/prandom.qc
branches/nexuiz-2.0/data/qcsrc/client/progs.src
branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
branches/nexuiz-2.0/data/qcsrc/client/teamradar.qc
branches/nexuiz-2.0/data/qcsrc/common/constants.qh
branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc
branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh
branches/nexuiz-2.0/data/qcsrc/common/util-pre.qh
branches/nexuiz-2.0/data/qcsrc/common/util.qc
branches/nexuiz-2.0/data/qcsrc/common/util.qh
branches/nexuiz-2.0/data/qcsrc/menu/item/listbox.c
branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_decibels.c
branches/nexuiz-2.0/data/qcsrc/menu/progs.src
branches/nexuiz-2.0/data/qcsrc/server/arena.qc
branches/nexuiz-2.0/data/qcsrc/server/bot/bot.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
branches/nexuiz-2.0/data/qcsrc/server/constants.qh
branches/nexuiz-2.0/data/qcsrc/server/defs.qh
branches/nexuiz-2.0/data/qcsrc/server/extensions.qh
branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
branches/nexuiz-2.0/data/qcsrc/server/movelib.qc
branches/nexuiz-2.0/data/qcsrc/server/nexball.qc
branches/nexuiz-2.0/data/qcsrc/server/progs.src
branches/nexuiz-2.0/data/qcsrc/server/scores.qc
branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc
branches/nexuiz-2.0/data/qcsrc/server/t_items.qc
branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
branches/nexuiz-2.0/data/qcsrc/server/vehicles/racer.qc
branches/nexuiz-2.0/data/qcsrc/server/vehicles/spiderbot.qc
branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc
branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc
branches/nexuiz-2.0/data/qcsrc/server/w_fireball.qc
branches/nexuiz-2.0/data/qcsrc/server/w_grenadelauncher.qc
branches/nexuiz-2.0/data/qcsrc/server/w_hagar.qc
branches/nexuiz-2.0/data/qcsrc/server/w_hlac.qc
branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc
branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc
branches/nexuiz-2.0/data/qcsrc/server/w_rocketlauncher.qc
branches/nexuiz-2.0/data/qcsrc/server/w_shotgun.qc
branches/nexuiz-2.0/data/qcsrc/server/w_tuba.qc
branches/nexuiz-2.0/data/vehicle_racer.cfg
branches/nexuiz-2.0/misc/tools/autoshader.sh
Log:
r8227 | div0 | 2009-11-07 14:42:13 -0500 (Sat, 07 Nov 2009) | 2 lines
add a crude version of <math.h> to QC
r8228 | div0 | 2009-11-07 14:44:31 -0500 (Sat, 07 Nov 2009) | 2 lines
put mathlib under MIT license
r8229 | div0 | 2009-11-07 14:45:52 -0500 (Sat, 07 Nov 2009) | 2 lines
comment fixes
r8230 | fruitiex | 2009-11-07 15:46:19 -0500 (Sat, 07 Nov 2009) | 2 lines
add accuracy stats to the scoreboard, replace accuracy percentage on hud weapon icons with colored bars
r8231 | fruitiex | 2009-11-07 16:12:34 -0500 (Sat, 07 Nov 2009) | 2 lines
show the accuracy stats panel even if there are no stats :P
r8232 | div0 | 2009-11-07 16:54:51 -0500 (Sat, 07 Nov 2009) | 7 lines
different probability distributions for spread (quake-style, solid circle, gaussian)
Currently, all is quake-style.
quake-style: http://rm.endoftheinternet.org/img/uploaded/6ad7218846a2a279987cbf230f6bab9e.jpg
circle: http://rm.endoftheinternet.org/img/uploaded/06ce7e1fa72bd651cd7a0fd0b23f689e.jpg
gaussian: http://rm.endoftheinternet.org/img/uploaded/8203aa325bc0bbce07d6329e97f44a35.jpg
The cvar doesn't change the standard deviation!
r8233 | div0 | 2009-11-07 17:21:45 -0500 (Sat, 07 Nov 2009) | 2 lines
yet another style: linear falloff
r8234 | div0 | 2009-11-07 17:26:37 -0500 (Sat, 07 Nov 2009) | 2 lines
fix comments :P
r8235 | samual | 2009-11-07 20:28:30 -0500 (Sat, 07 Nov 2009) | 1 line
Make the text of scoreboard table headers brighter
r8236 | fruitiex | 2009-11-08 02:51:26 -0500 (Sun, 08 Nov 2009) | 2 lines
fix team coloring on accuracy panel, add support for minstagib and do small cleanups
r8237 | fruitiex | 2009-11-08 03:35:12 -0500 (Sun, 08 Nov 2009) | 2 lines
enable gauss 2D spread, double bullet count on shotgun and do some other minor balance changes
r8238 | div0 | 2009-11-08 03:45:44 -0500 (Sun, 08 Nov 2009) | 2 lines
now with REAL linear falloff (old formula was wrong)
r8239 | div0 | 2009-11-08 04:14:31 -0500 (Sun, 08 Nov 2009) | 2 lines
add back the falloff curve that was MEANT to be linear before :P
r8240 | div0 | 2009-11-08 05:23:04 -0500 (Sun, 08 Nov 2009) | 2 lines
fix stddev of gaussian dist
r8242 | tzork | 2009-11-08 06:21:23 -0500 (Sun, 08 Nov 2009) | 3 lines
Racer: return to spawn if left ("alive")for some time, rockets accelerate, better idle code, better spawn location code, turn more cvars to globals
Spiderbot: minor stuff.
r8243 | div0 | 2009-11-08 07:23:38 -0500 (Sun, 08 Nov 2009) | 2 lines
simpler gaussian distribution code
r8244 | div0 | 2009-11-08 07:27:44 -0500 (Sun, 08 Nov 2009) | 2 lines
get rid of sqrt2 hardcoded
r8245 | div0 | 2009-11-08 07:28:16 -0500 (Sun, 08 Nov 2009) | 2 lines
redundant redundant M_PI
r8246 | m0rfar | 2009-11-08 07:36:59 -0500 (Sun, 08 Nov 2009) | 1 line
fixing insignificant z-fighting on soylent. bug #448
r8247 | samual | 2009-11-08 12:40:59 -0500 (Sun, 08 Nov 2009) | 1 line
g_nodepthtestplayers -- Allows you to disable depth testing on players using EF_NODEPTHTESTING -- Basically, it's a server side wallhack.
r8248 | div0 | 2009-11-08 12:43:37 -0500 (Sun, 08 Nov 2009) | 2 lines
fix some mathlib bugs
r8249 | div0 | 2009-11-08 12:48:03 -0500 (Sun, 08 Nov 2009) | 2 lines
fix warning
r8250 | div0 | 2009-11-08 12:52:28 -0500 (Sun, 08 Nov 2009) | 2 lines
fix some constants
r8251 | div0 | 2009-11-08 13:03:28 -0500 (Sun, 08 Nov 2009) | 2 lines
log() function is now a builtin (this means we need the current engine if any code uses log())
r8252 | div0 | 2009-11-08 13:05:33 -0500 (Sun, 08 Nov 2009) | 2 lines
remove log and exp from gamecommand again as log is dangerous for now
r8253 | m0rfar | 2009-11-08 13:08:16 -0500 (Sun, 08 Nov 2009) | 1 line
compiled now. fixed #589, overcaulked lift on strength
r8254 | samual | 2009-11-08 13:20:44 -0500 (Sun, 08 Nov 2009) | 1 line
g_nodepthtestitems -- Allows you to disable depth testing on items using EF_NODEPTHTESTING - just like g_nodepthtestplayers! :P :P :P
r8255 | div0 | 2009-11-08 14:09:23 -0500 (Sun, 08 Nov 2009) | 2 lines
logarithm
r8256 | div0 | 2009-11-08 14:10:45 -0500 (Sun, 08 Nov 2009) | 2 lines
make it work even if someone changes the files :P
r8257 | div0 | 2009-11-08 14:11:18 -0500 (Sun, 08 Nov 2009) | 2 lines
remove debug print
r8258 | div0 | 2009-11-08 14:30:32 -0500 (Sun, 08 Nov 2009) | 2 lines
fix checkextension decl
r8259 | div0 | 2009-11-08 14:54:24 -0500 (Sun, 08 Nov 2009) | 2 lines
work around fteqcc bug
r8260 | div0 | 2009-11-09 02:25:55 -0500 (Mon, 09 Nov 2009) | 2 lines
fix running guns
r8261 | fruitiex | 2009-11-09 02:30:08 -0500 (Mon, 09 Nov 2009) | 2 lines
flip column/row highligthing, remove the blinking text from warmup (accuracy panel)
r8262 | div0 | 2009-11-09 02:36:49 -0500 (Mon, 09 Nov 2009) | 2 lines
better isnan()
r8263 | div0 | 2009-11-09 04:10:29 -0500 (Mon, 09 Nov 2009) | 2 lines
more waits :P
r8264 | fruitiex | 2009-11-10 00:01:40 -0500 (Tue, 10 Nov 2009) | 2 lines
balance changes
r8265 | fruitiex | 2009-11-10 14:48:21 -0500 (Tue, 10 Nov 2009) | 2 lines
fix division by zero
r8266 | fruitiex | 2009-11-10 14:58:28 -0500 (Tue, 10 Nov 2009) | 2 lines
REALLY fix it this time.
r8267 | fruitiex | 2009-11-10 16:28:20 -0500 (Tue, 10 Nov 2009) | 2 lines
Commit the new clan arena mod, as well as make the unbalanced team nagger optional via a serverside cvar (default on). Also do tiny balance changes to the nexrun balance... again ;)
r8268 | fruitiex | 2009-11-10 16:29:50 -0500 (Tue, 10 Nov 2009) | 2 lines
update cvar checksums
r8269 | fruitiex | 2009-11-11 08:36:28 -0500 (Wed, 11 Nov 2009) | 2 lines
clean up CA and add some standard CA stuff like starting with all weapons and ammo types (uses the balance cvars of lms), no friendly fire, no selfdamage
r8270 | div0 | 2009-11-11 15:24:43 -0500 (Wed, 11 Nov 2009) | 5 lines
WAY better tuba thanks to CSQC magic.
Try exec input-tuba.cfg, then tuba_staccato, then play with MIDI keyboard. Now all I need is splitting up the tuba samples into start+loop- and end-files, and we can hold notes for any time we want :P but even now it's already way better, as you can hit notes at (almost) any speed you want. Still no polyphony yet, but CSQC side supports it :P
Also fix a warning in mathlib.
r8271 | div0 | 2009-11-11 15:25:44 -0500 (Wed, 11 Nov 2009) | 2 lines
oops, needed to lower tuba damage/force then :P
r8272 | div0 | 2009-11-11 16:03:57 -0500 (Wed, 11 Nov 2009) | 2 lines
add comment
r8273 | div0 | 2009-11-11 16:05:30 -0500 (Wed, 11 Nov 2009) | 2 lines
more fixing :P
r8274 | samual | 2009-11-12 12:17:43 -0500 (Thu, 12 Nov 2009) | 1 line
Update physicsSamual.cfg, and add sv_stopspeed to all config files --- Also add physicsLzd.cfg
r8275 | fruitiex | 2009-11-12 14:34:24 -0500 (Thu, 12 Nov 2009) | 2 lines
rcon2irc plugin: allow people to view who (tries to) log in to the irc admin feature
r8276 | div0 | 2009-11-14 04:03:49 -0500 (Sat, 14 Nov 2009) | 2 lines
change a shot origin error to warning
r8277 | lordhavoc | 2009-11-14 09:56:36 -0500 (Sat, 14 Nov 2009) | 2 lines
enable spread on weapons
r8279 | fruitiex | 2009-11-14 15:28:58 -0500 (Sat, 14 Nov 2009) | 2 lines
fix friendlyfire check in ca, add ca support for silvercity
r8280 | samual | 2009-11-14 16:22:31 -0500 (Sat, 14 Nov 2009) | 1 line
physicsSamual.cfg: Change sv_accelerate value from 5.5 to 7
r8281 | div0 | 2009-11-14 17:25:17 -0500 (Sat, 14 Nov 2009) | 2 lines
has_alpha function in autoshader.sh: also detect foo_alpha.jpg files
r8282 | div0 | 2009-11-14 17:56:16 -0500 (Sat, 14 Nov 2009) | 2 lines
document getextresponse
r8283 | div0 | 2009-11-14 17:59:20 -0500 (Sat, 14 Nov 2009) | 2 lines
match up documentation because it now uses double quotes
r8284 | div0 | 2009-11-14 18:03:55 -0500 (Sat, 14 Nov 2009) | 2 lines
sync extensions
r8285 | div0 | 2009-11-14 18:28:21 -0500 (Sat, 14 Nov 2009) | 2 lines
fix typo
r8286 | div0 | 2009-11-15 07:03:26 -0500 (Sun, 15 Nov 2009) | 2 lines
way improved tuba config (also with keyboard support on bindmaps 3 and 4)
r8287 | fruitiex | 2009-11-15 09:57:52 -0500 (Sun, 15 Nov 2009) | 2 lines
add us dvorak to input-tuba.cfg :P
r8288 | div0 | 2009-11-15 14:15:39 -0500 (Sun, 15 Nov 2009) | 2 lines
more tuba goodness (audio files only)
r8289 | div0 | 2009-11-15 16:04:14 -0500 (Sun, 15 Nov 2009) | 2 lines
tuba: great new code that can hold notes
r8290 | div0 | 2009-11-16 02:47:47 -0500 (Mon, 16 Nov 2009) | 2 lines
slightly improved tuba note handling
r8291 | fruitiex | 2009-11-16 16:47:45 -0500 (Mon, 16 Nov 2009) | 2 lines
Patch by Spaceman: Allow viewing the accuracy stats of spectated players (client and serverside setting, default off)
r8292 | fruitiex | 2009-11-17 15:29:27 -0500 (Tue, 17 Nov 2009) | 2 lines
patch by Spaceman: bots send accuracy data but never receive it, add an escape "v" for accuracy
r8293 | fruitiex | 2009-11-17 15:50:03 -0500 (Tue, 17 Nov 2009) | 2 lines
add cvar: sbar_timer_scale which allows scaling the timer
r8294 | fruitiex | 2009-11-18 13:56:38 -0500 (Wed, 18 Nov 2009) | 2 lines
experimental lightningun, used in the nexrun balance
r8295 | fruitiex | 2009-11-18 14:03:01 -0500 (Wed, 18 Nov 2009) | 2 lines
use crylink_fire2.wav instead, sounds much better when spammed like this :p
r8296 | fruitiex | 2009-11-19 13:36:36 -0500 (Thu, 19 Nov 2009) | 2 lines
experimental gauntlet, use it in nexrun, do a small lg tweak for the nexrun balance
r8297 | fruitiex | 2009-11-19 13:43:14 -0500 (Thu, 19 Nov 2009) | 2 lines
precache the gauntlet sound
r8298 | mrbougo | 2009-11-19 14:19:37 -0500 (Thu, 19 Nov 2009) | 1 line
FruitieX, you broek mah effects! I guess this was accidental, but don't add/remove effects in the middle of the file, only add at the end and purge unnecessary lines on unused effects while leaving the definition in place
r8299 | lordhavoc | 2009-11-19 16:32:41 -0500 (Thu, 19 Nov 2009) | 2 lines
fix a bug with ekg (players were not gibbing on death)
r8300 | div0 | 2009-11-21 09:28:03 -0500 (Sat, 21 Nov 2009) | 2 lines
fix minor typos in gauntlet and lighting gun code
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/.patchsets 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-8226
+revisions_applied = 1-7945,7948-7948,7951-8300
Modified: branches/nexuiz-2.0/data/balance.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/balance.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 1904952fd0d915f79ab4e6f0622abdb6
+set cvar_check_balance 729b07b9caa8a86c08841a0f4275e97d
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -177,6 +177,16 @@
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
set g_projectiles_newton_style_2_minfactor 0.7
set g_projectiles_newton_style_2_maxfactor 5
+set g_projectiles_spread_style 0
+// possible values:
+// 0: forward + solid sphere (like Quake) - varies velocity
+// 1: forward + flattened solid sphere
+// 2: forward + solid circle
+// 3: forward + normal distribution 3D - varies velocity
+// 4: forward + normal distribution on a plane
+// 5: forward + circle with 1-r falloff
+// 6: forward + circle with 1-r^2 falloff
+// 7: forward + circle with (1-r)(2-r) falloff
set g_balance_falldamage_deadminspeed 150
set g_balance_falldamage_minspeed 1400
set g_balance_falldamage_factor 0.15
@@ -220,17 +230,20 @@
set g_balance_laser_primary_force 400
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 9000
+set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.7
set g_balance_laser_primary_animtime 0.3
set g_balance_laser_primary_lifetime 30
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.05
+set g_balance_laser_gauntlet 0
set g_balance_laser_secondary 1 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_force 400
set g_balance_laser_secondary_radius 70
set g_balance_laser_secondary_speed 9000
+set g_balance_laser_secondary_spread 0
set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.3
set g_balance_laser_secondary_lifetime 30
@@ -278,6 +291,7 @@
set g_balance_grenadelauncher_primary_radius 140
set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 200
+set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.5
@@ -288,6 +302,7 @@
set g_balance_grenadelauncher_secondary_radius 140
set g_balance_grenadelauncher_secondary_speed 1400
set g_balance_grenadelauncher_secondary_speed_up 200
+set g_balance_grenadelauncher_secondary_spread 0
set g_balance_grenadelauncher_secondary_lifetime 0.3
set g_balance_grenadelauncher_secondary_refire 1
set g_balance_grenadelauncher_secondary_animtime 0.5
@@ -302,6 +317,7 @@
set g_balance_electro_primary_radius 90
set g_balance_electro_primary_comboradius 300
set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_spread 0
set g_balance_electro_primary_lifetime 30
set g_balance_electro_primary_refire 1
set g_balance_electro_primary_animtime 0.3
@@ -313,6 +329,7 @@
set g_balance_electro_secondary_radius 90
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
+set g_balance_electro_secondary_spread 0
set g_balance_electro_secondary_lifetime 1
set g_balance_electro_secondary_refire 0.3
set g_balance_electro_secondary_refire2 0
@@ -366,6 +383,8 @@
set g_balance_crylink_secondary_middle_fadetime 5
set g_balance_crylink_secondary_line_lifetime 0.1 // range: 700 full, fades to 2450
set g_balance_crylink_secondary_line_fadetime 0.25
+
+set g_balance_crylink_secondary_lightning 0
// }}}
// {{{ nex
set g_balance_nex_damage 60
@@ -519,14 +538,14 @@
set g_balance_campingrifle_secondary_burstcost 0.35
// }}}
// {{{ tuba
-set g_balance_tuba_refire 0.25
-set g_balance_tuba_animtime 0.25
+set g_balance_tuba_refire 0.05
+set g_balance_tuba_animtime 0.05
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_volume 1
-set g_balance_tuba_damage 25
+set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
-set g_balance_tuba_force 200
+set g_balance_tuba_force 40
// }}}
// {{{ fireball
set g_balance_fireball_primary_ammo 5
@@ -543,6 +562,7 @@
set g_balance_fireball_primary_refire 1.5
set g_balance_fireball_primary_speed 700
set g_balance_fireball_primary_speed_up 100
+set g_balance_fireball_primary_spread 0
set g_balance_fireball_secondary_ammo 15
set g_balance_fireball_secondary_animtime 0.15
set g_balance_fireball_secondary_bfgdamage 100
@@ -562,4 +582,5 @@
set g_balance_fireball_secondary_refire 3
set g_balance_fireball_secondary_refire2 6
set g_balance_fireball_secondary_speed 650
+set g_balance_fireball_secondary_spread 0
// }}}
Modified: branches/nexuiz-2.0/data/balance25.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance25.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/balance25.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 1904952fd0d915f79ab4e6f0622abdb6
+set cvar_check_balance 729b07b9caa8a86c08841a0f4275e97d
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -177,6 +177,16 @@
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
set g_projectiles_newton_style_2_minfactor 0.7
set g_projectiles_newton_style_2_maxfactor 5
+set g_projectiles_spread_style 0
+// possible values:
+// 0: forward + solid sphere (like Quake) - varies velocity
+// 1: forward + flattened solid sphere
+// 2: forward + solid circle
+// 3: forward + normal distribution 3D - varies velocity
+// 4: forward + normal distribution on a plane
+// 5: forward + circle with 1-r falloff
+// 6: forward + circle with 1-r^2 falloff
+// 7: forward + circle with (1-r)(2-r) falloff
set g_balance_falldamage_deadminspeed 150
set g_balance_falldamage_minspeed 1400
set g_balance_falldamage_factor 0.15
@@ -220,17 +230,20 @@
set g_balance_laser_primary_force 400
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 9000
+set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.7
set g_balance_laser_primary_animtime 0.3
set g_balance_laser_primary_lifetime 30
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
+set g_balance_laser_gauntlet 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_force 400
set g_balance_laser_secondary_radius 70
set g_balance_laser_secondary_speed 9000
+set g_balance_laser_secondary_spread 0
set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.3
set g_balance_laser_secondary_lifetime 30
@@ -278,6 +291,7 @@
set g_balance_grenadelauncher_primary_radius 140
set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 200
+set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.3
@@ -288,6 +302,7 @@
set g_balance_grenadelauncher_secondary_radius 140
set g_balance_grenadelauncher_secondary_speed 1400
set g_balance_grenadelauncher_secondary_speed_up 200
+set g_balance_grenadelauncher_secondary_spread 0
set g_balance_grenadelauncher_secondary_lifetime 2.5
set g_balance_grenadelauncher_secondary_refire 0.7
set g_balance_grenadelauncher_secondary_animtime 0.3
@@ -302,6 +317,7 @@
set g_balance_electro_primary_radius 150
set g_balance_electro_primary_comboradius 0
set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_spread 0
set g_balance_electro_primary_lifetime 30
set g_balance_electro_primary_refire 0.6
set g_balance_electro_primary_animtime 0.3
@@ -313,6 +329,7 @@
set g_balance_electro_secondary_radius 150
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
+set g_balance_electro_secondary_spread 0
set g_balance_electro_secondary_lifetime 5
set g_balance_electro_secondary_refire 0.3
set g_balance_electro_secondary_refire2 0
@@ -366,6 +383,8 @@
set g_balance_crylink_secondary_middle_fadetime 5
set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_line_fadetime 2
+
+set g_balance_crylink_secondary_lightning 0
// }}}
// {{{ nex
set g_balance_nex_damage 100
@@ -519,14 +538,14 @@
set g_balance_campingrifle_secondary_burstcost 0
// }}}
// {{{ tuba
-set g_balance_tuba_refire 0.25
-set g_balance_tuba_animtime 0.25
+set g_balance_tuba_refire 0.05
+set g_balance_tuba_animtime 0.05
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_volume 1
-set g_balance_tuba_damage 25
+set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
-set g_balance_tuba_force 200
+set g_balance_tuba_force 40
// }}}
// {{{ fireball
set g_balance_fireball_primary_ammo 5
@@ -543,6 +562,7 @@
set g_balance_fireball_primary_refire 1.5
set g_balance_fireball_primary_speed 700
set g_balance_fireball_primary_speed_up 100
+set g_balance_fireball_primary_spread 0
set g_balance_fireball_secondary_ammo 15
set g_balance_fireball_secondary_animtime 0.15
set g_balance_fireball_secondary_bfgdamage 200
@@ -562,4 +582,5 @@
set g_balance_fireball_secondary_refire 2
set g_balance_fireball_secondary_refire2 0
set g_balance_fireball_secondary_speed 650
+set g_balance_fireball_secondary_spread 0
// }}}
Modified: branches/nexuiz-2.0/data/balanceHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceHavoc.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/balanceHavoc.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 1904952fd0d915f79ab4e6f0622abdb6
+set cvar_check_balance 729b07b9caa8a86c08841a0f4275e97d
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -177,6 +177,16 @@
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
set g_projectiles_newton_style_2_minfactor 0.7
set g_projectiles_newton_style_2_maxfactor 5
+set g_projectiles_spread_style 0
+// possible values:
+// 0: forward + solid sphere (like Quake) - varies velocity
+// 1: forward + flattened solid sphere
+// 2: forward + solid circle
+// 3: forward + normal distribution 3D - varies velocity
+// 4: forward + normal distribution on a plane
+// 5: forward + circle with 1-r falloff
+// 6: forward + circle with 1-r^2 falloff
+// 7: forward + circle with (1-r)(2-r) falloff
set g_balance_falldamage_deadminspeed 150
set g_balance_falldamage_minspeed 1400
set g_balance_falldamage_factor 0.15
@@ -220,17 +230,20 @@
set g_balance_laser_primary_force 400
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 9000
+set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.7
set g_balance_laser_primary_animtime 0.3
set g_balance_laser_primary_lifetime 30
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
+set g_balance_laser_gauntlet 0
set g_balance_laser_secondary 1 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_force 400
set g_balance_laser_secondary_radius 70
set g_balance_laser_secondary_speed 9000
+set g_balance_laser_secondary_spread 0
set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.3
set g_balance_laser_secondary_lifetime 30
@@ -278,6 +291,7 @@
set g_balance_grenadelauncher_primary_radius 140
set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 200
+set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.5
@@ -288,6 +302,7 @@
set g_balance_grenadelauncher_secondary_radius 140
set g_balance_grenadelauncher_secondary_speed 1400
set g_balance_grenadelauncher_secondary_speed_up 200
+set g_balance_grenadelauncher_secondary_spread 0
set g_balance_grenadelauncher_secondary_lifetime 0.3
set g_balance_grenadelauncher_secondary_refire 1
set g_balance_grenadelauncher_secondary_animtime 0.5
@@ -302,6 +317,7 @@
set g_balance_electro_primary_radius 90
set g_balance_electro_primary_comboradius 300
set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_spread 0
set g_balance_electro_primary_lifetime 30
set g_balance_electro_primary_refire 1
set g_balance_electro_primary_animtime 0.3
@@ -313,6 +329,7 @@
set g_balance_electro_secondary_radius 90
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
+set g_balance_electro_secondary_spread 0
set g_balance_electro_secondary_lifetime 1
set g_balance_electro_secondary_refire 0.3
set g_balance_electro_secondary_refire2 0
@@ -366,6 +383,8 @@
set g_balance_crylink_secondary_middle_fadetime 5
set g_balance_crylink_secondary_line_lifetime 0.1 // range: 700 full, fades to 2450
set g_balance_crylink_secondary_line_fadetime 0.25
+
+set g_balance_crylink_secondary_lightning 0
// }}}
// {{{ nex
set g_balance_nex_damage 60
@@ -519,14 +538,14 @@
set g_balance_campingrifle_secondary_burstcost 0.35
// }}}
// {{{ tuba
-set g_balance_tuba_refire 0.25
-set g_balance_tuba_animtime 0.25
+set g_balance_tuba_refire 0.05
+set g_balance_tuba_animtime 0.05
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_volume 1
-set g_balance_tuba_damage 25
+set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
-set g_balance_tuba_force 200
+set g_balance_tuba_force 40
// }}}
// {{{ fireball
set g_balance_fireball_primary_ammo 5
@@ -543,6 +562,7 @@
set g_balance_fireball_primary_refire 1.5
set g_balance_fireball_primary_speed 700
set g_balance_fireball_primary_speed_up 100
+set g_balance_fireball_primary_spread 0
set g_balance_fireball_secondary_ammo 15
set g_balance_fireball_secondary_animtime 0.15
set g_balance_fireball_secondary_bfgdamage 100
@@ -562,4 +582,5 @@
set g_balance_fireball_secondary_refire 3
set g_balance_fireball_secondary_refire2 6
set g_balance_fireball_secondary_speed 650
+set g_balance_fireball_secondary_spread 0
// }}}
Modified: branches/nexuiz-2.0/data/balanceNexrun.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceNexrun.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/balanceNexrun.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 1904952fd0d915f79ab4e6f0622abdb6
+set cvar_check_balance 729b07b9caa8a86c08841a0f4275e97d
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -159,7 +159,7 @@
// }}}
// {{{ misc
-set g_balance_selfdamagepercent 1
+set g_balance_selfdamagepercent 0.75
set g_balance_weaponswitchdelay 0.1
set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
set g_weaponratefactor 1 "weapon fire rate multiplier"
@@ -178,6 +178,16 @@
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
set g_projectiles_newton_style_2_minfactor 0.7
set g_projectiles_newton_style_2_maxfactor 5
+set g_projectiles_spread_style 4
+// possible values:
+// 0: forward + solid sphere (like Quake) - varies velocity
+// 1: forward + flattened solid sphere
+// 2: forward + solid circle
+// 3: forward + normal distribution 3D - varies velocity
+// 4: forward + normal distribution on a plane
+// 5: forward + circle with 1-r falloff
+// 6: forward + circle with 1-r^2 falloff
+// 7: forward + circle with (1-r)(2-r) falloff
set g_balance_falldamage_deadminspeed 150
set g_balance_falldamage_minspeed 675
set g_balance_falldamage_factor 0.25
@@ -218,20 +228,23 @@
// {{{ laser
set g_balance_laser_primary_damage 22
set g_balance_laser_primary_edgedamage 0
-set g_balance_laser_primary_force 75
-set g_balance_laser_primary_radius 3
-set g_balance_laser_primary_speed 1500
-set g_balance_laser_primary_refire 0
+set g_balance_laser_primary_force 200
+set g_balance_laser_primary_radius 52
+set g_balance_laser_primary_speed 0
+set g_balance_laser_primary_spread 0
+set g_balance_laser_primary_refire 0.1
set g_balance_laser_primary_animtime 0.1
-set g_balance_laser_primary_lifetime 0.066
+set g_balance_laser_primary_lifetime 0
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
-set g_balance_laser_secondary 1 // when 1, a secondary laser mode exists
+set g_balance_laser_gauntlet 1
+set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 30
set g_balance_laser_secondary_edgedamage 0
set g_balance_laser_secondary_force 100
set g_balance_laser_secondary_radius 3
set g_balance_laser_secondary_speed 1500
+set g_balance_laser_secondary_spread 0
set g_balance_laser_secondary_refire 0
set g_balance_laser_secondary_animtime 0.15
set g_balance_laser_secondary_lifetime 0.066
@@ -239,18 +252,18 @@
set g_balance_laser_secondary_delay 0
// }}}
// {{{ shotgun
-set g_balance_shotgun_primary_bullets 18
-set g_balance_shotgun_primary_damage 7
-set g_balance_shotgun_primary_force 20
+set g_balance_shotgun_primary_bullets 36
+set g_balance_shotgun_primary_damage 3
+set g_balance_shotgun_primary_force 10
set g_balance_shotgun_primary_spread 0.18
set g_balance_shotgun_primary_refire 1
set g_balance_shotgun_primary_animtime 1
set g_balance_shotgun_primary_ammo 1
set g_balance_shotgun_primary_speed 12000
set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
-set g_balance_shotgun_secondary_bullets 18
+set g_balance_shotgun_secondary_bullets 22
set g_balance_shotgun_secondary_damage 2
-set g_balance_shotgun_secondary_force 20
+set g_balance_shotgun_secondary_force 12
set g_balance_shotgun_secondary_spread 0.25
set g_balance_shotgun_secondary_refire 1.5
set g_balance_shotgun_secondary_animtime 0.2
@@ -273,12 +286,13 @@
set g_balance_uzi_bulletconstant 115 // 13.1qu
// }}}
// {{{ mortar
-set g_balance_grenadelauncher_primary_damage 55
+set g_balance_grenadelauncher_primary_damage 60
set g_balance_grenadelauncher_primary_edgedamage 10
set g_balance_grenadelauncher_primary_force 250
-set g_balance_grenadelauncher_primary_radius 120
+set g_balance_grenadelauncher_primary_radius 100
set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 200
+set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 3
set g_balance_grenadelauncher_primary_refire 0.7
set g_balance_grenadelauncher_primary_animtime 0.6
@@ -289,11 +303,12 @@
set g_balance_grenadelauncher_secondary_radius 150
set g_balance_grenadelauncher_secondary_speed 1000
set g_balance_grenadelauncher_secondary_speed_up 0
-set g_balance_grenadelauncher_secondary_lifetime 2
+set g_balance_grenadelauncher_secondary_spread 0.05
+set g_balance_grenadelauncher_secondary_lifetime 1.2
set g_balance_grenadelauncher_secondary_refire 0.7
set g_balance_grenadelauncher_secondary_animtime 0.6
set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 50
+set g_balance_grenadelauncher_secondary_health 0
set g_balance_grenadelauncher_secondary_damageforcescale 0
// }}}
// {{{ electro
@@ -303,6 +318,7 @@
set g_balance_electro_primary_radius 80
set g_balance_electro_primary_comboradius 150
set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_spread 0
set g_balance_electro_primary_lifetime 3
set g_balance_electro_primary_refire 0.7
set g_balance_electro_primary_animtime 0.7
@@ -314,6 +330,7 @@
set g_balance_electro_secondary_radius 150
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
+set g_balance_electro_secondary_spread 0.05
set g_balance_electro_secondary_lifetime 2.5
set g_balance_electro_secondary_refire 0.1
set g_balance_electro_secondary_refire2 2
@@ -350,23 +367,25 @@
set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
set g_balance_crylink_primary_other_fadetime 0.25
-set g_balance_crylink_secondary_damage 5
+set g_balance_crylink_secondary_damage 8
set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -40
-set g_balance_crylink_secondary_radius 50
+set g_balance_crylink_secondary_force 30
+set g_balance_crylink_secondary_radius 1200
set g_balance_crylink_secondary_speed 3000
set g_balance_crylink_secondary_spread 0.02
set g_balance_crylink_secondary_shots 3
set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.1
-set g_balance_crylink_secondary_animtime 0.1
-set g_balance_crylink_secondary_ammo 1.5
+set g_balance_crylink_secondary_refire 0.066
+set g_balance_crylink_secondary_animtime 0.066
+set g_balance_crylink_secondary_ammo 0.66
set g_balance_crylink_secondary_bouncedamagefactor 0.5
set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_middle_fadetime 5
set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_line_fadetime 2
+
+set g_balance_crylink_secondary_lightning 1
// }}}
// {{{ nex
set g_balance_nex_damage 100
@@ -380,26 +399,26 @@
set g_balance_nex_damagefalloff_forcehalflife 1500
// }}}
// {{{ minstanex
-set g_balance_minstanex_refire 1.5
-set g_balance_minstanex_animtime 1.5
+set g_balance_minstanex_refire 1.25
+set g_balance_minstanex_animtime 1.25
set g_balance_minstanex_ammo 10
// }}}
// {{{ hagar
-set g_balance_hagar_primary_damage 13
+set g_balance_hagar_primary_damage 12
set g_balance_hagar_primary_edgedamage 5
set g_balance_hagar_primary_force 70
-set g_balance_hagar_primary_radius 90
+set g_balance_hagar_primary_radius 50
set g_balance_hagar_primary_spread 0
-set g_balance_hagar_primary_speed 2000
+set g_balance_hagar_primary_speed 1800
set g_balance_hagar_primary_lifetime 3
set g_balance_hagar_primary_refire 0.1
set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary_damage 12
-set g_balance_hagar_secondary_edgedamage 12
+set g_balance_hagar_secondary_damage 11
+set g_balance_hagar_secondary_edgedamage 11
set g_balance_hagar_secondary_force 60
set g_balance_hagar_secondary_radius 70
-set g_balance_hagar_secondary_spread 0.05
-set g_balance_hagar_secondary_speed 2000
+set g_balance_hagar_secondary_spread 0.2
+set g_balance_hagar_secondary_speed 1800
set g_balance_hagar_secondary_lifetime_min 0.1
set g_balance_hagar_secondary_lifetime_rand 0.05
set g_balance_hagar_secondary_refire 0.1
@@ -408,19 +427,19 @@
// {{{ rocketlauncher
set g_balance_rocketlauncher_damage 90
set g_balance_rocketlauncher_edgedamage 30
-set g_balance_rocketlauncher_force 400
-set g_balance_rocketlauncher_radius 90
+set g_balance_rocketlauncher_force 350
+set g_balance_rocketlauncher_radius 110
set g_balance_rocketlauncher_speed 1000
set g_balance_rocketlauncher_speedaccel 0
set g_balance_rocketlauncher_speedstart 1000
set g_balance_rocketlauncher_lifetime 3
-set g_balance_rocketlauncher_refire 1
+set g_balance_rocketlauncher_refire 0.9
set g_balance_rocketlauncher_animtime 0.8
set g_balance_rocketlauncher_ammo 3
set g_balance_rocketlauncher_health 0
set g_balance_rocketlauncher_damageforcescale 0
set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
+set g_balance_rocketlauncher_guiderate 80 // max degrees per second
set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
@@ -520,14 +539,14 @@
set g_balance_campingrifle_secondary_burstcost 0.35
// }}}
// {{{ tuba
-set g_balance_tuba_refire 0.25
-set g_balance_tuba_animtime 0.25
+set g_balance_tuba_refire 0.05
+set g_balance_tuba_animtime 0.05
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_volume 1
-set g_balance_tuba_damage 25
+set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
-set g_balance_tuba_force 200
+set g_balance_tuba_force 40
// }}}
// {{{ fireball
set g_balance_fireball_primary_ammo 5
@@ -543,6 +562,7 @@
set g_balance_fireball_primary_lifetime 7
set g_balance_fireball_primary_refire 2
set g_balance_fireball_primary_speed 900
+set g_balance_fireball_primary_spread 0
set g_balance_fireball_primary_speed_up 100
set g_balance_fireball_secondary_ammo 25
set g_balance_fireball_secondary_animtime 0.15
@@ -563,4 +583,5 @@
set g_balance_fireball_secondary_refire 0
set g_balance_fireball_secondary_refire2 4
set g_balance_fireball_secondary_speed 650
+set g_balance_fireball_secondary_spread 0
// }}}
Modified: branches/nexuiz-2.0/data/balanceSamual.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceSamual.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/balanceSamual.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 1904952fd0d915f79ab4e6f0622abdb6
+set cvar_check_balance 729b07b9caa8a86c08841a0f4275e97d
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
@@ -178,6 +178,16 @@
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
set g_projectiles_newton_style_2_minfactor 0.8
set g_projectiles_newton_style_2_maxfactor 1.5
+set g_projectiles_spread_style 0
+// possible values:
+// 0: forward + solid sphere (like Quake) - varies velocity
+// 1: forward + flattened solid sphere
+// 2: forward + solid circle
+// 3: forward + normal distribution 3D - varies velocity
+// 4: forward + normal distribution on a plane
+// 5: forward + circle with 1-r falloff
+// 6: forward + circle with 1-r^2 falloff
+// 7: forward + circle with (1-r)(2-r) falloff
set g_balance_falldamage_deadminspeed 150
set g_balance_falldamage_minspeed 1400
set g_balance_falldamage_factor 0.15
@@ -221,17 +231,20 @@
set g_balance_laser_primary_force 400
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 12000
+set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.7
set g_balance_laser_primary_animtime 0.3
set g_balance_laser_primary_lifetime 30
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
+set g_balance_laser_gauntlet 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_force 400
set g_balance_laser_secondary_radius 70
set g_balance_laser_secondary_speed 12000
+set g_balance_laser_secondary_spread 0
set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.3
set g_balance_laser_secondary_lifetime 30
@@ -279,6 +292,7 @@
set g_balance_grenadelauncher_primary_radius 140
set g_balance_grenadelauncher_primary_speed 2200
set g_balance_grenadelauncher_primary_speed_up 220
+set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.3
@@ -289,6 +303,7 @@
set g_balance_grenadelauncher_secondary_radius 140
set g_balance_grenadelauncher_secondary_speed 1400
set g_balance_grenadelauncher_secondary_speed_up 150
+set g_balance_grenadelauncher_secondary_spread 0
set g_balance_grenadelauncher_secondary_lifetime 1
set g_balance_grenadelauncher_secondary_refire 0.7
set g_balance_grenadelauncher_secondary_animtime 0.3
@@ -303,6 +318,7 @@
set g_balance_electro_primary_radius 150
set g_balance_electro_primary_comboradius 0
set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_spread 0
set g_balance_electro_primary_lifetime 30
set g_balance_electro_primary_refire 0.6
set g_balance_electro_primary_animtime 0.3
@@ -314,6 +330,7 @@
set g_balance_electro_secondary_radius 150
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
+set g_balance_electro_secondary_spread 0
set g_balance_electro_secondary_lifetime 2.5
set g_balance_electro_secondary_refire 0.2
set g_balance_electro_secondary_refire2 1
@@ -367,6 +384,8 @@
set g_balance_crylink_secondary_middle_fadetime 5
set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_line_fadetime 2
+
+set g_balance_crylink_secondary_lightning 0
// }}}
// {{{ nex
set g_balance_nex_damage 90
@@ -520,14 +539,14 @@
set g_balance_campingrifle_secondary_burstcost 0.35
// }}}
// {{{ tuba
-set g_balance_tuba_refire 0.25
-set g_balance_tuba_animtime 0.25
+set g_balance_tuba_refire 0.05
+set g_balance_tuba_animtime 0.05
set g_balance_tuba_attenuation 0.5
set g_balance_tuba_volume 1
-set g_balance_tuba_damage 25
+set g_balance_tuba_damage 5
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
-set g_balance_tuba_force 200
+set g_balance_tuba_force 40
// }}}
// {{{ fireball
set g_balance_fireball_primary_ammo 5
@@ -544,6 +563,7 @@
set g_balance_fireball_primary_refire 2
set g_balance_fireball_primary_speed 900
set g_balance_fireball_primary_speed_up 100
+set g_balance_fireball_primary_spread 0
set g_balance_fireball_secondary_ammo 25
set g_balance_fireball_secondary_animtime 0.15
set g_balance_fireball_secondary_bfgdamage 100
@@ -563,4 +583,5 @@
set g_balance_fireball_secondary_refire 0
set g_balance_fireball_secondary_refire2 4
set g_balance_fireball_secondary_speed 650
+set g_balance_fireball_secondary_spread 0
// }}}
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -26,7 +26,7 @@
seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
// default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default 9ede7a7edae0b7ae4c8b7e6517293a6a
+set cvar_check_default 489314f0011ead8255994194a02ab81a
// Nexuiz version (formatted for machines)
// used to determine if a client version is compatible
@@ -472,6 +472,8 @@
set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once <g_respawn_delay> seconds are over"
set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)"
set g_fullbrightitems 0 "brightens up items"
+set g_nodepthtestplayers 0 "disables depth testing on players"
+set g_nodepthtestitems 0 "disables depth testing on items"
set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"
set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"
set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"
@@ -561,6 +563,8 @@
set g_changeteam_banned 0 "not allowed to change team"
set g_changeteam_fragtransfer 0 "% of frags you get to keep when you change teams (rounded down)"
+set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"
+
// dm
set g_dm 1 "Deathmatch: killing any other player is one frag, player with most frags wins"
set gamecfg 1 // "deathmatch"
@@ -680,6 +684,12 @@
set g_arena_warmup 5 "time, newly spawned players have to prepare themselves in round based matches"
set g_arena_powerups 0 "enables powerups (superhealth, strength and shield), which are removed by default"
+// ca
+set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round."
+set g_ca_point_limit 10 "point limit 10 is standard for clan arena"
+set g_ca_point_leadlimit 0
+set g_ca_warmup 10 "how long the players will have time to run around the map before the round starts"
+
// onslaught
set g_onslaught 0 "Onslaught: take control points towards the enemy generator and then destroy it"
set g_onslaught_gen_health 5000
@@ -1257,6 +1267,11 @@
seta sbar_alpha_bg 0.8 "alpha value of the HUD background"
seta sbar_alpha_fg 1 "alpha value of the HUD foreground items"
seta sbar_border_thickness 1 "scoreboard border thickness"
+seta sbar_accuracy_border_thickness 1 "accuracy stats border thickness"
+seta sbar_accuracy_doublerows 0 "use two rows instead of one"
+seta sbar_accuracy_yellow 40 "percentage at which the accuracy color is yellow"
+seta sbar_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard"
+seta sbar_accuracy_hud 1 "0 = no weapon accuracy bar on the weapon icons"
seta sbar_color_bg_r 0 "red color component of the HUD background"
seta sbar_color_bg_g 0.25 "green color component of the HUD background"
seta sbar_color_bg_b 0.17 "blue color component of the HUD background"
@@ -1272,10 +1287,10 @@
seta sbar_scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
seta sbar_hudselector 1 "0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display"
seta sbar_pingrefreshinterval 10 "refesh interval of ping display in the scoreboard: range 1 - 60 (In seconds)"
-seta sbar_hud_accuracy 0 "1 = weapon accuracy on the weapon icons"
seta sbar_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
-seta sbar_increment_maptime 0 "1 = show elapsed time on the timer"
seta sbar_showweaponicons 1 "1 = show icons of weapons that you have"
+seta sbar_timer_increment 0 "1 = show elapsed time on the timer"
+seta sbar_timer_scale 1 "scale multiplier of the timer"
// for menu server list (eventually make them have engine support?)
seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
@@ -1601,6 +1616,7 @@
alias cl_hook_gamestart_rune
alias cl_hook_gamestart_lms
alias cl_hook_gamestart_arena
+alias cl_hook_gamestart_ca
alias cl_hook_gamestart_kh
alias cl_hook_gamestart_ons
alias cl_hook_gamestart_as
@@ -1619,6 +1635,7 @@
alias sv_hook_gamestart_rune
alias sv_hook_gamestart_lms
alias sv_hook_gamestart_arena
+alias sv_hook_gamestart_ca
alias sv_hook_gamestart_kh
alias sv_hook_gamestart_ons
alias sv_hook_gamestart_as
@@ -1666,3 +1683,9 @@
set sv_pitch_fixyaw 1 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0"
set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
+
+// weapon accuracy stats
+set sv_accuracy_data_share 1 "1 send weapon accuracy data statistics to spectating clients, depends on cl_accuracy_data_share"
+set sv_accuracy_data_send 1 "1 send weapon accuracy data statistics and improved score info to all the clients at the end of the match, depends on cl_accuracy_data_receive, 0 send the current 'player has won' to all the clients"
+set cl_accuracy_data_share 0 "1 share my weapon accuracy data statistics with other players, 0 keep my weapon accuracy data statistics hidden"
+set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the end of the match"
Modified: branches/nexuiz-2.0/data/effectinfo.txt
===================================================================
--- branches/nexuiz-2.0/data/effectinfo.txt 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/effectinfo.txt 2009-11-21 14:34:05 UTC (rev 8302)
@@ -4506,3 +4506,20 @@
velocityoffset 0 0 80
velocityjitter 256 256 256
velocitymultiplier -0.1
+
+
+// gauntlet laser
+// based off morphed's cl_gentle
+// used in qcsrc/server/w_laser.qc
+effect laser_gauntlet
+tex 43 43
+count 3
+type spark
+color 0xff00ff 0xff0000
+size 4 8
+sizeincrease 34
+alpha 128 128 292
+gravity 0
+airfriction 5
+liquidfriction 10
+velocityjitter 50 50 50
Copied: branches/nexuiz-2.0/data/gfx/hud/sb_accuracy_bar.tga (from rev 8300, trunk/data/gfx/hud/sb_accuracy_bar.tga)
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/input-tuba.cfg
===================================================================
--- branches/nexuiz-2.0/data/input-tuba.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/input-tuba.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -9,9 +9,12 @@
// run Nexuiz with:
// ./nexuiz -sndseqin 20:0 +exec input-tuba.cfg
// Then, grab a Tuba, then play notes on your MIDI keyboard!
-// You can toggle staccato/legato using the DP commands
-// ] tuba_staccato
-// ] tuba_legato
+//
+// If you have no keyboard input, you can map the tuba notes to your keyboard:
+// in_bindmap 3 0
+// for US keyboard layout, and
+// in_bindmap 4 0
+// for German keyboard layout
alias +tuba_l "+moveleft; +tuba_$*"
alias -tuba_l "-moveleft; -tuba_$*"
@@ -29,51 +32,236 @@
alias -tuba_1 "-attack"
alias +tuba_2 "+attack2"
alias -tuba_2 "-attack2"
+alias +tuba_! "echo cannot play this note, sorry"
+alias -tuba_! ""
+alias +tuba_ ""
+alias -tuba_ ""
-"alias" tuba_staccato "\"alias\" +tuba \"+tuba_$$$$*; wait; -tuba_$$$$*\"; \"alias\" -tuba \"\""
-"alias" tuba_legato "\"alias\" +tuba \"+tuba_$$$$*\"; \"alias\" -tuba \"-tuba_$$$$*\""
-tuba_legato
+set tuba_note_42 "l b c 1"
+set tuba_note_43 "b c 1"
+set tuba_note_44 "r b c 1"
+set tuba_note_45 "!"
+set tuba_note_46 "!"
+set tuba_note_47 "f r c 1"
+set tuba_note_48 "c 1"
+set tuba_note_49 "l b c 2"
+set tuba_note_50 "r c 1"
+set tuba_note_51 "f l c 1"
+set tuba_note_52 "f c 1"
+set tuba_note_53 "l c 1"
+set tuba_note_54 "l b 1"
+set tuba_note_55 "b 1"
+set tuba_note_56 "b r 1"
+set tuba_note_57 "r c 2"
+set tuba_note_58 "f l c 2"
+set tuba_note_59 "f r 1"
+set tuba_note_60 "1"
+set tuba_note_61 "l b 2"
+set tuba_note_62 "r 1"
+set tuba_note_63 "f l 1"
+set tuba_note_64 "f 1"
+set tuba_note_65 "l 1"
+set tuba_note_66 "f r 2"
+set tuba_note_67 "2"
+set tuba_note_68 "b r j 1"
+set tuba_note_69 "r 2"
+set tuba_note_70 "f l 2"
+set tuba_note_71 "f 2"
+set tuba_note_72 "l 2"
+set tuba_note_73 "l b j 2"
+set tuba_note_74 "r j 1"
+set tuba_note_75 "f l j 1"
+set tuba_note_76 "f j 1"
+set tuba_note_77 "l j 1"
+set tuba_note_78 "f r j 2"
+set tuba_note_79 "j 2"
+set tuba_note_80 "!"
+set tuba_note_81 "r j 2"
+set tuba_note_82 "f l j 2"
+set tuba_note_83 "f j 2"
+set tuba_note_84 "l j 2"
+set tuba_note_ ""
-bind MIDINOTE42 "+tuba l b c 1"
-bind MIDINOTE43 "+tuba b c 1"
-bind MIDINOTE44 "+tuba r b c 1"
-bind MIDINOTE45 "echo can't play this"
-bind MIDINOTE46 "echo can't play this"
-bind MIDINOTE47 "+tuba f r c 1"
-bind MIDINOTE48 "+tuba c 1"
-bind MIDINOTE49 "+tuba l b c 2"
-bind MIDINOTE50 "+tuba r c 1"
-bind MIDINOTE51 "+tuba f l c 1"
-bind MIDINOTE52 "+tuba f c 1"
-bind MIDINOTE53 "+tuba l c 1"
-bind MIDINOTE54 "+tuba l b 1"
-bind MIDINOTE55 "+tuba b 1"
-bind MIDINOTE56 "+tuba b r 1"
-bind MIDINOTE57 "+tuba r c 2"
-bind MIDINOTE58 "+tuba f l c 2"
-bind MIDINOTE59 "+tuba f r 1"
-bind MIDINOTE60 "+tuba 1"
-bind MIDINOTE61 "+tuba l b 2"
-bind MIDINOTE62 "+tuba r 1"
-bind MIDINOTE63 "+tuba f l 1"
-bind MIDINOTE64 "+tuba f 1"
-bind MIDINOTE65 "+tuba l 1"
-bind MIDINOTE66 "+tuba f r 2"
-bind MIDINOTE67 "+tuba 2"
-bind MIDINOTE68 "+tuba b r j 1"
-bind MIDINOTE69 "+tuba r 2"
-bind MIDINOTE70 "+tuba f l 2"
-bind MIDINOTE71 "+tuba f 2"
-bind MIDINOTE72 "+tuba l 2"
-bind MIDINOTE73 "+tuba l b j 2"
-bind MIDINOTE74 "+tuba r j 1"
-bind MIDINOTE75 "+tuba f l j 1"
-bind MIDINOTE76 "+tuba f j 1"
-bind MIDINOTE77 "+tuba l j 1"
-bind MIDINOTE78 "+tuba f r j 2"
-bind MIDINOTE79 "+tuba j 2"
-bind MIDINOTE80 "echo can't play this"
-bind MIDINOTE81 "+tuba r j 2"
-bind MIDINOTE82 "+tuba f l j 2"
-bind MIDINOTE83 "+tuba f j 2"
-bind MIDINOTE84 "+tuba l j 2"
+bind MIDINOTE42 "+tuba 42"
+bind MIDINOTE43 "+tuba 43"
+bind MIDINOTE44 "+tuba 44"
+bind MIDINOTE45 "+tuba 45"
+bind MIDINOTE46 "+tuba 46"
+bind MIDINOTE47 "+tuba 47"
+bind MIDINOTE48 "+tuba 48"
+bind MIDINOTE49 "+tuba 49"
+bind MIDINOTE50 "+tuba 50"
+bind MIDINOTE51 "+tuba 51"
+bind MIDINOTE52 "+tuba 52"
+bind MIDINOTE53 "+tuba 53"
+bind MIDINOTE54 "+tuba 54"
+bind MIDINOTE55 "+tuba 55"
+bind MIDINOTE56 "+tuba 56"
+bind MIDINOTE57 "+tuba 57"
+bind MIDINOTE58 "+tuba 58"
+bind MIDINOTE59 "+tuba 59"
+bind MIDINOTE60 "+tuba 60"
+bind MIDINOTE61 "+tuba 61"
+bind MIDINOTE62 "+tuba 62"
+bind MIDINOTE63 "+tuba 63"
+bind MIDINOTE64 "+tuba 64"
+bind MIDINOTE65 "+tuba 65"
+bind MIDINOTE66 "+tuba 66"
+bind MIDINOTE67 "+tuba 67"
+bind MIDINOTE68 "+tuba 68"
+bind MIDINOTE69 "+tuba 69"
+bind MIDINOTE70 "+tuba 70"
+bind MIDINOTE71 "+tuba 71"
+bind MIDINOTE72 "+tuba 72"
+bind MIDINOTE73 "+tuba 73"
+bind MIDINOTE74 "+tuba 74"
+bind MIDINOTE75 "+tuba 75"
+bind MIDINOTE76 "+tuba 76"
+bind MIDINOTE77 "+tuba 77"
+bind MIDINOTE78 "+tuba 78"
+bind MIDINOTE79 "+tuba 79"
+bind MIDINOTE80 "+tuba 80"
+bind MIDINOTE81 "+tuba 81"
+bind MIDINOTE82 "+tuba 82"
+bind MIDINOTE83 "+tuba 83"
+bind MIDINOTE84 "+tuba 84"
+
+// german keyboard layout for tuba
+in_bind 3 < "+tuba 48"
+in_bind 3 a "+tuba 49"
+in_bind 3 y "+tuba 50"
+in_bind 3 s "+tuba 51"
+in_bind 3 x "+tuba 52"
+in_bind 3 c "+tuba 53"
+in_bind 3 f "+tuba 54"
+in_bind 3 v "+tuba 55"
+in_bind 3 g "+tuba 56"
+in_bind 3 b "+tuba 57"
+in_bind 3 h "+tuba 58"
+in_bind 3 n "+tuba 59"
+in_bind 3 m "+tuba 60"
+in_bind 3 k "+tuba 61"
+in_bind 3 , "+tuba 62"
+in_bind 3 l "+tuba 63"
+in_bind 3 . "+tuba 64"
+in_bind 3 - "+tuba 65"
+in_bind 3 ä "+tuba 66"
+in_bind 3 shift "+tuba 67"
+in_bind 3 # "+tuba 68"
+in_bind 3 q "+tuba 60"
+in_bind 3 2 "+tuba 61"
+in_bind 3 w "+tuba 62"
+in_bind 3 3 "+tuba 63"
+in_bind 3 e "+tuba 64"
+in_bind 3 r "+tuba 65"
+in_bind 3 5 "+tuba 66"
+in_bind 3 t "+tuba 67"
+in_bind 3 6 "+tuba 68"
+in_bind 3 z "+tuba 69"
+in_bind 3 7 "+tuba 70"
+in_bind 3 u "+tuba 71"
+in_bind 3 i "+tuba 72"
+in_bind 3 9 "+tuba 73"
+in_bind 3 o "+tuba 74"
+in_bind 3 0 "+tuba 75"
+in_bind 3 p "+tuba 76"
+in_bind 3 ü "+tuba 77"
+in_bind 3 ' "+tuba 78"
+in_bind 3 + "+tuba 79"
+in_bind 3 backspace "+tuba 80"
+in_bind 3 enter "+tuba 81"
+
+// US keyboard layout for tuba
+in_bind 4 z "+tuba 48"
+in_bind 4 s "+tuba 49"
+in_bind 4 x "+tuba 50"
+in_bind 4 d "+tuba 51"
+in_bind 4 c "+tuba 52"
+in_bind 4 v "+tuba 53"
+in_bind 4 g "+tuba 54"
+in_bind 4 b "+tuba 55"
+in_bind 4 h "+tuba 56"
+in_bind 4 n "+tuba 57"
+in_bind 4 j "+tuba 58"
+in_bind 4 m "+tuba 59"
+in_bind 4 , "+tuba 60"
+in_bind 4 l "+tuba 61"
+in_bind 4 . "+tuba 62"
+in_bind 4 ";" "+tuba 63"
+in_bind 4 / "+tuba 64"
+in_bind 4 shift "+tuba 65"
+in_bind 4 "\\" "+tuba 66"
+in_bind 4 q "+tuba 60"
+in_bind 4 2 "+tuba 61"
+in_bind 4 w "+tuba 62"
+in_bind 4 3 "+tuba 63"
+in_bind 4 e "+tuba 64"
+in_bind 4 r "+tuba 65"
+in_bind 4 5 "+tuba 66"
+in_bind 4 t "+tuba 67"
+in_bind 4 6 "+tuba 68"
+in_bind 4 y "+tuba 69"
+in_bind 4 7 "+tuba 70"
+in_bind 4 u "+tuba 71"
+in_bind 4 i "+tuba 72"
+in_bind 4 9 "+tuba 73"
+in_bind 4 o "+tuba 74"
+in_bind 4 0 "+tuba 75"
+in_bind 4 p "+tuba 76"
+in_bind 4 [ "+tuba 77"
+in_bind 4 = "+tuba 78"
+in_bind 4 ] "+tuba 79"
+in_bind 4 backspace "+tuba 80"
+in_bind 4 enter "+tuba 81"
+
+// US dvorak layout for tuba
+in_bind 5 ";" "+tuba 48"
+in_bind 5 o "+tuba 49"
+in_bind 5 q "+tuba 50"
+in_bind 5 e "+tuba 51"
+in_bind 5 j "+tuba 52"
+in_bind 5 k "+tuba 53"
+in_bind 5 i "+tuba 54"
+in_bind 5 x "+tuba 55"
+in_bind 5 d "+tuba 56"
+in_bind 5 b "+tuba 57"
+in_bind 5 h "+tuba 58"
+in_bind 5 m "+tuba 59"
+in_bind 5 w "+tuba 60"
+in_bind 5 n "+tuba 61"
+in_bind 5 v "+tuba 62"
+in_bind 5 z "+tuba 63"
+in_bind 5 - "+tuba 64"
+in_bind 5 shift "+tuba 65"
+in_bind 5 "\\" "+tuba 66"
+in_bind 5 "'" "+tuba 60"
+in_bind 5 2 "+tuba 61"
+in_bind 5 , "+tuba 62"
+in_bind 5 3 "+tuba 63"
+in_bind 5 . "+tuba 64"
+in_bind 5 p "+tuba 65"
+in_bind 5 5 "+tuba 66"
+in_bind 5 y "+tuba 67"
+in_bind 5 6 "+tuba 68"
+in_bind 5 f "+tuba 69"
+in_bind 5 7 "+tuba 70"
+in_bind 5 g "+tuba 71"
+in_bind 5 c "+tuba 72"
+in_bind 5 9 "+tuba 73"
+in_bind 5 r "+tuba 74"
+in_bind 5 0 "+tuba 75"
+in_bind 5 l "+tuba 76"
+in_bind 5 [ "+tuba 77"
+in_bind 5 "/" "+tuba 78"
+in_bind 5 ] "+tuba 79"
+in_bind 5 backspace "+tuba 80"
+in_bind 5 enter "+tuba 81"
+
+set tuba_note ""
+alias tuba_stop_ ""
+alias +tuba_note "+tuba_${$1}"
+alias -tuba_note "-tuba_${$1}"
+alias tuba_start "+tuba_note tuba_note_$tuba_note"
+alias tuba_stop "-tuba_note tuba_note_$tuba_note; alias tuba_stop_$tuba_note \"\"; set tuba_note \"\""
+alias +tuba "tuba_stop; set tuba_note $1; tuba_start; alias tuba_stop_$1 tuba_stop"
+alias -tuba "tuba_stop_$1"
Modified: branches/nexuiz-2.0/data/maps/aggressor.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/aggressor.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/aggressor.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -13,3 +13,4 @@
type kh 1000 20 3
type rc 20 5 10 20
cdtrack 4
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/aneurysm.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/aneurysm.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/aneurysm.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -12,3 +12,4 @@
type kh 1000 30 2
type tdm 50 20 2
cdtrack 6
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/basement.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/basement.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/basement.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -10,3 +10,4 @@
type lms 9 20
type arena 10 20
cdtrack 4
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/bleach.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/bleach.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/bleach.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type kh 1000 20 3
cdtrack 8
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/darkzone.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/darkzone.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/darkzone.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -10,3 +10,4 @@
type lms 9 20
type arena 10 20
cdtrack 8
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/desertfactory.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/desertfactory.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/desertfactory.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -8,3 +8,4 @@
type lms 9 20
type arena 10 20
type kh 1000 20 2
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/dieselpower.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/dieselpower.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/dieselpower.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type kh 1000 20 3
cdtrack 15
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/downer.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/downer.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/downer.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type arena 10 20
cdtrack 8
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/eggandbacon.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/eggandbacon.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/eggandbacon.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -9,3 +9,4 @@
type lms 16 20
type arena 10 20
type ctf 300 20
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/evilspace.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/evilspace.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/evilspace.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -8,3 +8,4 @@
type lms 9 20
type arena 10 20
cdtrack 7
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/farewell.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/farewell.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/farewell.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type arena 10 20
cdtrack 5
size -1536 -832 -576 896 1152 768
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/final_rage.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/final_rage.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/final_rage.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type arena 10 20
cdtrack 7
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/reslimed.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/reslimed.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/reslimed.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -10,3 +10,4 @@
type rune 200 20
type lms 9 20
cdtrack 4
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/ruiner.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/ruiner.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/ruiner.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -12,3 +12,4 @@
cdtrack 11
clientsettemp_for_type all r_shadow_glossexponent 96
clientsettemp_for_type all r_shadow_glossintensity 2
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/runningman.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/runningman.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/runningman.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type arena 10 20
cdtrack 2
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/runningman_1on1remix.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/runningman_1on1remix.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/runningman_1on1remix.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -12,3 +12,4 @@
type arena 10 20
type kh 1000 20 3
cdtrack 2
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/silvercity.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/silvercity.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/silvercity.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -10,4 +10,5 @@
type rune 200 20
type lms 9 20
type kh 1000 20 3
+type ca 10 20
cdtrack 10
Modified: branches/nexuiz-2.0/data/maps/skyway.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/skyway.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/skyway.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type arena 10 20
type kh 1000 20 3
cdtrack 9
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/slimepit.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/slimepit.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/slimepit.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -10,3 +10,4 @@
type lms 9 20
type arena 10 20
cdtrack 4
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/soylent/lm_0000.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent/lm_0001.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent/lm_0002.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent/lm_0003.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent/lm_0004.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent/lm_0005.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent.bsp
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/soylent.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/soylent.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/soylent.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type arena 10 20
cdtrack 14
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/starship.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/starship.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/starship.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -10,3 +10,4 @@
type lms 9 20
type arena 10 20
cdtrack 16
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/stormkeep.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/stormkeep.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/stormkeep.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -13,3 +13,4 @@
type kh 1000 20 3
type tdm 50 20 2
cdtrack 6
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/stormkeep2.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/stormkeep2.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/stormkeep2.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -12,3 +12,4 @@
type kh 1000 20 3
type tdm 50 20 2
cdtrack 6
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0000.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0001.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0002.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0003.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0004.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0005.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0006.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0007.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0008.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0009.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0010.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0011.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0012.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0013.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0014.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0015.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0016.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0017.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0018.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0019.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0020.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0021.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0022.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0023.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0024.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0025.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0026.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength/lm_0027.tga
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength.bsp
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/strength.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/strength.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/strength.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type arena 10 20
type tdm 50 20 2
cdtrack 5
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/toxic.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/toxic.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/toxic.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type arena 10 20
cdtrack 3
+type ca 10 20
Modified: branches/nexuiz-2.0/data/maps/warfare.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/warfare.mapinfo 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/maps/warfare.mapinfo 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,3 +11,4 @@
type lms 9 20
type arena 10 20
cdtrack 6
+type ca 10 20
Modified: branches/nexuiz-2.0/data/physics10.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics10.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics10.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 100
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physics11.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics11.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics11.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 50
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physics151.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics151.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics151.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 50
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physics151b.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics151b.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics151b.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 25
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physics16rc1.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics16rc1.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics16rc1.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 50
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physics20.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics20.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics20.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 220
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physics25.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics25.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics25.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 220
+sv_stopspeed 100
sv_accelerate 8
sv_airaccelerate 5.5
sv_friction 7
Modified: branches/nexuiz-2.0/data/physics26.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics26.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physics26.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 220
+sv_stopspeed 100
sv_accelerate 8
sv_airaccelerate 5.5
sv_friction 7
Modified: branches/nexuiz-2.0/data/physicsCPMA.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsCPMA.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsCPMA.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 320
sv_maxairspeed 320
+sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 1
sv_friction 8
Modified: branches/nexuiz-2.0/data/physicsHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsHavoc.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsHavoc.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 220
+sv_stopspeed 100
sv_accelerate 8
sv_airaccelerate 5.5
sv_friction 7
Copied: branches/nexuiz-2.0/data/physicsLzd.cfg (from rev 8300, trunk/data/physicsLzd.cfg)
===================================================================
--- branches/nexuiz-2.0/data/physicsLzd.cfg (rev 0)
+++ branches/nexuiz-2.0/data/physicsLzd.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -0,0 +1,26 @@
+//LZD Physics Config v0.1
+//By PCLizard and Oh Hai :)
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 300
+sv_stopspeed 40
+sv_accelerate 15
+sv_airaccelerate 9
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 310
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0.35
+sv_airaccel_qw 0.95
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_aircontrol 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
\ No newline at end of file
Modified: branches/nexuiz-2.0/data/physicsNexrun.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsNexrun.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsNexrun.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -4,6 +4,7 @@
// CPMA: 320
sv_maxairspeed 400
// CPMA: 320
+sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 1
sv_friction 8
Modified: branches/nexuiz-2.0/data/physicsNexrun_dm.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsNexrun_dm.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsNexrun_dm.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,28 +1,29 @@
-// Nexrun tweaked to suit CPM
-sv_gravity 800
-sv_maxspeed 320
-// CPMA: 320
-sv_maxairspeed 320
-// CPMA: 320
-sv_accelerate 15
-sv_airaccelerate 1
-sv_friction 8
-edgefriction 1
-sv_stepheight 34
-// CPMA: 18
-sv_jumpvelocity 270
-sv_wateraccelerate 4
-sv_waterfriction 1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw 0.95
-// CPMA: 1
-sv_airstopaccelerate 2.5
-sv_airstrafeaccelerate 70
-sv_maxairstrafespeed 30
-sv_aircontrol 150
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
+// Nexrun tweaked to suit CPM
+sv_gravity 800
+sv_maxspeed 320
+// CPMA: 320
+sv_maxairspeed 320
+// CPMA: 320
+sv_stopspeed 100
+sv_accelerate 15
+sv_airaccelerate 1
+sv_friction 8
+edgefriction 1
+sv_stepheight 34
+// CPMA: 18
+sv_jumpvelocity 270
+sv_wateraccelerate 4
+sv_waterfriction 1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw 0.95
+// CPMA: 1
+sv_airstopaccelerate 2.5
+sv_airstrafeaccelerate 70
+sv_maxairstrafespeed 30
+sv_aircontrol 150
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
Modified: branches/nexuiz-2.0/data/physicsQ.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQ.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsQ.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 320
sv_maxairspeed 30
+sv_stopspeed 100
sv_accelerate 10
sv_airaccelerate 106.66666666666666666666
// it is 10 in Quake 1, but the Nexuiz player physics code does not 100% match an oddity of Quake 1, but matches Quake 2 and 3 more
Modified: branches/nexuiz-2.0/data/physicsQ2.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQ2.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsQ2.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 300
sv_maxairspeed 300
+sv_stopspeed 100
sv_accelerate 10
sv_airaccelerate 1
sv_friction 6
Modified: branches/nexuiz-2.0/data/physicsQ2a.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQ2a.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsQ2a.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 300
sv_maxairspeed 30
+sv_stopspeed 100
sv_accelerate 10
sv_airaccelerate 106.66666666666666666666
// it is 10 in Quake 2, but the Nexuiz player physics code does not 100% match an oddity of Quake 1, but matches Quake 2 and 3 more
Modified: branches/nexuiz-2.0/data/physicsQ3.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQ3.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsQ3.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 320
sv_maxairspeed 320
+sv_stopspeed 100
sv_accelerate 10
sv_airaccelerate 1
sv_friction 6
Modified: branches/nexuiz-2.0/data/physicsQBF.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQBF.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsQBF.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 250
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physicsQBFplus.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQBFplus.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsQBFplus.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 800
sv_maxspeed 400
sv_maxairspeed 220
+sv_stopspeed 100
sv_accelerate 5.5
sv_airaccelerate 5.5
sv_friction 5
Modified: branches/nexuiz-2.0/data/physicsSamual.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsSamual.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsSamual.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,12 +1,13 @@
sv_gravity 880
sv_maxspeed 420
sv_maxairspeed 235
-sv_accelerate 5.5
+sv_stopspeed 200
+sv_accelerate 7
sv_airaccelerate 6
sv_friction 4
edgefriction 0
sv_stepheight 34
-sv_jumpvelocity 355
+sv_jumpvelocity 330
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0.3
Modified: branches/nexuiz-2.0/data/physicsWarsow.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsWarsow.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsWarsow.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 850
sv_maxspeed 320
sv_maxairspeed 320
+sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 1
sv_friction 8
Modified: branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 850
sv_maxspeed 320
sv_maxairspeed 320
+sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 1
sv_friction 8
Modified: branches/nexuiz-2.0/data/physicsWarsowDev.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsWarsowDev.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/physicsWarsowDev.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -2,6 +2,7 @@
sv_gravity 850
sv_maxspeed 320
sv_maxairspeed 320
+sv_stopspeed 100
sv_accelerate 12
sv_airaccelerate 1
sv_friction 8
Modified: branches/nexuiz-2.0/data/qcsrc/client/Main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/Main.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/Main.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -134,6 +134,7 @@
Casings_Precache();
DamageInfo_Precache();
Announcer_Precache();
+ Tuba_Precache();
get_mi_min_max_texcoords(1); // try the CLEVER way first
minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
@@ -719,6 +720,13 @@
if(newspectatee_status != spectatee_status)
{
+ float i;
+ // clear the weapon accuracy stats
+ for(i = WEP_FIRST; i <= WEP_LAST; ++i) {
+ weapon_hits[i] = 0;
+ weapon_fired[i] = 0;
+ }
+
// clear race stuff
race_laptime = 0;
race_checkpointtime = 0;
@@ -825,6 +833,7 @@
case ENT_CLIENT_RANDOMSEED: Ent_RandomSeed(); break;
case ENT_CLIENT_WALL: Ent_Wall(); break;
case ENT_CLIENT_MODELEFFECT: Ent_ModelEffect(bIsNewEntity); break;
+ case ENT_CLIENT_TUBANOTE: Ent_TubaNote(bIsNewEntity); break;
default:
error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
break;
@@ -1050,6 +1059,11 @@
current_viewzoom = 0.6;
}
+void Net_TeamNagger()
+{
+ teamnagger = 1;
+}
+
// CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
// You must ALWAYS first acquire the temporary ID, which is sent as a byte.
// Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
@@ -1088,6 +1102,10 @@
Net_ReadNexgunBeamParticle();
bHandled = true;
break;
+ case TE_CSQC_TEAMNAGGER:
+ Net_TeamNagger();
+ bHandled = true;
+ break;
case TE_CSQC_LIGHTNINGARC:
Net_ReadLightningarc();
bHandled = true;
Modified: branches/nexuiz-2.0/data/qcsrc/client/View.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/View.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/View.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -122,18 +122,6 @@
}
float drawtime;
-
-float tan(float x)
-{
- return sin(x) / cos(x);
-}
-float atan2(float y, float x)
-{
- vector v;
- v = '1 0 0' * x + '0 1 0' * y;
- v = vectoangles(v);
- return v_y * 0.01745329251994329576;
-}
float avgspeed;
vector GetCurrentFov(float fov)
{
@@ -199,15 +187,15 @@
velocityzoom = bound(0, drawframetime / max(0.000000001, cvar_or("cl_velocityzoomtime", 0.3)), 1);
avgspeed = avgspeed * (1 - velocityzoom) + (vlen(pmove_vel) / 1000) * velocityzoom;
- velocityzoom = pow(2.718281828459, float2range11(avgspeed * -cvar_or("cl_velocityzoom", 0) / 1) * 1);
+ velocityzoom = exp(float2range11(avgspeed * -cvar_or("cl_velocityzoom", 0) / 1) * 1);
//print(ftos(avgspeed), " avgspeed, ", ftos(cvar_or("cl_velocityzoom", 0)), " cvar, ", ftos(velocityzoom), " return\n"); // for debugging
float frustumx, frustumy, fovx, fovy;
- frustumy = tan(fov * 0.00872664625997164788) * 0.75 * current_viewzoom * velocityzoom;
+ frustumy = tan(fov * M_PI / 360.0) * 0.75 * current_viewzoom * velocityzoom;
frustumx = frustumy * vid_width / vid_height / vid_pixelheight;
- fovx = atan2(frustumx, 1) / 0.00872664625997164788;
- fovy = atan2(frustumy, 1) / 0.00872664625997164788;
+ fovx = atan2(frustumx, 1) / M_PI * 360.0;
+ fovy = atan2(frustumy, 1) / M_PI * 360.0;
return '1 0 0' * fovx + '0 1 0' * fovy;
}
@@ -448,7 +436,7 @@
sbar_alpha_fg = cvar("sbar_alpha_fg" ) * (1 - cvar("_menu_alpha"));
sbar_currentammo = cvar("sbar_showcurrentammo");
sbar_hudselector = cvar("sbar_hudselector");
- sbar_hud_accuracy = cvar("sbar_hud_accuracy");
+ sbar_accuracy_hud = cvar_or("sbar_accuracy_hud", 1);
ColorTranslateMode = cvar("cl_stripcolorcodes");
activeweapon = getstati(STAT_SWITCHWEAPON);
f = cvar("teamplay");
@@ -922,8 +910,7 @@
// 0--1 floats. 1 = 100%, 0.6 = 50%.
float health, shield, energy, rockets;
- float i;
- vector p, pp;
+ vector p;
p = drawgetimagesize(SPIDER_CROSS);
p_x *= cvar_or("cl_vehicle_spiderbot_cross_size", 1);
Modified: branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/csqc_builtins.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -285,3 +285,13 @@
float(string s) tokenize_console = #514;
float(float i) argv_start_index = #515;
float(float i) argv_end_index = #516;
+
+float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
+float(float c) acos = #472; // returns angle in radians for a given cos() value, the result is in the range 0 to PI
+float(float t) atan = #473; // returns angle in radians for a given tan() value, the result is in the range -PI*0.5 to PI*0.5
+float(float c, float s) atan2 = #474; // returns angle in radians for a given cos() and sin() value pair, the result is in the range -PI to PI (this is identical to vectoyaw except it returns radians rather than degrees)
+float(float a) tan = #475; // returns tangent value (which is simply sin(a)/cos(a)) for the given angle in radians, the result is in the range -infinity to +infinity
+float DEG2RAD = 0.0174532925199432957692369076848861271344287188854172545609719144;
+float RAD2DEG = 57.2957795130823208767981548141051703324054724665643215491602438612;
+float PI = 3.1415926535897932384626433832795028841971693993751058209749445923;
+float log(float f) = #532;
Modified: branches/nexuiz-2.0/data/qcsrc/client/csqc_constants.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/csqc_constants.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/csqc_constants.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -136,7 +136,6 @@
const float TE_EXPLOSIONQUAD = 70;
// Math Constants
-const float M_PI = 3.14159265358979323846;
const float EXTRA_LOW = -99999999;
const float EXTRA_HIGH = 99999999;
Modified: branches/nexuiz-2.0/data/qcsrc/client/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/miscfunctions.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/miscfunctions.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -266,8 +266,6 @@
return false;
}
-float PI = 3.14159265359;
-float DEG2RAD = 0.01745329252;
vector rotate(vector v, float a)
{
vector w;
Modified: branches/nexuiz-2.0/data/qcsrc/client/prandom.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/prandom.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/prandom.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -5,7 +5,7 @@
float prandom()
{
float c;
- c = crc16(FALSE, strcat(ftos(prandom_seed), ftos(prandom_seed + 3.1415926535)));
+ c = crc16(FALSE, strcat(ftos(prandom_seed), ftos(prandom_seed + M_PI)));
prandom_seed = c;
#ifdef USE_PRANDOM_DEBUG
Modified: branches/nexuiz-2.0/data/qcsrc/client/progs.src
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/progs.src 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/progs.src 2009-11-21 14:34:05 UTC (rev 8302)
@@ -6,6 +6,7 @@
csqc_constants.qc
../common/constants.qh
csqc_builtins.qc
+../common/mathlib.qh
../common/util.qh
../common/items.qh
@@ -39,6 +40,7 @@
effects.qc
wall.qc
modeleffects.qc
+tuba.qc
//vehicles/spiderbot.qc
Main.qc
@@ -54,3 +56,5 @@
../common/gamecommand.qc
../common/mapinfo.qc
../common/items.qc
+
+../common/mathlib.qc
Modified: branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/sbar.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/sbar.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,6 +1,8 @@
void drawstringright(vector, string, vector, vector, float, float);
void drawstringcenter(vector, string, vector, vector, float, float);
+float teamnagger;
+
float weapon_hits[WEP_COUNT];
float weapon_fired[WEP_COUNT];
float weapon_number;
@@ -12,13 +14,14 @@
float sbar_alpha_bg;
float sbar_color_bg_team;
float sbar_border_thickness;
+float sbar_accuracy_border_thickness;
float sbar_scoreboard_alpha_bg;
float sbar_scoreboard_alpha_fg;
float sbar_scoreboard_highlight;
float sbar_scoreboard_highlight_alpha;
float sbar_scoreboard_highlight_alpha_self;
float sbar_hudselector;
-float sbar_hud_accuracy;
+float sbar_accuracy_hud;
float sbar_scoreboard_alpha_name;
float sbar_scoreboard_alpha_name_self;
@@ -48,6 +51,26 @@
MapVote_Draw();
}
+vector Sbar_AccuracyColor(float accuracy)
+{
+ vector color;
+ float yellow_accuracy = cvar("sbar_accuracy_yellow"); // value at which this function returns yellow
+ if(accuracy >= 100) {
+ color_x = 0;
+ color_y = 1;
+ }
+ else if(accuracy > yellow_accuracy) {
+ color_x = 1 - (accuracy-yellow_accuracy)/(100-yellow_accuracy); // red value between 1 -> 0
+ color_y = 1;
+ }
+ else {
+ color_x = 1;
+ color_y = accuracy/yellow_accuracy; // green value between 0 -> 1
+ }
+ color_z = 0;
+ return color;
+}
+
float weaponspace[10];
float weapon_first, weapon_last;
void Sbar_DrawWeapon_Clear()
@@ -84,7 +107,7 @@
color_x = color_y = color_z = value;
// width = 300, height = 100
- const float w_width = 24, w_height = 12, w_space = 2, font_size = 8;
+ const float w_width = 24, w_height = 12, w_space = 2, font_size = 8, accuracybar_height = 3;
sp = weaponspace[idx] + 1;
weaponspace[idx] = sp;
@@ -106,12 +129,14 @@
drawstring(pos, ftos(imp), vsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
// draw the weapon accuracy on the HUD
- if(sbar_hud_accuracy)
+ if(sbar_accuracy_hud)
{
- weapon_stats = rint(100*weapon_hit/weapon_damage);
- fill_colour_x = 1 - 0.015 * weapon_stats;
- fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
- drawstringright(pos + '22 0 0', strcat(ftos(weapon_stats),"%"), '6 6 0', fill_colour, sbar_alpha_fg, 0);
+ if(weapon_damage)
+ weapon_stats = floor(100 * weapon_hit / weapon_damage);
+
+ fill_colour = Sbar_AccuracyColor(weapon_stats);
+ if(weapon_damage)
+ drawpic(pos - '2 0 0' + '0 1 0' * (w_height - accuracybar_height), "gfx/hud/sb_accuracy_bar.tga", '1 0 0' * w_width + '0 1 0' * accuracybar_height, fill_colour, sbar_alpha_fg, DRAWFLAG_NORMAL);
}
}
@@ -1028,7 +1053,7 @@
if (mod(i,2))
drawfill(pos - '0 1 0' - sbar_fontsize_x / 2 * '1 0 0', column_dim, '0 0 0', sbar_scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
}
- drawstring(pos, sbar_title[i], sbar_fontsize, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(pos, sbar_title[i], sbar_fontsize, rgb * 1.5, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
pos_x += column_dim_x;
}
if(sbar_field[i] == SP_SEPARATOR)
@@ -1056,7 +1081,7 @@
tmp_x = stringwidth(sbar_title[i], FALSE);
tmp_x = (sbar_size[i] - tmp_x) * sbar_fontsize_x;
- drawstring(pos + tmp, sbar_title[i], sbar_fontsize, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(pos + tmp, sbar_title[i], sbar_fontsize, rgb * 1.5, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
pos_x -= sbar_fontsize_x;
}
}
@@ -1107,6 +1132,109 @@
return 0;
}
+float g_minstagib;
+float average_accuracy;
+vector Sbar_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
+{
+ float i;
+ float weapon_hit, weapon_damage, weapon_stats;
+ float fontsize = 40 * 1/3;
+ float weapon_cnt = 12;
+ float rows;
+ if(cvar("sbar_accuracy_doublerows"))
+ rows = 2;
+ else
+ rows = 1;
+ float height = 40;
+
+ if(warmup_stage)
+ {
+ return pos;
+ }
+
+ drawstring(pos, strcat("Accuracy stats (average ", ftos(average_accuracy), "%)"), sbar_fontsize, '1 1 1', sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ pos_y += 18;
+ vector tmp;
+ tmp_x = sbwidth;
+ tmp_y = height * rows;
+
+ drawpic_tiled(pos, "gfx/hud/sb_scoreboard_bg", bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawborderlines(sbar_accuracy_border_thickness, pos, tmp, '0 0 0', sbar_scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
+
+ // column highlighting
+ for(i = 0; i < weapon_cnt/rows; ++i)
+ {
+ if(!mod(i, 2))
+ drawfill(pos + '1 0 0' * (sbwidth/weapon_cnt) * rows * i, '0 1 0' * height * rows + '1 0 0' * (sbwidth/weapon_cnt) * rows, '0 0 0', sbar_scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
+ }
+
+ // row highlighting
+ for(i = 0; i < rows; ++i)
+ {
+ drawfill(pos + '0 1 0' * height * (2/3) + '0 1 0' * height * i, '1 0 0' * sbwidth + '0 1 0' * fontsize, '1 1 1', sbar_scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
+ }
+
+ drawfont = sbar_bigfont;
+ average_accuracy = 0;
+ float weapons_with_stats;
+ weapons_with_stats = 0;
+ if(rows == 2)
+ pos_x += sbwidth/weapon_cnt / 2;
+
+ if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
+ g_minstagib = 1; // TODO: real detection for minstagib?
+
+ for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ {
+ if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA || i == WEP_FIREBALL) // skip port-o-launch, nex || minstanex, tuba and fireball
+ continue;
+ weapon_hit = weapon_hits[i];
+ weapon_damage = weapon_fired[i];
+ if(weapon_damage)
+ weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
+ self = get_weaponinfo(i);
+ float weapon_alpha;
+
+ if(weapon_damage)
+ weapon_alpha = sbar_scoreboard_alpha_fg;
+ else
+ weapon_alpha = 0.2 * sbar_scoreboard_alpha_fg;
+
+ // weapon icon
+ drawpic(pos, strcat("gfx/hud/inv_weapon", ftos(i-1)), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+ // the accuracy
+ if(weapon_damage) {
+ weapons_with_stats += 1;
+ average_accuracy += weapon_stats; // store sum of all accuracies in average_accuracy
+
+ string s;
+ s = strcat(ftos(weapon_stats),"%");
+
+ float padding;
+ padding = ((sbwidth/weapon_cnt) - stringwidth(s, FALSE) * fontsize) / 2; // center the accuracy value
+
+ vector color;
+ color = Sbar_AccuracyColor(weapon_stats);
+ drawstring(pos + '1 0 0' * padding + '0 1 0' * height * (2/3), s, '1 1 0' * fontsize, color, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ }
+ pos_x += sbwidth/weapon_cnt * rows;
+ if(rows == 2 && i == 6) {
+ pos_x -= sbwidth;
+ pos_y += height;
+ }
+ }
+ drawfont = sbar_font;
+
+ if(weapons_with_stats)
+ average_accuracy = floor(average_accuracy / weapons_with_stats);
+
+ if(rows == 2)
+ pos_x -= sbwidth/weapon_cnt / 2;
+ pos_x -= sbwidth;
+ pos_y += height;
+ return pos;
+}
+
float lastpingstime;
float scoreboard_bottom;
float sbar_scoreboard_fade_alpha;
@@ -1175,7 +1303,7 @@
pos_y += sbar_fontsize_y;
drawfont = sbar_font;
-
+
// Draw the scoreboard
vector bg_size;
bg_size = drawgetimagesize("gfx/hud/sb_scoreboard_bg");
@@ -1221,6 +1349,12 @@
pos_y += 1.25 * sbar_fontsize_y;
}
}
+ else if(cvar("sbar_accuracy")) {
+ if(teamplay)
+ pos = Sbar_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
+ else
+ pos = Sbar_DrawScoreboardAccuracyStats(pos, rgb, bg_size);
+ }
tmp = pos + '0 1.5 0' * sbar_fontsize_y;
pos_y += 3 * sbar_fontsize_y;
@@ -1616,6 +1750,8 @@
topright = '0 0 0';
topright_x = vid_conwidth;
+ float scale;
+ scale = cvar("sbar_timer_scale");
timelimit = getstatf(STAT_TIMELIMIT);
timeleft = max(0, timelimit * 60 + getstatf(STAT_GAMESTARTTIME) - time);
@@ -1640,45 +1776,45 @@
seconds = elapsedTime - minutes*60;
}
if (minutes < 10)
- bgpos_x = topright_x - 54 - 17 - 12;
+ bgpos_x = topright_x - (54 + 17 + 12) * scale;
else if (minutes < 100) // nudge the timer background left if more digits are drawn
- bgpos_x = topright_x - 72 - 17 - 12;
+ bgpos_x = topright_x - (72 + 17 + 12) * scale;
else
- bgpos_x = topright_x - 90 - 17 - 12;
+ bgpos_x = topright_x - (90 + 17 + 12) * scale;
bgpos_y = 0;
bgpos_z = 0;
} else {
minutes = minutesLeft;
seconds = secondsLeft;
if (minutes == 0)
- bgpos_x = topright_x - 36 - 7 - 12;
+ bgpos_x = topright_x - (36 + 7 + 12) * scale;
else if (minutes < 10) // nudge the timer background left if more digits are drawn
- bgpos_x = topright_x - 54 - 17 - 12;
+ bgpos_x = topright_x - (54 + 17 + 12) * scale;
else if (minutes < 100)
- bgpos_x = topright_x - 72 - 17 - 12;
+ bgpos_x = topright_x - (72 + 17 + 12) * scale;
else
- bgpos_x = topright_x - 90 - 17 - 12;
+ bgpos_x = topright_x - (90 + 17 + 12) * scale;
bgpos_y = 0;
bgpos_z = 0;
}
if (cvar("viewsize") <= 100) { // draw timer background when viewsize <= 100
if (teamplay)
- drawpic(bgpos, "gfx/hud/sb_timerbg", '120 30 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color
+ drawpic(bgpos, "gfx/hud/sb_timerbg", '120 30 0' * scale, GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color
else {
color_x = cvar("sbar_color_bg_r");
color_y = cvar("sbar_color_bg_g");
color_z = cvar("sbar_color_bg_b");
- drawpic(bgpos, "gfx/hud/sb_timerbg", '120 30 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic(bgpos, "gfx/hud/sb_timerbg", '120 30 0' * scale, color, sbar_alpha_bg, DRAWFLAG_NORMAL);
}
}
if(minutesLeft >= 1 || cvar("sbar_increment_maptime") || timelimit == 0 || warmup_stage) {
- Sbar_DrawXNum(topright - '103 0 0' + '0 2 0', minutes, 3, 0, 18, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);
- drawpic(topright - '53 0 0' + '0 1 0', "gfx/hud/num_colon", '18 18 0', timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL);
+ Sbar_DrawXNum(topright - ('103 0 0' - '0 2 0') * scale, minutes, 3, 0, 18 * scale, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic(topright - ('53 0 0' - '0 1 0') * scale, "gfx/hud/num_colon", '18 18 0' * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL);
}
- Sbar_DrawXNum(topright - '36 0 0' - '3 0 0' + '0 2 0', seconds, -2, 0, 18, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);
+ Sbar_DrawXNum(topright - ('36 0 0' + '3 0 0' - '0 2 0') * scale, seconds, -2, 0, 18 * scale, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);
}
void CSQC_Strength_Timer() {
@@ -2094,6 +2230,7 @@
float left_border; // position where the weapons start, the description is in the border
vector fill_colour, fill_size;
vector pos;
+ vector border_colour;
float col_margin = 20; // pixels between the columns
float row_margin = 20; // pixels between the rows
@@ -2131,11 +2268,11 @@
weapon_hit = weapon_hits[i];
weapon_damage = weapon_fired[i];
self = get_weaponinfo(i);
+ border_colour = (i == activeweapon) ? '1 1 1' : '0 0 0'; // white or black border
- //if ((weapon_number != 42)) // print them all :)
if (weapon_damage) {
if (self.weapon_type == WEP_TYPE_SPLASH) {
- weapon_stats = bound(0, rint(100 * weapon_hit / weapon_damage), 100);
+ weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
fill_colour_x = 1 - 0.015 * weapon_stats;
fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
@@ -2166,7 +2303,7 @@
// background
drawpic(pos, "gfx/hud/sb_accuracy", fill_size , fill_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);
- drawborderlines(sbar_border_thickness, pos, fill_size, '0 0 0', sbar_alpha_bg, DRAWFLAG_NORMAL);
+ drawborderlines(sbar_border_thickness, pos, fill_size, border_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);
// the weapon
drawpic(pos, strcat("gfx/hud/inv_weapon", ftos(i-1)), '1 0.5 0' * fill_size_x , '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
@@ -2184,8 +2321,8 @@
drawstringright(pos + '4.5 0 0' * sbar_fontsize_x + '0 9 0' * sbar_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
++count_splash;
- } else if ((self.weapon_type == WEP_TYPE_HITSCAN) && (weapon_damage)) {
- weapon_stats = bound(0, rint(100 * weapon_hit / weapon_damage), 100);
+ } else if (self.weapon_type == WEP_TYPE_HITSCAN) {
+ weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
fill_colour_x = 1 - 0.015 * weapon_stats;
fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
@@ -2216,7 +2353,7 @@
// background
drawpic(pos, "gfx/hud/sb_accuracy", fill_size , fill_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);
- drawborderlines(sbar_border_thickness, pos, fill_size, '0 0 0', sbar_alpha_bg, DRAWFLAG_NORMAL);
+ drawborderlines(sbar_border_thickness, pos, fill_size, border_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);
// the weapon
drawpic(pos, strcat("gfx/hud/inv_weapon", ftos(i-1)), '1 0.5 0' * fill_size_x , '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
@@ -2325,6 +2462,7 @@
sbar_alpha_bg = cvar("sbar_alpha_bg") * (1 - cvar("_menu_alpha"));
sbar_border_thickness = bound(0, cvar("sbar_border_thickness"), 5);
+ sbar_accuracy_border_thickness = bound(0, cvar_or("sbar_accuracy_border_thickness", 1), 5);
sbar_color_bg_team = cvar("sbar_color_bg_team");
float i;
@@ -2333,12 +2471,12 @@
float stat_items, stat_weapons;
weapon_stats = getstati(STAT_DAMAGE_HITS);
- weapon_number = weapon_stats & 63;
- weapon_hits[weapon_number] = rint(weapon_stats / 64);
+ weapon_number = weapon_stats & 63;
+ weapon_hits[weapon_number] = floor(weapon_stats / 64);
- weapon_stats = getstati(STAT_DAMAGE_FIRED);
- weapon_number = weapon_stats & 63;
- weapon_fired[weapon_number] = rint(weapon_stats / 64);
+ weapon_stats = getstati(STAT_DAMAGE_FIRED);
+ weapon_number = weapon_stats & 63;
+ weapon_fired[weapon_number] = floor(weapon_stats / 64);
vector o; o = '1 0 0' * vid_conwidth;
o_y = 28; // move spectator text slightly down to prevent overlapping the timer
@@ -2466,7 +2604,7 @@
o = Sbar_DrawNoteLine(o, s);
}
}
- if(teamplay && !intermission && !spectatee_status)
+ if(teamplay && !intermission && !spectatee_status && gametype != GAME_CA && teamnagger)
{
entity tm;
float ts_min, ts_max;
Modified: branches/nexuiz-2.0/data/qcsrc/client/teamradar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/teamradar.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/client/teamradar.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -342,10 +342,10 @@
vector frame_origin, frame_size;
frame_origin = frame_size = '0 0 0';
- frame_origin_x = teamradar_origin2d_x - teamradar_size2d_x * 0.55859375;
- frame_origin_y = teamradar_origin2d_y - teamradar_size2d_y * 0.55859375;
- frame_size_x = teamradar_size2d_x * 1.1171875;
- frame_size_y = teamradar_size2d_y * 1.1171875;
+ frame_origin_x = teamradar_origin2d_x - teamradar_size2d_x * 0.55859375; // matches the picture
+ frame_origin_y = teamradar_origin2d_y - teamradar_size2d_y * 0.55859375; // matches the picture
+ frame_size_x = teamradar_size2d_x * 1.1171875; // matches the picture
+ frame_size_y = teamradar_size2d_y * 1.1171875; // matches the picture
drawpic(frame_origin, "gfx/ons-frame.tga", frame_size, '1 1 1', sbar_alpha_fg, 0);
drawpic(frame_origin, "gfx/ons-frame-team.tga", frame_size, rgb, sbar_alpha_fg, 0);
Copied: branches/nexuiz-2.0/data/qcsrc/client/tuba.qc (from rev 8300, trunk/data/qcsrc/client/tuba.qc)
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/tuba.qc (rev 0)
+++ branches/nexuiz-2.0/data/qcsrc/client/tuba.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -0,0 +1,70 @@
+#define TUBA_STARTNOTE(n) strcat((checkextension("DP_SND_SETPARAMS") ? "weapons/tuba_loopnote" : "weapons/tuba_note"), ftos(n), ".wav")
+.float cnt; // note
+
+void Ent_TubaNote_Think()
+{
+ self.cnt -= frametime * self.count * 3;
+ self.nextthink = time;
+ if(self.cnt <= 0)
+ {
+ sound(self, CHAN_PROJECTILE, "misc/null.wav", 0, 0);
+ remove(self);
+ }
+ else
+ sound(self, CHAN_PROJECTILE, "", self.cnt, cvar("g_balance_tuba_attenuation"));
+}
+
+void Ent_TubaNote_UpdateSound()
+{
+ self.enemy.cnt = bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1);
+ self.enemy.count = self.enemy.cnt;
+ sound(self.enemy, CHAN_PROJECTILE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, cvar("g_balance_tuba_attenuation"));
+}
+
+void Ent_TubaNote_StopSound()
+{
+ self.enemy.nextthink = time;
+ self.enemy = world;
+}
+
+void Ent_TubaNote(float bIsNew)
+{
+ float f, n;
+ f = ReadByte();
+ n = floor(f / 2) - 42;
+ if(n != self.cnt || bIsNew)
+ if(self.enemy)
+ Ent_TubaNote_StopSound();
+ if(!self.enemy)
+ {
+ self.enemy = spawn();
+ self.enemy.classname = "tuba_note";
+ bIsNew = TRUE;
+ }
+ if(f & 1)
+ {
+ self.enemy.origin_x = ReadCoord();
+ self.enemy.origin_y = ReadCoord();
+ self.enemy.origin_z = ReadCoord();
+ setorigin(self.enemy, self.enemy.origin);
+ }
+ self.think = Ent_TubaNote_StopSound;
+ self.entremove = Ent_TubaNote_StopSound;
+ self.enemy.think = Ent_TubaNote_Think;
+ self.enemy.nextthink = time + 10;
+ if(bIsNew)
+ {
+ self.cnt = n;
+ Ent_TubaNote_UpdateSound();
+ }
+}
+
+void Tuba_Precache()
+{
+ float i;
+ for(i = -18; i <= +27; ++i)
+ {
+ precache_sound(TUBA_STARTNOTE(i));
+ }
+ //precache_sound(""); // we want to change volume of existing sounds
+}
Modified: branches/nexuiz-2.0/data/qcsrc/common/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/constants.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/common/constants.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -38,6 +38,7 @@
const float GAME_RACE = 11;
const float GAME_NEXBALL = 12;
const float GAME_CTS = 13;
+const float GAME_CA = 14;
const float AS_STRING = 1;
const float AS_INT = 2;
@@ -50,6 +51,7 @@
const float TE_CSQC_ZCURVEPARTICLES = 103;
const float TE_CSQC_NEXGUNBEAMPARTICLE = 104;
const float TE_CSQC_LIGHTNINGARC = 105;
+const float TE_CSQC_TEAMNAGGER = 106;
const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@ -86,6 +88,7 @@
const float ENT_CLIENT_WALL = 20;
const float ENT_CLIENT_SPIDERBOT = 21;
const float ENT_CLIENT_MODELEFFECT = 22;
+const float ENT_CLIENT_TUBANOTE = 23;
const float ENT_CLIENT_TURRET = 40;
Modified: branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -405,8 +405,10 @@
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_RUNEMATCH; // Rune always works
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_LMS; // LMS always works
- if(spawnpoints >= 8 && diameter > 4096)
+ if(spawnpoints >= 8 && diameter > 4096) {
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_TEAM_DEATHMATCH;
+ MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CA;
+ }
if( diameter < 4096)
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_ARENA;
if(spawnpoints >= 12 && diameter > 5120)
@@ -525,6 +527,7 @@
else if(t == "rune") return MAPINFO_TYPE_RUNEMATCH;
else if(t == "lms") return MAPINFO_TYPE_LMS;
else if(t == "arena") return MAPINFO_TYPE_ARENA;
+ else if(t == "ca") return MAPINFO_TYPE_CA;
else if(t == "kh") return MAPINFO_TYPE_KEYHUNT;
else if(t == "as") return MAPINFO_TYPE_ASSAULT;
else if(t == "ons") return MAPINFO_TYPE_ONSLAUGHT;
@@ -699,6 +702,7 @@
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RUNEMATCH) fputs(fh, "type rune 200 20\n");
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_LMS) fputs(fh, "type lms 9 20\n");
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ARENA) fputs(fh, "type arena 10 20\n");
+ if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CA) fputs(fh, "type ca 10 20\n");
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEYHUNT) fputs(fh, "type kh 1000 20 3\n");
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ASSAULT) fputs(fh, "type as 20\n");
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE) fputs(fh, "type rc 20 5 7 15\n");
@@ -966,6 +970,8 @@
return MAPINFO_TYPE_LMS;
else if(cvar("g_arena"))
return MAPINFO_TYPE_ARENA;
+ else if(cvar("g_ca"))
+ return MAPINFO_TYPE_CA;
else if(cvar("g_keyhunt"))
return MAPINFO_TYPE_KEYHUNT;
else if(cvar("g_onslaught"))
@@ -1010,6 +1016,7 @@
case MAPINFO_TYPE_RUNEMATCH: return "g_runematch";
case MAPINFO_TYPE_LMS: return "g_lms";
case MAPINFO_TYPE_ARENA: return "g_arena";
+ case MAPINFO_TYPE_CA: return "g_ca";
case MAPINFO_TYPE_KEYHUNT: return "g_kh";
case MAPINFO_TYPE_ASSAULT: return "g_assault";
case MAPINFO_TYPE_ONSLAUGHT: return "g_onslaught";
@@ -1030,6 +1037,7 @@
cvar_set("g_runematch", (t == MAPINFO_TYPE_RUNEMATCH) ? "1" : "0");
cvar_set("g_lms", (t == MAPINFO_TYPE_LMS) ? "1" : "0");
cvar_set("g_arena", (t == MAPINFO_TYPE_ARENA) ? "1" : "0");
+ cvar_set("g_ca", (t == MAPINFO_TYPE_CA) ? "1" : "0");
cvar_set("g_keyhunt", (t == MAPINFO_TYPE_KEYHUNT) ? "1" : "0");
cvar_set("g_assault", (t == MAPINFO_TYPE_ASSAULT) ? "1" : "0");
cvar_set("g_onslaught", (t == MAPINFO_TYPE_ONSLAUGHT) ? "1" : "0");
Modified: branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -11,7 +11,8 @@
float MAPINFO_TYPE_KEYHUNT = 1024;
float MAPINFO_TYPE_NEXBALL = 2048;
float MAPINFO_TYPE_CTS = 4096;
-float MAPINFO_TYPE_ALL = 65535; // this has to include all above bits
+float MAPINFO_TYPE_CA = 8192;
+float MAPINFO_TYPE_ALL = 16383; // this has to include all above bits
float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps
Copied: branches/nexuiz-2.0/data/qcsrc/common/mathlib.qc (from rev 8300, trunk/data/qcsrc/common/mathlib.qc)
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/mathlib.qc (rev 0)
+++ branches/nexuiz-2.0/data/qcsrc/common/mathlib.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -0,0 +1,288 @@
+/*
+Copyright (c) 2009 Rudolf Polzer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+int fpclassify(float x)
+{
+ if(isnan(x))
+ return FP_NAN;
+ if(isinf(x))
+ return FP_INFINITE;
+ if(x == 0)
+ return FP_ZERO;
+ return FP_NORMAL;
+}
+int isfinite(float x)
+{
+ return !(isnan(x) || isinf(x));
+}
+int isinf(float x)
+{
+ return (x != 0) && (x + x == x);
+}
+int isnan(float x)
+{
+ return !(x + x == x + x);
+}
+int isnormal(float x)
+{
+ return isfinite(x);
+}
+int signbit(float x)
+{
+ return (x < 0);
+}
+
+float acosh(float x)
+{
+ return log(x + sqrt(x*x - 1));
+}
+float asinh(float x)
+{
+ return log(x + sqrt(x*x + 1));
+}
+float atanh(float x)
+{
+ return 0.5 * log((1+x) / (1-x));
+}
+float cosh(float x)
+{
+ return 0.5 * (exp(x) + exp(-x));
+}
+float sinh(float x)
+{
+ return 0.5 * (exp(x) - exp(-x));
+}
+float tanh(float x)
+{
+ return sinh(x) / cosh(x);
+}
+
+float exp(float x)
+{
+ return pow(M_E, x);
+}
+float exp2(float x)
+{
+ return pow(2, x);
+}
+float expm1(float x)
+{
+ return exp(x) - 1;
+}
+
+vector frexp(float x)
+{
+ vector v;
+ v_z = 0;
+ v_y = ilogb(x) + 1;
+ v_x = x / exp2(v_y);
+ return v;
+}
+int ilogb(float x)
+{
+ return floor(log2(fabs(x)));
+}
+float ldexp(float x, int e)
+{
+ return x * pow(2, e);
+}
+float log10(float x)
+{
+ return log(x) * M_LOG10E;
+}
+float log1p(float x)
+{
+ return log(x + 1);
+}
+float log2(float x)
+{
+ return log(x) * M_LOG2E;
+}
+float logb(float x)
+{
+ return floor(log2(fabs(x)));
+}
+vector modf(float f)
+{
+ return '1 0 0' * (f - trunc(f)) + '0 1 0' * trunc(f);
+}
+
+float scalbn(float x, int n)
+{
+ return x * pow(2, n);
+}
+
+float cbrt(float x)
+{
+ return copysign(pow(fabs(x), 1.0/3.0), x);
+}
+float hypot(float x, float y)
+{
+ return sqrt(x*x + y*y);
+}
+
+float erf(float x)
+{
+ // approximation taken from wikipedia
+ float y;
+ y = x*x;
+ return copysign(sqrt(1 - exp(-y * (1.273239544735163 + 0.14001228868667 * y) / (1 + 0.14001228868667 * y))), x);
+}
+float erfc(float x)
+{
+ return 1.0 - erf(x);
+}
+vector lgamma(float x)
+{
+ // TODO improve accuracy
+ if(!isfinite(x))
+ return fabs(x) * '1 0 0' + copysign(1, x) * '0 1 0';
+ if(x < 1 && x == floor(x))
+ return nan("gamma") * '1 1 1';
+ if(x < 0.1)
+ {
+ vector v;
+ v = lgamma(1.0 - x);
+ // reflection formula:
+ // gamma(1-z) * gamma(z) = pi / sin(pi*z)
+ // lgamma(1-z) + lgamma(z) = log(pi) - log(sin(pi*z))
+ // sign of gamma(1-z) = sign of gamma(z) * sign of sin(pi*z)
+ v_z = sin(M_PI * x);
+ v_x = log(M_PI) - log(fabs(v_z)) - v_x;
+ if(v_z < 0)
+ v_y = -v_y;
+ v_z = 0;
+ return v;
+ }
+ if(x < 1.1)
+ return lgamma(x + 1) - log(x) * '1 0 0';
+ x -= 1;
+ return (0.5 * log(2 * M_PI * x) + x * (log(x) - 1)) * '1 0 0' + '0 1 0';
+}
+float tgamma(float x)
+{
+ vector v;
+ v = lgamma(x);
+ return exp(v_x) * v_y;
+}
+
+float nearbyint(float x)
+{
+ return rint(x);
+}
+float trunc(float x)
+{
+ return (x>=0) ? floor(x) : ceil(x);
+}
+
+float fmod(float x, float y)
+{
+ return x - y * trunc(x / y);
+}
+float remainder(float x, float y)
+{
+ return x - y * rint(x / y);
+}
+vector remquo(float x, float y)
+{
+ vector v;
+ v_z = 0;
+ v_y = rint(x / y);
+ v_x = x - y * v_y;
+ return v;
+}
+
+float copysign(float x, float y)
+{
+ return fabs(x) * ((y>0) ? 1 : -1);
+}
+float nan(string tag)
+{
+ return sqrt(-1);
+}
+float nextafter(float x, float y)
+{
+ // TODO very crude
+ if(x == y)
+ return nan("nextafter");
+ if(x > y)
+ return -nextafter(-x, -y);
+ // now we know that x < y
+ // so we need the next number > x
+ float d, a, b;
+ d = max(fabs(x), 0.00000000000000000000001);
+ a = x + d;
+ do
+ {
+ d *= 0.5;
+ b = a;
+ a = x + d;
+ }
+ while(a != x);
+ return b;
+}
+float nexttoward(float x, float y)
+{
+ return nextafter(x, y);
+}
+
+float fdim(float x, float y)
+{
+ return max(x-y, 0);
+}
+float fmax(float x, float y)
+{
+ return max(x, y);
+}
+float fmin(float x, float y)
+{
+ return min(x, y);
+}
+float fma(float x, float y, float z)
+{
+ return x * y + z;
+}
+
+int isgreater(float x, float y)
+{
+ return x > y;
+}
+int isgreaterequal(float x, float y)
+{
+ return x >= y;
+}
+int isless(float x, float y)
+{
+ return x < y;
+}
+int islessequal(float x, float y)
+{
+ return x <= y;
+}
+int islessgreater(float x, float y)
+{
+ return x < y || x > y;
+}
+int isunordered(float x, float y)
+{
+ return !(x < y || x == y || x > y);
+}
Copied: branches/nexuiz-2.0/data/qcsrc/common/mathlib.qh (from rev 8300, trunk/data/qcsrc/common/mathlib.qh)
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/mathlib.qh (rev 0)
+++ branches/nexuiz-2.0/data/qcsrc/common/mathlib.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -0,0 +1,124 @@
+/*
+Copyright (c) 2009 Rudolf Polzer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+// <math.h>
+
+// The commented-out functions need no implementation because DarkPlaces offers
+// them as builtins. They are listed here anyway for completeness sake.
+
+#define int float
+
+#define FP_NAN 0
+#define FP_INFINITE 1
+#define FP_ZERO 2
+#define FP_SUBNORMAL 3
+#define FP_NORMAL 4
+int fpclassify(float x);
+int isfinite(float x);
+int isinf(float x);
+int isnan(float x);
+int isnormal(float x);
+int signbit(float x);
+
+//float acos(float x);
+//float asin(float x);
+//float atan(float x);
+//float atan2(float y, float x);
+//float cos(float x);
+//float sin(float x);
+//float tan(float x);
+
+float acosh(float x);
+float asinh(float x);
+float atanh(float x);
+float cosh(float x);
+float sinh(float x);
+float tanh(float x);
+
+float exp(float x);
+float exp2(float x);
+float expm1(float x);
+
+vector frexp(float x); // returns mantissa as _x, exponent as _y
+int ilogb(float x);
+float ldexp(float x, int e);
+//float log(float x);
+float log10(float x);
+float log1p(float x);
+float log2(float x);
+float logb(float x);
+vector modf(float f); // fraction as _x, integer as _y
+
+float scalbn(float x, int n);
+
+float cbrt(float x);
+//float fabs(float x);
+float hypot(float x, float y);
+//float pow(float x, float y);
+//float sqrt(float x, float y);
+
+float erf(float x);
+float erfc(float x);
+vector lgamma(float x); // value in _x, sign in _y
+float tgamma(float x);
+
+//float ceil(float x);
+//float floor(float x);
+float nearbyint(float x);
+//float rint(float x);
+//float round(float x);
+float trunc(float x);
+
+float fmod(float x, float y);
+float remainder(float x, float y);
+vector remquo(float x, float y);
+
+float copysign(float x, float y);
+float nan(string tag);
+float nextafter(float x, float y);
+float nexttoward(float x, float y);
+
+float fdim(float x, float y);
+float fmax(float x, float y);
+float fmin(float x, float y);
+float fma(float x, float y, float z);
+
+int isgreater(float x, float y);
+int isgreaterequal(float x, float y);
+int isless(float x, float y);
+int islessequal(float x, float y);
+int islessgreater(float x, float y);
+int isunordered(float x, float y);
+
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log_2 e */
+#define M_LOG10E 0.43429448190325182765 /* log_10 e */
+#define M_LN2 0.69314718055994530942 /* log_e 2 */
+#define M_LN10 2.30258509299404568402 /* log_e 10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
Modified: branches/nexuiz-2.0/data/qcsrc/common/util-pre.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util-pre.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/common/util-pre.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -0,0 +1,5 @@
+//float log(float x);
+#define log log_builtin \
+ #undef log \
+ /* turn the next use of "log" into a declaration of log_builtin */
+
Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,3 +1,43 @@
+// checkextension wrapper for log
+float sqrt(float f); // declared later
+float exp(float f); // declared later
+float pow(float f, float e); // declared later
+float checkextension(string s); // declared later
+float log_synth(float f)
+{
+ float p, l;
+ if(f < 0)
+ return sqrt(-1); // nan? -inf?
+ if(f == 0)
+ return sqrt(-1); // ACTUALLY this should rather be -inf, but we cannot create a +inf in QC
+ if(f + f == f)
+ return l; // +inf
+ if(f < 1)
+ {
+ f = 1 / f;
+ p = -1;
+ }
+ else
+ p = 1;
+ while(f > 2)
+ {
+ f = sqrt(f);
+ p *= 2;
+ }
+ // two steps are good enough
+ l = ((6-f) * f - 5) / 4.32808512266689022212;
+ l += exp(-l) * f - 1;
+ l += exp(-l) * f - 1;
+ return l * p;
+}
+float log(float f)
+{
+ if(checkextension("DP_QC_LOG"))
+ return log_builtin(f);
+ else
+ return log_synth(f);
+}
+
string wordwrap_buffer;
void wordwrap_buffer_put(string s)
@@ -422,6 +462,7 @@
else if (g == GAME_RUNEMATCH) return "rune";
else if (g == GAME_LMS) return "lms";
else if (g == GAME_ARENA) return "arena";
+ else if (g == GAME_CA) return "ca";
else if (g == GAME_KEYHUNT) return "kh";
else if (g == GAME_ONSLAUGHT) return "ons";
else if (g == GAME_ASSAULT) return "as";
@@ -1490,11 +1531,20 @@
y = rint(v_y * 4) + 128;
z = rint(v_z * 4) + 128;
if(x > 255 || x < 0)
- error("shot origin x out of bounds");
+ {
+ print("shot origin ", vtos(v), " x out of bounds\n");
+ x = bound(0, x, 255);
+ }
if(y > 255 || y < 0)
- error("shot origin y out of bounds");
+ {
+ print("shot origin ", vtos(v), " y out of bounds\n");
+ y = bound(0, y, 255);
+ }
if(z > 255 || z < 0)
- error("shot origin z out of bounds");
+ {
+ print("shot origin ", vtos(v), " z out of bounds\n");
+ z = bound(0, z, 255);
+ }
return x * 0x10000 + y * 0x100 + z;
}
vector decompressShotOrigin(float f)
@@ -1662,3 +1712,24 @@
// continuous function mapping all reals into 0..1
return 0.5 + 0.5 * float2range11(f);
}
+
+// from the GNU Scientific Library
+float gsl_ran_gaussian_lastvalue;
+float gsl_ran_gaussian_lastvalue_set;
+float gsl_ran_gaussian(float sigma)
+{
+ float a, b;
+ if(gsl_ran_gaussian_lastvalue_set)
+ {
+ gsl_ran_gaussian_lastvalue_set = 0;
+ return sigma * gsl_ran_gaussian_lastvalue;
+ }
+ else
+ {
+ a = random() * 2 * M_PI;
+ b = sqrt(-2 * log(random()));
+ gsl_ran_gaussian_lastvalue = cos(a) * b;
+ gsl_ran_gaussian_lastvalue_set = 1;
+ return sigma * sin(a) * b;
+ }
+}
Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -196,7 +196,9 @@
#endif
// the NULL function
-const var void func_null(void);
+const var void func_null(void); FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(func_null)
const var string string_null;
float float2range11(float f);
float float2range01(float f);
+
+float gsl_ran_gaussian(float sigma);
Modified: branches/nexuiz-2.0/data/qcsrc/menu/item/listbox.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/item/listbox.c 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/menu/item/listbox.c 2009-11-21 14:34:05 UTC (rev 8302)
@@ -223,16 +223,16 @@
me.controlTop = max(0, me.scrollPos / (me.nItems * me.itemHeight));
me.controlBottom = min((me.scrollPos + 1) / (me.nItems * me.itemHeight), 1);
- float fmin;
- fmin = 1 * me.controlWidth / me.size_y * me.size_x;
+ float minfactor;
+ minfactor = 1 * me.controlWidth / me.size_y * me.size_x;
f = me.controlBottom - me.controlTop;
- if(f < fmin) // FIXME good default?
+ if(f < minfactor) // FIXME good default?
{
- // f * X + 1 * (1-X) = fmin
- // (f - 1) * X + 1 = fmin
- // (f - 1) * X = fmin - 1
- // X = (fmin - 1) / (f - 1)
- f = (fmin - 1) / (f - 1);
+ // f * X + 1 * (1-X) = minfactor
+ // (f - 1) * X + 1 = minfactor
+ // (f - 1) * X = minfactor - 1
+ // X = (minfactor - 1) / (f - 1)
+ f = (minfactor - 1) / (f - 1);
me.controlTop = me.controlTop * f + 0 * (1 - f);
me.controlBottom = me.controlBottom * f + 1 * (1 - f);
}
Modified: branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/menu/mbuiltin.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -6,7 +6,7 @@
//#define PROFILESTRZONE
//#define FIXEDFOPEN
-void checkextension(string ext) = #1;
+float checkextension(string ext) = #1;
// error cmds
void error(string err,...) = #2;
@@ -347,3 +347,4 @@
string(float, float) getgamedirinfo = #626;
#define GETGAMEDIRINFO_NAME 0
#define GETGAMEDIRINFO_DESCRIPTION 1
+float log(float f) = #532;
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c 2009-11-21 14:34:05 UTC (rev 8302)
@@ -51,6 +51,8 @@
if(e.checked) e0 = NULL;
me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_ctf", "CTF"));
if(e.checked) e0 = NULL;
+ me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_ca", "CA"));
+ if(e.checked) e0 = NULL;
me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_domination", "Domination"));
if(e.checked) e0 = NULL;
me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_keyhunt", "Key Hunt"));
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c 2009-11-21 14:34:05 UTC (rev 8302)
@@ -22,6 +22,7 @@
ATTRIB(NexuizMapInfoDialog, typeDominationLabel, entity, NULL)
ATTRIB(NexuizMapInfoDialog, typeKeyHuntLabel, entity, NULL)
ATTRIB(NexuizMapInfoDialog, typeCTFLabel, entity, NULL)
+ ATTRIB(NexuizMapInfoDialog, typeCALabel, entity, NULL)
ATTRIB(NexuizMapInfoDialog, typeAssaultLabel, entity, NULL)
ATTRIB(NexuizMapInfoDialog, typeOnslaughtLabel, entity, NULL)
ATTRIB(NexuizMapInfoDialog, typeRaceLabel, entity, NULL)
@@ -76,6 +77,7 @@
me.typeRuneLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RUNEMATCH);
me.typeKeyHuntLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEYHUNT);
me.typeCTFLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTF);
+ me.typeCALabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CA);
me.typeAssaultLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ASSAULT);
me.typeOnslaughtLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ONSLAUGHT);
me.typeRaceLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE);
@@ -132,6 +134,8 @@
me.typeKeyHuntLabel = e;
me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "CTF"));
me.typeCTFLabel = e;
+ me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "CA"));
+ me.typeCALabel = e;
me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Assault"));
me.typeAssaultLabel = e;
me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Onslaught"));
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_decibels.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_decibels.c 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_decibels.c 2009-11-21 14:34:05 UTC (rev 8302)
@@ -9,49 +9,6 @@
#ifdef IMPLEMENTATION
-float exp(float x)
-{
- return pow(2.718281828459045, x);
-
- /* wtf did I do here?
- float i;
- float t, s;
-
- s = 1;
- t = 1;
- for(i = 1; i < 100; ++i)
- {
- t *= x;
- t /= i;
- s += t;
- }
-
- return s;
- */
-}
-
-float ln(float x)
-{
- float i;
- float r, r0;
-
- r = 1;
- r0 = 0;
- for(i = 1; fabs(r - r0) >= 0.05; ++i)
- {
- // Newton iteration on exp(r) = x:
- // r <- r - (exp(r) - x) / (exp(r))
- // r <- r - 1 + x / exp(r)
- r0 = r;
- r = r0 - 1 + x / exp(r0);
- }
- dprint("ln: ", ftos(i), " iterations\n");
-
- return r;
-}
-
-#define LOG10 2.302585093
-
entity makeNexuizDecibelsSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
{
entity me;
@@ -72,7 +29,7 @@
else if(v < 0.0005)
me.value = -1000000;
else
- me.value = 0.1 * floor(0.5 + 10.0 * ln(cvar(me.cvarName)) * 10 / LOG10);
+ me.value = 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName)) * 10);
}
void saveCvarsNexuizDecibelsSlider(entity me)
{
@@ -84,7 +41,7 @@
if(me.value < -33)
cvar_set(me.cvarName, "0");
else
- cvar_set(me.cvarName, ftos(exp(me.value / 10 * LOG10)));
+ cvar_set(me.cvarName, ftos(pow(10, me.value / 10)));
}
string valueToTextNexuizDecibelsSlider(entity me, float v)
Modified: branches/nexuiz-2.0/data/qcsrc/menu/progs.src
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/progs.src 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/menu/progs.src 2009-11-21 14:34:05 UTC (rev 8302)
@@ -4,6 +4,7 @@
../common/util-pre.qh
msys.qh
mbuiltin.qh
+../common/mathlib.qh
../common/util.qh
oo/base.h
@@ -38,3 +39,5 @@
../common/campaign_setup.qc
../common/mapinfo.qc
../common/items.qc
+
+../common/mathlib.qc
Modified: branches/nexuiz-2.0/data/qcsrc/server/arena.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/arena.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/arena.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -9,6 +9,9 @@
entity spawnqueue_last;
entity champion;
float warmup;
+float allowed_to_spawn;
+float player_cnt;
+.float caplayer;
void PutObserverInServer();
void PutClientInServer();
@@ -29,9 +32,12 @@
entity oldself;
oldself = self;
- if(g_arena)
- if(cvar("g_arena_warmup"))
+ if(g_arena && cvar("g_arena_warmup"))
warmup = time + cvar("g_arena_warmup");
+ else if(g_ca) {
+ warmup = time + cvar("g_ca_warmup");
+ allowed_to_spawn = 1;
+ }
lms_lowest_lives = 999;
lms_next_place = player_count;
@@ -81,6 +87,10 @@
else
PutObserverInServer();
}
+ else if(g_ca && self.caplayer) {
+ self.classname = "player";
+ PutClientInServer();
+ }
else
{
/*
@@ -111,8 +121,8 @@
if(g_keyhunt)
kh_Controller_SetThink(cvar("g_balance_keyhunt_delay_round")+(game_starttime - time), "", kh_StartRound);
- if(g_arena)
- if(champion)
+ if(g_arena || g_ca)
+ if(champion && champion.classname == "player" && player_cnt > 1)
UpdateFrags(champion, +1);
self = oldself;
@@ -175,50 +185,73 @@
*
* Called in PlayerPostThink()
*/
+float roundStartTime_prev; // prevent networkspam
void Arena_Warmup()
{
float f;
string msg;
- if(!g_arena || !arena_roundbased || (time < game_starttime))
+ if((!g_arena && !g_ca) || (g_arena && !arena_roundbased) || (time < game_starttime))
return;
- f = rint(warmup - time);
+ f = floor(warmup - time + 1);
+ allowed_to_spawn = 0;
+
+ if(g_ca && player_cnt < 2)
+ allowed_to_spawn = 1;
+
msg = NEWLINES;
- if(time < warmup && self.spawned)
+ if(time < warmup)
{
- if(champion)
- msg = strcat(msg, "The Champion is ", champion.netname, "^7\n");
+ if (g_ca)
+ allowed_to_spawn = 1;
+ if(champion && !(g_ca))
+ centerprint(self, strcat(msg, "The Champion is ", champion.netname, "^7\n"));
- if(f)
- msg = strcat(msg, "Round will start in ", ftos(f),"\n");
- else
- {
+ if(f != roundStartTime_prev) {
+ centerprint(self, strcat("Round will start in ", ftos(f),"\n"));
+ roundStartTime_prev = f;
+ if(f == 5)
+ play2all("announcer/robotic/prepareforbattle.wav");
+ else if(f == 3)
+ play2all("announcer/robotic/3.wav");
+ else if(f == 2)
+ play2all("announcer/robotic/2.wav");
+ else if(f == 1)
+ play2all("announcer/robotic/1.wav");
+ }
+
+ if (!g_ca) {
if(self.spawned)
- msg = strcat(msg, "^1Fight!\n");
+ self.movetype = MOVETYPE_NONE;
+
+ self.velocity = '0 0 0';
+ self.avelocity = '0 0 0';
+ self.movement = '0 0 0';
+ //self.fixangle = TRUE;
}
+ }
- centerprint(self, msg);
+ else if((!g_ca && self.movetype == MOVETYPE_NONE) || ((g_ca && f > -1 && f != roundStartTime_prev)))
+ {
+ if(self.classname == "player")
+ self.movetype = MOVETYPE_WALK;
+ centerprint(self, "^1Fight!\n");
+ roundStartTime_prev = f;
+ play2all("announcer/robotic/begin.wav");
- if(self.spawned)
- self.movetype = MOVETYPE_NONE;
+ player_cnt = 0;
- self.velocity = '0 0 0';
- self.avelocity = '0 0 0';
- self.movement = '0 0 0';
- //self.fixangle = TRUE;
+ FOR_EACH_CLIENT(self) {
+ if (self.classname == "player") {
+ player_cnt += 1;
+ }
+ }
}
- else if(self.movetype == MOVETYPE_NONE)
- {
- self.movetype = MOVETYPE_WALK;
- centerprint(self, "\n");
- }
-
}
float next_round;
-
/**
* This function finds out whether an arena round is over 1 player is left.
* It determines the last player who's still alive and saves it's entity reference
@@ -231,34 +264,83 @@
if(time < warmup + 1)
return;
- //extend next_round if it isn't set yet and only 1 player is spawned
- if(!next_round)
- if(numspawned < 2)
- next_round = time + 3;
+ if(g_ca) {
+ // check the amount of spawned players in each team
+ float redspawned, bluespawned;
+ FOR_EACH_CLIENT(self) {
+ if (self.classname == "player") {
+ if (self.team == COLOR_TEAM1) redspawned += 1;
+ else if (self.team == COLOR_TEAM2) bluespawned += 1;
+ }
+ }
- if(!arena_roundbased || (next_round && next_round < time && player_count > 1))
- {
- next_round = 0;
+ if(player_cnt < 2 && (redspawned && bluespawned)) {
+ reset_map(TRUE);
+ }
+ else if(player_cnt < 2) {
+ FOR_EACH_CLIENT(self)
+ if(self.classname == "player")
+ centerprint(self, strcat("^1Need at least 2 players to play CA", "^7\n"));
- if(arena_roundbased)
+ allowed_to_spawn = 1;
+ return;
+ }
+ else if(!next_round)
+ if((redspawned && bluespawned == 0) || (bluespawned && redspawned == 0)) {
+ next_round = time + 5;
+
+ champion = find(world, classname, "player");
+ string champion_team;
+ if(champion.team == COLOR_TEAM1) {
+ champion_team = "^1Red team";
+ play2all("ctf/red_capture.wav");
+ }
+ else if(champion.team == COLOR_TEAM2) {
+ champion_team = "^4Blue team";
+ play2all("ctf/blue_capture.wav");
+ }
+ FOR_EACH_CLIENT(self) centerprint(self, strcat(champion_team, "^7 wins the round.", "^7\n"));
+ else if(!redspawned && !bluespawned) {
+ FOR_EACH_CLIENT(self) centerprint(self, strcat("^7Round tied.", "^7\n"));
+ next_round = time + 5;
+ }
+ }
+
+ if((next_round && next_round < time))
{
- champion = find(world, classname, "player");
- while(champion && champion.deadflag)
- champion = find(champion, classname, "player");
+ next_round = 0;
reset_map(TRUE);
}
+ } else { // arena
+ //extend next_round if it isn't set yet and only 1 player is spawned
+ if(!next_round)
+ if(numspawned < 2)
+ next_round = time + 3;
- while(numspawned < maxspawned && spawnqueue_first)
+ if(!arena_roundbased || (next_round && next_round < time && player_count > 1))
{
- self = spawnqueue_first;
+ next_round = 0;
- bprint ("^4", self.netname, "^4 is the next challenger\n");
+ if(arena_roundbased)
+ {
+ champion = find(world, classname, "player");
+ while(champion && champion.deadflag)
+ champion = find(champion, classname, "player");
+ reset_map(TRUE);
+ }
- Spawnqueue_Remove(self);
- Spawnqueue_Mark(self);
+ while(numspawned < maxspawned && spawnqueue_first)
+ {
+ self = spawnqueue_first;
- self.classname = "player";
- PutClientInServer();
+ bprint ("^4", self.netname, "^4 is the next challenger\n");
+
+ Spawnqueue_Remove(self);
+ Spawnqueue_Mark(self);
+
+ self.classname = "player";
+ PutClientInServer();
+ }
}
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/bot/bot.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/bot/bot.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/bot/bot.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -207,6 +207,9 @@
self.playerskin = self.playerskin_freeme = strzone(bot_skin);
self.netname = self.netname_freeme = strzone(strcat(prefix, name, suffix));
+
+ self.cvar_cl_accuracy_data_share = 1; // share the bots weapon accuracy data with the world
+ self.cvar_cl_accuracy_data_receive = 0; // don't receive any weapon accuracy data
};
void bot_custom_weapon_priority_setup()
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,5 +1,10 @@
void race_send_recordtime(float t, float msg);
+void send_CSQC_teamnagger() {
+ WriteByte(0, SVC_TEMPENTITY);
+ WriteByte(0, TE_CSQC_TEAMNAGGER);
+}
+
float ClientData_Send(entity to, float sf)
{
if(to != self.owner)
@@ -316,7 +321,7 @@
// there is 50/50 chance of choosing a random spot or the furthest spot
// (this means that roughly every other spawn will be furthest, so you
// usually won't get fragged at spawn twice in a row)
- if (arena_roundbased)
+ if (arena_roundbased && !g_ca)
{
firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 800, teamcheck);
if(firstspot_new)
@@ -638,7 +643,11 @@
if(sv_loddistance1)
SetCustomizer(self, Client_customizeentityforclient, Client_uncustomizeentityforclient);
- self.team = -1;
+ if(g_ca) {
+ // do nothing
+ }
+ else
+ self.team = -1;
if(g_arena)
{
@@ -785,14 +794,14 @@
self.classname = "observer";
}
- if(g_arena)
+ if(g_arena || (g_ca && !allowed_to_spawn))
if(!self.spawned)
self.classname = "observer";
if(gameover)
self.classname = "observer";
- if(self.classname == "player") {
+ if(self.classname == "player" && (!g_ca || (g_ca && allowed_to_spawn))) {
entity spot, oldself;
float j;
@@ -936,6 +945,9 @@
Spawnqueue_Mark(self);
}
+ else if(g_ca)
+ self.caplayer = 1;
+
self.event_damage = PlayerDamage;
self.bot_attack = TRUE;
@@ -993,7 +1005,7 @@
SUB_UseTargets();
activator = world;
self = oldself;
- } else if(self.classname == "observer") {
+ } else if(self.classname == "observer" || (g_ca && !allowed_to_spawn)) {
PutObserverInServer ();
}
@@ -1406,10 +1418,11 @@
stuffcmd(self, strcat("set gametype ", ftos(game), "\n"));
- if(g_arena)
+ if(g_arena || g_ca)
{
self.classname = "observer";
- Spawnqueue_Insert(self);
+ if(g_arena)
+ Spawnqueue_Insert(self);
}
/*else if(g_ctf)
{
@@ -1473,6 +1486,8 @@
speedaward_alltimebest_holder = db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/netname"));
race_send_speedaward_alltimebest(MSG_ONE);
}
+ else if(cvar("sv_teamnagger"))
+ send_CSQC_teamnagger();
}
/*
@@ -1744,7 +1759,7 @@
self.modelflags &~= MF_ROCKET;
}
- self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME);
+ self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
if(!self.modelindex || self.deadflag) // don't apply the flags if the player is gibbed
return;
@@ -1835,7 +1850,10 @@
}
}
- if (cvar("g_fullbrightplayers"))
+ if(cvar("g_nodepthtestplayers"))
+ self.effects = self.effects | EF_NODEPTHTEST;
+
+ if(cvar("g_fullbrightplayers"))
self.effects = self.effects | EF_FULLBRIGHT;
// midair gamemode: damage only while in the air
@@ -1948,10 +1966,10 @@
limita = limita * limit_mod;
//limitf = limitf * limit_mod;
- if(g_lms)
+ if(g_lms && g_ca)
rot_mod = 0;
- if (!g_minstagib && (!g_lms || cvar("g_lms_regenerate")))
+ if (!g_minstagib && !g_ca && (!g_lms || cvar("g_lms_regenerate")))
{
self.armorvalue = CalcRotRegen(self.armorvalue, mina, cvar("g_balance_armor_regen"), cvar("g_balance_armor_regenlinear"), regen_mod * frametime * (time > self.pauseregen_finished), maxa, cvar("g_balance_armor_rot"), cvar("g_balance_armor_rotlinear"), rot_mod * frametime * (time > self.pauserotarmor_finished), limita);
self.health = CalcRotRegen(self.health, minh, cvar("g_balance_health_regen"), cvar("g_balance_health_regenlinear"), regen_mod * frametime * (time > self.pauseregen_finished), maxh, cvar("g_balance_health_rot"), cvar("g_balance_health_rotlinear"), rot_mod * frametime * (time > self.pauserothealth_finished), limith);
@@ -2019,12 +2037,33 @@
self.pressedkeys &~= KEY_CROUCH;
}
+void update_stats (float number, float hit, float fired) {
+// self.stat_hit = number + ((number==0) ? 1 : 64) * hit * sv_accuracy_data_share;
+// self.stat_fired = number + ((number==0) ? 1 : 64) * fired * sv_accuracy_data_share;
+
+ if(number) {
+ self.stat_hit = number + 64 * hit * sv_accuracy_data_share;
+ self.stat_fired = number + 64 * fired * sv_accuracy_data_share;
+ } else {
+ self.stat_hit = hit * sv_accuracy_data_share;
+ self.stat_fired = fired * sv_accuracy_data_share;
+ }
+}
+
/*
======================
spectate mode routines
======================
*/
+
+.float weapon_count;
void SpectateCopy(entity spectatee) {
+ if(spectatee.weapon_count < WEP_LAST) {
+ update_stats (spectatee.weapon_count, spectatee.cvar_cl_accuracy_data_share * floor(spectatee.stats_hit[spectatee.weapon_count - 1]), spectatee.cvar_cl_accuracy_data_share * floor(spectatee.stats_fired[spectatee.weapon_count - 1]));
+ spectatee.weapon_count ++;
+ } else
+ update_stats (0, spectatee.cvar_cl_accuracy_data_share * spectatee.stat_hit, spectatee.cvar_cl_accuracy_data_share * spectatee.stat_fired);
+
self.kh_state = spectatee.kh_state;
self.armortype = spectatee.armortype;
self.armorvalue = spectatee.armorvalue;
@@ -2075,20 +2114,25 @@
float SpectateNext() {
other = find(self.enemy, classname, "player");
- if (!other) {
+
+ if (!other)
other = find(other, classname, "player");
- }
- if (other) {
+
+ if (other)
self.enemy = other;
- }
+
if(self.enemy.classname == "player") {
msg_entity = self;
WriteByte(MSG_ONE, SVC_SETVIEW);
WriteEntity(MSG_ONE, self.enemy);
//stuffcmd(self, "set viewsize $tmpviewsize \n");
self.movetype = MOVETYPE_NONE;
+
+ self.enemy.weapon_count = 0;
+
if(!SpectateUpdate())
PutObserverInServer();
+
return 1;
} else {
return 0;
@@ -2126,18 +2170,29 @@
if(isJoinAllowed()) {
if(!teams_matter || cvar("g_campaign") || cvar("g_balance_teams") || (self.wasplayer && cvar("g_changeteam_banned"))) {
self.classname = "player";
+
if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force"))
JoinBestTeam(self, FALSE, TRUE);
+
if(cvar("g_campaign"))
campaign_bots_may_start = 1;
+
+ self.stat_count = WEP_LAST;
+
PutClientInServer();
+
if(self.classname == "player")
bprint ("^4", self.netname, "^4 is playing now\n");
+
if(!cvar("g_campaign"))
centerprint(self,""); // clear MOTD
+
return;
} else {
- stuffcmd(self,"menu_showteamselect\n");
+ if (g_ca && self.caplayer) {
+ } // do nothing
+ else
+ stuffcmd(self,"menu_showteamselect\n");
return;
}
}
@@ -2268,12 +2323,14 @@
self.classname = "spectator";
} else {
self.classname = "observer";
+ self.stat_count = WEP_LAST;
PutClientInServer();
}
} else if (self.BUTTON_ATCK2) {
self.welcomemessage_time = 0;
self.flags &~= FL_JUMPRELEASED;
self.classname = "observer";
+ self.stat_count = WEP_LAST;
PutClientInServer();
} else {
if(!SpectateUpdate())
@@ -2290,6 +2347,7 @@
}
}
}
+
PrintWelcomeMessage(self);
self.flags |= FL_CLIENT | FL_NOTARGET;
}
@@ -2427,7 +2485,7 @@
if(frametime)
player_anim();
button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
- force_respawn = (g_lms || cvar("g_forced_respawn"));
+ force_respawn = (g_lms || (g_ca) || cvar("g_forced_respawn"));
if (self.deadflag == DEAD_DYING)
{
if(force_respawn)
@@ -2818,6 +2876,15 @@
stuffcmd(self, "seta _cl_name Player\n");
}
+ // send the clients accuracy stats to the client
+ if(self.stat_count > 0)
+ if(frametime)
+ {
+ self.stat_hit = self.stat_count + 64 * floor(self.(stats_hit[self.stat_count - 1]));
+ self.stat_fired = self.stat_count + 64 * floor(self.(stats_fired[self.stat_count - 1]));
+ self.stat_count -= 1;
+ }
+
if(sv_maxidle && frametime)
{
// WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -436,13 +436,13 @@
if(sidefric < 0 && (vel_perpend*vel_perpend))
{
- float f, fmin;
+ float f, fminimum;
f = (1 + frametime * wishspeed * sidefric);
- fmin = (savespeed - vel_straight*vel_straight) / (vel_perpend*vel_perpend);
- if(fmin <= 0)
+ fminimum = (savespeed - vel_straight*vel_straight) / (vel_perpend*vel_perpend);
+ if(fminimum <= 0)
vel_perpend = vel_perpend * f;
else
- vel_perpend = vel_perpend * min(1, max(fmin, f));
+ vel_perpend = vel_perpend * min(1, max(fminimum, f));
}
else
vel_perpend = vel_perpend * (1 - frametime * wishspeed * sidefric);
@@ -587,13 +587,13 @@
{
// diagonal
if(self.movement_x > 0)
- self.movement_x = 0.70710678118654752440 * wishspeed;
+ self.movement_x = M_SQRT1_2 * wishspeed;
else
- self.movement_x = -0.70710678118654752440 * wishspeed;
+ self.movement_x = -M_SQRT1_2 * wishspeed;
if(self.movement_y > 0)
- self.movement_y = 0.70710678118654752440 * wishspeed;
+ self.movement_y = M_SQRT1_2 * wishspeed;
else
- self.movement_y = -0.70710678118654752440 * wishspeed;
+ self.movement_y = -M_SQRT1_2 * wishspeed;
}
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -475,8 +475,7 @@
else
Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
- if(g_arena)
- if(numspawned < 2)
+ if((g_arena && numspawned < 2) || (g_ca && player_cnt < 2))
return;
if (!g_minstagib)
@@ -731,7 +730,7 @@
if(defer_ClientKill_Now_TeamChange)
ClientKill_Now_TeamChange();
- if(sv_gentle > 0) {
+ if(sv_gentle > 0 || cvar("ekg")) {
// remove corpse
PlayerCorpseDamage (inflictor, attacker, 100.0, deathtype, hitloc, force);
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -302,7 +302,7 @@
if (frametime)
self.weapon_frametime = frametime;
- if((arena_roundbased && time < warmup) || ((time < game_starttime) && !cvar("sv_ready_restart_after_countdown")))
+ if(((arena_roundbased || g_ca) && time < warmup) || ((time < game_starttime) && !cvar("sv_ready_restart_after_countdown")))
return;
if (!self.weaponentity || self.health < 1)
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -147,11 +147,14 @@
ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
trueaimpoint = trace_endpos;
- // Track max damage and set the stat to be sent later in g_world.qc
- if not(inWarmupStage)
- {
- ent.max_damage[ent.weapon] += maxdamage;
- ent.maxdamage_fired = ent.weapon + 64 * rint(ent.max_damage[ent.weapon]);
+ // track max damage
+ if not(inWarmupStage) {
+ entity w;
+ w = get_weaponinfo(ent.weapon);
+ if(w.weapon_type == WEP_TYPE_SPLASH) { // splash damage
+ ent.stats_fired[ent.weapon - 1] += maxdamage;
+ ent.stat_fired = ent.weapon + 64 * floor(ent.stats_fired[ent.weapon - 1]);
+ }
}
W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
@@ -561,7 +564,9 @@
self.effects &~= EF_TELEPORT_BIT;
self.effects |= tb;
- if(self.owner.alpha != 0)
+ if(self.owner.alpha == default_player_alpha)
+ self.alpha = default_weapon_alpha;
+ else if(self.owner.alpha != 0)
self.alpha = self.owner.alpha;
else
self.alpha = 1;
@@ -773,7 +778,9 @@
}
self.effects = self.owner.effects | EF_LOWPRECISION;
self.effects = self.effects & EFMASK_CHEAP; // eat performance
- if(self.owner.alpha != 0)
+ if(self.owner.alpha == default_player_alpha)
+ self.alpha = default_weapon_alpha;
+ else if(self.owner.alpha != 0)
self.alpha = self.owner.alpha;
else
self.alpha = 1;
@@ -1228,14 +1235,6 @@
return outvelocity;
}
-void W_SetupProjectileVelocity(entity missile)
-{
- if(missile.owner == world)
- error("Unowned missile");
-
- missile.velocity = W_CalculateProjectileVelocity(missile.owner.velocity, missile.velocity);
-}
-
void W_AttachToShotorg(entity flash, vector offset)
{
entity xflash;
@@ -1268,3 +1267,232 @@
}
}
}
+
+vector cliptoplane(vector v, vector p)
+{
+ return v - (v * p) * p;
+}
+
+vector solve_cubic_pq(float p, float q)
+{
+ float D, u, v, a;
+ D = q*q/4.0 + p*p*p/27.0;
+ if(D < 0)
+ {
+ // irreducibilis
+ a = 1.0/3.0 * acos(-q/2.0 * sqrt(-27.0/(p*p*p)));
+ u = sqrt(-4.0/3.0 * p);
+ // a in range 0..pi/3
+ // 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)
+ );
+ }
+ else if(D == 0)
+ {
+ // simple
+ if(p == 0)
+ 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;
+ }
+ else
+ {
+ // cardano
+ u = cbrt(-q/2.0 + sqrt(D));
+ v = cbrt(-q/2.0 - sqrt(D));
+ return '1 1 1' * (u + v);
+ }
+}
+vector solve_cubic_abcd(float a, float b, float c, float d)
+{
+ // y = 3*a*x + b
+ // x = (y - b) / 3a
+ float p, q;
+ vector v;
+ p = (9*a*c - 3*b*b);
+ q = (27*a*a*d - 9*a*b*c + 2*b*b*b);
+ v = solve_cubic_pq(p, q);
+ v = (v - b * '1 1 1') * (1.0 / (3.0 * a));
+ if(a < 0)
+ v += '1 0 -1' * (v_z - v_x); // swap x, z
+ return v;
+}
+
+vector findperpendicular(vector v)
+{
+ vector p;
+ p_x = v_z;
+ p_y = -v_x;
+ p_z = v_y;
+ return normalize(cliptoplane(p, v));
+}
+
+vector W_CalculateProjectileSpread(vector forward, float spread)
+{
+ float sigma;
+ vector v1, v2;
+ float dx, dy, r;
+ float sstyle;
+ if(spread <= 0)
+ return forward;
+ sstyle = cvar("g_projectiles_spread_style");
+
+ if(sstyle == 0)
+ {
+ // this is the baseline for the spread value!
+ // standard deviation: sqrt(2/5)
+ // density function: sqrt(1-r^2)
+ return forward + randomvec() * spread;
+ }
+ else if(sstyle == 1)
+ {
+ // same thing, basically
+ return normalize(forward + cliptoplane(randomvec() * spread, forward));
+ }
+ else if(sstyle == 2)
+ {
+ // circle spread... has at sigma=1 a standard deviation of sqrt(1/2)
+ sigma = spread * 0.89442719099991587855; // match baseline stddev
+ v1 = findperpendicular(forward);
+ v2 = cross(forward, v1);
+ // random point on unit circle
+ dx = random() * 2 * M_PI;
+ dy = sin(dx);
+ dx = cos(dx);
+ // radius in our dist function
+ r = random();
+ r = sqrt(r);
+ return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+ }
+ else if(sstyle == 3) // gauss 3d
+ {
+ sigma = spread * 0.44721359549996; // match baseline stddev
+ // note: 2D gaussian has sqrt(2) times the stddev of 1D, so this factor is right
+ v1 = forward;
+ v1_x += gsl_ran_gaussian(sigma);
+ v1_y += gsl_ran_gaussian(sigma);
+ v1_z += gsl_ran_gaussian(sigma);
+ return v1;
+ }
+ else if(sstyle == 4) // gauss 2d
+ {
+ sigma = spread * 0.44721359549996; // match baseline stddev
+ // note: 2D gaussian has sqrt(2) times the stddev of 1D, so this factor is right
+ v1_x = gsl_ran_gaussian(sigma);
+ v1_y = gsl_ran_gaussian(sigma);
+ v1_z = gsl_ran_gaussian(sigma);
+ return normalize(forward + cliptoplane(v1, forward));
+ }
+ else if(sstyle == 5) // 1-r
+ {
+ sigma = spread * 1.154700538379252; // match baseline stddev
+ v1 = findperpendicular(forward);
+ v2 = cross(forward, v1);
+ // random point on unit circle
+ dx = random() * 2 * M_PI;
+ dy = sin(dx);
+ dx = cos(dx);
+ // radius in our dist function
+ r = random();
+ r = solve_cubic_abcd(-2, 3, 0, -r) * '0 1 0';
+ return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+ }
+ else if(sstyle == 6) // 1-r^2
+ {
+ sigma = spread * 1.095445115010332; // match baseline stddev
+ v1 = findperpendicular(forward);
+ v2 = cross(forward, v1);
+ // random point on unit circle
+ dx = random() * 2 * M_PI;
+ dy = sin(dx);
+ dx = cos(dx);
+ // radius in our dist function
+ r = random();
+ r = sqrt(1 - r);
+ r = sqrt(1 - r);
+ return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+ }
+ else if(sstyle == 7) // (1-r) (2-r)
+ {
+ sigma = spread * 1.224744871391589; // match baseline stddev
+ v1 = findperpendicular(forward);
+ v2 = cross(forward, v1);
+ // random point on unit circle
+ dx = random() * 2 * M_PI;
+ dy = sin(dx);
+ dx = cos(dx);
+ // radius in our dist function
+ r = random();
+ r = 1 - sqrt(r);
+ r = 1 - sqrt(r);
+ return normalize(forward + (v1 * dx + v2 * dy) * r * sigma);
+ }
+ else
+ error("g_projectiles_spread_style must be 0 (sphere), 1 (flattened sphere), 2 (circle), 3 (gauss 3D), 4 (gauss plane), 5 (linear falloff), 6 (quadratic falloff), 7 (stronger falloff)!");
+ return '0 0 0';
+ /*
+ * how to derive falloff functions:
+ * rho(r) := (2-r) * (1-r);
+ * a : 0;
+ * b : 1;
+ * rhor(r) := r * rho(r);
+ * cr(t) := integrate(rhor(r), r, a, t);
+ * scr(t) := integrate(rhor(r) * r^2, r, a, t);
+ * variance : scr(b) / cr(b);
+ * solve(cr(r) = rand * cr(b), r), programmmode:false;
+ * sqrt(0.4 / variance), numer;
+ */
+}
+
+#if 0
+float mspercallsum;
+float mspercallsstyle;
+float mspercallcount;
+#endif
+void W_SetupProjectileVelocityEx(entity missile, vector dir, vector upDir, float pSpeed, float pUpSpeed, float spread)
+{
+ if(missile.owner == world)
+ error("Unowned missile");
+
+ dir = dir + upDir * (pUpSpeed / pSpeed);
+ pSpeed *= vlen(dir);
+ dir = normalize(dir);
+
+#if 0
+ if(cvar("g_projectiles_spread_style") != mspercallsstyle)
+ {
+ mspercallsum = mspercallcount = 0;
+ mspercallsstyle = cvar("g_projectiles_spread_style");
+ }
+ mspercallsum -= gettime(GETTIME_HIRES);
+#endif
+ dir = W_CalculateProjectileSpread(dir, spread);
+#if 0
+ mspercallsum += gettime(GETTIME_HIRES);
+ mspercallcount += 1;
+ print("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
+#endif
+
+ missile.velocity = W_CalculateProjectileVelocity(missile.owner.velocity, pSpeed * dir);
+}
+
+void W_SetupProjectileVelocity(entity missile, float pSpeed, float spread)
+{
+ W_SetupProjectileVelocityEx(missile, w_shotdir, v_up, pSpeed, 0, spread);
+}
+
+#define W_SETUPPROJECTILEVELOCITY_UP(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), cvar(#s "_speed_up"), cvar(#s "_spread"))
+#define W_SETUPPROJECTILEVELOCITY(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), 0, cvar(#s "_spread"))
Modified: branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -257,6 +257,8 @@
kh_Key_DropAll(self, TRUE);
WaypointSprite_PlayerDead();
self.classname = "observer";
+ if(g_ca)
+ self.caplayer = 0;
if(blockSpectators)
sprint(self, strcat("^7You have to become a player within the next ", ftos(cvar("g_maxplayers_spectator_blocktime")), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
PutClientInServer();
@@ -269,8 +271,11 @@
{
if(isJoinAllowed()) {
self.classname = "player";
+ if(g_ca)
+ self.caplayer = 1;
PlayerScore_Clear(self);
bprint ("^4", self.netname, "^4 is playing now\n");
+ self.stat_count = WEP_LAST;
PutClientInServer();
if(cvar("g_campaign"))
campaign_bots_may_start = 1;
@@ -813,7 +818,8 @@
void ReadyRestart()
{
// no arena, assault support yet...
- if(g_arena | g_assault | gameover | intermission_running | race_completing)
+ // TODO: CA support
+ if(g_arena | g_ca | g_assault | gameover | intermission_running | race_completing)
localcmd("restart\n");
else
localcmd("\nsv_hook_gamerestart;");
Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,5 +1,5 @@
-string CVAR_CHECK_DEFAULT = "9ede7a7edae0b7ae4c8b7e6517293a6a";
-string CVAR_CHECK_BALANCE = "1904952fd0d915f79ab4e6f0622abdb6";
+string CVAR_CHECK_DEFAULT = "489314f0011ead8255994194a02ab81a";
+string CVAR_CHECK_BALANCE = "729b07b9caa8a86c08841a0f4275e97d";
float FALSE = 0;
float TRUE = 1;
Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -17,7 +17,7 @@
float ctf_score_value(string parameter);
-float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_lms, g_runematch, g_race, g_nexball, g_cts;
+float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_runematch, g_race, g_nexball, g_cts;
float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_laserguided_missile, g_midair, g_minstagib, g_nixnex, g_nixnex_with_laser, g_pinata, g_norecoil, g_vampire, g_minstagib_invis_alpha, g_bloodloss;
float g_warmup_limit;
float g_warmup_allguns;
@@ -389,7 +389,7 @@
float bot_waypoints_for_items;
-.float attack_finished_for[WEP_COUNT];
+.float attack_finished_for[WEP_COUNT];
.float attack_finished_single;
#ifdef INDEPENDENT_ATTACK_FINISHED
#define ATTACK_FINISHED_FOR(ent,w) ((ent).(attack_finished_for[(w) - WEP_FIRST]))
@@ -598,7 +598,16 @@
.float hitplotfh;
.string noise4;
-.float damage_hits, maxdamage_fired;
+.float stat_hit;
+.float stat_fired;
+.float stat_count;
+
+.float stats_hit[WEP_LAST - WEP_FIRST + 1]; // for hitscan bullets hit
+.float stats_fired[WEP_LAST - WEP_FIRST + 1]; // for hitscan bullets fired
+
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_hit);
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_fired);
+
.float maycheat;
.float stat_leadlimit;
@@ -624,3 +633,8 @@
.entity personal;
string deathmessage;
+
+
+
+.float cvar_cl_accuracy_data_share;
+.float cvar_cl_accuracy_data_receive;
\ No newline at end of file
Modified: branches/nexuiz-2.0/data/qcsrc/server/extensions.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/extensions.qh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/extensions.qh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -469,6 +469,15 @@
//self.button7 = (bits & 64) != 0;
//self.button8 = (bits & 128) != 0;
+// DP_LIGHTSTYLE_STATICVALUE
+// idea: VorteX
+// darkplaces implementation: VorteX
+// description: allows alternative 'static' lightstyle syntax : "=value"
+// examples: "=0.5", "=2.0", "=2.75"
+// could be used to control switchable lights or making styled lights with brightness > 2
+// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact
+// that other engines (which do not support this extension) could connect to a game and misunderstand this kind of lightstyle syntax
+
//DP_LITSPRITES
//idea: LordHavoc
//darkplaces implementation: LordHavoc
@@ -647,6 +656,17 @@
//description:
//prints "entity 1" or similar into a string. (this was a Q2 builtin)
+//DP_QC_EXTRESPONSEPACKET
+//idea: div0
+//darkplaces implementation: div0
+//builtin definitions:
+string(void) getextresponse = #624;
+//description:
+//returns a string of the form "\"ipaddress:port\" data...", or the NULL string
+//if no packet was found. Packets can be queued into the client/server by
+//sending a packet starting with "\xFF\xFF\xFF\xFFextResponse " to the
+//listening port.
+
//DP_QC_FINDCHAIN
//idea: LordHavoc
//darkplaces implementation: LordHavoc
@@ -800,6 +820,13 @@
//description:
//returns the playing time of the current cdtrack when passed to gettime()
+//DP_QC_LOG
+//darkplaces implementation: div0
+//builtin definitions:
+float log(float f) = #532;
+//description:
+//logarithm
+
//DP_QC_MINMAXBOUND
//idea: LordHavoc
//darkplaces implementation: LordHavoc
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -121,7 +121,7 @@
PlayerScore_Add(targ, SP_DEATHS, 1);
- if(g_arena)
+ if(g_arena || g_ca)
if(cvar("g_arena_roundbased"))
return;
@@ -702,7 +702,7 @@
{
teamdamage0 = max(attacker.dmg_team, cvar("g_teamdamage_threshold"));
attacker.dmg_team = attacker.dmg_team + damage;
- if(attacker.dmg_team > teamdamage0)
+ if(attacker.dmg_team > teamdamage0 && !g_ca)
mirrordamage = cvar("g_mirrordamage") * (attacker.dmg_team - teamdamage0);
mirrorforce = cvar("g_mirrordamage") * vlen(force);
if(g_minstagib)
@@ -710,6 +710,8 @@
if(cvar("g_friendlyfire") == 0)
damage = 0;
}
+ else if(g_ca)
+ damage = 0;
else
damage = cvar("g_friendlyfire") * damage;
// mirrordamage will be used LATER
@@ -792,7 +794,12 @@
damage = damage * cvar("g_balance_powerup_invincible_takedamage");
if (targ == attacker)
- damage = damage * cvar("g_balance_selfdamagepercent"); // Partial damage if the attacker hits himself
+ {
+ if(g_ca)
+ damage = 0;
+ else
+ damage = damage * cvar("g_balance_selfdamagepercent"); // Partial damage if the attacker hits himself
+ }
// CTF: reduce damage/force
if(g_ctf)
@@ -1002,23 +1009,16 @@
return nearest;
}
-.float actual_damage[WEP_COUNT]; //amount of damage done
-.float max_damage[WEP_COUNT]; //the maximum damage of the weapon
-
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(actual_damage);
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(max_damage);
-
void Damage_RecordDamage(entity attacker, float deathtype, float damage)
{
float weaponid;
weaponid = DEATH_WEAPONOF(deathtype);
+
if not(inWarmupStage)
- if(weaponid)
- if(clienttype(attacker) == CLIENTTYPE_REAL)
- {
- // Track damage done and update the stat to be sent later in g_world.qc
- attacker.actual_damage[weaponid] += damage;
- attacker.damage_hits = weaponid + 64 * rint(attacker.actual_damage[weaponid]);
+ if (weaponid)
+ if ((clienttype(attacker) == CLIENTTYPE_REAL) | (clienttype(attacker) == CLIENTTYPE_BOT)) {
+ attacker.stats_hit[weaponid - 1] += damage;
+ attacker.stat_hit = weaponid + 64 * floor(attacker.stats_hit[weaponid - 1]);
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -340,8 +340,7 @@
missile.state = 0; // not latched onto anything
- missile.velocity = v_forward * cvar("g_balance_grapplehook_speed_fly");
- W_SetupProjectileVelocity(missile);
+ W_SetupProjectileVelocityEx(missile, v_forward, v_up, cvar("g_balance_grapplehook_speed_fly"), 0, 0);
missile.angles = vectoangles (missile.velocity);
//missile.glow_color = 250; // 244, 250
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -243,6 +243,7 @@
BADCVAR("timelimit");
BADCVAR("fraglimit");
BADCVAR("g_arena");
+ BADCVAR("g_ca");
BADCVAR("g_assault");
BADCVAR("g_ctf");
BADCVAR("g_dm");
@@ -600,8 +601,8 @@
addstat(STAT_INVINCIBLE_FINISHED, AS_FLOAT, invincible_finished);
addstat(STAT_PRESSED_KEYS, AS_FLOAT, pressedkeys);
addstat(STAT_FUEL, AS_INT, ammo_fuel);
- addstat(STAT_DAMAGE_HITS, AS_INT, damage_hits);
- addstat(STAT_DAMAGE_FIRED, AS_INT, maxdamage_fired);
+ addstat(STAT_DAMAGE_HITS, AS_INT, stat_hit);
+ addstat(STAT_DAMAGE_FIRED, AS_INT, stat_fired);
addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
@@ -1205,7 +1206,7 @@
{
s = strcat(":player:see-labels:", GetPlayerScoreString(other, 0), ":");
s = strcat(s, ftos(rint(time - other.jointime)), ":");
- if(other.classname == "player" || g_arena || g_lms)
+ if(other.classname == "player" || g_arena || g_ca || g_lms)
s = strcat(s, ftos(other.team), ":");
else
s = strcat(s, "spectator:");
@@ -1296,10 +1297,7 @@
*/
void NextLevel()
{
- float minTotalFrags;
- float maxTotalFrags;
- float score;
- float f;
+ float i;
gameover = TRUE;
@@ -1329,42 +1327,60 @@
GameLogClose();
- FOR_EACH_CLIENT(other)
- {
- FixIntermissionClient(other);
+// TO DO
- if(other.winning)
- bprint(other.netname, " ^7wins.\n");
- }
+// save the stats to a text file on the client
+// stuffcmd(other, log_stats "stats/file_name");
+// bprint stats
+// stuffcmd(other, log_stats "");
+// use a filename similar to the demo name
+ // string file_name;
+ // file_name = strcat("\nlog_file \"stats/", strftime(TRUE, "%Y-%m-%d_%H-%M"), "_", mapname, ".txt\""); // open the log file
- minTotalFrags = 0;
- maxTotalFrags = 0;
- FOR_EACH_PLAYER(other)
- {
- if(maxTotalFrags < other.totalfrags)
- maxTotalFrags = other.totalfrags;
- if(minTotalFrags > other.totalfrags)
- minTotalFrags = other.totalfrags;
- }
+// write a stats parser for the menu
- if(!currentbots)
- {
- FOR_EACH_PLAYER(other)
- {
- score = (other.totalfrags - minTotalFrags) / max(maxTotalFrags - minTotalFrags, 1);
- f = bound(0, other.play_time / max(time, 1), 1);
- // store some statistics?
+ if(cvar("sv_accuracy_data_send")) {
+ string stats_to_send;
+
+ FOR_EACH_CLIENT(other) { // make the string to send
+ FixIntermissionClient(other);
+
+ if(other.cvar_cl_accuracy_data_share) {
+ stats_to_send = strcat(stats_to_send, ":hits:", other.netname);
+
+ for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ stats_to_send = strcat(stats_to_send, ":", ftos(other.stats_hit[i-1]));
+
+ stats_to_send = strcat(stats_to_send, "\n:fired:", other.netname);
+
+ for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ stats_to_send = strcat(stats_to_send, ":", ftos(other.stats_fired[i-1]));
+
+ stats_to_send = strcat(stats_to_send, "\n");
+ }
}
+
+ FOR_EACH_REALCLIENT(other) { // only spam humans
+ Score_NicePrint(other); // print the score
+
+ if(other.cvar_cl_accuracy_data_receive) // send the stats string to all the willing clients
+ bprint(stats_to_send);
+ }
+ } else { // ye olde message
+ FOR_EACH_PLAYER(other) {
+ FixIntermissionClient(other);
+
+ if(other.winning)
+ bprint(other.netname, " ^7wins.\n");
+ }
}
if(cvar("g_campaign"))
CampaignPreIntermission();
localcmd("\nsv_hook_gameend;");
+}
- // WriteByte (MSG_ALL, SVC_INTERMISSION);
-};
-
/*
============
CheckRules_Player
@@ -1702,7 +1718,7 @@
if(WinningConditionHelper_zeroisworst)
leadlimit = 0; // not supported in this mode
- if(g_dm || g_tdm || g_arena || (g_race && !g_race_qualifying) || g_nexball)
+ if(g_dm || g_tdm || g_arena || g_ca || (g_race && !g_race_qualifying) || g_nexball)
// these modes always score in increments of 1, thus this makes sense
{
if(leaderfrags != WinningConditionHelper_topscore)
Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -420,87 +420,111 @@
string formatmessage(string msg)
{
- float p, p1, p2;
- float n;
- string escape;
- string replacement;
- p = 0;
- n = 7;
- while (1)
- {
- if (n < 1)
- break; // too many replacements
- n = n - 1;
- p1 = strstr(msg, "%", p); // NOTE: this destroys msg as it's a tempstring!
- p2 = strstr(msg, "\\", p); // NOTE: this destroys msg as it's a tempstring!
+ float p, p1, p2;
+ float n;
+ string escape;
+ string replacement;
+ p = 0;
+ n = 7;
- if (p1 < 0)
- p1 = p2;
- if (p2 < 0)
- p2 = p1;
- p = min(p1, p2);
+ while (1) {
+ if (n < 1)
+ break; // too many replacements
- if (p < 0)
- break;
- replacement = substring(msg, p, 2);
- escape = substring(msg, p + 1, 1);
- if (escape == "%")
- replacement = "%";
- else if (escape == "\\")
- replacement = "\\";
- else if (escape == "n")
- replacement = "\n";
- else if (escape == "a")
- replacement = ftos(floor(self.armorvalue));
- else if (escape == "h")
- replacement = ftos(floor(self.health));
- else if (escape == "l")
- replacement = NearestLocation(self.origin);
- else if (escape == "y")
- replacement = NearestLocation(self.cursor_trace_endpos);
- else if (escape == "d")
- replacement = NearestLocation(self.death_origin);
- else if (escape == "w")
- {
- float wep;
- wep = self.weapon;
- if (!wep)
- wep = self.switchweapon;
- if (!wep)
- wep = self.cnt;
- replacement = W_Name(wep);
- }
- else if (escape == "W")
- {
- if (self.items & IT_SHELLS) replacement = "shells";
- else if (self.items & IT_NAILS) replacement = "bullets";
- else if (self.items & IT_ROCKETS) replacement = "rockets";
- else if (self.items & IT_CELLS) replacement = "cells";
- else replacement = "batteries"; // ;)
- }
- else if (escape == "x")
- {
- replacement = self.cursor_trace_ent.netname;
- if (!replacement || !self.cursor_trace_ent)
- replacement = "nothing";
- }
- else if (escape == "p")
- {
- if (self.last_selected_player)
- replacement = self.last_selected_player.netname;
- else
- replacement = "(nobody)";
- }
- else if (escape == "s")
- replacement = ftos(vlen(self.velocity - self.velocity_z * '0 0 1'));
- else if (escape == "S")
- replacement = ftos(vlen(self.velocity));
- msg = strcat(substring(msg, 0, p), replacement, substring(msg, p+2, strlen(msg) - (p+2)));
- p = p + strlen(replacement);
- }
- return msg;
+ n = n - 1;
+ p1 = strstr(msg, "%", p); // NOTE: this destroys msg as it's a tempstring!
+ p2 = strstr(msg, "\\", p); // NOTE: this destroys msg as it's a tempstring!
+
+ if (p1 < 0)
+ p1 = p2;
+
+ if (p2 < 0)
+ p2 = p1;
+
+ p = min(p1, p2);
+
+ if (p < 0)
+ break;
+
+ replacement = substring(msg, p, 2);
+ escape = substring(msg, p + 1, 1);
+
+ if (escape == "%")
+ replacement = "%";
+ else if (escape == "\\")
+ replacement = "\\";
+ else if (escape == "n")
+ replacement = "\n";
+ else if (escape == "a")
+ replacement = ftos(floor(self.armorvalue));
+ else if (escape == "h")
+ replacement = ftos(floor(self.health));
+ else if (escape == "l")
+ replacement = NearestLocation(self.origin);
+ else if (escape == "y")
+ replacement = NearestLocation(self.cursor_trace_endpos);
+ else if (escape == "d")
+ replacement = NearestLocation(self.death_origin);
+ else if (escape == "w") {
+ float wep;
+ wep = self.weapon;
+ if (!wep)
+ wep = self.switchweapon;
+ if (!wep)
+ wep = self.cnt;
+ replacement = W_Name(wep);
+ } else if (escape == "W") {
+ if (self.items & IT_SHELLS) replacement = "shells";
+ else if (self.items & IT_NAILS) replacement = "bullets";
+ else if (self.items & IT_ROCKETS) replacement = "rockets";
+ else if (self.items & IT_CELLS) replacement = "cells";
+ else replacement = "batteries"; // ;)
+ } else if (escape == "x") {
+ replacement = self.cursor_trace_ent.netname;
+ if (!replacement || !self.cursor_trace_ent)
+ replacement = "nothing";
+ } else if (escape == "p") {
+ if (self.last_selected_player)
+ replacement = self.last_selected_player.netname;
+ else
+ replacement = "(nobody)";
+ } else if (escape == "s")
+ replacement = ftos(vlen(self.velocity - self.velocity_z * '0 0 1'));
+ else if (escape == "S")
+ replacement = ftos(vlen(self.velocity));
+ else if (escape == "v") {
+ float weapon_number;
+ local entity stats;
+
+ if(self.classname == "spectator")
+ stats = self.enemy;
+ else
+ stats = self;
+
+ weapon_number = stats.weapon;
+
+ if (!weapon_number)
+ weapon_number = stats.switchweapon;
+
+ if (!weapon_number)
+ weapon_number = stats.cnt;
+
+ if(stats.cvar_cl_accuracy_data_share && stats.stats_fired[weapon_number - 1])
+ replacement = ftos(bound(0, floor(100 * stats.stats_hit[weapon_number - 1] / stats.stats_fired[weapon_number - 1]), 100));
+ else
+ replacement = "~"; // or something to indicate NULL, not available
+ }
+
+ msg = strcat(substring(msg, 0, p), replacement, substring(msg, p+2, strlen(msg) - (p+2)));
+ p = p + strlen(replacement);
+ }
+ return msg;
}
+float boolean(float value) { // if value is 0 return FALSE (0), otherwise return TRUE (1)
+ return (value == 0) ? FALSE : TRUE;
+}
+
/*
=============
GetCvars
@@ -610,13 +634,18 @@
GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");
GetCvars_handleFloat(s, f, cvar_cl_hitsound, "cl_hitsound");
+ GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_share, "cl_accuracy_data_share");
+ GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_receive, "cl_accuracy_data_receive");
+
+ self.cvar_cl_accuracy_data_share = boolean(self.cvar_cl_accuracy_data_share);
+ self.cvar_cl_accuracy_data_receive = boolean(self.cvar_cl_accuracy_data_receive);
+
#ifdef ALLOW_FORCEMODELS
GetCvars_handleFloat(s, f, cvar_cl_forceplayermodels, "cl_forceplayermodels");
GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromnexuiz, "cl_forceplayermodelsfromnexuiz");
#endif
GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
-
// fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
if (f > 0)
{
@@ -935,7 +964,7 @@
}
else
{
- if (g_lms)
+ if (g_lms || g_ca)
{
start_ammo_shells = cvar("g_lms_start_ammo_shells");
start_ammo_nails = cvar("g_lms_start_ammo_nails");
@@ -973,7 +1002,7 @@
if (t < 0) // "default" weapon selection
{
- if (g_lms)
+ if (g_lms || g_ca)
t = (e.spawnflags & WEPSPAWNFLAG_NORMAL);
else if (g_race || g_cts)
t = (i == WEP_LASER);
@@ -1103,6 +1132,8 @@
float sv_pitch_max;
float sv_pitch_fixyaw;
+float sv_accuracy_data_share;
+
void readlevelcvars(void)
{
g_bugrigs = cvar("g_bugrigs");
@@ -1128,112 +1159,119 @@
g_touchexplode_force = cvar("g_touchexplode_force");
#ifdef ALLOW_FORCEMODELS
- sv_clforceplayermodels = cvar("sv_clforceplayermodels");
+ sv_clforceplayermodels = cvar("sv_clforceplayermodels");
#endif
- sv_loddistance1 = cvar("sv_loddistance1");
- sv_loddistance2 = cvar("sv_loddistance2");
+ sv_loddistance1 = cvar("sv_loddistance1");
+ sv_loddistance2 = cvar("sv_loddistance2");
+
if(sv_loddistance2 <= sv_loddistance1)
sv_loddistance2 = 1073741824; // enough to turn off LOD 2 reliably
- sv_clones = cvar("sv_clones");
- sv_cheats = cvar("sv_cheats");
- sv_gentle = cvar("sv_gentle");
- sv_foginterval = cvar("sv_foginterval");
- g_cloaked = cvar("g_cloaked");
- g_jump_grunt = cvar("g_jump_grunt");
- g_footsteps = cvar("g_footsteps");
- g_grappling_hook = cvar("g_grappling_hook");
- g_jetpack = cvar("g_jetpack");
- g_laserguided_missile = cvar("g_laserguided_missile");
- g_midair = cvar("g_midair");
- g_minstagib = cvar("g_minstagib");
- g_nixnex = cvar("g_nixnex");
- g_nixnex_with_laser = cvar("g_nixnex_with_laser");
- g_norecoil = cvar("g_norecoil");
- g_vampire = cvar("g_vampire");
- g_bloodloss = cvar("g_bloodloss");
- sv_maxidle = cvar("sv_maxidle");
- sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
- sv_pogostick = cvar("sv_pogostick");
- sv_doublejump = cvar("sv_doublejump");
- g_ctf_reverse = cvar("g_ctf_reverse");
+
+ sv_clones = cvar("sv_clones");
+ sv_cheats = cvar("sv_cheats");
+ sv_gentle = cvar("sv_gentle");
+ sv_foginterval = cvar("sv_foginterval");
+ g_cloaked = cvar("g_cloaked");
+ g_jump_grunt = cvar("g_jump_grunt");
+ g_footsteps = cvar("g_footsteps");
+ g_grappling_hook = cvar("g_grappling_hook");
+ g_jetpack = cvar("g_jetpack");
+ g_laserguided_missile = cvar("g_laserguided_missile");
+ g_midair = cvar("g_midair");
+ g_minstagib = cvar("g_minstagib");
+ g_nixnex = cvar("g_nixnex");
+ g_nixnex_with_laser = cvar("g_nixnex_with_laser");
+ g_norecoil = cvar("g_norecoil");
+ g_vampire = cvar("g_vampire");
+ g_bloodloss = cvar("g_bloodloss");
+ sv_maxidle = cvar("sv_maxidle");
+ sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
+ sv_pogostick = cvar("sv_pogostick");
+ sv_doublejump = cvar("sv_doublejump");
+ g_ctf_reverse = cvar("g_ctf_reverse");
sv_autotaunt = cvar("sv_autotaunt");
sv_taunt = cvar("sv_taunt");
- inWarmupStage = cvar("g_warmup");
- g_warmup_limit = cvar("g_warmup_limit");
- g_warmup_allguns = cvar("g_warmup_allguns");
- g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
+ inWarmupStage = cvar("g_warmup");
+ g_warmup_limit = cvar("g_warmup_limit");
+ g_warmup_allguns = cvar("g_warmup_allguns");
+ g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
- if ((g_race && g_race_qualifying == 2) || g_runematch || g_arena || g_assault || cvar("g_campaign"))
- inWarmupStage = 0; // these modes cannot work together, sorry
+ if ((g_race && g_race_qualifying == 2) || g_runematch || g_arena || g_assault || cvar("g_campaign"))
+ inWarmupStage = 0; // these modes cannot work together, sorry
- g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
- g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo");
- g_pickup_respawntime_short = cvar("g_pickup_respawntime_short");
- g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium");
- g_pickup_respawntime_long = cvar("g_pickup_respawntime_long");
- g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup");
- g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon");
- g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo");
- g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short");
- g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium");
- g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long");
- g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup");
+ g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
+ g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo");
+ g_pickup_respawntime_short = cvar("g_pickup_respawntime_short");
+ g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium");
+ g_pickup_respawntime_long = cvar("g_pickup_respawntime_long");
+ g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup");
+ g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon");
+ g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo");
+ g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short");
+ g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium");
+ g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long");
+ g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup");
- if (g_minstagib) g_nixnex = g_weaponarena = 0;
- if (g_nixnex) g_weaponarena = 0;
- g_weaponarena = 0;
+ if (g_minstagib) g_nixnex = g_weaponarena = 0;
+ if (g_nixnex) g_weaponarena = 0;
+ g_weaponarena = 0;
- g_weaponspeedfactor = cvar("g_weaponspeedfactor");
- g_weaponratefactor = cvar("g_weaponratefactor");
- g_weapondamagefactor = cvar("g_weapondamagefactor");
- g_weaponforcefactor = cvar("g_weaponforcefactor");
+ g_weaponspeedfactor = cvar("g_weaponspeedfactor");
+ g_weaponratefactor = cvar("g_weaponratefactor");
+ g_weapondamagefactor = cvar("g_weapondamagefactor");
+ g_weaponforcefactor = cvar("g_weaponforcefactor");
- g_pickup_shells = cvar("g_pickup_shells");
- g_pickup_shells_max = cvar("g_pickup_shells_max");
- g_pickup_nails = cvar("g_pickup_nails");
- g_pickup_nails_max = cvar("g_pickup_nails_max");
- g_pickup_rockets = cvar("g_pickup_rockets");
- g_pickup_rockets_max = cvar("g_pickup_rockets_max");
- g_pickup_cells = cvar("g_pickup_cells");
- g_pickup_cells_max = cvar("g_pickup_cells_max");
- g_pickup_fuel = cvar("g_pickup_fuel");
- g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack");
- g_pickup_fuel_max = cvar("g_pickup_fuel_max");
- g_pickup_armorsmall = cvar("g_pickup_armorsmall");
- g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max");
- g_pickup_armormedium = cvar("g_pickup_armormedium");
- g_pickup_armormedium_max = cvar("g_pickup_armormedium_max");
- g_pickup_armorbig = cvar("g_pickup_armorbig");
- g_pickup_armorbig_max = cvar("g_pickup_armorbig_max");
- g_pickup_armorlarge = cvar("g_pickup_armorlarge");
- g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max");
- g_pickup_healthsmall = cvar("g_pickup_healthsmall");
- g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max");
- g_pickup_healthmedium = cvar("g_pickup_healthmedium");
- g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max");
- g_pickup_healthlarge = cvar("g_pickup_healthlarge");
- g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max");
- g_pickup_healthmega = cvar("g_pickup_healthmega");
- g_pickup_healthmega_max = cvar("g_pickup_healthmega_max");
+ g_pickup_shells = cvar("g_pickup_shells");
+ g_pickup_shells_max = cvar("g_pickup_shells_max");
+ g_pickup_nails = cvar("g_pickup_nails");
+ g_pickup_nails_max = cvar("g_pickup_nails_max");
+ g_pickup_rockets = cvar("g_pickup_rockets");
+ g_pickup_rockets_max = cvar("g_pickup_rockets_max");
+ g_pickup_cells = cvar("g_pickup_cells");
+ g_pickup_cells_max = cvar("g_pickup_cells_max");
+ g_pickup_fuel = cvar("g_pickup_fuel");
+ g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack");
+ g_pickup_fuel_max = cvar("g_pickup_fuel_max");
+ g_pickup_armorsmall = cvar("g_pickup_armorsmall");
+ g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max");
+ g_pickup_armormedium = cvar("g_pickup_armormedium");
+ g_pickup_armormedium_max = cvar("g_pickup_armormedium_max");
+ g_pickup_armorbig = cvar("g_pickup_armorbig");
+ g_pickup_armorbig_max = cvar("g_pickup_armorbig_max");
+ g_pickup_armorlarge = cvar("g_pickup_armorlarge");
+ g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max");
+ g_pickup_healthsmall = cvar("g_pickup_healthsmall");
+ g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max");
+ g_pickup_healthmedium = cvar("g_pickup_healthmedium");
+ g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max");
+ g_pickup_healthlarge = cvar("g_pickup_healthlarge");
+ g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max");
+ g_pickup_healthmega = cvar("g_pickup_healthmega");
+ g_pickup_healthmega_max = cvar("g_pickup_healthmega_max");
- g_pinata = cvar("g_pinata");
+ g_pinata = cvar("g_pinata");
- g_weapon_stay = cvar("g_weapon_stay");
- if (!g_weapon_stay && (cvar("deathmatch") == 2))
- g_weapon_stay = 1;
+ g_weapon_stay = cvar("g_weapon_stay");
+
+ if (!g_weapon_stay && (cvar("deathmatch") == 2))
+ g_weapon_stay = 1;
+
g_ghost_items = cvar("g_ghost_items");
+
if(g_ghost_items >= 1)
g_ghost_items = 0.13; // default alpha value
- if not(inWarmupStage)
- game_starttime = cvar("g_start_delay");
+ if not(inWarmupStage)
+ game_starttime = cvar("g_start_delay");
sv_pitch_min = cvar("sv_pitch_min");
sv_pitch_max = cvar("sv_pitch_max");
sv_pitch_fixyaw = cvar("sv_pitch_fixyaw");
- readplayerstartcvars();
+ sv_accuracy_data_share = boolean(cvar("sv_accuracy_data_share"));
+
+ readplayerstartcvars();
}
/*
Modified: branches/nexuiz-2.0/data/qcsrc/server/movelib.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/movelib.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/movelib.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -4,13 +4,13 @@
Simulate drag
self.velocity = movelib_dragvec(self.velocity,0.02,0.5);
**/
-vector movelib_dragvec(float drag, float exp)
+vector movelib_dragvec(float drag, float exp_)
{
float lspeed,ldrag;
lspeed = vlen(self.velocity);
ldrag = lspeed * drag;
- ldrag = ldrag * (drag * exp);
+ ldrag = ldrag * (drag * exp_);
ldrag = 1 - (ldrag / lspeed);
return self.velocity * ldrag;
@@ -20,12 +20,12 @@
Simulate drag
self.velocity *= movelib_dragflt(somespeed,0.01,0.7);
**/
-float movelib_dragflt(float fspeed,float drag,float exp)
+float movelib_dragflt(float fspeed,float drag,float exp_)
{
float ldrag;
ldrag = fspeed * drag;
- ldrag = ldrag * ldrag * exp;
+ ldrag = ldrag * ldrag * exp_;
ldrag = 1 - (ldrag / fspeed);
return ldrag;
Modified: branches/nexuiz-2.0/data/qcsrc/server/nexball.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/nexball.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/nexball.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -675,8 +675,7 @@
setsize (missile, '0 0 0', '0 0 0');
setorigin (missile, w_shotorg);
- missile.velocity = w_shotdir * cvar("g_balance_nexball_secondary_speed");
- W_SetupProjectileVelocity(missile);
+ W_SetupProjectileVelocity(missile, cvar("g_balance_nexball_secondary_speed"), 0);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_Nexball_Touch;
missile.think = SUB_Remove;
Modified: branches/nexuiz-2.0/data/qcsrc/server/progs.src
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/progs.src 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/progs.src 2009-11-21 14:34:05 UTC (rev 8302)
@@ -6,6 +6,7 @@
builtins.qh
extensions.qh
post-builtins.qh
+../common/mathlib.qh
constants.qh
../common/constants.qh
../common/util.qh
@@ -167,3 +168,5 @@
monsters/m_monsters.qc
monsters/monster_zombie.qc
csqcprojectile.qc
+
+../common/mathlib.qc
Modified: branches/nexuiz-2.0/data/qcsrc/server/scores.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/scores.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/scores.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -246,7 +246,7 @@
if(teamscores_entities_count)
return;
if(g_lms) return;
- if(g_arena) return;
+ if(g_arena || g_ca) return;
if(g_race && !g_race_qualifying) return;
sk = player.scorekeeper;
@@ -496,12 +496,12 @@
s = strcat(s, ":human");
else
s = strcat(s, ":bot");
- if(p.classname != "player" && !g_arena && !g_lms)
+ if(p.classname != "player" && !g_arena && !g_ca && !g_lms)
s = strcat(s, ":spectator");
}
else
{
- if(p.classname == "player" || g_arena || g_lms)
+ if(p.classname == "player" || g_arena || g_ca || g_lms)
s = GetPlayerScoreString(p, 2);
else
s = "-666";
Modified: branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -67,7 +67,7 @@
self.dmg = 2;
}
// check for falling damage
- if(!self.hook.state)
+ if(!self.hook.state && !g_ca)
{
dm = vlen(self.oldvelocity) - vlen(self.velocity); // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
if (self.deadflag)
Modified: branches/nexuiz-2.0/data/qcsrc/server/t_items.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/t_items.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/t_items.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -64,7 +64,7 @@
void Item_Show (entity e, float mode)
{
- e.effects &~= EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT;
+ e.effects &~= EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST;
if (mode > 0)
{
// make the item look normal, and be touchable
@@ -124,6 +124,8 @@
if (e.strength_finished || e.invincible_finished)
e.effects |= EF_ADDITIVE | EF_FULLBRIGHT;
+ if (cvar("g_nodepthtestitems"))
+ e.effects |= EF_NODEPTHTEST;
if (cvar("g_fullbrightitems"))
e.effects |= EF_FULLBRIGHT;
@@ -786,7 +788,7 @@
weaponsInMap |= weaponid;
- if(g_lms)
+ if(g_lms || g_ca)
{
startitem_failed = TRUE;
remove(self);
@@ -1268,7 +1270,7 @@
if(!cvar("g_powerup_superhealth"))
return;
- if(g_arena && !cvar("g_arena_powerups"))
+ if((g_arena || g_ca) && !cvar("g_arena_powerups"))
return;
if(g_minstagib) {
@@ -1293,7 +1295,7 @@
if(!cvar("g_powerup_strength"))
return;
- if(g_arena && !cvar("g_arena_powerups"))
+ if((g_arena || g_ca) && !cvar("g_arena_powerups"))
return;
if(g_minstagib) {
@@ -1309,7 +1311,7 @@
if(!cvar("g_powerup_shield"))
return;
- if(g_arena && !cvar("g_arena_powerups"))
+ if((g_arena || g_ca) && !cvar("g_arena_powerups"))
return;
if(g_minstagib) {
Modified: branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -93,6 +93,7 @@
cvar_set("g_runematch", ftos(g_runematch));
cvar_set("g_lms", ftos(g_lms));
cvar_set("g_arena", ftos(g_arena));
+ cvar_set("g_ca", ftos(g_ca));
cvar_set("g_keyhunt", ftos(g_keyhunt));
cvar_set("g_assault", ftos(g_assault));
cvar_set("g_onslaught", ftos(g_onslaught));
@@ -118,6 +119,7 @@
found += (g_runematch = (!found && (prev != GAME_RUNEMATCH) && cvar("g_runematch")));
found += (g_lms = (!found && (prev != GAME_LMS) && cvar("g_lms")));
found += (g_arena = (!found && (prev != GAME_ARENA) && cvar("g_arena")));
+ found += (g_ca = (!found && (prev != GAME_CA) && cvar("g_ca")));
found += (g_keyhunt = (!found && (prev != GAME_KEYHUNT) && cvar("g_keyhunt")));
found += (g_assault = (!found && (prev != GAME_ASSAULT) && cvar("g_assault")));
found += (g_onslaught = (!found && (prev != GAME_ONSLAUGHT) && cvar("g_onslaught")));
@@ -294,6 +296,14 @@
arena_roundbased = cvar("g_arena_roundbased");
}
+ if(g_ca)
+ {
+ game = GAME_CA;
+ gamemode_name = "Clan Arena";
+ ActivateTeamplay();
+ fraglimit_override = cvar("g_ca_point_limit");
+ leadlimit_override = cvar("g_ca_point_leadlimit");
+ }
if(g_keyhunt)
{
game = GAME_KEYHUNT;
Modified: branches/nexuiz-2.0/data/qcsrc/server/vehicles/racer.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/vehicles/racer.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/vehicles/racer.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,8 +1,10 @@
#define RACER_MIN '-80 -80 -40'
#define RACER_MAX '80 80 40'
+#define RACER_TICRATE 0.05
void racer_exit(float eject);
void racer_enter();
+//void racer_think();
float racer_power_air;
float racer_power_solid;
@@ -14,24 +16,35 @@
float racer_shieldmax;
float racer_energymax;
+float racer_pitchspeed;
+float racer_turnspeed;
+float racer_turnroll;
+float racer_speed_forward;
+float racer_speed_strafe;
+
float jetfromtag_power;
float jetfromtag_normpower;
vector jetfromtag_origin;
float jetfromtag_groundcontact;
-.entity ccamera;
+//pow(drag, exp)
void racer_loadsettings()
{
- racer_power_min = cvar("g_vehicle_racer_power_min");
- racer_power_air = cvar("g_vehicle_racer_power_air");
- racer_power_solid = cvar("g_vehicle_racer_power_solid");
+ racer_power_min = cvar("g_vehicle_racer_power_min") * 0.25;
+ racer_power_air = cvar("g_vehicle_racer_power_air") * 0.25;
+ racer_power_solid = cvar("g_vehicle_racer_power_solid") * 0.25;
racer_springlength = cvar("g_vehicle_racer_springlength");
racer_anglestabilizer = cvar("g_vehicle_racer_anglestabilizer");
+ racer_pitchspeed = cvar("g_vehicle_racer_pitchspeed");
+ racer_turnspeed = cvar("g_vehicle_racer_turnspeed");
+ racer_turnroll = cvar("g_vehicle_racer_turnroll");
+ racer_speed_forward = cvar("g_vehicle_racer_speed_forward");
+ racer_speed_strafe = cvar("g_vehicle_racer_speed_strafe");
racer_healthmax = cvar("g_vehicle_racer_health");
racer_shieldmax = cvar("g_vehicle_racer_shield");
- racer_energymax = cvar("g_vehicle_racer_energy_max");
+ racer_energymax = cvar("g_vehicle_racer_energy");
}
@@ -47,7 +60,7 @@
traceline(jetfromtag_origin, force_dir, MOVE_NORMAL, self);
//te_lightning1(world,jetfromtag_origin, force_dir);
- trace_fraction *= trace_fraction;
+ //trace_fraction *= trace_fraction;
solid_frac = 1 - trace_fraction;
air_frac = trace_fraction;
@@ -61,6 +74,8 @@
jetfromtag_power = solid_pwr + air_pwr;
jetfromtag_normpower = jetfromtag_power / (racer_power_air + racer_power_solid);
+ //te_lightning1(world,jetfromtag_origin,jetfromtag_origin + normalize(self.origin - force_dir) * max(jetfromtag_power, racer_power_min));
+ //return normalize(self.origin - force_dir) * max(jetfromtag_power, racer_power_min);
return v_forward * max(jetfromtag_power, racer_power_min);
}
@@ -106,7 +121,7 @@
push_vector_z += (br_push - bl_push);
push_vector_z *= 360;
- if(!push_vector_z)
+ if (push_vector_z == 1.0)
if(self.angles_z > 0)
self.angles_z = max(0, self.angles_z - (racer_anglestabilizer * frametime));
else
@@ -114,7 +129,7 @@
else
self.angles_z += push_vector_z * frametime;
- if(!push_vector_x)
+ if (push_vector_x == 1.0)
if(self.angles_x > 0)
self.angles_x = max(0, self.angles_x - (racer_anglestabilizer * frametime));
else
@@ -123,7 +138,6 @@
self.angles_x += push_vector_x * frametime;
}
-
void racer_bolt_explode()
{
vector org2;
@@ -151,6 +165,24 @@
remove (self);
}
+void racer_rocket_touch()
+{
+ if(other.owner == self.owner)
+ return;
+
+ PROJECTILE_TOUCH;
+ /*
+ if(pointcontents(self.origin) == CONTENT_SKY)
+ {
+ self.think = SUB_Remove;
+ self.nextthink = time;
+ return;
+ }
+ */
+
+ racer_rocket_explode();
+}
+
void racer_fire_cannon(string tagname)
{
entity bolt;
@@ -175,6 +207,7 @@
void racer_rocket_think()
{
vector newdir,olddir;
+ float oldspeed, newspeed;
self.nextthink = time;
@@ -194,9 +227,12 @@
self.touch = racer_rocket_explode;
olddir = normalize(self.velocity);
+ oldspeed = vlen(self.velocity);
+
newdir = normalize((0.5 * (self.enemy.absmin + self.enemy.absmax)) - self.origin);
+ newspeed = oldspeed + self.lip;
- self.velocity = normalize(olddir + newdir * cvar("g_vehicle_spiderbot_rocket_turnrate")) * cvar("g_vehicle_racer_rocket_speed");
+ self.velocity = normalize(olddir + newdir * self.wait) * newspeed;
UpdateCSQCProjectile(self);
}
@@ -208,12 +244,14 @@
rocket = spawn();
setsize (rocket, '-1 -1 -1', '1 1 1');
+ rocket.lip = cvar("g_vehicle_racer_rocket_accel") * sys_ticrate;
+ rocket.wait = cvar("g_vehicle_racer_rocket_turnrate");
rocket.solid = SOLID_BBOX;
rocket.movetype = MOVETYPE_FLYMISSILE;
rocket.flags = FL_PROJECTILE;
rocket.owner = self;
rocket.realowner = self.owner;
- rocket.touch = racer_rocket_explode;
+ rocket.touch = racer_rocket_touch;
rocket.bot_dodge = TRUE;
rocket.bot_dodgerating = cvar("g_vehicle_racer_rocket_damage");
setorigin(rocket, gettaginfo(self,gettagindex(self,tagname)));
@@ -291,20 +329,21 @@
return 1;
}
+
racer_align4point();
racer.angles_x *= -1;
makevectors(racer.angles);
// Rotate Body
- ftmp = cvar("g_vehicle_racer_turnspeed") * sys_ticrate;
+ ftmp = racer_turnspeed * sys_ticrate;
ftmp2 = ftmp * -1;
ftmp = bound(ftmp2,shortangle_f(player.v_angle_y - racer.angles_y,racer.angles_y),ftmp);
ftmp2 = safeangle(racer.angles_y + ftmp);
// Roll
- ftmp = bound(-90,shortangle_f(player.v_angle_z + ((racer.angles_y - ftmp2) * cvar("g_vehicle_racer_turnroll")), racer.angles_z),90);
+ ftmp = bound(-90,shortangle_f(player.v_angle_z + ((racer.angles_y - ftmp2) * racer_turnroll), racer.angles_z),90);
ftmp = safeangle(racer.angles_z + ftmp);
racer.angles_z = ftmp;
@@ -312,36 +351,36 @@
racer.angles_y = ftmp2;
// Pitch Body
- ftmp = cvar("g_vehicle_racer_pitchspeed") * sys_ticrate;
+ ftmp = racer_pitchspeed * sys_ticrate;
ftmp2 = ftmp * -1;
ftmp = bound(ftmp2,shortangle_f(player.v_angle_x - racer.angles_x,racer.angles_x),ftmp);
+ //ftmp = 0;
racer.angles_x = safeangle(racer.angles_x + ftmp);
racer.angles_x *= -1;
-
if(player.movement_x != 0)
{
if(player.movement_x > 0)
- df += v_forward * cvar("g_vehicle_racer_speed_forward");
+ df += v_forward * racer_speed_forward;
else if(player.movement_x < 0)
- df -= v_forward * cvar("g_vehicle_racer_speed_forward");
+ df -= v_forward * racer_speed_forward;
}
if(player.movement_y != 0)
{
if(player.movement_y < 0)
- df -= v_right * cvar("g_vehicle_racer_speed_strafe");
+ df -= v_right * racer_speed_strafe;
else if(player.movement_y > 0)
- df += v_right * cvar("g_vehicle_racer_speed_strafe");
+ df += v_right * racer_speed_strafe;
}
// limit _z to avoid flying on normal thrust
if(df_z > 0)
df_z = min(df_z,700);
+
// Afterburn
-
//if (jetfromtag_groundcontact)
if (player.BUTTON_JUMP)
if(racer.vehicle_energy >= (cvar("g_vehicle_racer_speed_afterburn_cost")* frametime))
@@ -402,13 +441,13 @@
player.vehicle_reload1 = (time - racer.lip) / (racer.delay-racer.lip);
//player.vehicle_energy = racer.vehicle_energy;
- vehicle_stdproc_shiledregen(CCVAR("_shield"), frametime);
- vehicle_stdproc_healthregen(CCVAR("_health"), frametime);
+ vehicle_stdproc_shiledregen(racer_shieldmax, frametime);
+ vehicle_stdproc_healthregen(racer_healthmax, frametime);
if (racer.wait < time)
- vehicle_stdproc_energyregen(CCVAR("_energy"), frametime);
+ vehicle_stdproc_energyregen(racer_energymax, frametime);
else
- player.vehicle_energy = (racer.vehicle_energy / CCVAR("_energy"));
+ player.vehicle_energy = (racer.vehicle_energy / racer_energymax);
self = player;
@@ -419,13 +458,68 @@
return 1;
}
-void racer_think()
+void racer_exitthink()
{
- movelib_beak_simple(cvar("g_vehicle_racer_speed_stop"));
+ float a, b, c;
self.nextthink = time;
+
+ a = racer_anglestabilizer;
+ b = racer_springlength;
+ c = racer_power_solid;
+
+ racer_anglestabilizer = 36;
+ racer_springlength = 96;
+ racer_power_solid = 300;
+
+ racer_align4point();
+
+ if(self.velocity_z < 0)
+ self.velocity_z *= 0.95;
+
+ racer_anglestabilizer = a;
+ racer_springlength = b;
+ racer_power_solid = c;
+
+ self.velocity_x *= 0.95;
+ self.velocity_y *= 0.95;
}
+void racer_spawnthink()
+{
+ float a, b, c;
+ vector dorg;
+
+ self.nextthink = time;
+
+ a = racer_anglestabilizer;
+ b = racer_springlength;
+ c = racer_power_solid;
+
+ racer_anglestabilizer = 36;
+ racer_springlength = 96;
+ racer_power_solid = 300;
+
+ // self.velocity_z += sin(time * 128) * 4;
+
+ racer_align4point();
+
+ if(self.velocity_z < 0)
+ self.velocity_z *= 0.98;
+
+ racer_anglestabilizer = a;
+ racer_springlength = b;
+ racer_power_solid = c;
+
+ self.velocity_x *= 0.95;
+ self.velocity_y *= 0.95;
+
+ dorg = self.pos1 - self.origin ;
+
+ self.velocity_x = bound(-32, self.velocity_x + dorg_x, 32);
+ self.velocity_y = bound(-32, self.velocity_y + dorg_y, 32);
+}
+
void racer_enter()
{
self.owner = other;
@@ -465,11 +559,19 @@
WriteAngle(MSG_ONE, 0); // roll
}
+void racer_spawn();
+void racer_return()
+{
+ pointparticles(particleeffectnum("teleport"), self.enemy.origin + '0 0 64', '0 0 0', 1);
+ self.enemy.think = racer_spawn;
+ self.enemy.nextthink = time;
+ remove(self);
+}
+
void racer_exit(float eject)
{
self.colormap = 1024;
self.flags = FL_NOTARGET;
- self.velocity = '0 0 0';
if not (self.owner)
return;
@@ -485,7 +587,7 @@
if (self.deadflag == DEAD_NO)
{
- self.think = racer_think;
+ self.think = racer_exitthink;
self.nextthink = time;
}
@@ -502,9 +604,7 @@
self.owner.view_ofs = PL_VIEW_OFS;
self.owner.event_damage = PlayerDamage;
self.owner.hud = HUD_NORMAL;
- //self.owner.exteriormodeltoclient = self;
-
self.vehicle_hudmodel.viewmodelforclient = self;
if(eject)
@@ -520,26 +620,15 @@
}
self.owner = world;
-}
-void racer_entercap()
-{
- entity oldself;
- entity oldother;
-
- oldself = self;
- oldother = other;
-
- other = self.enemy;
- self = self.owner;
-
- racer_enter();
-
- other = oldother;
- self = oldself;
-
- self.think = SUB_Remove;
- self.nextthink = time;
+ if (self.deadflag != DEAD_NO)
+ {
+ entity ret;
+ ret = spawn();
+ ret.enemy = self;
+ ret.think = racer_return;
+ ret.nextthink = time + cvar("g_vehicle_racer_respawntime");
+ }
}
void racer_touch()
@@ -568,15 +657,6 @@
if(other.vehicle != world)
return;
- /*
- entity entercap;
- entercap = spawn();
- entercap.enemy = other;
- entercap.owner = self;
- entercap.think = racer_entercap;
- entercap.nextthink = time;
- */
-
racer_enter();
}
@@ -592,14 +672,14 @@
void racer_spawn()
{
- self.think = racer_think;
+ self.think = racer_spawnthink;
self.nextthink = time;
self.flags = FL_NOTARGET;
self.effects = 0;
- self.vehicle_health = CCVAR("_health");
- self.vehicle_shield = CCVAR("_shield");
+ self.vehicle_health = racer_healthmax;
+ self.vehicle_shield = racer_shieldmax;
self.event_damage = vehicle_stdproc_damage;
self.touch = racer_touch;
@@ -638,7 +718,7 @@
RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
self.alpha = -1;
- self.nextthink = time + 10;
+ self.nextthink = time + cvar("g_vehicle_racer_respawntime");
self.think = racer_spawn;
self.movetype = MOVETYPE_NONE;
self.effects = EF_NODRAW;
@@ -740,10 +820,30 @@
racer_loadsettings();
self.vehicle_flags = VHF_HASSHIELD | VHF_SHIELDREGEN;
+
+ traceline(self.origin,self.origin - '0 0 2048',MOVE_WORLDONLY,self);
+ if(trace_startsolid)
+ {
+ dprint("WARNING: vehicle_racer placed in solid\n");
+ traceline(self.origin + '0 0 512' ,self.origin - '0 0 2048',MOVE_WORLDONLY,self);
+ if(trace_startsolid || trace_fraction == 1.0)
+ {
+ dprint("ERROR: vehicle_racer placed in more then 512 units into solid\n");
+ remove(self);
+ return;
+ }
+ }
+
+ if(trace_fraction != 1.0)
+ setorigin(self,trace_endpos + '0 0 128');
+ else
+ dprint("WARNING: vehicle_racer placed more then 2048 units above ground.\n");
+
precache_model ("models/vehicles/wakizashi.dpm");
precache_model ("models/vehicles/wakizashi_cockpit.dpm");
- precache_model ("models/rocket.md3");
+ precache_model ("maps/bspmodel.bsp");
+
self.think = racer_dinit;
self.nextthink = time + 1;
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/vehicles/spiderbot.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/vehicles/spiderbot.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/vehicles/spiderbot.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -601,14 +601,15 @@
return TRUE;
}
-//void spiderbot_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
void spiderbot_spawn()
{
self.frame = 5;
self.think = spiderbot_think;
self.nextthink = time;
- self.velocity = '0 0 -2000';
+ setsize(self,spiderbot_MIN,spiderbot_MAX);
+
+ self.velocity = '0 0 0';
self.vehicle_health = CCVAR("_health");
self.vehicle_shield = CCVAR("_shield");
self.event_damage = vehicle_stdproc_damage;
@@ -624,7 +625,7 @@
self.deadflag = DEAD_NO;
self.bot_attack = TRUE;
self.flags |= FL_NOTARGET;
- setsize(self,spiderbot_MIN,spiderbot_MAX);
+ self.vehicle_hudmodel.viewmodelforclient = self;
setorigin(self,self.spiderbot_spawnpnt.origin);
self.angles = self.spiderbot_spawnpnt.angles;
@@ -647,7 +648,7 @@
sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("rocket_explode"), findbetterlocation (self.origin, 16), '0 0 0', 1);
- RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_TURRET, world);
+ RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_SBBLOWUP, world);
self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = -1;
self.nextthink = time + cvar("g_vehicle_spiderbot_respawntime");
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_common.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_common.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,9 +1,3 @@
-.float bullets_hit[WEP_COUNT]; //for hitscan bullets hit
-.float bullets_fired[WEP_COUNT]; //for hitscan bullets fired
-
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(bullets_hit);
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(bullets_fired);
-
void W_GiveWeapon (entity e, float wep, string name)
{
entity oldself;
@@ -32,15 +26,14 @@
local vector hitloc, force, endpoint, dir;
local entity ent, endent;
local float endq3surfaceflags;
- //local entity explosion;
- float did_hit;
+
float length;
vector beampos;
string snd;
entity pseudoprojectile;
float f, ffs;
- did_hit = 0;
+ float hit;
railgun_start = start;
railgun_end = end;
@@ -131,11 +124,11 @@
//for stats so that team hit will count as a miss
if(ent.flags & FL_CLIENT)
if(ent.deadflag == DEAD_NO)
- did_hit = 1;
+ hit = 1;
if(teams_matter)
if(ent.team == self.team)
- did_hit = 0;
+ hit = 0;
f = ExponentialFalloff(mindist, maxdist, halflifedist, (ent.origin - start) * dir);
ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, (ent.origin - start) * dir);
@@ -152,23 +145,18 @@
ent = findfloat(ent, railgunhit, TRUE);
}
- //calculate hits and fired shots for hitscan
+ // calculate hits and fired shots for hitscan
if not(inWarmupStage)
- if not(self.isbot)
{
- self.bullets_fired[self.weapon] += 1;
+ self.stats_fired[self.weapon - 1] += 1;
+ self.stat_fired = self.weapon + 64 * floor(self.stats_fired[self.weapon - 1]);
- if(did_hit)
- self.bullets_hit[self.weapon] += 1;
-
- // update the client and store in addstat() in g_world
- self.damage_hits = self.weapon + 64 * rint(self.bullets_hit[self.weapon]);
- self.maxdamage_fired = self.weapon + 64 * rint(self.bullets_fired[self.weapon]);
+ if(hit) {
+ self.stats_hit[self.weapon - 1] += 1;
+ self.stat_hit = self.weapon + 64 * floor(self.stats_hit[self.weapon - 1]);
+ }
}
- // we're done with the explosion entity, remove it
- //remove(explosion);
-
trace_endpos = endpoint;
trace_ent = endent;
trace_dphitq3surfaceflags = endq3surfaceflags;
@@ -181,9 +169,6 @@
{
float f;
- float hit;
- hit = 0;
-
f = pow(bound(0, vlen(self.velocity) / vlen(self.oldvelocity), 1), 2); // energy multiplier
if(other.solid == SOLID_BSP)
@@ -199,14 +184,6 @@
railgun_start = self.origin - 2 * frametime * self.velocity;
railgun_end = self.origin + 2 * frametime * self.velocity;
- if(other.flags & FL_CLIENT)
- if(other.deadflag == DEAD_NO)
- hit = 1;
-
- if(teamplay)
- if(other.team == self.owner.team)
- hit = 0;
-
Damage(other, self, self.owner, self.dmg * f, self.projectiledeathtype, self.origin, self.dmg_force * normalize(self.velocity) * f);
damage_headshotbonus = 0;
@@ -218,17 +195,15 @@
announce(self.owner, "announcer/male/awesome.wav");
}
- //calculate hits for ballistic weapons
- if not(inWarmupStage)
- if not(self.owner.isbot)
+ // calculate hits for ballistic weapons
+ if (other.flags & FL_CLIENT) // is the player a client
+ if (other.deadflag == DEAD_NO) // is the victim a corpse
+ if ((!(teamplay)) | (other.team != self.owner.team)) // not teamplay (ctf, kh, tdm etc) or the victim is in the same team
+ if not(inWarmupStage) // not in warm up stage
{
- if(hit)
- self.owner.bullets_hit[self.owner.weapon] += 1;
- // update the client
- self.owner.damage_hits = self.owner.weapon + 64 * rint(self.owner.bullets_hit[self.owner.weapon]);
+ self.owner.stats_hit[self.owner.weapon - 1] += 1;
+ self.owner.stat_hit = self.owner.weapon + 64 * floor(self.owner.stats_hit[self.owner.weapon - 1]);
}
-
- //sound (self, CHAN_PROJECTILE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
}
self.enemy = other; // don't hit the same player twice with the same bullet
@@ -342,6 +317,7 @@
{
endzcurveparticles();
}
+
void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
{
float lag, dt, savetime;
@@ -361,8 +337,7 @@
proj.movetype = MOVETYPE_FLY;
proj.think = SUB_Remove;
proj.nextthink = time + lifetime; // min(pLifetime, vlen(world.maxs - world.mins) / pSpeed);
- proj.velocity = (dir + randomvec() * spread) * pSpeed;
- W_SetupProjectileVelocity(proj);
+ W_SetupProjectileVelocityEx(proj, dir, v_up, pSpeed, 0, spread);
proj.angles = vectoangles(proj.velocity);
proj.dmg_radius = cvar("g_ballistics_materialconstant") / bulletconstant;
// so: bulletconstant = bullet mass / area of bullet circle
@@ -377,14 +352,6 @@
proj.oldvelocity = proj.velocity;
- //calculate fired bullets for ballistics
- if not(inWarmupStage)
- if not(self.isbot)
- {
- self.bullets_fired[self.weapon] += 1;
- self.maxdamage_fired = self.weapon + 64 * rint(self.bullets_fired[self.weapon]);
- }
-
if(cvar("g_antilag_bullets"))
if(pSpeed >= cvar("g_antilag_bullets"))
{
@@ -414,6 +381,13 @@
savetime = frametime;
frametime = 0.05;
+ // update the accuracy stats - increase shots fired by 1
+ if not(inWarmupStage)
+ {
+ oldself.stats_fired[oldself.weapon - 1] += 1;
+ oldself.stat_fired = oldself.weapon + 64 * floor(oldself.stats_fired[oldself.weapon - 1]);
+ }
+
for(;;)
{
// DP tracetoss is stupid and always traces in 0.05s
@@ -430,13 +404,6 @@
self.velocity = v0;
self.gravity = g0;
- if not(inWarmupStage)
- if not(self.isbot)
- {
- self.bullets_fired[self.weapon] += 1;
- self.maxdamage_fired = self.weapon + 64 * rint(self.bullets_fired[self.weapon]);
- }
-
if(vlen(trace_endpos - self.origin) > 16)
zcurveparticles_from_tracetoss(eff, self.origin, trace_endpos, self.velocity);
if(trace_fraction == 1)
@@ -456,7 +423,7 @@
break;
// hit the player
- W_BallisticBullet_Hit ();
+ W_BallisticBullet_Hit();
}
// go through solid!
@@ -477,6 +444,13 @@
return;
}
+ // update the accuracy stats
+ if not(inWarmupStage)
+ {
+ self.stats_fired[self.weapon - 1] += 1;
+ self.stat_fired = self.weapon + 64 * floor(self.stats_fired[self.weapon - 1]);
+ }
+
if(tracereffects & EF_RED)
CSQCProjectile(proj, TRUE, PROJECTILE_BULLET_GLOWING_TRACER, TRUE);
else if(tracereffects & EF_BLUE)
@@ -485,11 +459,9 @@
CSQCProjectile(proj, TRUE, PROJECTILE_BULLET, TRUE);
}
-
void fireBullet (vector start, vector dir, float spread, float damage, float force, float dtype, float tracer)
{
vector end;
- //local entity e;
dir = normalize(dir + randomvec() * spread);
end = start + dir * MAX_SHOT_DISTANCE;
@@ -498,7 +470,7 @@
else
traceline_antilag (self, start, end, FALSE, self, ANTILAG_LATENCY(self));
- end = trace_endpos;
+ end = trace_endpos;
if ((trace_fraction != 1.0) && (pointcontents (trace_endpos) != CONTENT_SKY))
{
@@ -511,7 +483,6 @@
trace_endpos = end;
}
-
void W_PrepareExplosionByDamage(entity attacker, void() explode)
{
self.takedamage = DAMAGE_NO;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -101,9 +101,7 @@
s_z = v_forward_y;
}
s = s * cvar("g_balance_crylink_primary_spread");
- proj.velocity = (w_shotdir + right * s_y + up * s_z) * cvar("g_balance_crylink_primary_speed");
-// proj.velocity = (w_shotdir + randomvec() * cvar("g_balance_crylink_primary_spread")) * cvar("g_balance_crylink_primary_speed");
- W_SetupProjectileVelocity(proj);
+ W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, cvar("g_balance_crylink_primary_speed"), 0, 0);
proj.touch = W_Crylink_Touch;
if(counter == 0)
SUB_SetFade(proj, time + cvar("g_balance_crylink_primary_middle_lifetime"), cvar("g_balance_crylink_primary_middle_fadetime"));
@@ -154,8 +152,7 @@
setorigin (proj, w_shotorg);
setsize(proj, '0 0 0', '0 0 0');
- proj.velocity = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * cvar("g_balance_crylink_secondary_spread")) * cvar("g_balance_crylink_secondary_speed");
- W_SetupProjectileVelocity(proj);
+ W_SetupProjectileVelocityEx(proj, (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * cvar("g_balance_crylink_secondary_spread")), v_up, cvar("g_balance_crylink_secondary_speed"), 0, 0);
proj.touch = W_Crylink_Touch2;
if(counter == (shots - 1) / 2)
SUB_SetFade(proj, time + cvar("g_balance_crylink_secondary_middle_lifetime"), cvar("g_balance_crylink_secondary_middle_fadetime"));
@@ -176,25 +173,20 @@
}
}
-
-/*
// experimental lightning gun
void W_Crylink_Attack3 (void)
{
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_primary_ammo");
- W_SetupShot (self, TRUE, 0, "weapons/crylink_fire.wav");
+ self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_secondary_ammo");
+ W_SetupShot (self, TRUE, 0, "weapons/crylink_fire2.wav", cvar("g_balance_crylink_secondary_damage"));
- traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * 1000, FALSE, self, self.ping * 0.001);
+ traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_crylink_secondary_radius"), FALSE, self, ANTILAG_LATENCY(self));
- pointparticles(particleeffectnum("lightning_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
- pointparticles(particleeffectnum("lightning_impact", trace_endpos, trace_plane_normal * 1000, 1);
- trailparticles(world, particleeffectnum("lightning_beam", w_shotorg, trace_endpos);
+ te_lightning1(self, w_shotorg, trace_endpos);
if (trace_fraction < 1)
- Damage(trace_ent, self, self, cvar("g_balance_crylink_primary_damage"), WEP_CRYLINK | HITTYPE_SECONDARY, trace_endpos, '0 0 0');
+ Damage(trace_ent, self, self, cvar("g_balance_crylink_secondary_damage"), WEP_CRYLINK | HITTYPE_SECONDARY, trace_endpos, cvar("g_balance_crylink_secondary_force") * w_shotdir);
}
-*/
void spawnfunc_weapon_crylink (void)
{
@@ -221,7 +213,10 @@
if (self.BUTTON_ATCK2)
if (weapon_prepareattack(1, cvar("g_balance_crylink_secondary_refire")))
{
- W_Crylink_Attack2();
+ if(cvar("g_balance_crylink_secondary_lightning"))
+ W_Crylink_Attack3();
+ else
+ W_Crylink_Attack2();
weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -127,8 +127,7 @@
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_cells = self.ammo_cells - cvar("g_balance_electro_primary_ammo");
proj.movetype = MOVETYPE_FLY;
- proj.velocity = w_shotdir * cvar("g_balance_electro_primary_speed");
- W_SetupProjectileVelocity(proj);
+ W_SETUPPROJECTILEVELOCITY(proj, g_balance_electro_primary);
proj.angles = vectoangles(proj.velocity);
proj.touch = W_Plasma_TouchExplode;
setsize(proj, '0 0 -3', '0 0 -3');
@@ -166,8 +165,7 @@
//proj.glow_size = 50;
//proj.glow_color = 45;
proj.movetype = MOVETYPE_BOUNCE;
- proj.velocity = (w_shotdir + randomvec() * cvar("g_balance_electro_secondary_spread")) * cvar("g_balance_electro_secondary_speed") + v_up * cvar("g_balance_electro_secondary_speed_up");
- W_SetupProjectileVelocity(proj);
+ W_SETUPPROJECTILEVELOCITY_UP(proj, g_balance_electro_secondary);
proj.touch = W_Plasma_Touch;
setsize(proj, '0 0 -3', '0 0 -3');
proj.takedamage = DAMAGE_YES;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_fireball.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_fireball.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_fireball.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -145,8 +145,7 @@
setorigin(proj, w_shotorg);
proj.movetype = MOVETYPE_FLY;
- proj.velocity = w_shotdir * cvar("g_balance_fireball_secondary_speed");
- W_SetupProjectileVelocity(proj);
+ W_SETUPPROJECTILEVELOCITY(proj, g_balance_fireball_secondary);
proj.angles = vectoangles(proj.velocity);
proj.touch = W_Fireball_TouchExplode;
setsize(proj, '-16 -16 -16', '16 16 16');
@@ -280,9 +279,8 @@
proj.think = W_Firemine_Think;
proj.nextthink = time;
proj.damageforcescale = cvar("g_balance_fireball_primary_damageforcescale");
- proj.velocity = w_shotdir * cvar("g_balance_fireball_primary_speed") + v_up * cvar("g_balance_fireball_primary_speed_up");
proj.pushltime = time + cvar("g_balance_fireball_primary_lifetime");
- W_SetupProjectileVelocity(proj);
+ W_SETUPPROJECTILEVELOCITY_UP(proj, g_balance_fireball_primary);
proj.angles = vectoangles(proj.velocity);
proj.flags = FL_PROJECTILE;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_grenadelauncher.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_grenadelauncher.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_grenadelauncher.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -99,8 +99,7 @@
gren.think = adaptor_think2use;
gren.use = W_Grenade_Explode;
gren.touch = W_Grenade_Touch1;
- gren.velocity = w_shotdir * cvar("g_balance_grenadelauncher_primary_speed") + v_up * cvar("g_balance_grenadelauncher_primary_speed_up");
- W_SetupProjectileVelocity(gren);
+ W_SETUPPROJECTILEVELOCITY_UP(gren, g_balance_grenadelauncher_primary);
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
@@ -138,8 +137,7 @@
gren.health = cvar("g_balance_grenadelauncher_secondary_health");
gren.damageforcescale = cvar("g_balance_grenadelauncher_secondary_damageforcescale");
gren.event_damage = W_Grenade_Damage;
- gren.velocity = w_shotdir * cvar("g_balance_grenadelauncher_secondary_speed") + v_up * cvar("g_balance_grenadelauncher_secondary_speed_up");
- W_SetupProjectileVelocity(gren);
+ W_SETUPPROJECTILEVELOCITY_UP(gren, g_balance_grenadelauncher_secondary);
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_hagar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_hagar.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_hagar.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -61,8 +61,7 @@
setsize(missile, '0 0 0', '0 0 0');
missile.movetype = MOVETYPE_FLY;
- missile.velocity = (w_shotdir + randomvec() * cvar("g_balance_hagar_primary_spread")) * cvar("g_balance_hagar_primary_speed");
- W_SetupProjectileVelocity(missile);
+ W_SETUPPROJECTILEVELOCITY(missile, g_balance_hagar_primary);
missile.angles = vectoangles (missile.velocity);
missile.flags = FL_PROJECTILE;
@@ -97,9 +96,7 @@
setsize(missile, '0 0 0', '0 0 0');
missile.movetype = MOVETYPE_BOUNCEMISSILE;
- missile.velocity = (w_shotdir + randomvec() * cvar("g_balance_hagar_secondary_spread")) * cvar("g_balance_hagar_secondary_speed");
- W_SetupProjectileVelocity(missile);
- missile.avelocity = '100 10 10';
+ W_SETUPPROJECTILEVELOCITY(missile, g_balance_hagar_secondary);
missile.angles = vectoangles (missile.velocity);
missile.flags = FL_PROJECTILE;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_hlac.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_hlac.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_hlac.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -58,9 +58,7 @@
setorigin (missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
- missile.velocity = (w_shotdir + randomvec() * spread) * cvar("g_balance_hlac_primary_speed");
-
- W_SetupProjectileVelocity(missile);
+ W_SetupProjectileVelocity(missile, cvar("g_balance_hlac_primary_speed"), spread);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_HLAC_Touch;
@@ -102,9 +100,7 @@
setorigin (missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
- missile.velocity = (w_shotdir + randomvec() * spread) * cvar("g_balance_hlac_secondary_speed");
-
- W_SetupProjectileVelocity(missile);
+ W_SetupProjectileVelocity(missile, cvar("g_balance_hlac_secondary_speed"), spread);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_HLAC_Touch2;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -72,10 +72,9 @@
setsize(missile, '0 0 0', '0 0 0');
if (issecondary == 1)
- missile.velocity = w_shotdir * cvar("g_balance_laser_secondary_speed");
+ W_SETUPPROJECTILEVELOCITY(missile, g_balance_laser_secondary);
else
- missile.velocity = w_shotdir * cvar("g_balance_laser_primary_speed");
- W_SetupProjectileVelocity(missile);
+ W_SETUPPROJECTILEVELOCITY(missile, g_balance_laser_primary);
missile.angles = vectoangles (missile.velocity);
//missile.glow_color = 250; // 244, 250
//missile.glow_size = 120;
@@ -98,6 +97,18 @@
}
}
+void W_Laser_Attack2 (void) // gauntlet
+{
+ W_SetupShot (self, TRUE, 0, "weapons/gauntlet_fire.wav", cvar("g_balance_laser_primary_damage"));
+
+ traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_laser_primary_radius"), FALSE, self, ANTILAG_LATENCY(self));
+
+ pointparticles(particleeffectnum("laser_gauntlet"), w_shotorg + w_shotdir * cvar("g_balance_laser_primary_radius"), '0 0 0', 1);
+
+ if (trace_fraction < 1)
+ Damage(trace_ent, self, self, cvar("g_balance_laser_primary_damage"), WEP_LASER | HITTYPE_SECONDARY, trace_endpos, cvar("g_balance_laser_primary_force") * w_shotdir);
+}
+
void spawnfunc_weapon_laser (void)
{
weapon_defaultspawnfunc(WEP_LASER);
@@ -126,7 +137,10 @@
if (self.BUTTON_ATCK)
if (weapon_prepareattack(0, cvar("g_balance_laser_primary_refire")))
{
- W_Laser_Attack(0);
+ if(cvar("g_balance_laser_gauntlet"))
+ W_Laser_Attack2();
+ else
+ W_Laser_Attack(0);
weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_laser_primary_animtime"), w_ready);
}
if (self.BUTTON_ATCK2)
@@ -152,6 +166,7 @@
precache_model ("models/weapons/v_laser.md3");
precache_model ("models/weapons/h_laser.dpm");
precache_sound ("weapons/lasergun_fire.wav");
+ precache_sound ("weapons/gauntlet_fire.wav");
}
else if (req == WR_SETUP)
weapon_setup(WEP_LASER);
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -179,10 +179,10 @@
gren.nextthink = time + cvar("g_balance_porto_primary_lifetime");
gren.think = W_Porto_Think;
gren.touch = W_Porto_Touch;
- gren.velocity = w_shotdir * cvar("g_balance_porto_primary_speed");
if(self.items & IT_STRENGTH)
- gren.velocity = gren.velocity * cvar("g_balance_powerup_strength_force");
- W_SetupProjectileVelocity(gren);
+ W_SetupProjectileVelocity(gren, cvar("g_balance_porto_primary_speed") * cvar("g_balance_powerup_strength_force"), 0);
+ else
+ W_SetupProjectileVelocity(gren, cvar("g_balance_porto_primary_speed"), 0);
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_rocketlauncher.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_rocketlauncher.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_rocketlauncher.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -319,10 +319,9 @@
setorigin (missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
if(g_laserguided_missile && self.laser_on)
- missile.velocity = w_shotdir * cvar("g_balance_rocketlauncher_laserguided_speedstart") * g_weaponspeedfactor;
+ W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_laserguided_speedstart"), 0);
else
- missile.velocity = w_shotdir * cvar("g_balance_rocketlauncher_speedstart") * g_weaponspeedfactor;
- W_SetupProjectileVelocity(missile);
+ W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_speedstart"), 0);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_Rocket_Touch;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_shotgun.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_shotgun.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_shotgun.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,4 +1,3 @@
-
void W_Shotgun_Attack (void)
{
float sc;
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_tuba.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_tuba.qc 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_tuba.qc 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,5 +1,7 @@
-#define TUBA_NOTE(n) strcat("weapons/tuba_note", ftos(n), ".wav")
+//#define TUBA_NOTE(n) strcat("weapons/tuba_note", ftos(n), ".wav")
.float tuba_notecount;
+.entity tuba_note;
+.float tuba_smoketime;
float Tuba_GetNote(entity pl, float hittype)
{
@@ -68,10 +70,38 @@
return note;
}
+float W_Tuba_NoteSendEntity(entity to, float sf)
+{
+ WriteByte(MSG_ENTITY, ENT_CLIENT_TUBANOTE);
+ WriteByte(MSG_ENTITY, (sf & 1) | ((self.cnt + 42) * 2));
+ if(sf & 1)
+ {
+ WriteCoord(MSG_ENTITY, self.origin_x);
+ WriteCoord(MSG_ENTITY, self.origin_y);
+ WriteCoord(MSG_ENTITY, self.origin_z);
+ }
+ return TRUE;
+}
+
+void W_Tuba_NoteThink()
+{
+ self.nextthink = time;
+ if(self.owner.origin != self.origin)
+ {
+ setorigin(self, self.owner.origin);
+ self.SendFlags |= 1;
+ }
+ if(time > self.teleport_time)
+ {
+ self.owner.tuba_note = world;
+ remove(self);
+ }
+}
+
void W_Tuba_Attack(float hittype)
{
vector o;
- float c;
+ float c, n;
W_SetupShot(self, FALSE, 2, "", cvar("g_balance_tuba_damage"));
if(self.tuba_notecount)
{
@@ -83,11 +113,43 @@
self.tuba_notecount = TRUE;
c = CHAN_WEAPON2;
}
- sound(self, c, TUBA_NOTE(Tuba_GetNote(self, hittype)), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), cvar("g_balance_tuba_attenuation"));
+
+ n = Tuba_GetNote(self, hittype);
+
+ if(self.tuba_note)
+ {
+ if(self.tuba_note.cnt != n)
+ {
+ /*
+ self.tuba_note.cnt = n;
+ self.tuba_note.SendFlags |= 2;
+ */
+ remove(self.tuba_note);
+ self.tuba_note = world;
+ }
+ }
+
+ if not(self.tuba_note)
+ {
+ self.tuba_note = spawn();
+ self.tuba_note.owner = self;
+ self.tuba_note.cnt = n;
+ self.tuba_note.think = W_Tuba_NoteThink;
+ self.tuba_note.nextthink = time;
+ Net_LinkEntity(self.tuba_note, FALSE, 0, W_Tuba_NoteSendEntity);
+ }
+
+ self.tuba_note.teleport_time = time + cvar("g_balance_tuba_refire") * 2; // so it can get prolonged safely
+
+ //sound(self, c, TUBA_NOTE(n), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), cvar("g_balance_tuba_attenuation"));
RadiusDamage(self, self, cvar("g_balance_tuba_damage"), cvar("g_balance_tuba_edgedamage"), cvar("g_balance_tuba_radius"), world, cvar("g_balance_tuba_force"), hittype | WEP_TUBA, world);
o = gettaginfo(self.exteriorweaponentity, 0);
- pointparticles(particleeffectnum("smoke_ring"), o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
+ if(time > self.tuba_smoketime)
+ {
+ pointparticles(particleeffectnum("smoke_ring"), o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
+ self.tuba_smoketime = time + 0.25;
+ }
}
void spawnfunc_weapon_tuba (void)
@@ -121,14 +183,24 @@
if (weapon_prepareattack(0, cvar("g_balance_tuba_refire")))
{
W_Tuba_Attack(0);
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_tuba_animtime"), w_ready);
+ //weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_tuba_animtime"), w_ready);
+ weapon_thinkf(WFRAME_IDLE, cvar("g_balance_tuba_animtime"), w_ready);
}
if (self.BUTTON_ATCK2)
if (weapon_prepareattack(1, cvar("g_balance_tuba_refire")))
{
W_Tuba_Attack(HITTYPE_SECONDARY);
- weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_tuba_animtime"), w_ready);
+ //weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_tuba_animtime"), w_ready);
+ weapon_thinkf(WFRAME_IDLE, cvar("g_balance_tuba_animtime"), w_ready);
}
+ if(self.tuba_note)
+ {
+ if(!self.BUTTON_ATCK && !self.BUTTON_ATCK2)
+ {
+ remove(self.tuba_note);
+ self.tuba_note = world;
+ }
+ }
}
else if (req == WR_PRECACHE)
{
@@ -136,9 +208,9 @@
precache_model ("models/weapons/v_tuba.md3");
precache_model ("models/weapons/h_tuba.dpm");
- float i;
- for(i = -18; i <= +27; ++i)
- precache_sound(TUBA_NOTE(i));
+ //float i;
+ //for(i = -18; i <= +27; ++i)
+ // precache_sound(TUBA_NOTE(i));
}
else if (req == WR_SETUP)
weapon_setup(WEP_TUBA);
Copied: branches/nexuiz-2.0/data/sound/weapons/gauntlet_fire.ogg (from rev 8300, trunk/data/sound/weapons/gauntlet_fire.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-1.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-1.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-10.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-10.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-11.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-11.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-12.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-12.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-13.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-13.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-14.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-14.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-15.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-15.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-16.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-16.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-17.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-17.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-18.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-18.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-2.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-2.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-3.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-3.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-4.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-4.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-5.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-5.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-6.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-6.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-7.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-7.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-8.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-8.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote-9.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote-9.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote0.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote0.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote1.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote1.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote10.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote10.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote11.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote11.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote12.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote12.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote13.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote13.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote14.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote14.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote15.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote15.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote16.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote16.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote17.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote17.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote18.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote18.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote19.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote19.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote2.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote2.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote20.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote20.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote21.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote21.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote22.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote22.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote23.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote23.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote24.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote24.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote25.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote25.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote26.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote26.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote27.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote27.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote3.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote3.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote4.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote4.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote5.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote5.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote6.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote6.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote7.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote7.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote8.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote8.ogg)
===================================================================
(Binary files differ)
Copied: branches/nexuiz-2.0/data/sound/weapons/tuba_loopnote9.ogg (from rev 8300, trunk/data/sound/weapons/tuba_loopnote9.ogg)
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/vehicle_racer.cfg
===================================================================
--- branches/nexuiz-2.0/data/vehicle_racer.cfg 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/data/vehicle_racer.cfg 2009-11-21 14:34:05 UTC (rev 8302)
@@ -1,5 +1,6 @@
set g_vehicle_racer_reload 1
+set g_vehicle_racer_respawntime 10
set g_vehicle_racer_health 250
set g_vehicle_racer_shield 100
@@ -18,17 +19,17 @@
set g_vehicle_racer_speed_afterburn 3500
set g_vehicle_racer_speed_afterburn_emin 25
-set g_vehicle_racer_speed_afterburn_cost 100
+set g_vehicle_racer_speed_afterburn_cost 50
set g_vehicle_racer_power_air 0
-set g_vehicle_racer_power_solid 1000
+set g_vehicle_racer_power_solid 8000
set g_vehicle_racer_drag 0.25
set g_vehicle_racer_dragexp 0.9
set g_vehicle_racer_downforce 0.01
-set g_vehicle_racer_springlength 150
+set g_vehicle_racer_springlength 125
set g_vehicle_racer_anglestabilizer 18
set g_vehicle_racer_turnspeed 180
@@ -43,6 +44,8 @@
set g_vehicle_racer_laser_cost 2
set g_vehicle_racer_rocket_speed 1500
+set g_vehicle_racer_rocket_accel 1500
+set g_vehicle_racer_rocket_turnrate 0.5
set g_vehicle_racer_rocket_damage 200
set g_vehicle_racer_rocket_radius 100
set g_vehicle_racer_rocket_refire 5
Modified: branches/nexuiz-2.0/misc/tools/autoshader.sh
===================================================================
--- branches/nexuiz-2.0/misc/tools/autoshader.sh 2009-11-21 14:30:36 UTC (rev 8301)
+++ branches/nexuiz-2.0/misc/tools/autoshader.sh 2009-11-21 14:34:05 UTC (rev 8302)
@@ -147,7 +147,7 @@
has_alpha()
{
- convert "$1" -depth 8 RGBA:- | xxd -c 4 -g 1 | grep -v " ff " >/dev/null
+ [ -f "${1%.jpg}_alpha.jpg" ] || convert "$1" -depth 8 RGBA:- | xxd -c 4 -g 1 | grep -v " ff " >/dev/null
}
autoshaders()
Copied: branches/nexuiz-2.0/server/rcon2irc/showlogins.pl (from rev 8300, trunk/server/rcon2irc/showlogins.pl)
===================================================================
--- branches/nexuiz-2.0/server/rcon2irc/showlogins.pl (rev 0)
+++ branches/nexuiz-2.0/server/rcon2irc/showlogins.pl 2009-11-21 14:34:05 UTC (rev 8302)
@@ -0,0 +1,48 @@
+# Nexuiz rcon2irc plugin by Merlijn Hofstra licensed under GPL - showlogins.pl
+# Place this file inside the same directory as rcon2irc.pl and add the full filename to the plugins.
+
+{ my %sl = (
+ show_success => 1,
+ show_failed => 1,
+ failed_interval => 60,
+); $store{plugin_showlogins} = \%sl; }
+
+sub out($$@);
+sub schedule($$);
+
+schedule sub {
+ my ($timer) = @_;
+ if ($store{plugin_showlogins}->{failed_attempts}) {
+ # Generate hostmakes
+ my %temp = undef;
+ my @hostmasks = grep !$temp{$_}++, @{ $store{plugin_showlogins}->{failed_attempts} };
+
+ foreach my $mask (@hostmasks) {
+ my $count = 0;
+ foreach (@{ $store{plugin_showlogins}->{failed_attempts} }) {
+ $count++ if ($_ eq $mask);
+ }
+
+ out irc => 0, "PRIVMSG $config{irc_channel} :\00305* login failed\017 \00304$mask\017 tried to become an IRC admin \00304$count\017 times";
+ }
+
+ $store{plugin_showlogins}->{failed_attempts} = undef;
+ }
+ schedule $timer => $store{plugin_showlogins}->{failed_interval};;
+} => 1;
+
+[ irc => q{:(([^! ]*)![^ ]*) (?i:PRIVMSG) [^&#%]\S* :(.*)} => sub {
+ my ($hostmask, $nick, $command) = @_;
+ my $sl = $store{plugin_showlogins};
+
+ if ($command eq "login $config{irc_admin_password}") {
+ out irc => 0, "PRIVMSG $config{irc_channel} :\00310* login\017 $nick is now logged in as an IRC admin" if ($sl->{show_success});
+ return 0;
+ }
+
+ if ($command =~ m/^login/i && $sl->{show_failed}) {
+ push @{ $store{plugin_showlogins}->{failed_attempts} }, $hostmask;
+ }
+
+ return 0;
+} ],
More information about the nexuiz-commits
mailing list