]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'remotes/origin/terencehill/newpanelhud-dom_points' into terenceh...
authorterencehill <piuntn@gmail.com>
Wed, 3 Nov 2010 19:20:56 +0000 (20:20 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 3 Nov 2010 19:20:56 +0000 (20:20 +0100)
129 files changed:
.gitattributes
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceXonotic.cfg
defaultXonotic.cfg
effectinfo.txt
gfx/crosshair_ring.tga
gfx/crosshaircampingrifle.tga
gfx/crosshaircrylink.tga
gfx/crosshairelectro.tga
gfx/crosshairfireball.tga
gfx/crosshairgrenadelauncher.tga
gfx/crosshairhagar.tga
gfx/crosshairhlac.tga
gfx/crosshairhook.tga
gfx/crosshairlaser.tga
gfx/crosshairminstanex.tga
gfx/crosshairnex.tga
gfx/crosshairporto.tga
gfx/crosshairrocketlauncher.tga
gfx/crosshairseeker.tga
gfx/crosshairshotgun.tga
gfx/crosshairuzi.tga
gfx/hud/default/player_blue.tga [new file with mode: 0644]
gfx/hud/default/player_red.tga [new file with mode: 0644]
gfx/rifle_ring_1.tga [deleted file]
gfx/rifle_ring_2.tga [deleted file]
gfx/rifle_ring_3.tga [deleted file]
gfx/rifle_ring_4.tga [deleted file]
models/domination/dom_axe.tga [deleted file]
models/domination/dom_axe_glow.tga [deleted file]
models/domination/dom_bolt.tga [deleted file]
models/domination/dom_bolt_glow.tga [deleted file]
models/turrets/hellion.md3
qcsrc/client/Defs.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/bgmscript.qc
qcsrc/client/csqc_builtins.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/main.qh
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/particles.qc
qcsrc/client/scoreboard.qc
qcsrc/client/scoreboard.qh
qcsrc/client/target_music.qc
qcsrc/common/campaign_common.qh
qcsrc/common/campaign_file.qc
qcsrc/common/constants.qh
qcsrc/common/mapinfo.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/server/arena.qc
qcsrc/server/campaign.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/clientcommands.qc
qcsrc/server/defs.qh
qcsrc/server/domination.qc
qcsrc/server/extensions.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_rocketflying.qc [new file with mode: 0644]
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src
qcsrc/server/sv_main.qc
qcsrc/server/teamplay.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/units/unit_hellion.qc
qcsrc/server/tturrets/units/unit_machinegun.qc
qcsrc/server/tturrets/units/unit_mlrs.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_uzi.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/common.qh
qcsrc/warpzonelib/server.qc
scripts/shaderlist.txt
sound/misc/hitground1.ogg
sound/misc/hitground2.ogg
sound/misc/hitground3.ogg
sound/misc/hitground4.ogg
sound/misc/metalhitground1.ogg
sound/misc/metalhitground2.ogg
sound/misc/metalhitground3.ogg
sound/misc/metalhitground4.ogg
sound/weapons/campingrifle_fire2.ogg [deleted file]
sound/weapons/campingrifle_fire2.wav [new file with mode: 0644]
sound/weapons/dryfire.wav [new file with mode: 0644]
textures/domination/dom_base.tga [new file with mode: 0644]
textures/domination/dom_base_gloss.tga [new file with mode: 0644]
textures/domination/dom_base_glow.jpg [new file with mode: 0644]
textures/domination/dom_base_norm.tga [new file with mode: 0644]
textures/domination/dom_base_reflect.tga [new file with mode: 0644]
textures/domination/dom_blue.tga [new file with mode: 0644]
textures/domination/dom_blue_reflect.tga [new file with mode: 0644]
textures/domination/dom_pink.tga [new file with mode: 0644]
textures/domination/dom_pink_reflect.tga [new file with mode: 0644]
textures/domination/dom_red.tga [new file with mode: 0644]
textures/domination/dom_red_reflect.tga [new file with mode: 0644]
textures/domination/dom_unclaimed.tga [new file with mode: 0644]
textures/domination/dom_unclaimed_reflect.tga [new file with mode: 0644]
textures/domination/dom_yellow.tga [new file with mode: 0644]
textures/domination/dom_yellow_reflect.tga [new file with mode: 0644]
unit_hellion.cfg
unit_mlrs.cfg
xonotic-credits.txt

index a2b2bfc3a215233e9be344f4b887e7ca6535ef18..ec3bfe3d1054e3a7f5ebd372dee7c3b00e766d3a 100644 (file)
@@ -1,31 +1,41 @@
 * -crlf
 
-*.7z -crlf -diff
+*.0 -diff -crlf
+*.1 crlf=input
+*.3 crlf=input
+*.7z -diff -crlf
 *.ac crlf=input
+*.a -diff -crlf
 *.afm crlf=input
 *.aft crlf=input
+*.ai -diff -crlf
 *.aliases crlf=input
 all crlf=input
 *.am crlf=input
 *.animinfo crlf=input
-*.aps -crlf -diff
+*.aps -diff -crlf
+*.asc -diff -crlf
 *.ase -crlf
 *.bat -crlf
 *.bgs crlf=input
-*.blend -crlf -diff
-*.bmp -crlf -diff
+*.blend1 -diff -crlf
+*.blend -diff -crlf
+blind_id -diff -crlf
+*.bmp -diff -crlf
 branch-manager crlf=input
+*.brand crlf=input
 BSDmakefile crlf=input
 bsp2ent crlf=input
-*.bsp -crlf -diff
-*.cache -crlf -diff
+*.bsp -diff -crlf
+*.cache -diff -crlf
 *.cbp -crlf
-*.cbp -crlf -diff
+*.cbp -diff -crlf
 *.c crlf=input
 *.cfg crlf=input
 *.cg crlf=input
 ChangeLog crlf=input
 CHANGES crlf=input
+cjpeg -diff -crlf
 COMPILING crlf=input
 compress-texture crlf=input
 *.conf crlf=input
@@ -33,42 +43,49 @@ CONTRIBUTORS crlf=input
 COPYING crlf=input
 *.cpp crlf=input
 create crlf=input
+*.cron crlf=input
 *.css crlf=input
-Current -crlf -diff
-*.cvsignore crlf=input
 *.cvswrappers crlf=input
-*.dat -crlf -diff
-*.db -crlf -diff
+*.d0pk -diff -crlf
+*.db -diff -crlf
 *.default crlf=input
 *.def crlf=input
-*.dem -crlf -diff
+*.dem -diff -crlf
 *.dev -crlf
-*.dll -crlf -diff
-DOCS -crlf -diff
+dir -diff -crlf
+djpeg -diff -crlf
+*.dll -diff -crlf
+DOCS -diff -crlf
 *.dot crlf=input
 DoxyConfig crlf=input
+doxyfile crlf=input
 Doxyfile crlf=input
 *.doxygen crlf=input
-*.dpm -crlf -diff
+*.dpm -diff -crlf
 *.dsp -crlf
 *.dsw -crlf
 *.dtd crlf=input
-*.dylib -crlf -diff
+*.dylib -diff -crlf
+empty -diff -crlf
 *.EncoderPlugin crlf=input
-*.ent -crlf
+*.flac -diff -crlf
 *.form crlf=input
 *.framegroups crlf=input
 *.game crlf=input
+*.gdb crlf=input
 gendox crlf=input
 gendoxfunctions crlf=input
 genDoxyfile crlf=input
-*.gif -crlf -diff
+*.gif -diff -crlf
 *.gitattributes crlf=input
 git-branch-manager crlf=input
 git-filter-index crlf=input
 git-filter-repository crlf=input
 *.gitignore crlf=input
+git-pk3-import crlf=input
+git-pk3-merge crlf=input
 git-pullall crlf=input
+git-recurse crlf=input
 git-split-repository crlf=input
 git-svn-checkout crlf=input
 git-svn-update crlf=input
@@ -81,64 +98,70 @@ GPL crlf=input
 *.hs crlf=input
 *.html crlf=input
 *.html-part crlf=input
-*.icns -crlf -diff
-*.ico -crlf -diff
+*.icns -diff -crlf
+*.ico -diff -crlf
+*.idl crlf=input
 *.idsoftware crlf=input
 *.inc crlf=input
 *.in crlf=input
+*.info-1 -diff -crlf
+*.info-2 -diff -crlf
+*.info -diff -crlf
+*.inl crlf=input
 *.instantaction crlf=input
-*.iqm -crlf -diff
+*.iqm -diff -crlf
 *.java crlf=input
 *.jhm crlf=input
 *.jnlp crlf=input
-*.jpg -crlf -diff
+jpegtran -diff -crlf
+*.jpg -diff -crlf
 *.jsmooth crlf=input
+*.la crlf=input
 LGPL crlf=input
 LICENSE crlf=input
-*.lmp -crlf -diff
+*.lmp -diff -crlf
 *.loaders crlf=input
-*.lso -crlf -diff
+*.lso -diff -crlf
+*.m4 crlf=input
 makefile crlf=input
 Makefile crlf=input
-*.makespr32 crlf=input
 makespr32 crlf=input
-*.map -crlf
+*.map -crlf filter=mapclean
 *.mapinfo crlf=input
 *.m crlf=input
-*.md3 -crlf -diff
+*.md3 -diff -crlf
 *.md5anim -crlf
 *.md5mesh -crlf
-*.mdl -crlf -diff
+*.mdl -diff -crlf
 *.med crlf=input
 *.mf crlf=input
-*.mid -crlf -diff
+*.mid -diff -crlf
 *.mk crlf=input
-*.mkdir -crlf -diff
-*.mmpz -crlf -diff
-*.modinfo crlf=input
+*.mkdir -diff -crlf
+*.mmpz -diff -crlf
 *.modules crlf=input
-nexuiz-map-compiler crlf=input
 *.nib -crlf
 *.obj -crlf
-OFFSETS -crlf -diff
-*.ogg -crlf -diff
+OFFSETS -diff -crlf
+*.ogg -diff -crlf
 *.options crlf=input
 pangorc crlf=input
 *.patch crlf=input
 *.patchsets crlf=input
-*.pcx -crlf -diff
-*.pfb -crlf -diff
-*.pfm -crlf -diff
-*.pk3 -crlf -diff
+*.pc crlf=input
+*.pcx -diff -crlf
+*.pfb -diff -crlf
+*.pfm -diff -crlf
+*.pk3 -diff -crlf
 PkgInfo crlf=input
 *.pl crlf=input
 *.plist crlf=input
 *.pm crlf=input
-*.png -crlf -diff
-POSITIONS -crlf -diff
+*.png -diff -crlf
+POSITIONS -diff -crlf
 *.proj -crlf
 *.properties crlf=input
-*.psd -crlf -diff
+*.psd -diff -crlf
 *.py crlf=input
 *.q3map1 crlf=input
 *.qc crlf=input
@@ -147,48 +170,53 @@ POSITIONS -crlf -diff
 *.rb crlf=input
 *.rc2 crlf=input
 *.rc -crlf
+rdjpgcom -diff -crlf
 *.readme crlf=input
 README crlf=input
-*.rtlights -crlf -diff
+*.rtlights -diff -crlf
 SCHEMA crlf=input
 *.scm crlf=input
-SDL -crlf -diff
-SDLMain.m crlf=input
+sdl-config crlf=input
+SDL -diff -crlf
 *.shader crlf=input
 *.sh crlf=input
 *.skin crlf=input
 *.sln -crlf
 *.sounds crlf=input
-*.sp2 -crlf -diff
-*.spr32 -crlf -diff
-*.spr -crlf -diff
+*.sp2 -diff -crlf
+*.spr32 -diff -crlf
+*.spr -diff -crlf
 *.src crlf=input
 *.strings crlf=input
-*.strip crlf=input
 strip crlf=input
-*.svg -crlf -diff
-*.TAB -crlf -diff
-*.tga -crlf -diff
-TMAP -crlf -diff
+*.svg -diff -crlf
+*.TAB -diff -crlf
+*.tga -diff -crlf
+TMAP -diff -crlf
 todo crlf=input
 TODO crlf=input
-*.ttf -crlf -diff
-*.TTF -crlf -diff
+*.ttf -diff -crlf
+*.TTF -diff -crlf
 *.txt crlf=input
-*.TXT crlf=input
 update-shaderlists crlf=input
+*.vbs -crlf
 *.vcproj -crlf
-*.wav -crlf -diff
-*.waypoints -crlf -diff
+versionbuilder crlf=input
+*.wav -diff -crlf
+*.waypoints -diff -crlf
 w crlf=input
 *.width crlf=input
 *.workspace -crlf
-*.xcf -crlf -diff
+wrjpgcom -diff -crlf
+*.xcf -diff -crlf
 *.xlink crlf=input
 *.xml crlf=input
 xonotic-map-compiler-autobuild crlf=input
 xonotic-map-compiler crlf=input
+xonotic-map-screenshot crlf=input
+xonotic-osx-agl crlf=input
+xonotic-osx-sdl crlf=input
 *.xpm crlf=input
-*.zip -crlf -diff
+*.zip -diff -crlf
 zipdiff crlf=input
-*.zym -crlf -diff
+*.zym -diff -crlf
index 158f676844e4c348a85e9015853fee0a21b20b86..22fdaf09dcce3f01b2386439d1575f56d9c1ca49 100644 (file)
@@ -442,8 +442,10 @@ set g_balance_nex_secondary_damagefalloff_halflife 0
 set g_balance_nex_secondary_damagefalloff_forcehalflife 0
 
 set g_balance_nex_charge 0
+set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index 11d85e4335640df92ab106a87df097491e73372a..b1c267342275ccf9f8fa8841d6c6d0183be0b915 100644 (file)
@@ -453,8 +453,10 @@ set g_balance_nex_secondary_damagefalloff_halflife 9999999
 set g_balance_nex_secondary_damagefalloff_forcehalflife 9999999
 
 set g_balance_nex_charge 0
+set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index 654ec6cc10a4baad704f416a09b2d777133f0144..bb704d3ca9064277bedd981c25cdde73b5d4d8d0 100644 (file)
@@ -441,8 +441,10 @@ set g_balance_nex_secondary_damagefalloff_halflife 1500
 set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
 
 set g_balance_nex_charge 0
+set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index 9a49f3da96d7918954d3e9171b4466486252a640..4b4a91c624cd70aaedffaf1ae7c7fb44784f8e0f 100644 (file)
@@ -442,8 +442,10 @@ set g_balance_nex_secondary_damagefalloff_halflife 1500
 set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
 
 set g_balance_nex_charge 0
+set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index 9d4f67a94c6206a08a75c354f20aea20324fc239..0dcdac942024c96ab403a0deb8f205d66c116be4 100644 (file)
@@ -64,8 +64,8 @@ set g_pickup_nails_max 300
 set g_pickup_rockets 25
 set g_pickup_rockets_weapon 15
 set g_pickup_rockets_max 150
-set g_pickup_cells 25
-set g_pickup_cells_weapon 15
+set g_pickup_cells 30
+set g_pickup_cells_weapon 20
 set g_pickup_cells_max 200
 set g_pickup_fuel 25
 set g_pickup_fuel_weapon 15
@@ -435,17 +435,19 @@ set g_balance_nex_secondary_damage 0
 set g_balance_nex_secondary_force 0
 set g_balance_nex_secondary_refire 0
 set g_balance_nex_secondary_animtime 0
-set g_balance_nex_secondary_ammo 5
+set g_balance_nex_secondary_ammo 2
 set g_balance_nex_secondary_damagefalloff_mindist 0
 set g_balance_nex_secondary_damagefalloff_maxdist 0
 set g_balance_nex_secondary_damagefalloff_halflife 0
 set g_balance_nex_secondary_damagefalloff_forcehalflife 0
 
 set g_balance_nex_charge 1
-set g_balance_nex_charge_start 0.25
-set g_balance_nex_charge_rate 0.025
+set g_balance_nex_charge_mindmg 40
+set g_balance_nex_charge_start 0.2
+set g_balance_nex_charge_rate 0.05
+set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_shot_multiplier 0.675
-set g_balance_nex_charge_velocity_rate 0.175
+set g_balance_nex_charge_velocity_rate 0.15
 set g_balance_nex_charge_minspeed 400
 set g_balance_nex_charge_maxspeed 1000
 // }}}
@@ -577,12 +579,12 @@ set g_balance_campingrifle_primary_damage 75
 set g_balance_campingrifle_primary_headshotaddeddamage 75
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 35000
+set g_balance_campingrifle_primary_speed 40000
 set g_balance_campingrifle_primary_lifetime 5
 set g_balance_campingrifle_primary_refire 1.5
 set g_balance_campingrifle_primary_animtime 1.4
 set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
+set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
 set g_balance_campingrifle_primary_burstcost 0
 set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
@@ -591,12 +593,12 @@ set g_balance_campingrifle_secondary_damage 50
 set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
 set g_balance_campingrifle_secondary_spread 0
 set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 30000
+set g_balance_campingrifle_secondary_speed 20000
 set g_balance_campingrifle_secondary_lifetime 5
 set g_balance_campingrifle_secondary_refire 1.5
 set g_balance_campingrifle_secondary_animtime 1.4
 set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
+set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
 set g_balance_campingrifle_secondary_burstcost 0
 set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
 // }}}
index 1746535c951c47d2416a98f9aeb51c3ba0e98649..cf524c7a81bc7225e76a561ebc7458e67979fba5 100644 (file)
@@ -211,7 +211,7 @@ seta crosshair_fireball_color_green 1.0     "crosshair color green component to disp
 seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
 seta crosshair_fireball_color_alpha 1  "crosshair alpha value to display when wielding the fireball"
 seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
-seta crosshair_ring_size 3     "bullet counter ring size for Rifle, velocity ring for Nex"
+seta crosshair_ring_size 2     "bullet counter ring size for Rifle, velocity ring for Nex"
 seta crosshair_campingrifle_bulletcounter_alpha 0.15
 seta crosshair_nexvelocity_alpha 0.15
 seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
@@ -249,6 +249,11 @@ v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
 cl_deathfade 1 // fade screen to dark red when dead, value represents how fast the fade is (higher is faster)
 cl_bobcycle 0 // how long the cycle of up/down view movement takes (only works if cl_bob is not 0), default is 0.6
 cl_bob 0.01 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
+cl_bob2cycle 0 // how long the cycle of left/right view movement takes (only works if cl_bob2 is not 0), default is 0.6
+cl_bob2 0.01 // how much view moves left/right when moving (does not move if cl_bob2cycle is 0), default is 0.01
+cl_bobfall 0.05 "how much the view swings down when falling (influenced by the speed you hit the ground with)"
+cl_bobfallcycle 3 "speed of the bobfall swing"
+cl_bobfallspeed 200 "necessary amount of speed for bob-falling to occur"
 cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
 cl_leanmodel 1 // enables weapon leaning effect when looking around
 cl_leanmodel_side_speed 0.7 "gun leaning sideways speed"
@@ -546,6 +551,7 @@ alias clearmap "disconnect"
 set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
 
 set g_dodging 0 "set to 1 to enable dodging in games"
+set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
 
 seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
 
@@ -609,6 +615,8 @@ set g_arena_respawn_delay 0
 set g_arena_respawn_waves 0
 set g_ca_respawn_delay 0
 set g_ca_respawn_waves 0
+set g_ca_damage2score_multiplier 0.01
+set g_ca_round_timelimit 180
 set g_nexball_respawn_delay 0
 set g_nexball_respawn_waves 0
 set g_as_respawn_delay 0
@@ -1071,8 +1079,8 @@ set sv_vote_singlecount 0 "set to 1 to count votes once after timeout or to 0 to
 set sv_vote_timeout 30 "a vote will timeout after this many seconds"
 set sv_vote_wait 120   "a player can not call a vote again for this many seconds when his vote was not accepted"
 set sv_vote_stop 15    "a player can not call a vote again for this many seconds when he stopped this vote (e.g. to correct it)"
-set sv_vote_majority_factor 0.5        "which quotient of the PLAYERS constitute a majority? (try: 0.667, 0.75 when using the above)"
-set sv_vote_simple_majority_factor 0.667       "which quotient of the VOTERS constitute a majority too? (0 = off, otherwise it must be higher than or equal to sv_vote_majority_factor)"
+set sv_vote_majority_factor 0.5        "which quotient of the PLAYERS constitute a majority? (try: 0.666, 0.75 when using the above)"
+set sv_vote_simple_majority_factor 0.666       "which quotient of the VOTERS constitute a majority too? (0 = off, otherwise it must be higher than or equal to sv_vote_majority_factor)"
 // when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
 set sv_vote_override_mostrecent 0
 alias vhelp "cmd vote help"
@@ -1383,7 +1391,7 @@ seta hud_panel_weapons_timeout_effect "1" "disappearance effect: 0) no effect; 1
 seta hud_panel_notify_time 10 "time that a new entry stays until it fades out"
 seta hud_panel_notify_fadetime 3 "fade out time"
 
-seta hud_panel_modicons_dom_layout 0 "3 possible layouts: 0) only icons; 1) icons and percentage of average pps (points per second); 2) icons and average pps"
+seta hud_panel_modicons_dom_layout 1 "3 possible layouts: 0) only icons; 1) icons and percentage of average pps (points per second); 2) icons and average pps"
 
 seta hud_panel_timer_increment 0 "show elapsed time instead of remaining time"
 
@@ -1406,11 +1414,11 @@ seta scoreboard_columns default
 seta scoreboard_border_thickness 1 "scoreboard border thickness"
 seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
 seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
-seta scoreboard_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard"
-seta scoreboard_color_bg_r 0 "red color component of the HUD background"
-seta scoreboard_color_bg_g 0.4 "green color component of the HUD background"
-seta scoreboard_color_bg_b 0.6 "blue color component of the HUD background"
-seta scoreboard_color_bg_team 0.5 "team color multiplier of the HUD background"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard"
+seta scoreboard_color_bg_r 0 "red color component of the scoreboard background"
+seta scoreboard_color_bg_g 0.4 "green color component of the scoreboard background"
+seta scoreboard_color_bg_b 0.6 "blue color component of the scoreboard background"
+seta scoreboard_color_bg_team 0.5 "team color multiplier of the scoreboard background"
 seta scoreboard_alpha_bg 0.6 "scoreboard background alpha"
 seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
 seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
@@ -1422,6 +1430,7 @@ seta scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on hud_scor
 seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
 seta scoreboard_offset_left 0.04 "how many pixels the scoreboard is offset from the left screen edge"
 seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge"
+seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
 
 // 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"
@@ -1518,8 +1527,7 @@ seta menu_mouse_speed 1 "speed multiplier for the mouse in the menu (does not af
 set menu_use_default_hostname 1
 alias sethostname "set menu_use_default_hostname 0; hostname $*"
 
-// force fog for people who turn it off in game (set this to like 5 if you suspect people are "cheating" that way)
-set sv_foginterval 0
+set sv_foginterval 1 "force enable fog in regular intervals"
 
 // Audio track names (for old-style "cd loop NUMBER" usage)
 set _cdtrack_first "1"
@@ -1549,7 +1557,6 @@ set capturelimit 0
 
 // hud: font size
 seta hud_fontsize 11
-seta hud_fontsize_spec 16
 seta scr_centersize 12
 seta hud_width 560
 // alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; scoreboard_columns_set"
@@ -1641,7 +1648,7 @@ set g_ban_sync_trusted_servers "" "request ban lists from these xonotic servers
 set g_ban_sync_timeout 45      "time out in seconds for the ban sync requests"
 set g_ban_sync_trusted_servers_verify 0        "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
 
-set g_showweaponspawns 0       "1: display sprites for weapon spawns found on the map when a weapon key is pressed and the weapon is not available"
+set g_showweaponspawns 1       "display sprites for weapon spawns found on the map when a weapon key is pressed and the weapon is not available"
 
 alias records "cmd records"
 alias rankings "cmd rankings"
@@ -1970,3 +1977,18 @@ r_shadow_glossexact 1
 
 // use fake light if map has no lightmaps
 r_fakelight 1
+
+// strength sound settings
+set sv_strengthsound_antispam_time 0.1 "minimum distance of strength sounds"
+set sv_strengthsound_antispam_refire_threshold 0.04 "apply minimum distance only if refire of the gun is smaller than this"
+
+// equalize looks better than fullbright
+r_equalize_entities_fullbright 1
+
+// UTF-8
+utf8_enable 1
+
+// safe font defaults
+r_font_hinting 1
+r_font_disable_freetype 0
+r_font_size_snapping 2
index e78e636a4501e04e2e69c69259a01d415e1e06c3..b36570aab4865bcd52cdabb25186d7b059b04fd9 100644 (file)
@@ -4676,8 +4676,8 @@ trailspacing 16
 type static
 color 0x202020 0x404040
 size 2 2
-sizeincrease 2
-alpha 256 256 512
+sizeincrease 0.2
+alpha 256 256 256
 airfriction -4
 velocityjitter 4 4 4
 type smoke
@@ -4688,7 +4688,7 @@ type bubble
 tex 62 62
 color 0x404040 0x808080
 size 1 1
-alpha 256 256 256
+alpha 256 256 128
 gravity -0.125
 bounce 1.5
 liquidfriction 4
index 970ba1562c179bbf58dc4d6fd853505dea5aaae6..f574012e6bc33934178f8986efce51c25c9fe65e 100644 (file)
Binary files a/gfx/crosshair_ring.tga and b/gfx/crosshair_ring.tga differ
index 8e9d2d9fab481cbe5a6d82dd49c1f0305570e940..c304046e8097c99f6cdc2511ca120bc16207bdb6 100644 (file)
Binary files a/gfx/crosshaircampingrifle.tga and b/gfx/crosshaircampingrifle.tga differ
index 27b2dc4dd7954c4322f22cd6ae2c96620fa85459..6b4491754d98a7a628ec8fd0703ef3be0b133d9e 100644 (file)
Binary files a/gfx/crosshaircrylink.tga and b/gfx/crosshaircrylink.tga differ
index 8a08cb87bb3b2c51ca13e567cb892f3e12c3942e..0b408190d02f665289fc005ee077d8b434f96f5b 100644 (file)
Binary files a/gfx/crosshairelectro.tga and b/gfx/crosshairelectro.tga differ
index 75e033960f0f58373ec416b4441073a18ab09efc..2c919b783e52facf8f0a4970d8cae9731ddb1fd8 100644 (file)
Binary files a/gfx/crosshairfireball.tga and b/gfx/crosshairfireball.tga differ
index 829697211a1324e00fc84b107b0a11997ca501d3..3b93b76e53012b066d4e94a413014ecca5d8a8e7 100644 (file)
Binary files a/gfx/crosshairgrenadelauncher.tga and b/gfx/crosshairgrenadelauncher.tga differ
index fa1cb81ed7a777beb2b531ee78165becf2740003..4c4457b87a32bf0e03895da23b4d4d6e80a153ef 100644 (file)
Binary files a/gfx/crosshairhagar.tga and b/gfx/crosshairhagar.tga differ
index 5500910fad65cbe19917d20c1947d66ec8b47f33..76b8d093812efa406eb8a6790ea1072c649e0605 100644 (file)
Binary files a/gfx/crosshairhlac.tga and b/gfx/crosshairhlac.tga differ
index 40e0d1f6f77709259d8ed1edb60f43b304fae8cc..d39b7b15f7081dff38660e0a01e213b7eeebe9b6 100644 (file)
Binary files a/gfx/crosshairhook.tga and b/gfx/crosshairhook.tga differ
index 9e33d7179ac8847150a69576265e2f3ad7cb2ace..884e9f03a373f4d201a8d4470e351bc0de703c2c 100644 (file)
Binary files a/gfx/crosshairlaser.tga and b/gfx/crosshairlaser.tga differ
index f5b8b0926ba1885d99c3c79d89d4af6af938250a..f2810cce21ed9b9fdf1986cd0e93fd609cbb2401 100644 (file)
Binary files a/gfx/crosshairminstanex.tga and b/gfx/crosshairminstanex.tga differ
index 8830856f5614290a582d353d47cb4cd645c77b3d..c304046e8097c99f6cdc2511ca120bc16207bdb6 100644 (file)
Binary files a/gfx/crosshairnex.tga and b/gfx/crosshairnex.tga differ
index 5e42186052462742fa3661117a25b31376fa9fd1..d39b7b15f7081dff38660e0a01e213b7eeebe9b6 100644 (file)
Binary files a/gfx/crosshairporto.tga and b/gfx/crosshairporto.tga differ
index 5eac11d63389f363f29ac132e11c9e753dee0828..ba1b7b17ae8908e02cd59dd2a7e7a11afbe58491 100644 (file)
Binary files a/gfx/crosshairrocketlauncher.tga and b/gfx/crosshairrocketlauncher.tga differ
index 7311550fc6c30d89271d5002c73d81e3b0613bc0..2c919b783e52facf8f0a4970d8cae9731ddb1fd8 100644 (file)
Binary files a/gfx/crosshairseeker.tga and b/gfx/crosshairseeker.tga differ
index 41d8b09903bb7bdae1b5d4175d00a32a06a17873..b30f946e21aed5ccf73c6849284bda7c19452873 100644 (file)
Binary files a/gfx/crosshairshotgun.tga and b/gfx/crosshairshotgun.tga differ
index feda30c7f8265d6729466bb94cf41f36ea851437..1f7e96947001d3a1e3582337d91bcb707a0638ac 100644 (file)
Binary files a/gfx/crosshairuzi.tga and b/gfx/crosshairuzi.tga differ
diff --git a/gfx/hud/default/player_blue.tga b/gfx/hud/default/player_blue.tga
new file mode 100644 (file)
index 0000000..cf10bc5
Binary files /dev/null and b/gfx/hud/default/player_blue.tga differ
diff --git a/gfx/hud/default/player_red.tga b/gfx/hud/default/player_red.tga
new file mode 100644 (file)
index 0000000..aea0ed8
Binary files /dev/null and b/gfx/hud/default/player_red.tga differ
diff --git a/gfx/rifle_ring_1.tga b/gfx/rifle_ring_1.tga
deleted file mode 100644 (file)
index 914de35..0000000
Binary files a/gfx/rifle_ring_1.tga and /dev/null differ
diff --git a/gfx/rifle_ring_2.tga b/gfx/rifle_ring_2.tga
deleted file mode 100644 (file)
index db0a808..0000000
Binary files a/gfx/rifle_ring_2.tga and /dev/null differ
diff --git a/gfx/rifle_ring_3.tga b/gfx/rifle_ring_3.tga
deleted file mode 100644 (file)
index 20348c2..0000000
Binary files a/gfx/rifle_ring_3.tga and /dev/null differ
diff --git a/gfx/rifle_ring_4.tga b/gfx/rifle_ring_4.tga
deleted file mode 100644 (file)
index 07975e2..0000000
Binary files a/gfx/rifle_ring_4.tga and /dev/null differ
diff --git a/models/domination/dom_axe.tga b/models/domination/dom_axe.tga
deleted file mode 100644 (file)
index d6e94cf..0000000
Binary files a/models/domination/dom_axe.tga and /dev/null differ
diff --git a/models/domination/dom_axe_glow.tga b/models/domination/dom_axe_glow.tga
deleted file mode 100644 (file)
index d6e94cf..0000000
Binary files a/models/domination/dom_axe_glow.tga and /dev/null differ
diff --git a/models/domination/dom_bolt.tga b/models/domination/dom_bolt.tga
deleted file mode 100644 (file)
index d5d36ee..0000000
Binary files a/models/domination/dom_bolt.tga and /dev/null differ
diff --git a/models/domination/dom_bolt_glow.tga b/models/domination/dom_bolt_glow.tga
deleted file mode 100644 (file)
index d5d36ee..0000000
Binary files a/models/domination/dom_bolt_glow.tga and /dev/null differ
index 0afeae40364d19df69c2f5aadfb4bd9ee3d38c17..02ab1eed3023fd8afa26d10225bff345ae0b9bf4 100644 (file)
Binary files a/models/turrets/hellion.md3 and b/models/turrets/hellion.md3 differ
index caab7332292524b54ece81f7ecc2d44806f67f86..e816fe221a13bc4994deb8aaf2f90318b1364e38 100644 (file)
@@ -262,3 +262,6 @@ float campingrifle_scope;
 float nex_scope;
 
 float cr_maxbullets;
+
+float bgmtime;
+
index 37937c30758dc079e3c66d3de77f63bfe91f57fb..5ac1f965e3a1d8714da30cd5ebdea66916917257 100644 (file)
@@ -338,7 +338,7 @@ void CSQC_common_hud(void);
 
 void PostInit(void);
 void CSQC_Demo_Camera();
-float HUD_WouldDrawScoreboard ();
+float HUD_WouldDrawScoreboard();
 float view_set;
 float camera_mode;
 float reticle_type;
@@ -468,7 +468,6 @@ void CSQC_UpdateView(float w, float h)
                }
        }
 
-       hud_accuracy_hud = cvar_or("hud_accuracy_hud", 1);
        ColorTranslateMode = cvar("cl_stripcolorcodes");
        activeweapon = getstati(STAT_SWITCHWEAPON);
        f = cvar("teamplay");
@@ -534,8 +533,6 @@ void CSQC_UpdateView(float w, float h)
        }
 
        // Draw the Crosshair
-       float scoreboard_active;
-       scoreboard_active = HUD_WouldDrawScoreboard();
        R_SetView(VF_DRAWCROSSHAIR, 0); //Make sure engine crosshairs are always hidden
 
        // Draw the Engine Status Bar (the default Quake HUD)
@@ -683,12 +680,12 @@ void CSQC_UpdateView(float w, float h)
                        self.draw2d();
        self = e;
 
+       scoreboard_active = HUD_WouldDrawScoreboard();
+
        float hud;
        hud = getstati(STAT_HUD);
        if(hud == HUD_SPIDERBOT)
-       {
                CSQC_SPIDER_HUD();
-       }
        else if(hud == HUD_WAKIZASHI)
         CSQC_WAKIZASHI_HUD();
     else if(hud == HUD_RAPTOR)
@@ -953,11 +950,6 @@ void CSQC_UpdateView(float w, float h)
        // let's reset the view back to normal for the end
        R_SetView(VF_MIN, '0 0 0');
        R_SetView(VF_SIZE, '1 0 0' * w + '0 1 0' * h);
-
-       // be safe against triggerbots until everyone has the fixed engine
-       // this call is meant to overwrite the trace globals by something
-       // unsuspicious
-       traceline('0 0 0', '0 0 0', MOVE_WORLDONLY, world);
 }
 
 #define spider_h "gfx/vehicles/hud_bg.tga"
@@ -1265,9 +1257,13 @@ void CSQC_common_hud(void)
                case HUD_NORMAL:
                        // do some accuracy var caching
                        float i;
+                       if(cvar_string("hud_panel_weapons_accuracy_color_levels") != acc_color_levels)
                        if(!(gametype == GAME_RACE || gametype == GAME_CTS))
                        {
-                               acc_levels = tokenize(cvar_string("hud_panel_weapons_accuracy_color_levels"));
+                               if(acc_color_levels)
+                                       strunzone(acc_color_levels);
+                               acc_color_levels = strzone(cvar_string("hud_panel_weapons_accuracy_color_levels"));
+                               acc_levels = tokenize(acc_color_levels);
                                if (acc_levels > MAX_ACCURACY_LEVELS)
                                        acc_levels = MAX_ACCURACY_LEVELS;
 
@@ -1278,7 +1274,7 @@ void CSQC_common_hud(void)
                        HUD_Main(); // always run these functions for alpha checks
                        HUD_DrawScoreboard();
 
-                       if (scoreboard_showscores || scoreboard_showscores_force || getstati(STAT_HEALTH) <= 0 || intermission == 1) // scoreboard/accuracy
+                       if (scoreboard_active) // scoreboard/accuracy
                        {       
                                HUD_Reset();
                                // HUD_DrawScoreboard takes care of centerprint_start
index 5e724442b7a316ea17cd0278d0fd23015d0740d5..a98b70683ab62b05760434e58efbde9961a25747 100644 (file)
@@ -234,3 +234,5 @@ var string autocvar_hud_panel_infomessages_bg_alpha;
 var string autocvar_hud_panel_infomessages_bg_border;
 var string autocvar_hud_panel_infomessages_bg_padding;
 var float autocvar_hud_panel_infomessages_flip;
+
+var float autocvar_scoreboard_border_thickness;
index 587a2e96cf8ac289bf287905ce5560c7eb17ab65..c23b425ae9d2e4edd0ace7c0cd77ec703b06b7ed 100644 (file)
@@ -167,7 +167,6 @@ float GetTimeForAmplitude(entity e, float amp)
 
 float BGMScript(entity e)
 {
-       float t;
        float amp, vel;
 
        if(e.bgmscript == "")
@@ -178,34 +177,33 @@ float BGMScript(entity e)
 
        e.just_toggled = FALSE;
 
-       t = gettime(GETTIME_CDTRACK);
-       if(t < 0)
+       if(bgmtime < 0)
                return -1;
 
-       if(t < e.bgmscripttime)
+       if(bgmtime < e.bgmscripttime)
        {
                //print("reset ", e.bgmscript, "\n");
                amp = GetCurrentAmplitude(e, e.bgmscripttime - e.bgmscriptstatetime + drawframetime);
 
                e.bgmscriptline = e.bgmscriptline0;
-               e.bgmscripttime = t;
+               e.bgmscripttime = bgmtime;
 
                // treat this as a stop event for all notes, to prevent sticking keys
                e.bgmscriptstate = FALSE;
                e.bgmscriptvolume = 1;
-               e.bgmscriptstatetime = t - GetTimeForAmplitude(e, amp);
+               e.bgmscriptstatetime = bgmtime - GetTimeForAmplitude(e, amp);
        }
 
        // find the CURRENT line
        for(;;)
        {
                tokenize_console(bufstr_get(bgmscriptbuf, e.bgmscriptline));
-               if(stof(argv(1)) >= t || argv(0) != e.bgmscript)
+               if(stof(argv(1)) >= bgmtime || argv(0) != e.bgmscript)
                {
-                       e.bgmscripttime = t;
-                       return GetCurrentAmplitude(e, t - e.bgmscriptstatetime);
+                       e.bgmscripttime = bgmtime;
+                       return GetCurrentAmplitude(e, bgmtime - e.bgmscriptstatetime);
                }
-               else if(t >= stof(argv(1)))
+               else if(bgmtime >= stof(argv(1)))
                {
                        e.bgmscriptline += 1;
                        e.bgmscripttime = stof(argv(1));
index 760197a2764a24419d42b69b5721cf9ce0d002b2..32c048f25b0187ec42f621d8f9aea6b74e88ed94 100644 (file)
@@ -236,6 +236,7 @@ float (string s)    tokenize = #441;
 string (float argnum)  argv = #442;
 
 string (string s) cvar_string = #448;
+string (string s) cvar_defstring = #482;
 
 float ()                                               buf_create = #460;
 void (float bufhandle)                                 buf_del = #461;
index 843597865c1b1ffa2edeb29e236bdc45c3428c16..a210070b701bcd1f55b8e7114ffafef05757007d 100644 (file)
@@ -284,10 +284,9 @@ void HUD_DrawCenterPrint (void)
 
        sz = 0.8 + (a / 5);
 
-       if(centerprint_num * cvar("scr_centersize") > 24 && HUD_WouldDrawScoreboard()) // 24 = height of Scoreboard text
-       {
+       if(centerprint_num * cvar("scr_centersize") > 24 && scoreboard_active) // 24 = height of Scoreboard text
                centerprint_start_y = scoreboard_bottom + centerprint_fontsize_y;
-       }
+
        pos = centerprint_start;
        for (i=0; i<centerprint_num; i = i + 1)
        {
@@ -902,8 +901,6 @@ float prevMouseClicked; // previous state
 float prevMouseClickedTime; // time during previous mouse click, to check for doubleclicks
 vector prevMouseClickedPos; // pos during previous mouse click, to check for doubleclicks
 
-float menu_enabled;
-float menu_enabled_time;
 float pressed_key_time;
 void HUD_Panel_Arrow_Action(float nPrimary)
 {
@@ -1059,7 +1056,6 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
        {
                if (bInputType == 1)
                        return true;
-               disable_menu_alphacheck = 1;
                menu_enabled = 1;
                menu_enabled_time = time;
                localcmd("menu_showhudexit\n");
@@ -1322,18 +1318,22 @@ vector prev_pos, prev_size;
 void HUD_Panel_Mouse()
 {
        // TODO: needs better check... is there any float that contains the current state of the menu? _menu_alpha isn't apparently updated the frame the menu gets enabled
-       if (menu_enabled == 0) // menu dialog closed, enable normal alpha stuff again
-               disable_menu_alphacheck = 0;
        if (autocvar__menu_alpha == 0 && time - menu_enabled_time > 0.5)
                menu_enabled = 0;
 
        /*
-       print("Disable menu_alphacheck: ", ftos(disable_menu_alphacheck), "\n");
+       print("menu_enabled: ", ftos(menu_enabled), "\n");
        print("Highlighted: ", ftos(highlightedPanel), "\n");
        print("Menu alpha: ", cvar_string("_menu_alpha"), "\n");
        */
 
-       if(mouseClicked == 0 && disable_menu_alphacheck != 2 && highlightedPanel >= 0) { // don't reset these variables in disable_menu_alphacheck mode 2!
+       // instantly hide the editor cursor if we open the HUDExit dialog
+       // as hud_fade_alpha doesn't decrease to 0 in this case
+       // TODO: find a way to fade the cursor out even in this case
+       if(menu_enabled == 1 || (menu_enabled == 2 && !hud_fade_alpha))
+               return;
+
+       if(mouseClicked == 0 && menu_enabled != 2 && highlightedPanel >= 0) { // don't reset these variables in menu_enabled mode 2!
                highlightedPanel = -1;
                highlightedAction = 0;
        }
@@ -1396,8 +1396,7 @@ void HUD_Panel_Mouse()
                if(time - prevMouseClickedTime < 0.4 && prevMouseClicked == 0 && prevMouseClickedPos == mousepos && highlightedPanel >= 0)
                {
                        mouseClicked = 0; // to prevent spam, I guess.
-                       disable_menu_alphacheck = 2;
-                       menu_enabled = 1;
+                       menu_enabled = 2;
                        menu_enabled_time = time;
                        HUD_Panel_GetName(highlightedPanel)
                        localcmd("menu_showhudoptions ", panel_name, "\n");
@@ -1658,6 +1657,10 @@ void HUD_Weapons(void)
        vector wpnpos;
        vector wpnsize;
 
+       float show_accuracy;
+       if(autocvar_hud_panel_weapons_accuracy && acc_levels)
+               show_accuracy = true;
+
        for(i = 0; i < weapon_cnt; ++i)
        {
                wpnpos = panel_pos + eX * column * panel_size_x*(1/columns) + eY * row * panel_size_y*(1/rows);
@@ -1671,7 +1674,7 @@ void HUD_Weapons(void)
                        drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
 
                // draw the weapon accuracy
-               if(acc_levels)
+               if(show_accuracy)
                {
                        float weapon_hit, weapon_damage;
                        weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
@@ -3856,6 +3859,37 @@ void HUD_VoteWindow(void)
 
 float mod_active; // is there any active mod icon?
 
+// Clan Arena HUD modicons
+void HUD_Mod_CA(vector pos, vector mySize)
+{
+       mod_active = 1; // CA should never hide the mod icons panel
+       float redalive, bluealive;
+       redalive = getstati(STAT_REDALIVE);
+       bluealive = getstati(STAT_BLUEALIVE);
+
+       drawfont = hud_bigfont;
+       vector redpos, bluepos;
+       if(mySize_x > mySize_y)
+       {
+               redpos = pos;
+               bluepos = pos + eY * 0.5 * mySize_y;
+               drawpic_aspect_skin(redpos, "player_red.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(redpos + eX * 0.5 * mySize_x, ftos(redalive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(bluepos, "player_blue.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(bluepos + eX * 0.5 * mySize_x, ftos(bluealive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       }
+       else
+       {
+               redpos = pos;
+               bluepos = pos + eY * 0.5 * mySize_y;
+               drawpic_aspect_skin(redpos, "player_red.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(redpos + eY * 0.3 * mySize_y, ftos(redalive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(bluepos, "player_blue.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(bluepos + eY * 0.3 * mySize_y, ftos(bluealive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       }
+       drawfont = hud_font;
+}
+
 // CTF HUD modicon section
 float redflag_prevframe, blueflag_prevframe; // status during previous frame
 float redflag_prevstatus, blueflag_prevstatus; // last remembered status
@@ -4240,16 +4274,31 @@ void HUD_Mod_Race(vector pos, vector mySize)
                crecordtime_prev = t;
                crecordtime_change_time = time;
        }
+
+       vector textPos, medalPos;
+       float squareSize;
+       if(mySize_x > mySize_y) {
+               // text on left side
+               squareSize = min(mySize_y, mySize_x/2);
+               textPos = pos + eX * 0.5 * max(0, mySize_x/2 - squareSize) + eY * 0.5 * (mySize_y - squareSize);
+               medalPos = pos + eX * 0.5 * max(0, mySize_x/2 - squareSize) + eX * 0.5 * mySize_x + eY * 0.5 * (mySize_y - squareSize);
+       } else {
+               // text on top
+               squareSize = min(mySize_x, mySize_y/2);
+               textPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eX * 0.5 * (mySize_x - squareSize);;
+               medalPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eY * 0.5 * mySize_y + eX * 0.5 * (mySize_x - squareSize);
+       }
+
        f = time - crecordtime_change_time;
 
        if (f > 1) {
-               drawstring_aspect(pos, "Personal best", eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eY * 0.25 * mySize_y, TIME_ENCODED_TOSTRING(t), eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos, "Personal best", eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos + eY * 0.25 * squareSize, TIME_ENCODED_TOSTRING(t), eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        } else {
-               drawstring_aspect(pos, "Personal best", eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eY * 0.25 * mySize_y, TIME_ENCODED_TOSTRING(t), eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect_expanding(pos, "Personal best", eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
-               drawstring_aspect_expanding(pos + eY * 0.25 * mySize_y, TIME_ENCODED_TOSTRING(t), eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
+               drawstring_aspect(textPos, "Personal best", eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos + eY * 0.25 * squareSize, TIME_ENCODED_TOSTRING(t), eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect_expanding(pos, "Personal best", eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
+               drawstring_aspect_expanding(pos + eY * 0.25 * squareSize, TIME_ENCODED_TOSTRING(t), eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
        }
 
        // server record
@@ -4261,13 +4310,13 @@ void HUD_Mod_Race(vector pos, vector mySize)
        f = time - srecordtime_change_time;
 
        if (f > 1) {
-               drawstring_aspect(pos + eY * 0.5 * mySize_y, "Server best", eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eY * 0.75 * mySize_y, TIME_ENCODED_TOSTRING(t), eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos + eY * 0.5 * squareSize, "Server best", eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos + eY * 0.75 * squareSize, TIME_ENCODED_TOSTRING(t), eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        } else {
-               drawstring_aspect(pos + eY * 0.5 * mySize_y, "Server best", eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(pos + eY * 0.75 * mySize_y, TIME_ENCODED_TOSTRING(t), eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect_expanding(pos + eY * 0.5 * mySize_y, "Server best", eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
-               drawstring_aspect_expanding(pos + eY * 0.75 * mySize_y, TIME_ENCODED_TOSTRING(t), eX * 0.5 * mySize_x + eY * 0.25 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
+               drawstring_aspect(textPos + eY * 0.5 * squareSize, "Server best", eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos + eY * 0.75 * squareSize, TIME_ENCODED_TOSTRING(t), eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect_expanding(textPos + eY * 0.5 * squareSize, "Server best", eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
+               drawstring_aspect_expanding(textPos + eY * 0.75 * squareSize, TIME_ENCODED_TOSTRING(t), eX * squareSize + eY * 0.25 * squareSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, f);
        }
 
        if (race_status != race_status_prev || race_status_name != race_status_name_prev) {
@@ -4278,13 +4327,12 @@ void HUD_Mod_Race(vector pos, vector mySize)
                race_status_name_prev = strzone(race_status_name);
        }
 
-       pos_x += mySize_x/2;
        // race "awards"
        float a;
        a = bound(0, race_status_time - time, 1);
 
        string s;
-       s = textShortenToWidth(race_status_name, mySize_y, '1 1 0' * 0.1 * mySize_y, stringwidth_colors);
+       s = textShortenToWidth(race_status_name, squareSize, '1 1 0' * 0.1 * squareSize, stringwidth_colors);
 
        float rank;
        if(race_status > 0)
@@ -4293,27 +4341,27 @@ void HUD_Mod_Race(vector pos, vector mySize)
        rankname = race_PlaceName(rank);
 
        vector namepos;
-       namepos = pos + '0.5 0.9 0' * mySize_y - eX * stringwidth(s, TRUE, '1 1 0' * 0.1 * mySize_y);
+       namepos = medalPos + '0 0.8 0' * squareSize;
        vector rankpos;
-       rankpos = pos + '0.5 0.25 0' * mySize_y - eX * stringwidth(rankname, TRUE, '1 1 0' * 0.15 * mySize_y);
+       rankpos = medalPos + '0 0.15 0' * squareSize;
 
        if(race_status == 0)
-               drawpic_aspect_skin(pos, "race_newfail", '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(medalPos, "race_newfail", '1 1 0' * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
        else if(race_status == 1) {
-               drawpic_aspect_skin(pos, "race_newtime", '1 1 0' * 0.9 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-               drawcolorcodedstring(namepos, s, '1 1 0' * 0.1 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-               drawstring(rankpos, rankname, '1 1 0' * 0.15 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(medalPos + '0.1 0 0' * squareSize, "race_newtime", '1 1 0' * 0.8 * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawcolorcodedstring_aspect(namepos, s, '1 0.2 0' * squareSize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawstring_aspect(rankpos, rankname, '1 0.15 0' * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
        } else if(race_status == 2) {
                if(race_status_name == GetPlayerName(player_localentnum -1) || !race_myrank || race_myrank < rank)
-                       drawpic_aspect_skin(pos, "race_newrankgreen", '1 1 0' * 0.9 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(medalPos + '0.1 0 0' * squareSize, "race_newrankgreen", '1 1 0' * 0.8 * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                else
-                       drawpic_aspect_skin(pos, "race_newrankyellow", '1 1 0' * 0.9 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-               drawcolorcodedstring(namepos, s, '1 1 0' * 0.1 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-               drawstring(rankpos, rankname, '1 1 0' * 0.15 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(medalPos + '0.1 0 0' * squareSize, "race_newrankyellow", '1 1 0' * 0.8 * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawcolorcodedstring_aspect(namepos, s, '1 0.2 0' * squareSize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawstring_aspect(rankpos, rankname, '1 0.15 0' * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
        } else if(race_status == 3) {
-               drawpic_aspect_skin(pos, "race_newrecordserver", '1 1 0' * 0.9 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-               drawcolorcodedstring(namepos, s, '1 1 0' * 0.1 * mySize_y, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-               drawstring(rankpos, rankname, '1 1 0' * 0.15 * mySize_y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(medalPos + '0.1 0 0' * squareSize, "race_newrecordserver", '1 1 0' * 0.8 * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawcolorcodedstring_aspect(namepos, s, '1 0.2 0' * squareSize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+               drawstring_aspect(rankpos, rankname, '1 0.15 0' * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
        }
 
        if (race_status_time - time <= 0) {
@@ -4393,6 +4441,7 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, float layout,
 
 void HUD_Mod_Dom(vector myPos, vector mySize)
 {
+       mod_active = 1; // required in each mod function that always shows something
        entity tm;
        float teams_count;
        for(tm = teams.sort_next; tm; tm = tm.sort_next)
@@ -4436,7 +4485,7 @@ void HUD_ModIcons(void)
        if(!autocvar_hud_panel_modicons && !autocvar__hud_configure)
                return;
 
-       if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_DOMINATION && !autocvar__hud_configure)
+       if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_CA && gametype != GAME_DOMINATION && !autocvar__hud_configure)
                return;
 
        active_panel = HUD_PANEL_MODICONS;
@@ -4475,6 +4524,8 @@ void HUD_ModIcons(void)
                HUD_Mod_Race(pos, mySize);
        else if(gametype == GAME_DOMINATION)
                HUD_Mod_Dom(pos, mySize);
+       else if(gametype == GAME_CA)
+               HUD_Mod_CA(pos, mySize);
 }
 
 // Draw pressed keys (#11)
@@ -4896,11 +4947,11 @@ void HUD_ShowSpeed(void)
        pos = (vid_conheight - numsize_y) * cvar("cl_showspeed_position");
 
        drawfont = hud_bigfont;
-       drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
 
        if (cvar("cl_showspeed_z") == 1) {
                zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
-               drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
        }
 
        drawfont = hud_font;
@@ -4928,6 +4979,8 @@ void HUD_ShowAcceleration(void)
        f = bound(0, f * 10, 1);
        acc_avg = acc_avg * (1 - f) + acceleration * f;
        acceleration = acc_avg / getstatf(STAT_MOVEVARS_MAXSPEED);
+       if (acceleration == 0)
+               return;
 
        pos = top - sz/2 * eY + (cvar("cl_showacceleration_position") * vid_conheight) * eY;
 
@@ -4937,18 +4990,16 @@ void HUD_ShowAcceleration(void)
        if (cvar("cl_showacceleration_color_custom"))
                rgb = stov(cvar_string("cl_showacceleration_color"));
        else {
-               rgb = '1 1 1';
-               if (acceleration < 0) {
+               if (acceleration < 0)
                        rgb = '1 .5 .5' - '0 .5 .5' * bound(0, -acceleration * 0.2, 1);
-               } else if (acceleration > 0) {
+               else
                        rgb = '.5 1 .5' - '.5 0 .5' * bound(0, +acceleration * 0.2, 1);
-               }
        }
 
        if (acceleration > 0)
-               HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
-       else if (acceleration < 0)
-               HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+               HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
+       else
+               HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
 }
 
 void HUD_Reset (void)
@@ -4999,7 +5050,7 @@ void HUD_Main (void)
        hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin);
 
        // global hud alpha fade
-       if(disable_menu_alphacheck == 1)
+       if(menu_enabled == 1)
                hud_fade_alpha = 1;
        else
                hud_fade_alpha = (1 - autocvar__menu_alpha);
@@ -5012,11 +5063,10 @@ void HUD_Main (void)
        else if(autocvar__menu_alpha == 0 && scoreboard_fade_alpha == 0)
                hud_fade_alpha = 1;
 
-       hud_border_thickness = bound(0, cvar("hud_border_thickness"), 5);
-       hud_accuracy_border_thickness = bound(0, cvar_or("hud_accuracy_border_thickness", 1), 5);
-
        hud_fontsize = HUD_GetFontsize("hud_fontsize");
-       hud_fontsize_spec = HUD_GetFontsize("hud_fontsize_spec");
+
+       if(!autocvar__hud_configure && !hud_fade_alpha)
+               return;
 
        // Drawing stuff
 
@@ -5036,29 +5086,29 @@ void HUD_Main (void)
                }
        }
 
-       float f;
-       vector color;
-       if((teamplay) && autocvar_hud_dock_color_team) {
-               f = stof(getplayerkey(player_localentnum - 1, "colors"));
-               color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
-       }
-       else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
-               color = '1 0 0' * autocvar_hud_dock_color_team;
-       }
-       else if(autocvar_hud_dock_color == "shirt") {
-               f = stof(getplayerkey(player_localentnum - 1, "colors"));
-               color = colormapPaletteColor(floor(f / 16), 0);
-       }
-       else if(autocvar_hud_dock_color == "pants") {
-               f = stof(getplayerkey(player_localentnum - 1, "colors"));
-               color = colormapPaletteColor(mod(f, 16), 1);
-       }
-       else
-               color = stov(autocvar_hud_dock_color);
-
        // draw the dock
        if(autocvar_hud_dock != "" && autocvar_hud_dock != "0")
        {
+               float f;
+               vector color;
+               if((teamplay) && autocvar_hud_dock_color_team) {
+                       f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                       color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
+               }
+               else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
+                       color = '1 0 0' * autocvar_hud_dock_color_team;
+               }
+               else if(autocvar_hud_dock_color == "shirt") {
+                       f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                       color = colormapPaletteColor(floor(f / 16), 0);
+               }
+               else if(autocvar_hud_dock_color == "pants") {
+                       f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                       color = colormapPaletteColor(mod(f, 16), 1);
+               }
+               else
+                       color = stov(autocvar_hud_dock_color);
+
                string pic;
                pic = strcat(hud_skin_path, "/", autocvar_hud_dock);
                if(precache_pic(pic) == "") {
@@ -5102,5 +5152,6 @@ void HUD_Main (void)
        hud_configure_prev = autocvar__hud_configure;
 
        if (!autocvar__hud_configure) // hud config mode disabled, enable normal alpha stuff again
-               disable_menu_alphacheck = 0;
+               if (menu_enabled)
+                       menu_enabled = 0;
 }
index e311c66a8aa923af4ac650897dad6b32524a9479..5e9d59b6ef29e1c0853e81f2d0dddf56ef12148c 100644 (file)
@@ -22,6 +22,7 @@ float weapon_fired[WEP_MAXCOUNT];
 #define MAX_ACCURACY_LEVELS 10
 float acc_lev[MAX_ACCURACY_LEVELS];
 float acc_levels;
+string acc_color_levels;
 
 float complain_weapon;
 string complain_weapon_name;
@@ -36,9 +37,6 @@ float weapontime;
 float weaponprevtime;
 
 float teamnagger;
-float hud_accuracy_hud;
-float hud_border_thickness;
-float hud_accuracy_border_thickness;
 
 float hud_configure_checkcollisions;
 float hud_configure_prev;
@@ -48,7 +46,9 @@ const float S_SHIFT = 1;
 const float S_CTRL = 2;
 const float S_ALT = 4;
 
-float disable_menu_alphacheck; // 0 = enable alpha check, 1 = disable for entire hud, 2 = disable for one panel
+float menu_enabled; // 1 showing the entire HUD, 2 showing only the clicked panel
+float menu_enabled_time;
+
 float hud_fade_alpha;
 
 string hud_skin_path;
@@ -166,13 +166,13 @@ if(panel_bg_alpha_str == "") {\
        panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);\
 }\
 panel_bg_alpha = stof(panel_bg_alpha_str);\
-if(autocvar__hud_configure && disable_menu_alphacheck == 2 && highlightedPanel == active_panel) {\
+if(autocvar__hud_configure && menu_enabled == 2 && highlightedPanel == active_panel) {\
        panel_bg_alpha = (1 - autocvar__menu_alpha) * max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;\
 } else if(autocvar__hud_configure) {\
        panel_bg_alpha = max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha);\
 } if(autocvar__hud_configure && !panel_enabled) {\
        panel_bg_alpha = 0.25;\
-} if(!(disable_menu_alphacheck == 2 && highlightedPanel == active_panel)) {\
+} if(!(menu_enabled == 2 && highlightedPanel == active_panel)) {\
        panel_bg_alpha *= hud_fade_alpha;\
 }
 
@@ -183,7 +183,7 @@ if(autocvar__hud_configure && disable_menu_alphacheck == 2 && highlightedPanel =
 panel_fg_alpha = autocvar_hud_panel_fg_alpha;\
 if(autocvar__hud_configure && !panel_enabled)\
        panel_fg_alpha = 0.25;\
-if(!(disable_menu_alphacheck == 2 && highlightedPanel == active_panel))\
+if(!(menu_enabled == 2 && highlightedPanel == active_panel))\
        panel_fg_alpha *= hud_fade_alpha;
 
 // Get border. See comments above, it's similar.
@@ -268,7 +268,7 @@ panel_bg_alpha_str = autocvar_hud_panel_##name##_bg_alpha; \
 panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
 panel_bg_padding_str = autocvar_hud_panel_##name##_bg_padding; \
 HUD_Panel_StringVars()\
-if(disable_menu_alphacheck == 2 && active_panel == highlightedPanel) {\
+if(menu_enabled == 2 && active_panel == highlightedPanel) {\
        HUD_Panel_GetMenuSize()\
        HUD_Panel_GetMenuPos()\
 }
@@ -297,7 +297,7 @@ switch(id) { \
 panel_pos = autocvar_hud_panel_##name##_pos; \
 panel_size = autocvar_hud_panel_##name##_size; \
 HUD_Panel_GetScaledVectors()\
-if(disable_menu_alphacheck == 2 && active_panel == highlightedPanel) {\
+if(menu_enabled == 2 && active_panel == highlightedPanel) {\
        HUD_Panel_GetMenuSize()\
        HUD_Panel_GetMenuPos()\
 }\
index f00e49c532a40cc0eaa1086aa143d11dee828955..2294ffd1557b080e7ac8d03f1d54d0613cea1254 100644 (file)
@@ -95,7 +95,6 @@ float teamscores_flags[MAX_SCORE];
 
 
 vector hud_fontsize;
-vector hud_fontsize_spec;
 
 float RANKINGS_RECEIVED_CNT;
 string grecordholder[RANKINGS_CNT];
index 7c3bcecc50d22be197f696b15a60b05036dd466f..40fcfda11cda44efbbf29b787f599be41c069489 100644 (file)
@@ -71,8 +71,8 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        pos_x = pos_x + text_size*0.5 - img_size_x*0.5;
        pos_y = pos_y - img_size_y;
 
-       pos += hud_border_thickness * '1 1 0';
-       img_size -= (hud_border_thickness * 2) * '1 1 0';
+       pos += autocvar_scoreboard_border_thickness * '1 1 0';
+       img_size -= (autocvar_scoreboard_border_thickness * 2) * '1 1 0';
        if(pic == "")
        {
                drawfill(pos, img_size, '.5 .5 .5', .7, DRAWFLAG_NORMAL);
@@ -81,19 +81,14 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        {
                drawpic(pos, pic, img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
        }
-       
-       drawpic(pos + '1 0 0', strcat("gfx/hud/num_", ftos(id+1)), (img_size_y / 5) * '1 1 0', '1 1 1', 0.6, DRAWFLAG_NORMAL);
 
-       if(id == mv_ownvote || pic == "")
-       {
-               drawborderlines(hud_border_thickness, pos, img_size, rgb, 1, DRAWFLAG_NORMAL);
-               drawpic(pos + '1 0 0', strcat("gfx/hud/num_", ftos(id+1)), (img_size_y / 5) * '1 1 0', rgb, 0.6, DRAWFLAG_NORMAL);
-       }
+       if(id == mv_ownvote)
+               drawborderlines(autocvar_scoreboard_border_thickness, pos, img_size, rgb, 1, DRAWFLAG_NORMAL);
        else
-       {
-               drawborderlines(hud_border_thickness, pos, img_size, '0 0 0', 1, DRAWFLAG_NORMAL);
-               drawpic(pos + '1 0 0', strcat("gfx/hud/num_", ftos(id+1)), (img_size_y / 5) * '1 1 0', '1 1 1', 0.6, DRAWFLAG_NORMAL);
-       }
+               drawborderlines(autocvar_scoreboard_border_thickness, pos, img_size, '0 0 0', 1, DRAWFLAG_NORMAL);
+
+       if(id == mv_selection)
+               drawfill(pos, img_size, '1 1 1', 0.1, DRAWFLAG_NORMAL);
 }
 
 void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, float id)
index 5c377bffadb8ade59c381071def85021d3181ba8..049368c1636b07944ae7de43de10008dfbbd9da2 100644 (file)
@@ -627,28 +627,33 @@ void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, f
 }
 
 // this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
-void PolyDrawModel(entity e)
+float PolyDrawModelSurface(entity e, float i_s)
 {
-       float i_s, i_t;
+       float i_t;
        float n_t;
        vector tri;
        string tex;
-       for(i_s = 0; ; ++i_s)
+       tex = getsurfacetexture(e, i_s);
+       if not(tex)
+               return 0; // this is beyond the last one
+       n_t = getsurfacenumtriangles(e, i_s);
+       for(i_t = 0; i_t < n_t; ++i_t)
        {
-               tex = getsurfacetexture(e, i_s);
-               if not(tex)
-                       break; // this is beyond the last one
-               n_t = getsurfacenumtriangles(e, i_s);
-               for(i_t = 0; i_t < n_t; ++i_t)
-               {
-                       tri = getsurfacetriangle(e, i_s, i_t);
-                       R_BeginPolygon(tex, 0);
-                       R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1);
-                       R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1);
-                       R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1);
-                       R_EndPolygon();
-               }
+               tri = getsurfacetriangle(e, i_s, i_t);
+               R_BeginPolygon(tex, 0);
+               R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1);
+               R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1);
+               R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1);
+               R_EndPolygon();
        }
+       return 1;
+}
+void PolyDrawModel(entity e)
+{
+       float i_s;
+       for(i_s = 0; ; ++i_s)
+               if(!PolyDrawModelSurface(e, i_s))
+                       break;
 }
 
 void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag)
index d4a95b7754cddc37b6522ffa80d0930c2081d4f1..e9a02631f2e572c43c954b3a7c202201e1d0b316 100644 (file)
@@ -286,14 +286,18 @@ void Net_ReadZCurveParticles()
 void Net_ReadNexgunBeamParticle()
 {
        vector shotorg, endpos;
+       float charge;
        shotorg_x = ReadCoord(); shotorg_y = ReadCoord(); shotorg_z = ReadCoord();
        endpos_x = ReadCoord(); endpos_y = ReadCoord(); endpos_z = ReadCoord();
+       charge = ReadByte() / 255.0;
        
        pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
        
        //draw either the old v2.3 beam or the new beam
+       charge = sqrt(charge); // divide evenly among trail spacing and alpha
+       particles_alphamin = particles_alphamax = charge;
        if (cvar("cl_particles_oldnexbeam") && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo()))
-               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, charge, 1);
        else
-               WarpZone_TrailParticles(world, particleeffectnum("nex_beam"), shotorg, endpos);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, charge, 1);
 }
index 76b19a54c50c99a94d7942951edf430ab380d626..4000f30a70e00e8ec5792b7994a7746a2eea2b5e 100644 (file)
@@ -766,16 +766,16 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, rgb + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
        // table border
-       tmp_y += hud_border_thickness;
+       tmp_y += autocvar_scoreboard_border_thickness;
        tmp_y += body_table_height;
-       drawborderlines(hud_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL); // more transparency for the scoreboard
+       drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL); // more transparency for the scoreboard
 
        // separator header/table
        pos_y += 1.25 * hud_fontsize_y;
-       tmp_y = hud_border_thickness;
+       tmp_y = autocvar_scoreboard_border_thickness;
        drawfill(pos, tmp, '0 0 0', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
-       pos_y += hud_border_thickness;
+       pos_y += autocvar_scoreboard_border_thickness;
 
        // table background
        tmp_y = body_table_height;
@@ -789,14 +789,14 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        // go back to the top to make alternated columns highlighting and to print the strings
        pos_y -= 1.25 * hud_fontsize_y;
-       pos_y -= hud_border_thickness;
+       pos_y -= autocvar_scoreboard_border_thickness;
 
        pos += '1 1 0';
 
        if (scoreboard_highlight)
        {
                column_dim_y = 1.25 * hud_fontsize_y; // header
-               column_dim_y += hud_border_thickness;
+               column_dim_y += autocvar_scoreboard_border_thickness;
                column_dim_y += body_table_height;
        }
 
@@ -846,7 +846,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        pos_x = xmin;
        pos_y += 1.25 * hud_fontsize_y; // skip the header
-       pos_y += hud_border_thickness;
+       pos_y += autocvar_scoreboard_border_thickness;
 
        // fill the table and draw the rows
        i = 0;
@@ -883,11 +883,9 @@ float HUD_WouldDrawScoreboard() {
                return 1;
        else if (intermission == 1)
                return 1;
-       else if (intermission == 2 && scoreboard_showscores)
-               return 1;
        else if (getstati(STAT_HEALTH) <= 0 && cvar("cl_deathscoreboard"))
                return 1;
-       else if(scoreboard_showscores_force)
+       else if (scoreboard_showscores_force)
                return 1;
        return 0;
 }
@@ -898,7 +896,6 @@ vector HUD_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 = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
        float rows;
        if(cvar("scoreboard_accuracy_doublerows"))
@@ -906,11 +903,9 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        else
                rows = 1;
        float height = 40;
-
-       if(warmup_stage)
-       {
-               return pos;
-       }
+       float fontsize = height * 1/3;
+       float weapon_height = height * 2/3;
+       float weapon_width = sbwidth / weapon_cnt;
 
        drawstring(pos, strcat("Accuracy stats (average ", ftos(average_accuracy), "%)"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_y += 1.25 * hud_fontsize_y;
@@ -922,19 +917,19 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        else
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-       drawborderlines(hud_accuracy_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
+       drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', 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', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
+                       drawfill(pos + '1 0 0' * weapon_width * rows * i, '0 1 0' * height * rows + '1 0 0' * weapon_width * rows, '0 0 0', 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', scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
+               drawfill(pos + '0 1 0' * weapon_height + '0 1 0' * height * i, '1 0 0' * sbwidth + '0 1 0' * fontsize, '1 1 1', scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
        }
 
        drawfont = hud_bigfont;
@@ -942,11 +937,14 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        float weapons_with_stats;
        weapons_with_stats = 0;
        if(rows == 2)
-               pos_x += sbwidth/weapon_cnt / 2;
+               pos_x += weapon_width / 2;
 
        if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
                g_minstagib = 1; // TODO: real detection for minstagib?
 
+       if (!acc_levels)
+               rgb = '1 1 1';
+
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
                self = get_weaponinfo(i);
@@ -966,7 +964,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        weapon_alpha = 0.2 * scoreboard_alpha_fg;
 
                // weapon icon
-               drawpic_aspect_skin(pos, strcat("weapon", self.netname), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos, strcat("weapon", self.netname), '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
                // the accuracy
                if(weapon_damage) {
                        weapons_with_stats += 1;
@@ -976,7 +974,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        s = strcat(ftos(weapon_stats),"%");
 
                        float padding;
-                       padding = ((sbwidth/weapon_cnt) - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
+                       padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
 
                        float weapon_hit, weapon_damage;
                        weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
@@ -986,21 +984,24 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                                weapon_stats = floor(100 * weapon_hit / weapon_damage);
                        }
 
-                       // find the max level lower than weapon_stats
-                       float j;
-                       j = acc_levels-1;
-                       while ( j && weapon_stats < acc_lev[j] )
-                               --j;
-
-                       // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
-                       float factor;
-                       factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
-                       rgb = acc_color(j);
-                       rgb = rgb + factor * (acc_color(j+1) - rgb);
+                       if (acc_levels)
+                       {
+                               // find the max level lower than weapon_stats
+                               float j;
+                               j = acc_levels-1;
+                               while ( j && weapon_stats < acc_lev[j] )
+                                       --j;
+
+                               // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
+                               float factor;
+                               factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
+                               rgb = acc_color(j);
+                               rgb = rgb + factor * (acc_color(j+1) - rgb);
+                       }
 
-                       drawstring(pos + '1 0 0' * padding + '0 1 0' * height * (2/3), s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+                       drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
                }
-               pos_x += sbwidth/weapon_cnt * rows;
+               pos_x += weapon_width * rows;
                if(rows == 2 && i == 6) {
                        pos_x -= sbwidth;
                        pos_y += height;
@@ -1012,7 +1013,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                average_accuracy = floor(average_accuracy / weapons_with_stats);
 
        if(rows == 2)
-               pos_x -= sbwidth/weapon_cnt / 2;
+               pos_x -= weapon_width / 2;
        pos_x -= sbwidth;
        pos_y += height;
 
@@ -1049,7 +1050,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        else
                drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-       drawborderlines(hud_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
+       drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
 
        // row highlighting
        for(i = 0; i<RANKINGS_RECEIVED_CNT; ++i)
@@ -1078,32 +1079,33 @@ float hud_woulddrawscoreboard_prev;
 float hud_woulddrawscoreboard_change; // "time" at which HUD_WouldDrawScoreboard() changed
 void HUD_DrawScoreboard()
 {
-       HUD_UpdatePlayerTeams();
-
        float hud_woulddrawscoreboard;
-       hud_woulddrawscoreboard = HUD_WouldDrawScoreboard();
+       hud_woulddrawscoreboard = scoreboard_active;
        if(hud_woulddrawscoreboard != hud_woulddrawscoreboard_prev) {
                hud_woulddrawscoreboard_change = time;
                hud_woulddrawscoreboard_prev = hud_woulddrawscoreboard;
        }
 
-       float scoreboard_fadeinspeed = cvar_or("scoreboard_fadeinspeed", 10);
-       float scoreboard_fadeoutspeed = cvar_or("scoreboard_fadeoutspeed", 5);
        if(hud_woulddrawscoreboard) {
+               float scoreboard_fadeinspeed = cvar_or("scoreboard_fadeinspeed", 10);
                if (scoreboard_fadeinspeed)
                        scoreboard_fade_alpha = bound (0, (time - hud_woulddrawscoreboard_change) * scoreboard_fadeinspeed, 1);
                else
                        scoreboard_fade_alpha = 1;
        }
-       else
+       else {
+               float scoreboard_fadeoutspeed = cvar_or("scoreboard_fadeoutspeed", 5);
                if (scoreboard_fadeoutspeed)
                        scoreboard_fade_alpha = bound (0, (1/scoreboard_fadeoutspeed - (time - hud_woulddrawscoreboard_change)) * scoreboard_fadeoutspeed, 1);
                else
                        scoreboard_fade_alpha = 0;
+       }
 
        if not(scoreboard_fade_alpha)
                return;
 
+       HUD_UpdatePlayerTeams();
+
        scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
        scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
        scoreboard_highlight = cvar("scoreboard_highlight");
@@ -1118,9 +1120,11 @@ void HUD_DrawScoreboard()
        xmin = cvar("scoreboard_offset_left") * vid_conwidth;
        ymin = cvar("con_notify") * cvar("con_notifysize");
 
-       sbwidth = xmax = vid_conwidth - xmin - cvar("scoreboard_offset_right") * vid_conwidth;
+       xmax = (1 - cvar("scoreboard_offset_right")) * vid_conwidth;
        ymax = vid_conheight - ymin;
 
+       sbwidth = xmax - xmin;
+
        // Initializes position
        pos_x = xmin;
        pos_y = ymin;
@@ -1138,8 +1142,7 @@ void HUD_DrawScoreboard()
        drawfont = hud_font;
 
        // Draw the scoreboard
-       vector bg_size;
-       bg_size = drawgetimagesize("gfx/hud/scoreboard_scoreboard_bg");
+       vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * cvar("scoreboard_bg_scale");
 
        if(teamplay)
        {
@@ -1183,7 +1186,7 @@ void HUD_DrawScoreboard()
                }
                pos = HUD_DrawScoreboardRankings(pos, pl, rgb, bg_size);
        }
-       else if(cvar("scoreboard_accuracy") && spectatee_status != -1) {
+       else if(cvar("scoreboard_accuracy") && spectatee_status != -1 && !warmup_stage) {
                if(teamplay)
                        pos = HUD_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
                else
@@ -1391,7 +1394,7 @@ void HUD_DrawAccuracyStats()
 
                                // background
                                drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-                               drawborderlines(hud_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+                               drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
                                // the weapon
                                drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
@@ -1441,7 +1444,7 @@ void HUD_DrawAccuracyStats()
 
                                // background
                                drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-                               drawborderlines(hud_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+                               drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
                                // the weapon
                                drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
index b39b48e53b42202ef0fe7e6c34c284a788ef3db7..3e5de00f2dfba9b5e9df2141097cdf0f96febb16 100644 (file)
@@ -1,2 +1,3 @@
 float HUD_WouldDrawScoreboard(void);
+float scoreboard_active;
 float scoreboard_fade_alpha;
index a7a46d80ad5788c19e58e649c7d25c0a147b1376..b1957038eb4eb9b7c1a97574713ceed3e42bf2e4 100644 (file)
@@ -50,6 +50,11 @@ void TargetMusic_Advance()
                }
        }
        music_trigger = world;
+
+       if(best)
+               bgmtime = getsoundtime(best, CHAN_VOICE);
+       else
+               bgmtime = gettime(GETTIME_CDTRACK);
 }
 
 void Net_TargetMusic()
index a8e61fc4f4378d69b43f936105bf02f11ff1fb12..f6e240a6faf5bd4411a1919fc9badf34ddf56e04 100644 (file)
@@ -10,6 +10,7 @@ string campaign_mapname[CAMPAIGN_MAX_ENTRIES];
 float campaign_bots[CAMPAIGN_MAX_ENTRIES];
 float campaign_botskill[CAMPAIGN_MAX_ENTRIES];
 float campaign_fraglimit[CAMPAIGN_MAX_ENTRIES];
+float campaign_timelimit[CAMPAIGN_MAX_ENTRIES];
 string campaign_mutators[CAMPAIGN_MAX_ENTRIES];
 string campaign_shortdesc[CAMPAIGN_MAX_ENTRIES];
 string campaign_longdesc[CAMPAIGN_MAX_ENTRIES];
index 89b24ce513270025a87e58f802b1dbb00a4313b7..08cec8092813b76653c9d8d33af5d94be4a52361 100644 (file)
@@ -54,12 +54,13 @@ float CampaignFile_Load(float offset, float n)
                                CAMPAIGN_GETARG; campaign_bots[campaign_entries] = stof(a);
                                CAMPAIGN_GETARG; campaign_botskill[campaign_entries] = stof(a);
                                CAMPAIGN_GETARG; campaign_fraglimit[campaign_entries] = stof(a);
+                               CAMPAIGN_GETARG; campaign_timelimit[campaign_entries] = stof(a);
                                CAMPAIGN_GETARG; campaign_mutators[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_shortdesc[campaign_entries] = strzone(a);
                                CAMPAIGN_GETARG; campaign_longdesc[campaign_entries] = strzone(strreplace("\\n", "\n", a));
                                campaign_entries = campaign_entries + 1;
 
-                               if(campaign_entries >= n)
+                               if(campaign_entries >= n)                               
                                        break;
                        }
                        lineno = lineno + 1;
index 417526e78ea9d2b64d18522bc4a57162c9bbb5a1..8cda4b13ec41ed0e9664c5445bd81d79980bacb6 100644 (file)
@@ -310,12 +310,7 @@ const float STAT_SHOTORG = 46; // compressShotOrigin
 const float STAT_LEADLIMIT = 47;
 const float STAT_BULLETS_LOADED = 48;
 const float STAT_NEX_CHARGE = 49;
-
-const float STAT_DOM_TOTAL_PPS = 70;
-const float STAT_DOM_PPS_RED = 71;
-const float STAT_DOM_PPS_BLUE = 72;
-const float STAT_DOM_PPS_PINK = 73;
-const float STAT_DOM_PPS_YELLOW = 74;
+const float STAT_HUD = 50;
 
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
@@ -326,7 +321,6 @@ const float CTF_STATE_ATTACK = 1;
 const float CTF_STATE_DEFEND = 2;
 const float CTF_STATE_COMMANDER = 3;
 
-const float STAT_HUD = 50;
 const float HUD_NORMAL = 0;
 const float HUD_SPIDERBOT = 10;
 const float HUD_WAKIZASHI = 11;
@@ -343,6 +337,16 @@ const float STAT_VEHICLESTAT_RELOAD1 = 64;
 const float STAT_VEHICLESTAT_AMMO2   = 65;
 const float STAT_VEHICLESTAT_RELOAD2 = 66;
 
+// mod stats (1xx)
+const float STAT_REDALIVE = 100;
+const float STAT_BLUEALIVE = 101;
+
+const float STAT_DOM_TOTAL_PPS = 100;
+const float STAT_DOM_PPS_RED = 101;
+const float STAT_DOM_PPS_BLUE = 102;
+const float STAT_DOM_PPS_PINK = 103;
+const float STAT_DOM_PPS_YELLOW = 104;
+
 //const float STAT_SPIDERBOT_AIM     53 // compressShotOrigin
 //const float STAT_SPIDERBOT_TARGET  54 // compressShotOrigin
 
index 835c58f64aec6baea33a728a6f97cded2194650d..43a05b1c0a77bdbcb7dc0a3e424ac687e7d1b482 100644 (file)
@@ -388,7 +388,7 @@ void _MapInfo_Map_Reset()
        MapInfo_Map_maxs = '0 0 0';
 }
 
-string MapInfo_GetDefault(float t)
+string _MapInfo_GetDefault(float t)
 {
        switch(t)
        {
@@ -418,7 +418,7 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
                return;
 
        if(load_default)
-               _MapInfo_Map_ApplyGametype(MapInfo_GetDefault(pThisType), pWantedType, pThisType, FALSE);
+               _MapInfo_Map_ApplyGametype(_MapInfo_GetDefault(pThisType), pWantedType, pThisType, FALSE);
        
        if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT || pWantedType == MAPINFO_TYPE_RACE || pWantedType == MAPINFO_TYPE_CTS) // these modes don't use fraglimit
        {
@@ -508,6 +508,132 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
        }
 }
 
+string _MapInfo_GetDefaultEx(float t)
+{
+       switch(t)
+       {
+               case MAPINFO_TYPE_DEATHMATCH:      return "timelimit=20 pointlimit=30 leadlimit=0";
+               case MAPINFO_TYPE_TEAM_DEATHMATCH: return "timelimit=20 pointlimit=50 teams=2 leadlimit=0";
+               case MAPINFO_TYPE_DOMINATION:      return "timelimit=20 pointlimit=200 teams=2 leadlimit=0";
+               case MAPINFO_TYPE_CTF:             return "timelimit=20 pointlimit=300 caplimit=10 leadlimit=0";
+               case MAPINFO_TYPE_RUNEMATCH:       return "timelimit=20 pointlimit=200 leadlimit=0";
+               case MAPINFO_TYPE_LMS:             return "timelimit=20 lives=9 leadlimit=0";
+               case MAPINFO_TYPE_ARENA:           return "timelimit=20 pointlimit=10 leadlimit=0";
+               case MAPINFO_TYPE_CA:              return "timelimit=20 pointlimit=10 leadlimit=0";
+               case MAPINFO_TYPE_KEYHUNT:         return "timelimit=20 pointlimit=1000 teams=3 leadlimit=0";
+               case MAPINFO_TYPE_ASSAULT:         return "timelimit=20";
+               case MAPINFO_TYPE_RACE:            return "timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0";
+               case MAPINFO_TYPE_ONSLAUGHT:       return "timelimit=20";
+               case MAPINFO_TYPE_NEXBALL:         return "timelimit=20 pointlimit=5 leadlimit=0";
+               case MAPINFO_TYPE_CTS:             return "timelimit=20 skill=-1";
+               default:                           return "";
+       }
+}
+
+void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
+{
+       string sa, k, v;
+       float p;
+       string fraglimit_normal;
+       string fraglimit_caps;
+       string fraglimit_teams;
+
+       MapInfo_Map_supportedGametypes |= pThisType;
+       if(!(pThisType & pWantedType))
+               return;
+
+       // reset all the cvars to their defaults
+
+       cvar_set("timelimit", cvar_defstring("timelimit"));
+       cvar_set("leadlimit", cvar_defstring("leadlimit"));
+       cvar_set("fraglimit", cvar_defstring("fraglimit"));
+       cvar_set("g_tdm_teams", cvar_defstring("g_tdm_teams"));
+       cvar_set("g_keyhunt_teams", cvar_defstring("g_keyhunt_teams"));
+       cvar_set("g_domination_default_teams", cvar_defstring("g_domination_default_teams"));
+       cvar_set("g_race_qualifying_timelimit", cvar_defstring("g_race_qualifying_timelimit"));
+
+       fraglimit_normal = string_null;
+       fraglimit_caps = string_null;
+       fraglimit_teams = string_null;
+
+       s = strcat(_MapInfo_GetDefaultEx(pWantedType), " ", s);
+       while(s != "")
+       {
+               sa = car(s);
+               s = cdr(s);
+
+               if(sa == "")
+                       continue;
+
+               p = strstrofs(sa, "=", 0);
+               if(p < 0)
+               {
+                       k = "timelimit";
+                       v = s;
+               }
+               else
+               {
+                       k = substring(sa, 0, p);
+                       v = substring(sa, p+1, -1);
+               }
+
+               if(k == "timelimit")
+               {
+                       cvar_set("timelimit", v);
+               }
+               else if(k == "leadlimit")
+               {
+                       cvar_set("leadlimit", v);
+               }
+               else if(k == "pointlimit" || k == "fraglimit" || k == "lives" || k == "laplimit")
+               {
+                       fraglimit_normal = v;
+               }
+               else if(k == "caplimit")
+               {
+                       fraglimit_caps = v;
+               }
+               else if(k == "teampointlimit" || k == "teamlaplimit")
+               {
+                       fraglimit_teams = v;
+               }
+               else if(k == "teams")
+               {
+                       cvar_set("g_tdm_teams", v);
+                       cvar_set("g_keyhunt_teams", v);
+                       cvar_set("g_domination_default_teams", v);
+               }
+               else if(k == "qualifying_timelimit")
+               {
+                       cvar_set("g_race_qualifying_timelimit", v);
+               }
+               else if(k == "skill")
+               {
+                       // ignore
+               }
+               else
+               {
+                       print("Invalid gametype key in mapinfo: ", k, "\n");
+               }
+       }
+
+       if(pWantedType == MAPINFO_TYPE_CTF && cvar("g_ctf_win_mode") < 2)
+       {
+               if(fraglimit_caps)
+                       cvar_set("fraglimit", fraglimit_caps);
+       }
+       else if(pWantedType == MAPINFO_TYPE_RACE && cvar("g_race_teams") >= 2)
+       {
+               if(fraglimit_teams)
+                       cvar_set("fraglimit", fraglimit_teams);
+       }
+       else
+       {
+               if(fraglimit_normal)
+                       cvar_set("fraglimit", fraglimit_normal);
+       }
+}
+
 float MapInfo_Type_FromString(string t)
 {
        if     (t == "dm")      return MAPINFO_TYPE_DEATHMATCH;
@@ -654,7 +780,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
        string fn;
        string s, t;
        float fh, fh2;
-       float r, f, n, i;
+       float r, f, n, i, p;
        string acl;
 
        acl = MAPINFO_SETTEMP_ACL_USER;
@@ -720,7 +846,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
 
                for(i = 1; i <= MapInfo_Map_supportedGametypes; i *= 2)
                        if(MapInfo_Map_supportedGametypes & i)
-                               fputs(fh, sprintf("type %s %s\n", MapInfo_Type_ToString(i), MapInfo_GetDefault(i)));
+                               fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(i), _MapInfo_GetDefaultEx(i)));
 
                fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
                if(fh2 >= 0)
@@ -759,6 +885,10 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
                if(substring(s, 0, 1) == "_")  // q3map style
                        continue;
 
+               p = strstrofs(s, "//", 0);
+               if(p >= 0)
+                       s = substring(s, 0, p);
+
                t = car(s); s = cdr(s);
                if(t == "title")
                        MapInfo_Map_title = s;
@@ -794,6 +924,15 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
                        else
                                dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
+               else if(t == "gametype")
+               {
+                       t = car(s); s = cdr(s);
+                       f = MapInfo_Type_FromString(t);
+                       if(f)
+                               _MapInfo_Map_ApplyGametypeEx (s, pGametypeToSet, f);
+                       else
+                               dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+               }
                else if(t == "size")
                {
                        float a, b, c, d, e;
@@ -884,7 +1023,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
                if(!(MapInfo_Map_supportedGametypes & pGametypeToSet))
                {
                        print("Can't select the requested game type. Trying anyway with stupid settings.\n");
-                       _MapInfo_Map_ApplyGametype(MapInfo_GetDefault(MAPINFO_TYPE_DEATHMATCH), pGametypeToSet, MAPINFO_TYPE_DEATHMATCH, FALSE);
+                       _MapInfo_Map_ApplyGametypeEx("", pGametypeToSet, MAPINFO_TYPE_DEATHMATCH);
                }
        }
 
index c0d16a959727cb2c7bf3de5b980153b7eba124ea..37a4669c512e0174adf448a4e1c222bc3e3fbc20 100644 (file)
@@ -70,6 +70,8 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", MinstaGib");
        if(cvar("g_nix"))
                s = strcat(s, ", NIX");
+       if(cvar("g_rocket_flying"))
+               s = strcat(s, ", Rocket Flying");
        if(cvar_string("g_weaponarena") != "0")
                s = strcat(s, ", ", WeaponArenaString());
        if(cvar("g_start_weapon_laser") == 0)
@@ -78,8 +80,6 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", Low gravity");
        if(cvar("g_cloaked"))
                s = strcat(s, ", Cloaked");
-       if(cvar("g_footsteps"))
-               s = strcat(s, ", Steps");
        if(cvar("g_grappling_hook"))
                s = strcat(s, ", Hook");
        if(cvar("g_laserguided_missile"))
@@ -170,9 +170,6 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_cloaked", "Cloaked"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_footsteps", "Footsteps"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_midair", "Midair"));
@@ -208,6 +205,9 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_laserguided_missile", "Laser guided missiles"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", "Rocket Flying"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", "Pinata"));
index ee4ce1b87ed9388ca2bf376f98a437866ef21bc3..046743151dbc02fd27dbd706a77d8065418397b6 100644 (file)
@@ -8,8 +8,8 @@ float arena_roundbased;
 entity spawnqueue_first;
 entity spawnqueue_last;
 entity champion;
+string champion_name;
 float warmup;
-float allowed_to_spawn;
 float ca_players;
 float required_ca_players;
 .float caplayer;
@@ -122,7 +122,7 @@ void reset_map(float dorespawn)
        if(g_keyhunt)
                kh_Controller_SetThink(cvar("g_balance_keyhunt_delay_round")+(game_starttime - time), "", kh_StartRound);
 
-       if(g_arena || g_ca)
+       if(g_arena)
        if(champion && champion.classname == "player" && player_count > 1)
                UpdateFrags(champion, +1);
 
@@ -195,11 +195,15 @@ void Arena_Warmup()
        if((!g_arena && !g_ca) || (g_arena && !arena_roundbased) || (time < game_starttime))
                return;
 
-       f = floor(warmup - time + 1);
+       f = ceil(warmup - time);
+       if(f > 0)
+               champion = world; // this is done because a if(champion) will not execute if champion = world
 
        allowed_to_spawn = 0;
 
-       if(g_ca && (ca_players < required_ca_players || inWarmupStage))
+       if(inWarmupStage)
+               allowed_to_spawn = 1;
+       if(ca_players < required_ca_players)
                allowed_to_spawn = 1;
 
        msg = NEWLINES;
@@ -208,7 +212,7 @@ void Arena_Warmup()
                if (g_ca)
                        allowed_to_spawn = 1;
                if(champion && g_arena)
-                       msg = strcat("The Champion is ", champion.netname, "^7\n");
+                       msg = strcat("The Champion is ", champion_name, "^7\n");
                        //centerprint(self, strcat(msg, "The Champion is ", champion.netname, "^7\n"));
 
                if(f != roundStartTime_prev) {
@@ -257,6 +261,9 @@ void Arena_Warmup()
 }
 
 float next_round;
+float stopalivecheck;
+float redalive, bluealive;
+.float redalive_stat, bluealive_stat;
 /**
  * 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
@@ -266,6 +273,22 @@ float next_round;
  */
 void Spawnqueue_Check()
 {
+       if(g_ca) // we want to perform this before the return block below...
+       {
+               // this is STUPID to perform again, but has to be done so that we can give instant feedback when a round ends
+               // and so the code won't start searching for a champion using find() before all players are actually REMOVED
+               redalive = 0; bluealive = 0;
+               FOR_EACH_PLAYER(self) {
+                       if (self.team == COLOR_TEAM1 && self.health >= 1) redalive += 1;
+                       else if (self.team == COLOR_TEAM2 && self.health >= 1) bluealive += 1;
+               }
+               // as if the above stuff wasn't stupid enough, let's run it a third time! :D
+               // (so that we can send redalive/bluealive as a stat)
+               FOR_EACH_PLAYER(self) {
+                       self.redalive_stat = redalive;
+                       self.bluealive_stat = bluealive;
+               }
+       }
        if(time < warmup + 1 || inWarmupStage)
                return;
 
@@ -285,34 +308,43 @@ void Spawnqueue_Check()
                else if(ca_players < required_ca_players) {
                        FOR_EACH_PLAYER(self)
                                centerprint(self, strcat("^1Need at least 1 player in each team to play CA", "^7\n"));
-
-                       allowed_to_spawn = 1;
                        return;
                }
                else if(!next_round) {
                        if((redspawned && !bluespawned) || (bluespawned && !redspawned)) {
                                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"));
+                               if(champion_name)
+                                       strunzone(champion_name);
+                               champion_name = strzone(champion.netname);
                        }
-                       else if(!redspawned && !bluespawned) {
+                       else if((!redspawned && !bluespawned) || time - warmup > cvar("g_ca_round_timelimit")) {
                                FOR_EACH_CLIENT(self) centerprint(self, strcat("^7Round tied.", "^7\n"));
                                next_round = time + 5;
                        }
+
+               }
+               if(!stopalivecheck)
+               {
+                       if(redalive && !bluealive)
+                       {
+                               play2all("ctf/red_capture.wav");
+                               FOR_EACH_CLIENT(self) centerprint(self, "^1 RED ^7team wins the round.\n");
+                               TeamScore_AddToTeam(COLOR_TEAM1, ST_SCORE, +1);
+                               stopalivecheck = TRUE;
+                       }
+                       else if(bluealive && !redalive)
+                       {
+                               play2all("ctf/blue_capture.wav");
+                               FOR_EACH_CLIENT(self) centerprint(self, "^4 BLUE ^7team wins the round.\n");
+                               TeamScore_AddToTeam(COLOR_TEAM2, ST_SCORE, +1);
+                               stopalivecheck = TRUE;
+                       }
                }
 
                if((next_round && next_round < time))
                {
+                       stopalivecheck = FALSE;
                        next_round = 0;
                        reset_map(TRUE);
                }
index 8a01a23b2474d87319c3485bc61a018cce60753a..300d01a7a56607b031a28e5e0d419c2dbadd42ea 100644 (file)
@@ -119,9 +119,9 @@ void CampaignPostInit()
        if(Campaign_Invalid())
                return;
        cvar_set("fraglimit", ftos(campaign_fraglimit[0]));
-       cvar_set("timelimit", "0");
+       cvar_set("timelimit", ftos(campaign_timelimit[0]));
        cvar_set_normal("fraglimit", ftos(campaign_fraglimit[0]));
-       cvar_set_normal("timelimit", "0");
+       cvar_set_normal("timelimit", ftos(campaign_timelimit[0]));
 }
 
 void CampaignSaveCvar(string cvarname, float value)
@@ -188,8 +188,23 @@ void CampaignPreIntermission()
 
        if(won == 1 && lost == 0 && checkrules_equality == 0 && cheatcount_total == 0)
        {
+               if(cvar("timelimit") != 0  &&  time > cvar("timelimit") * 60) // checks if the timelimit has expired.
+               {
+                       campaign_won = 0;
+                       bprint("Time's up! The current level has been LOST.\n");
+                       // sound!
+               }
+               else
+               {
                campaign_won = 1;
                bprint("The current level has been WON.\n");
+               // sound!       
+               }
+       }
+       else if(cvar("timelimit") != 0  &&  time > cvar("timelimit") * 60)
+       {
+               campaign_won = 0;
+               bprint("Time's up! The current level has been LOST.\n");
                // sound!
        }
        else
@@ -249,3 +264,4 @@ void CampaignLevelWarp(float n)
                error("Sorry, cheater. You are NOT WELCOME.");
        CampaignFile_Unload();
 }
+
index 6cc10bcd6bb767d1307cb38a52d896f49e76d03e..fe5aa3ddc4b0a161ec9b75ad30addc34c807238e 100644 (file)
@@ -1305,7 +1305,12 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto
 
 void ClientKill (void)
 {
-       ClientKill_TeamChange(0);
+       if((g_arena || g_ca) && ((champion && champion.classname == "player" && player_count > 1) || player_count == 1)) // don't allow a kill in this case either
+       {
+               // do nothing
+       }
+       else
+               ClientKill_TeamChange(0);
 }
 
 void DoTeamChange(float destteam)
@@ -1397,7 +1402,7 @@ Called when a client connects to the server
 string ColoredTeamName(float t);
 void DecodeLevelParms (void);
 //void dom_player_join_team(entity pl);
-void set_dom_state(entity e, float connecting);
+void set_dom_state(void);
 void ClientConnect (void)
 {
        float t;
@@ -1599,7 +1604,7 @@ void ClientConnect (void)
                send_CSQC_teamnagger();
 
        if (g_domination)
-               set_dom_state(self, TRUE);
+               set_dom_state();
        send_CSQC_cr_maxbullets(self);
 
        CheatInitClient();
index f41620f7c0d567fd35c16200dee56128fc9c76b3..b005dd5f3f20c575914e76107a7891ffd4198d07 100644 (file)
@@ -1332,10 +1332,9 @@ void SV_PlayerPhysics()
        {
                // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
                xyspeed = min(xyspeed, cvar("g_balance_nex_charge_maxspeed"));
-               float f;
                f = (xyspeed - cvar("g_balance_nex_charge_minspeed")) / (cvar("g_balance_nex_charge_maxspeed") - cvar("g_balance_nex_charge_minspeed"));
                // add the extra charge
-               self.nex_charge += cvar("g_balance_nex_charge_velocity_rate") * f * frametime;
+               self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_velocity_rate") * f * frametime);
        }
 :end
        if(self.flags & FL_ONGROUND)
index c9a5dfc4aa1b9d61236355e94824506004053edb..4537573c5d57b28c6ed7757a4aea131bcd78d109 100644 (file)
@@ -130,6 +130,8 @@ vector w_shotend;
 // this function calculates w_shotorg and w_shotdir based on the weapon model
 // offset, trueaim and antilag, and won't put w_shotorg inside a wall.
 // make sure you call makevectors first (FIXME?)
+.float prevstrengthsound;
+.float prevstrengthsoundattempt;
 void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float maxdamage, float range)
 {
        float nudge = 1; // added to traceline target and subtracted from result
@@ -245,9 +247,18 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                sound (ent, CHAN_WEAPON, snd, VOL_BASE, ATTN_NORM);
        }
 
-       if (ent.items & IT_STRENGTH)
-       if (!g_minstagib)
-               sound (ent, CHAN_AUTO, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM);
+       if(ent.items & IT_STRENGTH)
+       if(!g_minstagib)
+       if(
+               (time > ent.prevstrengthsound + cvar("sv_strengthsound_antispam_time"))
+               ||
+               (time > ent.prevstrengthsoundattempt + cvar("sv_strengthsound_antispam_refire_threshold"))
+       ) // prevent insane sound spam
+       {
+               sound(ent, CHAN_AUTO, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM);
+               ent.prevstrengthsound = time;
+       }
+       ent.prevstrengthsoundattempt = time;
 
        // nudge w_shotend so a trace to w_shotend hits
        w_shotend = w_shotend + normalize(w_shotend - w_shotorg) * nudge;
@@ -1106,6 +1117,9 @@ float weapon_prepareattack_checkammo(float secondary)
                for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
                        return FALSE;
 
+               if(self.weapon == self.switchweapon) // only play once BEFORE starting to switch weapons
+                       sound (self, CHAN_AUTO, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
+
                W_SwitchToOtherWeapon(self);
                return FALSE;
        }
index a9fd886bfe9c331e34b7651faf4c4bca063703c5..b705e9c09ce18a1877a3e9889e2130c06a53daa9 100644 (file)
@@ -430,7 +430,7 @@ void ReadyRestartForce()
 
        readyrestart_happened = 1;
        game_starttime = time;
-       if(!g_ca)
+       if(!g_ca && !g_arena)
                game_starttime += RESTART_COUNTDOWN;
        restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
 
@@ -448,7 +448,7 @@ void ReadyRestartForce()
        }
 
        //initiate the restart-countdown-announcer entity
-       if(cvar("sv_ready_restart_after_countdown"))
+       if(cvar("sv_ready_restart_after_countdown") && !g_ca && !g_arena)
        {
                restartTimer = spawn();
                restartTimer.think = restartTimer_Think;
index d88e0eba1d9b7d426dd88c6cd0235e303ac8c597..745a6e0b2a5e148be15ba87a3e3da7079d4d2f86 100644 (file)
@@ -440,6 +440,7 @@ float next_pingtime;
 // TODO implemented fall and falling
 #define ALLPLAYERSOUNDS \
                _VOICEMSG(death) \
+               _VOICEMSG(fall) \
                _VOICEMSG(drown) \
                _VOICEMSG(gasp) \
                _VOICEMSG(jump) \
@@ -650,3 +651,5 @@ string deathmessage;
 .entity realowner;
 
 .float nex_charge;
+
+float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
index 17e2e5fe0bbaabfefd1f8dd4790129b5778a035e..2c5d4869727bead678a0b2483d1866182167ebb6 100644 (file)
@@ -35,13 +35,20 @@ float pps_red;
 float pps_blue;
 float pps_yellow;
 float pps_pink;
-void set_dom_state(entity e, float connecting)
+void set_dom_state(void)
 {
-       if(connecting)  e.dom_total_pps = total_pps;
-                                       e.dom_pps_red = pps_red;
-                                       e.dom_pps_blue = pps_blue;
-       if(c3 >= 0)             e.dom_pps_yellow = pps_yellow;
-       if(c4 >= 0)             e.dom_pps_pink = pps_pink;
+       // BIG ugly hack to make stat sending work
+       self.dom_total_pps = total_pps;
+       self.dom_pps_red = pps_red;
+       self.dom_pps_blue = pps_blue;
+       if(c3 >= 0)
+       {
+               self.dom_pps_yellow = pps_yellow;
+       }
+       if(c4 >= 0)
+       {
+               self.dom_pps_pink = pps_pink;
+       }
 }
 
 void() dom_controlpoint_setup;
@@ -174,8 +181,8 @@ void dompoint_captured ()
                        WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", "");
        }
 
-       FOR_EACH_CLIENT(head)
-               set_dom_state(head, FALSE);
+       FOR_EACH_PLAYER(self)
+               set_dom_state();
 
        WaypointSprite_UpdateTeamRadar(self.sprite, RADARICON_DOMPOINT, colormapPaletteColor(self.goalentity.team - 1, 0));
        WaypointSprite_Ping(self.sprite);
@@ -601,13 +608,18 @@ void spawnfunc_dom_controlpoint()
        
        float points, waittime;
        if (g_domination_point_rate)
-               points += g_domination_point_rate;
+               points = g_domination_point_rate;
        else
-               points += self.frags;
+               points = self.frags;
+       if(points == 0) // default
+               points = 1;
+
        if (g_domination_point_amt)
-               waittime += g_domination_point_amt;
+               waittime = g_domination_point_amt;
        else
-               waittime += self.wait;
+               waittime = self.wait;
+       if(waittime == 0) // default
+               waittime = 5;
        total_pps += points/waittime;
 };
 
index ac774837299c5ce528f61e5ba84e86a44d474608..b72a0500013dc8402a8257d8febd4baef1bd6f75 100644 (file)
@@ -1,60 +1,60 @@
 
-       //DarkPlaces supported extension list, draft version 1.04
-
-       //things that don't have extensions yet:
-       .float disableclientprediction;
-
-       //definitions that id Software left out:
-       //these are passed as the 'nomonsters' parameter to traceline/tracebox (yes really this was supported in all quake engines, nomonsters is misnamed)
-       float MOVE_NORMAL = 0; // same as FALSE
-       float MOVE_NOMONSTERS = 1; // same as TRUE
-       float MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
-
-       //checkextension function
-       //idea: expected by almost everyone
-       //darkplaces implementation: LordHavoc
-       float(string s) checkextension = #99;
-       //description:
-       //check if (cvar("pr_checkextension")) before calling this, this is the only
-       //guaranteed extension to be present in the extension system, it allows you
-       //to check if an extension is available, by name, to check for an extension
-       //use code like this:
-       //// (it is recommended this code be placed in worldspawn or a worldspawn called function somewhere)
-       //if (cvar("pr_checkextension"))
-       //if (checkextension("DP_SV_SETCOLOR"))
-       //      ext_setcolor = TRUE;
-       //from then on you can check ext_setcolor to know if that extension is available
-
-       //BX_WAL_SUPPORT
-       //idea: id Software
-       //darkplaces implementation: LordHavoc
-       //description:
-       //indicates the engine supports .wal textures for filenames in the textures/ directory
-       //(note: DarkPlaces has supported this since 2001 or 2002, but did not advertise it as an extension, then I noticed Betwix was advertising it and added the extension accordingly)
-
-       //DP_BUTTONCHAT
-       //idea: Vermeulen
-       //darkplaces implementation: LordHavoc
-       //field definitions:
-       .float buttonchat;
-       //description:
-       //true if the player is currently chatting (in messagemode, menus or console)
-
-       //DP_BUTTONUSE
-       //idea: id Software
-       //darkplaces implementation: LordHavoc
-       //field definitions:
-       .float buttonuse;
-       //client console commands:
-       //+use
-       //-use
-       //description:
-       //made +use and -use commands work, they now control the .buttonuse field (.button1 was used by many mods for other purposes).
-
-       //DP_CL_LOADSKY
-       //idea: Nehahra, LordHavoc
-       //darkplaces implementation: LordHavoc
-       //client console commands:
+//DarkPlaces supported extension list, draft version 1.04
+
+//things that don't have extensions yet:
+.float disableclientprediction;
+
+//definitions that id Software left out:
+//these are passed as the 'nomonsters' parameter to traceline/tracebox (yes really this was supported in all quake engines, nomonsters is misnamed)
+float MOVE_NORMAL = 0; // same as FALSE
+float MOVE_NOMONSTERS = 1; // same as TRUE
+float MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
+
+//checkextension function
+//idea: expected by almost everyone
+//darkplaces implementation: LordHavoc
+float(string s) checkextension = #99;
+//description:
+//check if (cvar("pr_checkextension")) before calling this, this is the only
+//guaranteed extension to be present in the extension system, it allows you
+//to check if an extension is available, by name, to check for an extension
+//use code like this:
+//// (it is recommended this code be placed in worldspawn or a worldspawn called function somewhere)
+//if (cvar("pr_checkextension"))
+//if (checkextension("DP_SV_SETCOLOR"))
+//     ext_setcolor = TRUE;
+//from then on you can check ext_setcolor to know if that extension is available
+
+//BX_WAL_SUPPORT
+//idea: id Software
+//darkplaces implementation: LordHavoc
+//description:
+//indicates the engine supports .wal textures for filenames in the textures/ directory
+//(note: DarkPlaces has supported this since 2001 or 2002, but did not advertise it as an extension, then I noticed Betwix was advertising it and added the extension accordingly)
+
+//DP_BUTTONCHAT
+//idea: Vermeulen
+//darkplaces implementation: LordHavoc
+//field definitions:
+.float buttonchat;
+//description:
+//true if the player is currently chatting (in messagemode, menus or console)
+
+//DP_BUTTONUSE
+//idea: id Software
+//darkplaces implementation: LordHavoc
+//field definitions:
+.float buttonuse;
+//client console commands:
+//+use
+//-use
+//description:
+//made +use and -use commands work, they now control the .buttonuse field (.button1 was used by many mods for other purposes).
+
+//DP_CL_LOADSKY
+//idea: Nehahra, LordHavoc
+//darkplaces implementation: LordHavoc
+//client console commands:
 //"loadsky" (parameters: "basename", example: "mtnsun_" would load "mtnsun_up.tga" and "mtnsun_rt.tga" and similar names, use "" to revert to quake sky, note: this is the same as Quake2 skybox naming)
 //description:
 //sets global skybox for the map for this client (can be stuffed to a client by QC), does not hurt much to repeatedly execute this command, please don't use this in mods if it can be avoided (only if changing skybox is REALLY needed, otherwise please use DP_GFX_SKYBOX).
index 76cb7861498c7820ea603c9ad2b118b4f8f48951..ab0638387e472b6eeaf43830a065a388fd78a733 100644 (file)
@@ -753,6 +753,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                                        if(deathtype & HITTYPE_HEADSHOT)
                                                                headshot = 1;
                                                }
+                                               if(g_ca)
+                                                       PlayerScore_Add(attacker, SP_SCORE, damage * cvar("g_ca_damage2score_multiplier"));
                                        }
                                }
                                else
@@ -1154,9 +1156,7 @@ void Fire_ApplyDamage(entity e)
        if not(Fire_IsBurning(e))
                return;
 
-       o = e.owner;
-       while(o.owner)
-               o = o.owner;
+       for(t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
        if(clienttype(o) == CLIENTTYPE_NOTACLIENT)
                o = e.fire_owner;
 
index d97413f10efb94ff15770a6faf4b5af981d0aeb0..4a66f229380ea9c505962ae4e5aa0abe9674d171 100644 (file)
@@ -416,6 +416,10 @@ void trigger_hurt_touch()
        if (self.active != ACTIVE_ACTIVE) 
                return;
 
+       if(self.team)
+               if((self.spawnflags & 4 == 0) == (self.team != other.team))
+                       return;
+
        // only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
        if (other.iscreature)
        {
@@ -1012,6 +1016,8 @@ void misc_laser_think()
 {
        vector o;
        entity oldself;
+       entity hitent;
+       vector hitloc;
 
        self.nextthink = time;
 
@@ -1032,20 +1038,18 @@ void misc_laser_think()
                o = self.origin + v_forward * 32768;
        }
 
-       if(self.dmg)
+       if(self.dmg || self.enemy.target != "")
        {
-               if(self.dmg < 0)
-                       FireRailgunBullet(self.origin, o, 100000, 0, 0, 0, 0, 0, DEATH_HURTTRIGGER);
-               else
-                       FireRailgunBullet(self.origin, o, self.dmg * frametime, 0, 0, 0, 0, 0, DEATH_HURTTRIGGER);
+               traceline(self.origin, o, MOVE_NORMAL, self);
        }
+       hitent = trace_ent;
+       hitloc = trace_endpos;
 
        if(self.enemy.target != "") // DETECTOR laser
        {
-               traceline(self.origin, o, MOVE_NORMAL, self);
                if(trace_ent.iscreature)
                {
-                       self.pusher = trace_ent;
+                       self.pusher = hitent;
                        if(!self.count)
                        {
                                self.count = 1;
@@ -1071,6 +1075,15 @@ void misc_laser_think()
                        }
                }
        }
+
+       if(self.dmg)
+       {
+               if(self.team)
+                       if((self.spawnflags & 8 == 0) == (self.team != hitent.team))
+                               return;
+               if(hitent.takedamage)
+                       Damage(hitent, self, self, ((self.dmg < 0) ? 100000 : (self.dmg * frametime)), DEATH_HURTTRIGGER, hitloc, '0 0 0');
+       }
 }
 
 float laser_SendEntity(entity to, float fl)
@@ -1188,6 +1201,8 @@ void spawnfunc_misc_laser()
                self.scale = 1;
        if(!self.modelscale)
                self.modelscale = 1;
+       else if(self.modelscale < 0)
+               self.modelscale = 0;
        self.think = misc_laser_think;
        self.nextthink = time;
        InitializeEntity(self, misc_laser_init, INITPRIO_FINDTARGET);
index bc90ecac7b40630b16b0fa6c185e8d3e21c8fca9..6260d7e86d8f08a404afd3228908f70bdce1e774 100644 (file)
@@ -236,6 +236,7 @@ void cvar_changes_init()
                BADCVAR("g_configversion");
                BADCVAR("g_maplist_index");
                BADCVAR("halflifebsp");
+               BADPREFIX("sv_world");
 
                // client
                BADPREFIX("cl_");
@@ -279,6 +280,8 @@ void cvar_changes_init()
                BADCVAR("sys_colortranslation");
                BADCVAR("sys_specialcharactertranslation");
                BADCVAR("timestamps");
+               BADCVAR("net_address");
+               BADCVAR("net_address_ipv6");
 
                // mapinfo
                BADCVAR("timelimit");
@@ -437,6 +440,8 @@ void spawnfunc_worldspawn (void)
 
        compressShortVector_init();
 
+       allowed_to_spawn = TRUE;
+
        local entity head;
        head = nextent(world);
        maxclients = 0;
@@ -639,6 +644,11 @@ void spawnfunc_worldspawn (void)
 
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
 
+       if(g_ca)
+       {
+               addstat(STAT_REDALIVE, AS_INT, redalive_stat);
+               addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
+       }
        // g_movementspeed hack
        addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
        addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
@@ -1526,16 +1536,23 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
 
 float GetWinningCode(float fraglimitreached, float equality)
 {
-       if(equality)
-               if(fraglimitreached)
-                       return WINNING_STARTSUDDENDEATHOVERTIME;
-               else
-                       return WINNING_NEVER;
-       else
+       if(cvar("g_campaign") == 1)
                if(fraglimitreached)
                        return WINNING_YES;
                else
                        return WINNING_NO;
+
+       else
+               if(equality)
+                       if(fraglimitreached)
+                               return WINNING_STARTSUDDENDEATHOVERTIME;
+                       else
+                               return WINNING_NEVER;
+               else
+                       if(fraglimitreached)
+                               return WINNING_YES;
+                       else
+                               return WINNING_NO;
 }
 
 // set the .winning flag for exactly those players with a given field value
@@ -1654,7 +1671,7 @@ float WinningCondition_Assault()
 
                        TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
 
-                       if(ent.cnt == 1) // this was the second round
+                       if(ent.cnt == 1 || cvar("g_campaign")) // this was the second round
                        {
                                status = WINNING_YES;
                        }
index d4232424072f84aa90d2c7fd220371e4a91aa923..05f297746c5243812b1a0e61d811002c8aa422c9 100644 (file)
@@ -1172,6 +1172,10 @@ void readlevelcvars(void)
        // first load all the mutators
        if(cvar("g_nix"))
                MUTATOR_ADD(mutator_nix);
+       if(cvar("g_dodging"))
+               MUTATOR_ADD(mutator_dodging);
+       if(cvar("g_rocket_flying") || (cvar("g_balance_rocketlauncher_detonatedelay") == 0 && stof(cvar_defstring("g_balance_rocketlauncher_detonatedelay")) != 0))
+               MUTATOR_ADD(mutator_rocketflying);
 
     g_bugrigs = cvar("g_bugrigs");
     g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement");
@@ -1668,6 +1672,7 @@ void precache()
     precache_sound ("weapons/weapon_switch.wav");
     precache_sound ("weapons/weaponpickup.wav");
     precache_sound ("weapons/unavailable.wav");
+    precache_sound ("weapons/dryfire.wav");
     if (g_grappling_hook)
     {
         precache_sound ("weapons/hook_fire.wav"); // hook
index 73c16a9cd01c371a05d151d24499c82bf660faa8..cdc28f76bf426a44a4acace7da91b2a6396a807c 100644 (file)
@@ -112,3 +112,9 @@ MUTATOR_HOOKABLE(GetCvars);
        // INPUT:
                float get_cvars_f;
                string get_cvars_s;
+
+MUTATOR_HOOKABLE(EditProjectile);
+       // can edit any "just fired" projectile
+       // INPUT:
+               entity self;
+               entity other;
index d3b8e6d64ee04d26d9317f28894579ac6335eedc..894bb3ee54d2212f2f6dcfe056b06f5b4d8cc580 100644 (file)
@@ -266,7 +266,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
        return 0;
 }
 
-MUTATOR_DEFINITION(dodging)
+MUTATOR_DEFINITION(mutator_dodging)
 {
        // we need to be called before GetPressedKey does its thing so we can
        // detect state changes and therefore dodging actions..
diff --git a/qcsrc/server/mutators/mutator_rocketflying.qc b/qcsrc/server/mutators/mutator_rocketflying.qc
new file mode 100644 (file)
index 0000000..4cd26a4
--- /dev/null
@@ -0,0 +1,32 @@
+MUTATOR_HOOKFUNCTION(rocketflying_EditProjectile)
+{
+       if(other.classname == "rocket")
+       {
+               // kill detonate delay of rockets
+               other.spawnshieldtime = time;
+       }
+       return 0;
+}
+
+MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsString)
+{
+       ret_string = strcat(ret_string, ":RocketFlying");
+       return 0;
+}
+
+MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsPrettyString)
+{
+       ret_string = strcat(ret_string, ", Rocket Flying");
+       return 0;
+}
+
+MUTATOR_DEFINITION(mutator_rocketflying)
+{
+       entity e;
+
+       MUTATOR_HOOK(EditProjectile, rocketflying_EditProjectile, CBC_ORDER_ANY);
+       MUTATOR_HOOK(BuildMutatorsString, rocketflying_BuildMutatorsString, CBC_ORDER_ANY);
+       MUTATOR_HOOK(BuildMutatorsPrettyString, rocketflying_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+       return 0;
+}
index da14483a4d40fa52e10fb198b65af8fe109e10dd..91d2ea5be78c915997474f7fc24c851310bac36c 100644 (file)
@@ -1,5 +1,5 @@
 MUTATOR_DECLARATION(gamemode_keyhunt);
 
 MUTATOR_DECLARATION(mutator_nix);
-
-MUTATOR_DECLARATION(dodging);
+MUTATOR_DECLARATION(mutator_dodging);
+MUTATOR_DECLARATION(mutator_rocketflying);
index adf4b4a1d89545418734228dddc0b16345100f0a..d492a04ed3cb7f81e77a5b5c1ae978bd2c0868bf 100644 (file)
@@ -179,6 +179,7 @@ mutators/base.qc
 mutators/gamemode_keyhunt.qc
 mutators/mutator_nix.qc
 mutators/mutator_dodging.qc
+mutators/mutator_rocketflying.qc
 
 ../warpzonelib/anglestransform.qc
 ../warpzonelib/mathlib.qc
index 44a47c95dc5ed653c2cf40afb68bf7c788570b5d..3b7d77d58be6ef819dfcd4ae68266588e1ed36fc 100644 (file)
@@ -77,6 +77,10 @@ void CreatureFrame (void)
                                if (dm > 0)
                                {
                                        Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');
+                                       // this must be allowed to cut the normal pain sounds (played after them and on the same channel)
+                                       // there's no way to detect falling damage and prevent the pain sounds for this to be played instead
+                                       if(self.health > 0)
+                                               PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
                                }
                        }
 
index 912e22c2441e8c9aabea1cef218d45f234b3a2dc..1232e3c8eb9262f180e8bb97279fdaf761f29181 100644 (file)
@@ -210,9 +210,6 @@ void InitGameplayMode()
        fraglimit_override = cvar("fraglimit_override");
        leadlimit_override = cvar("leadlimit_override");
 
-       if(cvar("g_dodging"))
-               MUTATOR_ADD(dodging);
-       
        if(g_dm)
        {
                game = GAME_DEATHMATCH;
index 1b2fcd7723b8089c7fb5102dbb44f424eb4c7e66..af53db7c62c234f258cfb46919f1dfe29e820960 100644 (file)
@@ -340,8 +340,9 @@ float turret_stdproc_firecheck()
 
     // Special case: volly fire turret that has to fire a full volly if a shot was fired.
     if (self.shoot_flags & TFL_SHOOT_VOLLYALWAYS)
-        if not (self.volly_counter == self.shot_volly)
-            return 1;
+        if (self.volly_counter != self.shot_volly)
+                       if(self.ammo >= self.shot_dmg)
+                               return 1;               
 
     // Lack of zombies makes shooting dead things unnecessary :P
     if (self.firecheck_flags & TFL_FIRECHECK_DEAD)
@@ -1234,6 +1235,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
         self.use();
     }
 
+       turret_stdproc_respawn();
     return 1;
 }
 
index 1e42e5e1ada3251fa3707a2e53d7b6883e5d7998..b6408ed4f32b1f3aa936caad9234a1452fc4930e 100644 (file)
@@ -17,21 +17,23 @@ void turret_hellion_postthink()
     }
 
     if (self.tur_head.frame != 0)
-        self.tur_head.frame = self.tur_head.frame + 1;
+        self.tur_head.frame += 1;
 
-    if (self.tur_head.frame > 7)
+    if (self.tur_head.frame >= 7)
         self.tur_head.frame = 0;
 }
 
 void turret_hellion_attack()
 {
-    local entity missile;
-
+    entity missile;
+               
+       if(self.tur_head.frame != 0)
+               self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire"));
+       else
+               self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire2"));
+    
     sound (self, CHAN_WEAPON, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
 
-    // switch tubes
-    //self.tur_shotorg_y = self.tur_shotorg_y * -1;
-
     missile = spawn ();
     setorigin(missile, self.tur_shotorg);
     setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
@@ -57,12 +59,9 @@ void turret_hellion_attack()
     missile.tur_health         = time + 9;
     missile.tur_aimpos         = randomvec() * 128;
     te_explosion (missile.origin);
-
        CSQCProjectile(missile, FALSE, PROJECTILE_ROCKET, FALSE); // no culling, has fly sound
 
-    if (self.tur_head.frame == 0)
-        self.tur_head.frame = self.tur_head.frame + 1;
-
+       self.tur_head.frame += 1;
 }
 
 void turret_hellion_missile_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
index 4777722da86223327ccf145b01219422817e6ab1..c9a37416b6cdd581edff7b5eb317f734368aaec5 100644 (file)
@@ -5,9 +5,6 @@ void turret_machinegun_attack();
 //.float bulletcounter;
 void turret_machinegun_attack()
 {
-
-    entity flash;
-
     sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
     fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, cvar("g_balance_uzi_bulletconstant"));
     endFireBallisticBullet();
@@ -15,16 +12,8 @@ void turret_machinegun_attack()
     //w_deathtypestring = "had an alergic reaction due to 10 kilos of led";
     te_smallflash(self.tur_shotorg);
 
-    // muzzle flash for 3rd person view
-    flash = spawn();
-    setmodel(flash, "models/uziflash.md3"); // precision set below
-    setattachment(flash, self.tur_head, "tag_fire");
-    flash.think = W_Uzi_Flash_Go;
-    flash.nextthink = time + 0.02;
-    flash.frame = 2;
-    flash.angles_z = flash.v_angle_z + random() * 180;
-    flash.alpha = 1;
-    flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
+    UziFlash();
+    setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
 }
 
 
index 48e2b007680061c295c91fc696d5377d0ef3ab91..499d6de2352c15c55d591d762cca0d40eb1f32f1 100644 (file)
@@ -6,9 +6,14 @@ void turret_mlrs_rocket_touch();
 
 void turret_mlrs_postthink()
 {
-
     // 0 = full, 6 = empty
-    self.tur_head.frame = rint(6 - (self.ammo / self.shot_dmg));
+    self.tur_head.frame = bound(0, 6 - floor(0.1 + self.ammo / self.shot_dmg), 6);
+    if(self.tur_head.frame < 0)
+    {
+       dprint("ammo:",ftos(self.ammo),"\n");
+       dprint("shot_dmg:",ftos(self.shot_dmg),"\n");
+    }
+    
 }
 
 void turret_mlrs_attack()
index e12bbb83025b944179770233667eccb6f1393824..59aaf653de3750a80540b616fdd41ca5df20e081 100644 (file)
@@ -615,26 +615,14 @@ void walker_postthink()
 
 void walker_attack()
 {
-    entity flash;
-
     sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
     fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, cvar("g_balance_uzi_bulletconstant"));
     endFireBallisticBullet();
     if (self.uzi_bulletcounter == 2)
     {
 
-        flash = spawn();
-
-        setmodel(flash, "models/uziflash.md3");
-        setattachment(flash, self.tur_head, "tag_fire");
-
-        flash.scale     = 3;
-        flash.think     = W_Uzi_Flash_Go;
-        flash.nextthink = time + 0.02;
-        flash.frame     = 2;
-        flash.angles_z  = flash.v_angle_z + random() * 180;
-        flash.alpha     = 1;
-        flash.effects   = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
+               UziFlash();
+               setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
 
         self.uzi_bulletcounter = 0;
     }
index ba4360550ebe161c4736eba5ec5d22fa0a331142..056249ed53a6bc5f276da85ecbfc38532ab6ace6 100644 (file)
@@ -188,6 +188,7 @@ void spiderbot_rocket_do()
     self.gun2.cnt = time + self.attack_finished_single;
 }
 
+/*
 void spiderbot_minigun_fire_Flash_Go() {
        if (self.frame > 10)
        {
@@ -201,12 +202,12 @@ void spiderbot_minigun_fire_Flash_Go() {
        self.scale -= 0.01;
        self.nextthink = time + 0.02;
 }
+*/
 
-void spiderbot_minigun_fire(entity gun,float trail)
+void spiderbot_minigun_fire(entity gun, float trail)
 {
-
-    entity flash;
     vector v;
+    
     v = gettaginfo(gun,gettagindex(gun,"barrels"));
     v_forward = normalize(v_forward);
 
@@ -215,22 +216,9 @@ void spiderbot_minigun_fire(entity gun,float trail)
     fireBullet (v, v_forward, cvar("g_vehicle_spiderbot_minigun_spread"), cvar("g_vehicle_spiderbot_minigun_damage"),
         cvar("g_vehicle_spiderbot_minigun_spread"), DEATH_SBMINIGUN, 0);
 
-    if not (gun.enemy)
-    {
-        gun.enemy = spawn();
-        setattachment(gun.enemy , gun, "barrels");
-        setorigin(gun.enemy ,gun.enemy.origin + '52 0 0');
-    }
 
-    flash = gun.enemy;
-    setmodel(flash, "models/uziflash.md3");
-    flash.think = spiderbot_minigun_fire_Flash_Go;
-    flash.nextthink = time + 0.02;
-    flash.frame = 2;
-    flash.angles_z = flash.v_angle_z + random() * 180;
-    flash.alpha = 1;
-    flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
-    flash.scale = 1;
+       UziFlash();
+       setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
 
     if(trail)
         trailparticles(self, particleeffectnum("EF_MGTURRETTRAIL"), v, trace_endpos);
index 99df7041baf7196e83f4016123a2075ef6b30295..0b405ba77e8043dc2d73e7edf7a1155aa8f7554a 100644 (file)
@@ -371,6 +371,8 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
 
        proj.oldvelocity = proj.velocity;
 
+       other = proj; MUTATOR_CALLHOOK(EditProjectile);
+
        if(cvar("g_antilag_bullets"))
        if(pSpeed >= cvar("g_antilag_bullets"))
        {
index 5d1721f78f7def80f188107343408d8cb5d98d87..44e3967b546d9840970229196257bd256d0af6d4 100644 (file)
@@ -206,6 +206,8 @@ void W_Crylink_Attack (void)
 
                CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
 
+               other = proj; MUTATOR_CALLHOOK(EditProjectile);
+
                counter = counter + 1;
        }
 }
@@ -279,6 +281,8 @@ void W_Crylink_Attack2 (void)
 
                CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
 
+               other = proj; MUTATOR_CALLHOOK(EditProjectile);
+
                counter = counter + 1;
        }
 }
index 4bee058f0fcff973d2d2173332b819559b8f91af..6634837db6131f9da80daf588a54b53ceae2c008 100644 (file)
@@ -136,6 +136,8 @@ void W_Electro_Attack()
        //sounds bad
 
        CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO_BEAM, TRUE);
+
+       other = proj; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_Electro_Attack2()
@@ -182,6 +184,8 @@ void W_Electro_Attack2()
 #endif
 
        CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO, FALSE); // no culling, it has sound
+
+       other = proj; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 .vector hook_start, hook_end;
@@ -238,8 +242,10 @@ void lgbeam_think()
        if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)
        {
                if(cvar("g_balance_electro_primary_ammo"))
-                       dt = min(frametime, self.owner.ammo_cells / cvar("g_balance_electro_primary_ammo"));
-               self.owner.ammo_cells = max(0, self.owner.ammo_cells - cvar("g_balance_electro_primary_ammo") * frametime);
+               {
+                       dt = min(dt, self.owner.ammo_cells / cvar("g_balance_electro_primary_ammo"));
+                       self.owner.ammo_cells = max(0, self.owner.ammo_cells - cvar("g_balance_electro_primary_ammo") * frametime);
+               }
        }
 
        W_SetupShot_Range(self.owner, TRUE, 0, "", cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
index 6b98d37cd7404b024f8252e55b49307d58ecf4c1..e78bb2bbc3b1c03ace99f72afcf8f9b280b8430c 100644 (file)
@@ -155,6 +155,8 @@ void W_Fireball_Attack1()
        proj.flags = FL_PROJECTILE;
 
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREBALL, TRUE);
+
+       other = proj; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_Fireball_AttackEffect(float i, vector f_diff)
@@ -289,6 +291,8 @@ void W_Fireball_Attack2()
        proj.flags = FL_PROJECTILE;
 
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREMINE, TRUE);
+
+       other = proj; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_fireball (void)
index 0bc08b8de77f2b2a6d84c9603d571bac6188421e..e92b2b26062bdae5bddfbe1b7ddb1b18785608b8 100644 (file)
@@ -200,6 +200,8 @@ void W_Grenade_Attack (void)
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
        else
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE_BOUNCING, TRUE);
+
+       other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_Grenade_Attack2 (void)
@@ -244,6 +246,8 @@ void W_Grenade_Attack2 (void)
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
        else
                CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE_BOUNCING, TRUE);
+
+       other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_grenadelauncher (void)
index 1d9e9e698e211b3ac12812cf4ebdb8a987e48c40..587c9fccc04b4a2de5528d23aa394f63dda06ec0 100644 (file)
@@ -71,6 +71,8 @@ void W_Hagar_Attack (void)
        missile.flags = FL_PROJECTILE;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_Hagar_Attack2 (void)
@@ -106,6 +108,8 @@ void W_Hagar_Attack2 (void)
        missile.flags = FL_PROJECTILE;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE);
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_hagar (void)
index 9abb8a7a0200f76e63a5ecbe6b2ddeb2d19e7652..6aaf174147142b1f70212fd276274cbec9c5c053 100644 (file)
@@ -74,6 +74,8 @@ void W_HLAC_Attack (void)
        missile.projectiledeathtype = WEP_HLAC;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HLAC, TRUE);
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_HLAC_Attack2f (void)
@@ -116,6 +118,8 @@ void W_HLAC_Attack2f (void)
        missile.projectiledeathtype = WEP_HLAC | HITTYPE_SECONDARY;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HLAC, TRUE);
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void W_HLAC_Attack2 (void)
index 70fe77814de201e42e9f583d1e7b49c3da89e8a2..334e434c8afa9526774aab288d2ad2dfcbfa6dd5 100644 (file)
@@ -93,6 +93,8 @@ void W_Hook_Attack2()
        gren.flags = FL_PROJECTILE;
 
        CSQCProjectile(gren, TRUE, PROJECTILE_HOOKBOMB, TRUE);
+
+       other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_hook (void)
index 18715a9b4ba51ff79c7f995cd665d5a0bb1e88b5..db11eb395c3a370dce30aa21749e6a4199662702 100644 (file)
@@ -77,6 +77,9 @@ void W_Laser_Attack (float issecondary)
 
        missile.think = W_Laser_Think;
        missile.nextthink = time + cvar("g_balance_laser_primary_delay");
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
+
        if(time >= missile.nextthink)
        {
                entity oldself;
index da847d2709c19de897d57b1610a293537960cc75..dc4f48152e4ebb6d6dc07df6a0af8d49695cb77c 100644 (file)
@@ -17,7 +17,7 @@ void W_Mine_Stick ()
 
        // in order for mines to face properly when sticking to the ground, they must be a server side entity rather than a csqc projectile
 
-       local entity newmine;
+       entity newmine;
        newmine = spawn();
        newmine.classname = self.classname;
 
@@ -197,8 +197,8 @@ void W_Mine_Damage (entity inflictor, entity attacker, float damage, float death
 
 void W_Mine_Attack (void)
 {
-       local entity mine;
-       local entity flash;
+       entity mine;
+       entity flash;
 
        // scan how many mines we placed, and return if we reached our limit
        if(cvar("g_balance_minelayer_limit"))
@@ -262,6 +262,8 @@ void W_Mine_Attack (void)
        W_AttachToShotorg(flash, '5 0 0');
 
        // common properties
+
+       other = mine; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_minelayer (void); // defined in t_items.qc
@@ -277,9 +279,9 @@ float w_minelayer(float req)
                if(skill >= 2) // skill 0 and 1 bots won't detonate mines!
                {
                        // decide whether to detonate mines
-                       local entity mine, targetlist, targ;
-                       local float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
-                       local float selfdamage, teamdamage, enemydamage;
+                       entity targetlist, targ;
+                       float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
+                       float selfdamage, teamdamage, enemydamage;
                        edgedamage = cvar("g_balance_minelayer_edgedamage");
                        coredamage = cvar("g_balance_minelayer_damage");
                        edgeradius = cvar("g_balance_minelayer_radius");
@@ -312,7 +314,7 @@ float w_minelayer(float req)
                                }
                                mine = find(mine, classname, "mine");
                        }
-                       local float desirabledamage;
+                       float desirabledamage;
                        desirabledamage = enemydamage;
                        if (teamplay != 1 && time > self.invincible_finished && time > self.spawnshieldtime)
                                desirabledamage = desirabledamage - selfdamage * cvar("g_balance_selfdamagepercent");
@@ -341,7 +343,7 @@ float w_minelayer(float req)
                                                targ = targ.chain;
                                        }
                                }else{
-                                       local float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
+                                       float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
                                        //As the distance gets larger, a correct detonation gets near imposible
                                        //Bots are assumed to use the mine spawnfunc_light to see if the mine gets near a player
                                        if(v_forward * normalize(mine.origin - self.enemy.origin)< 0.1)
index a50dc11fb9ecb36fc1dfb9a7e029e8d310a5d5a6..29b8be7ef0e6efd823fb934de4afd5eac1f959fe 100644 (file)
@@ -2,23 +2,23 @@
 REGISTER_WEAPON(NEX, w_nex, IT_CELLS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_HIGH, "nex", "nex", "Nex");
 #else
 #ifdef SVQC
-void SendCSQCNexBeamParticle() {
+void SendCSQCNexBeamParticle(float charge) {
        vector v;
        v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
        WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
        WriteByte(MSG_BROADCAST, TE_CSQC_NEXGUNBEAMPARTICLE);
-       
        WriteCoord(MSG_BROADCAST, w_shotorg_x);
        WriteCoord(MSG_BROADCAST, w_shotorg_y);
        WriteCoord(MSG_BROADCAST, w_shotorg_z);
        WriteCoord(MSG_BROADCAST, v_x);
        WriteCoord(MSG_BROADCAST, v_y);
        WriteCoord(MSG_BROADCAST, v_z);
+       WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
 }
 
 void W_Nex_Attack (float issecondary)
 {
-       float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo;
+       float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge;
        if(issecondary)
        {
                mydmg = cvar("g_balance_nex_secondary_damage");
@@ -45,11 +45,13 @@ void W_Nex_Attack (float issecondary)
 
        if(cvar("g_balance_nex_charge"))
        {
-               mydmg *= self.nex_charge;
-               myforce *= self.nex_charge;
-               //print("^1Damage: ^7", ftos(mydmg), "\n");
+               charge = cvar("g_balance_nex_charge_mindmg") / mydmg + (1 - cvar("g_balance_nex_charge_mindmg") / mydmg) * self.nex_charge;
                self.nex_charge *= cvar("g_balance_nex_charge_shot_multiplier"); // do this AFTER setting mydmg/myforce
        }
+       else
+               charge = 1;
+       mydmg *= charge;
+       myforce *= charge;
 
        W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg);
 
@@ -60,7 +62,7 @@ void W_Nex_Attack (float issecondary)
                AnnounceTo(self, "yoda");
 
        //beam and muzzle flash done on client
-       SendCSQCNexBeamParticle();
+       SendCSQCNexBeamParticle(charge);
        
        // flash and burn the wall
        if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
@@ -74,6 +76,7 @@ void spawnfunc_weapon_nex (void); // defined in t_items.qc
 
 float w_nex(float req)
 {
+       float dt;
        if (req == WR_AIM)
        {
                self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE);
@@ -81,7 +84,7 @@ float w_nex(float req)
        }
        else if (req == WR_THINK)
        {
-               if(cvar("g_balance_nex_charge"))
+               if(cvar("g_balance_nex_charge") && self.nex_charge < cvar("g_balance_nex_charge_limit"))
                        self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_rate") * frametime / W_TICSPERFRAME);
                if (self.BUTTON_ATCK)
                {
@@ -95,10 +98,23 @@ float w_nex(float req)
                {
                        if(cvar("g_balance_nex_secondary_charge"))
                        {
-                               if(self.ammo_cells)
+                               dt = frametime / W_TICSPERFRAME;
+                               if(self.nex_charge < 1)
                                {
-                                       self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_secondary_charge_rate") * frametime / W_TICSPERFRAME);
-                                       self.ammo_cells = max(0, self.ammo_cells - cvar("g_balance_nex_secondary_ammo") * frametime / W_TICSPERFRAME);
+                                       dt = min(dt, (1 - self.nex_charge) / cvar("g_balance_nex_secondary_charge_rate"));
+                                       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                       {
+                                               if(cvar("g_balance_nex_secondary_ammo"))
+                                               {
+                                                       dt = min(dt, (self.ammo_cells - cvar("g_balance_nex_primary_ammo")) / cvar("g_balance_nex_secondary_ammo"));
+                                                       dt = max(0, dt);
+                                                       if(dt > 0)
+                                                       {
+                                                               self.ammo_cells = max(cvar("g_balance_nex_secondary_ammo"), self.ammo_cells - cvar("g_balance_nex_secondary_ammo") * dt);
+                                                       }
+                                               }
+                                       }
+                                       self.nex_charge += dt * cvar("g_balance_nex_secondary_charge_rate");
                                }
                        }
                        else if(cvar("g_balance_nex_secondary"))
@@ -127,7 +143,11 @@ float w_nex(float req)
        else if (req == WR_CHECKAMMO1)
                return self.ammo_cells >= cvar("g_balance_nex_primary_ammo");
        else if (req == WR_CHECKAMMO2)
+       {
+               if(cvar("g_balance_nex_secondary_charge"))
+                       return self.ammo_cells >= cvar("g_balance_nex_primary_ammo");
                return self.ammo_cells >= cvar("g_balance_nex_secondary_ammo");
+       }
        return TRUE;
 };
 #endif
index 010a0f8b36546ccf7ad18a47b3460349b3d61a18..65442b21b957caa3b667202c422d9add5497e82b 100644 (file)
@@ -200,6 +200,8 @@ void W_Porto_Attack (void)
        gren.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
 
        CSQCProjectile(gren, TRUE, PROJECTILE_PORTO_RED, TRUE);
+
+       other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_porto (void)
index d4056763a84d1e418075a0bd7ffe6a35318eb798..c109fc796b68afeb88d1b62d683083bd33062c29 100644 (file)
@@ -291,9 +291,13 @@ void W_Rocket_Think (void)
 
 void W_Rocket_Touch (void)
 {
+       if(WarpZone_Projectile_Touch())
+       {
+               if(wasfreed(self))
+                       W_Rocket_Unregister();
+               return;
+       }
        W_Rocket_Unregister();
-
-       PROJECTILE_TOUCH;
        W_Rocket_Explode ();
 }
 
@@ -363,6 +367,7 @@ void W_Rocket_Attack (void)
        W_AttachToShotorg(flash, '5 0 0');
 
        // common properties
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_rocketlauncher (void); // defined in t_items.qc
index c91e4f40869ff7fb11e74a8cd9f514422c31b790..08b1a678269e3b88c8aa1a106a108f35c7aee022 100644 (file)
@@ -212,6 +212,8 @@ void Seeker_Fire_Missile(vector f_diff)
        missile.angles = vectoangles (missile.velocity);
 
        CSQCProjectile(missile, FALSE, PROJECTILE_SEEKER, TRUE);
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void Seeker_Vollycontroler_Think()
@@ -351,6 +353,8 @@ void Seeker_Fire_Tag()
        missile.angles = vectoangles (missile.velocity);
 
        CSQCProjectile(missile, TRUE, PROJECTILE_TAG, FALSE); // has sound
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 
@@ -424,6 +428,8 @@ void Seeker_Fire_Flac()
        missile.flags = FL_PROJECTILE;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
+
+       other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
 void spawnfunc_weapon_seeker (void)
index d9197412b98287e9805d0736220ee97bbfc4cfb4..788c9880fe7c4f57df428a9ccc17afbbdc2e7138 100644 (file)
@@ -2,26 +2,49 @@
 REGISTER_WEAPON(UZI, w_uzi, IT_NAILS, 3, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "uzi", "uzi", "Machine Gun");
 #else
 #ifdef SVQC
+.entity muzzle_flash;
+
 // leilei's fancy muzzleflash stuff
-void W_Uzi_Flash_Go() {
-       if (self.alpha >= 0)
-       {
-               setmodel(self, "");
-               return;
-       }
+void Uzi_Flash_Go() 
+{      
        self.frame = self.frame + 2;
        self.scale = self.scale * 0.5;
        self.alpha = self.alpha - 0.25;
-       self.think = W_Uzi_Flash_Go;
        self.nextthink = time + 0.05;
-};
+
+       if (self.alpha <= 0)
+       {
+               self.think = SUB_Remove;
+               self.nextthink = time;
+               self.owner.muzzle_flash = world;
+               return;
+       }
+       
+}
+
+void UziFlash()
+{      
+       if (self.muzzle_flash == world)
+               self.muzzle_flash = spawn();    
+       
+       // muzzle flash for 1st person view
+       setmodel(self.muzzle_flash, "models/uziflash.md3"); // precision set below
+       
+       self.muzzle_flash.scale = 0.75;
+       self.muzzle_flash.think = Uzi_Flash_Go;
+       self.muzzle_flash.nextthink = time + 0.02;
+       self.muzzle_flash.frame = 2;
+       self.muzzle_flash.alpha = 0.75;
+       self.muzzle_flash.angles_z = random() * 180;
+       self.muzzle_flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
+       self.muzzle_flash.owner = self;
+       
+       
+}
 
 .float uzi_bulletcounter;
-.entity muzzleflash;
 void W_Uzi_Attack (float deathtype)
 {
-       local entity flash;
-
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
        {
                if (self.uzi_bulletcounter == 1)
@@ -47,20 +70,8 @@ void W_Uzi_Attack (float deathtype)
 
        pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
-       if ((self.muzzleflash == world) || wasfreed(self.muzzleflash))
-               self.muzzleflash = spawn();
-       
-       // muzzle flash for 1st person view
-       setmodel(self.muzzleflash, "models/uziflash.md3"); // precision set below
-       //SUB_SetFade(flash, time + 0.06, 0);
-       self.muzzleflash.scale = 0.75;
-       self.muzzleflash.think = W_Uzi_Flash_Go;
-       self.muzzleflash.nextthink = time + 0.02;
-       self.muzzleflash.frame = 2;
-       self.muzzleflash.alpha = 0.75;
-       self.muzzleflash.angles_z = random() * 180;
-       self.muzzleflash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
-       W_AttachToShotorg(self.muzzleflash, '5 0 0');
+       UziFlash();
+       W_AttachToShotorg(self.muzzle_flash, '5 0 0');
 
        // casing code
        if (cvar("g_casings") >= 2)
index 1e4fc3e630c392be3223e02d4eceb526d234215c..bc23cd11ba117713b6ccc9c99ba36e0d6d68626a 100644 (file)
@@ -411,6 +411,8 @@ void WarpZone_TraceToss(entity e, entity forent)
 
 entity WarpZone_TrailParticles_trace_callback_own;
 float WarpZone_TrailParticles_trace_callback_eff;
+float WarpZone_TrailParticles_trace_callback_f;
+float WarpZone_TrailParticles_trace_callback_flags;
 void WarpZone_TrailParticles_trace_callback(vector from, vector endpos, vector to)
 {
        trailparticles(WarpZone_TrailParticles_trace_callback_own, WarpZone_TrailParticles_trace_callback_eff, from, endpos);
@@ -423,6 +425,22 @@ void WarpZone_TrailParticles(entity own, float eff, vector org, vector end)
        WarpZone_TraceBox_ThroughZone(org, '0 0 0', '0 0 0', end, MOVE_NOMONSTERS, world, world, WarpZone_TrailParticles_trace_callback);
 }
 
+#ifdef CSQC
+void WarpZone_TrailParticles_WithMultiplier_trace_callback(vector from, vector endpos, vector to)
+{
+       boxparticles(WarpZone_TrailParticles_trace_callback_eff, WarpZone_TrailParticles_trace_callback_own, from, endpos, WarpZone_TrailParticles_trace_callback_own.velocity, WarpZone_TrailParticles_trace_callback_own.velocity, WarpZone_TrailParticles_trace_callback_f, WarpZone_TrailParticles_trace_callback_flags);
+}
+
+void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, float boxflags)
+{
+       WarpZone_TrailParticles_trace_callback_own = own;
+       WarpZone_TrailParticles_trace_callback_eff = eff;
+       WarpZone_TrailParticles_trace_callback_f = f;
+       WarpZone_TrailParticles_trace_callback_flags = boxflags;
+       WarpZone_TraceBox_ThroughZone(org, '0 0 0', '0 0 0', end, MOVE_NOMONSTERS, world, world, WarpZone_TrailParticles_WithMultiplier_trace_callback);
+}
+#endif
+
 float WarpZone_PlaneDist(entity wz, vector v)
 {
        return (v - wz.warpzone_origin) * wz.warpzone_forward;
index 9ccd5216a63186ad15da4c573cd368d8db51d481..1b594d96d73b7c9da95404ad43e73185a1f66ba6 100644 (file)
@@ -38,6 +38,9 @@ void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
 void WarpZone_TraceToss(entity e, entity forent);
 void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZone_trace_callback_t cb);
 void WarpZone_TrailParticles(entity own, float eff, vector org, vector end);
+#ifdef CSQC
+void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, float boxflags);
+#endif
 
 .vector WarpZone_findradius_dist;
 .vector WarpZone_findradius_nearest;
index 6e0ecb5b33811de1c266da4a90c617a84d16b2c3..42cc94c3af1e25b65ad044e033753bc0469305b9 100644 (file)
@@ -243,7 +243,13 @@ float WarpZone_CheckProjectileImpact()
        entity wz;
        wz = WarpZone_Find(self.origin + self.mins, self.origin + self.maxs);
        if(!wz)
-               return FALSE;
+               return 0;
+       if(self.warpzone_teleport_time == time)
+       {
+               // just ignore if we got teleported this frame already and now hit a wall and are in a warpzone again (this will cause a detonation)
+               // print("2 warps 1 frame\n");
+               return -1;
+       }
        o0 = self.origin;
        v0 = self.velocity;
        a0 = self.angles;
@@ -262,38 +268,40 @@ float WarpZone_CheckProjectileImpact()
        pd = WarpZone_TargetPlaneDist(wz, self.origin);
        if(pd < mpd)
        {
-               dpd = normalize(self.velocity) * self.warpzone_targetforward;
+               dpd = normalize(self.velocity) * wz.warpzone_targetforward;
                setorigin(self, self.origin + normalize(self.velocity) * ((mpd - pd) / dpd));
                if(!WarpZoneLib_MoveOutOfSolid(self))
                {
                        setorigin(self, o0);
                        self.angles = a0;
                        self.velocity = v0;
-                       return FALSE;
+                       return 0;
                }
        }
        WarpZone_RefSys_Add(self, wz);
        WarpZone_StoreProjectileData(self);
        self.warpzone_teleport_time = time;
 
-       return TRUE;
+       return +1;
 }
 float WarpZone_Projectile_Touch()
 {
+       float f;
        if(other.classname == "trigger_warpzone")
                return TRUE;
        if(WarpZone_Projectile_Touch_ImpactFilter_Callback())
                return TRUE;
-       if(WarpZone_CheckProjectileImpact())
-               return TRUE;
-       if(self.warpzone_teleport_time == time) // already got teleported this frame? no collision then please
+       if((f = WarpZone_CheckProjectileImpact()) != 0)
+               return (f > 0);
+       if(self.warpzone_teleport_time == time)
        {
+               // sequence: hit warpzone, get teleported, hit wall
+               // print("2 hits 1 frame\n");
                setorigin(self, self.warpzone_oldorigin);
                self.velocity = self.warpzone_oldvelocity;
                self.angles = self.warpzone_oldangles;
                return TRUE;
        }
-
        return FALSE;
 }
 
index 8a7b04ab19fc71637af1abac4c9459fd7b019d23..a73e7e2064a38d6966bb223a7b425037d24b8901 100644 (file)
@@ -1,3 +1,4 @@
+domination
 electro
 fireball
 flags
index d3fdb8fe02483b327cfda7cff7e6c7c2346fa097..8cfae10f605247f87c4f241ed3b62b88928a28f7 100644 (file)
Binary files a/sound/misc/hitground1.ogg and b/sound/misc/hitground1.ogg differ
index 031ee35493bf0c80c92d294c3bbd44ba7d123002..1f8a7441b43561d064a1d88e30f8466959b94e31 100644 (file)
Binary files a/sound/misc/hitground2.ogg and b/sound/misc/hitground2.ogg differ
index e139a0c7d77d64a6455f55a19b86641f68ef5431..73974a4de470f2f3beab0cb9d150ccb178185fe9 100644 (file)
Binary files a/sound/misc/hitground3.ogg and b/sound/misc/hitground3.ogg differ
index 12e02cd00bcd53ee0bad4db69e25864d32ff1ee1..0c40620d1604eab1b9c87e1361a99be99bb43f70 100644 (file)
Binary files a/sound/misc/hitground4.ogg and b/sound/misc/hitground4.ogg differ
index 8ae8803c1428f64242a2b54f233ca4bdfde35e7a..03bee01090caef40675d18674328e41df57edf78 100644 (file)
Binary files a/sound/misc/metalhitground1.ogg and b/sound/misc/metalhitground1.ogg differ
index 4928c91e2366fd419a1697adbc09cabe77325891..50f315f274fc0555e71c49550f3b61a7d979f3f6 100644 (file)
Binary files a/sound/misc/metalhitground2.ogg and b/sound/misc/metalhitground2.ogg differ
index 783e47cd40338244c4d30c13ef7a97281a98971d..0f3edb1060ff4ee9900e005ebf97a5a863fa4ef4 100644 (file)
Binary files a/sound/misc/metalhitground3.ogg and b/sound/misc/metalhitground3.ogg differ
index d4de2860378215b923d06fd2d695653b2514bff0..ad2b262557ebfbddfc67c8ec4a553bd4d0e29a1d 100644 (file)
Binary files a/sound/misc/metalhitground4.ogg and b/sound/misc/metalhitground4.ogg differ
diff --git a/sound/weapons/campingrifle_fire2.ogg b/sound/weapons/campingrifle_fire2.ogg
deleted file mode 100644 (file)
index 721b37b..0000000
Binary files a/sound/weapons/campingrifle_fire2.ogg and /dev/null differ
diff --git a/sound/weapons/campingrifle_fire2.wav b/sound/weapons/campingrifle_fire2.wav
new file mode 100644 (file)
index 0000000..66bda4f
Binary files /dev/null and b/sound/weapons/campingrifle_fire2.wav differ
diff --git a/sound/weapons/dryfire.wav b/sound/weapons/dryfire.wav
new file mode 100644 (file)
index 0000000..81e86b1
Binary files /dev/null and b/sound/weapons/dryfire.wav differ
diff --git a/textures/domination/dom_base.tga b/textures/domination/dom_base.tga
new file mode 100644 (file)
index 0000000..d2d1c79
Binary files /dev/null and b/textures/domination/dom_base.tga differ
diff --git a/textures/domination/dom_base_gloss.tga b/textures/domination/dom_base_gloss.tga
new file mode 100644 (file)
index 0000000..944313b
Binary files /dev/null and b/textures/domination/dom_base_gloss.tga differ
diff --git a/textures/domination/dom_base_glow.jpg b/textures/domination/dom_base_glow.jpg
new file mode 100644 (file)
index 0000000..6500eb0
Binary files /dev/null and b/textures/domination/dom_base_glow.jpg differ
diff --git a/textures/domination/dom_base_norm.tga b/textures/domination/dom_base_norm.tga
new file mode 100644 (file)
index 0000000..57bd703
Binary files /dev/null and b/textures/domination/dom_base_norm.tga differ
diff --git a/textures/domination/dom_base_reflect.tga b/textures/domination/dom_base_reflect.tga
new file mode 100644 (file)
index 0000000..944313b
Binary files /dev/null and b/textures/domination/dom_base_reflect.tga differ
diff --git a/textures/domination/dom_blue.tga b/textures/domination/dom_blue.tga
new file mode 100644 (file)
index 0000000..7032ecd
Binary files /dev/null and b/textures/domination/dom_blue.tga differ
diff --git a/textures/domination/dom_blue_reflect.tga b/textures/domination/dom_blue_reflect.tga
new file mode 100644 (file)
index 0000000..d477855
Binary files /dev/null and b/textures/domination/dom_blue_reflect.tga differ
diff --git a/textures/domination/dom_pink.tga b/textures/domination/dom_pink.tga
new file mode 100644 (file)
index 0000000..278403e
Binary files /dev/null and b/textures/domination/dom_pink.tga differ
diff --git a/textures/domination/dom_pink_reflect.tga b/textures/domination/dom_pink_reflect.tga
new file mode 100644 (file)
index 0000000..d477855
Binary files /dev/null and b/textures/domination/dom_pink_reflect.tga differ
diff --git a/textures/domination/dom_red.tga b/textures/domination/dom_red.tga
new file mode 100644 (file)
index 0000000..52c110e
Binary files /dev/null and b/textures/domination/dom_red.tga differ
diff --git a/textures/domination/dom_red_reflect.tga b/textures/domination/dom_red_reflect.tga
new file mode 100644 (file)
index 0000000..d477855
Binary files /dev/null and b/textures/domination/dom_red_reflect.tga differ
diff --git a/textures/domination/dom_unclaimed.tga b/textures/domination/dom_unclaimed.tga
new file mode 100644 (file)
index 0000000..8e1e314
Binary files /dev/null and b/textures/domination/dom_unclaimed.tga differ
diff --git a/textures/domination/dom_unclaimed_reflect.tga b/textures/domination/dom_unclaimed_reflect.tga
new file mode 100644 (file)
index 0000000..d477855
Binary files /dev/null and b/textures/domination/dom_unclaimed_reflect.tga differ
diff --git a/textures/domination/dom_yellow.tga b/textures/domination/dom_yellow.tga
new file mode 100644 (file)
index 0000000..daba347
Binary files /dev/null and b/textures/domination/dom_yellow.tga differ
diff --git a/textures/domination/dom_yellow_reflect.tga b/textures/domination/dom_yellow_reflect.tga
new file mode 100644 (file)
index 0000000..d477855
Binary files /dev/null and b/textures/domination/dom_yellow_reflect.tga differ
index f90d7fb599508a30b7758fdc154f746497e6d461..cdf7546b8c93234b8a4cf5604c54c24f2d9b0429 100644 (file)
@@ -2,7 +2,7 @@ set g_turrets_unit_hellion_std_health 500
 set g_turrets_unit_hellion_std_respawntime 90
 
 set g_turrets_unit_hellion_std_shot_dmg 50
-set g_turrets_unit_hellion_std_shot_refire 0.25
+set g_turrets_unit_hellion_std_shot_refire 0.2
 set g_turrets_unit_hellion_std_shot_radius 80
 
 set g_turrets_unit_hellion_std_shot_speed 650
index d63c1335e7e5bcec58219e623772761fa344311e..c3f3f7859d437f9d09bc2aade560a001433b5857 100644 (file)
@@ -9,7 +9,10 @@ set g_turrets_unit_mlrs_std_shot_spread 0.05
 set g_turrets_unit_mlrs_std_shot_force 25
 
 set g_turrets_unit_mlrs_std_shot_volly 6
-set g_turrets_unit_mlrs_std_shot_volly_refire 1
+
+// !must be correctly matched with ammo_recharge as this unit use
+// volly_always. (means ammo_recharge * ammo_max must be eaqual to volly_refire)
+set g_turrets_unit_mlrs_std_shot_volly_refire 4
 
 set g_turrets_unit_mlrs_std_target_range 3000
 set g_turrets_unit_mlrs_std_target_range_min 500
@@ -21,9 +24,10 @@ set g_turrets_unit_mlrs_std_target_select_anglebias 0.5
 set g_turrets_unit_mlrs_std_target_select_playerbias 1
 set g_turrets_unit_mlrs_std_target_select_missilebias 0
 
-set g_turrets_unit_mlrs_std_ammo_max 420
-set g_turrets_unit_mlrs_std_ammo 420
-set g_turrets_unit_mlrs_std_ammo_recharge 70
+// !must be shot_dmg * 6 as this unit uses ammo to control the animation
+set g_turrets_unit_mlrs_std_ammo_max 300
+set g_turrets_unit_mlrs_std_ammo 300
+set g_turrets_unit_mlrs_std_ammo_recharge 75
 
 set g_turrets_unit_mlrs_std_aim_firetolerance_dist 120
 set g_turrets_unit_mlrs_std_aim_speed 100
index 6fa67648c34758c6daf146e374a2156b0f238c38..368b64b42051a078fce4369497616de234b67eee 100644 (file)
@@ -26,6 +26,7 @@ FruitieX
 *Music / Sound FX
 mand1nga
 Merlijn Hofstra
+remaxim
 
 *Engine Code Additions & QA
 Rudolf "divVerent" Polzer