]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
rebrand nexuiz -> xonotic, will fix possible mess later
authorRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 18 Mar 2010 18:35:13 +0000 (19:35 +0100)
committerRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 18 Mar 2010 18:35:13 +0000 (19:35 +0100)
203 files changed:
Makefile
config_update.cfg
default.cfg
defaultHavoc.cfg
defaultNexuiz.cfg [deleted file]
defaultXonotic.cfg [new file with mode: 0644]
demos/bench1.dem [deleted file]
demos/demo1.dem [deleted file]
demos/demo2.dem [deleted file]
demos/demo3.dem [deleted file]
demos/demo4.dem [deleted file]
demos/demo5.dem [deleted file]
demos/piece-o-cake.dem [deleted file]
effectinfo.txt
input-tuba.cfg
models/sprites/make-sprites.sh
nexuiz-credits.txt [deleted file]
nexuiz.modinfo [deleted file]
physics10.cfg
physics11.cfg
physics151.cfg
physics151b.cfg
physics16rc1.cfg
physics20.cfg
physics25.cfg
physics26.cfg
physicsHavoc.cfg
physicsNoQWBunny.cfg
physicsQ.cfg
physicsQ2a.cfg
qcsrc/client/projectile.qc
qcsrc/client/teamradar.qc
qcsrc/common/constants.qh
qcsrc/menu/classes.c
qcsrc/menu/nexuiz/bigbutton.c [deleted file]
qcsrc/menu/nexuiz/bigcommandbutton.c [deleted file]
qcsrc/menu/nexuiz/button.c [deleted file]
qcsrc/menu/nexuiz/campaign.c [deleted file]
qcsrc/menu/nexuiz/charmap.c [deleted file]
qcsrc/menu/nexuiz/checkbox.c [deleted file]
qcsrc/menu/nexuiz/checkbox_slider_invalid.c [deleted file]
qcsrc/menu/nexuiz/colorbutton.c [deleted file]
qcsrc/menu/nexuiz/colorpicker.c [deleted file]
qcsrc/menu/nexuiz/commandbutton.c [deleted file]
qcsrc/menu/nexuiz/credits.c [deleted file]
qcsrc/menu/nexuiz/crosshairbutton.c [deleted file]
qcsrc/menu/nexuiz/cvarlist.c [deleted file]
qcsrc/menu/nexuiz/demolist.c [deleted file]
qcsrc/menu/nexuiz/dialog.c [deleted file]
qcsrc/menu/nexuiz/dialog_credits.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_create.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_create_advanced.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_create_mutators.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_demo.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_join.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_join_serverinfo.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c [deleted file]
qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c [deleted file]
qcsrc/menu/nexuiz/dialog_news.c [deleted file]
qcsrc/menu/nexuiz/dialog_quit.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_audio.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_effects.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_input.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_input_userbind.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_misc.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_misc_cvars.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_network.c [deleted file]
qcsrc/menu/nexuiz/dialog_settings_video.c [deleted file]
qcsrc/menu/nexuiz/dialog_singleplayer.c [deleted file]
qcsrc/menu/nexuiz/dialog_singleplayer_winner.c [deleted file]
qcsrc/menu/nexuiz/dialog_teamselect.c [deleted file]
qcsrc/menu/nexuiz/gametypebutton.c [deleted file]
qcsrc/menu/nexuiz/image.c [deleted file]
qcsrc/menu/nexuiz/inputbox.c [deleted file]
qcsrc/menu/nexuiz/keybinder.c [deleted file]
qcsrc/menu/nexuiz/listbox.c [deleted file]
qcsrc/menu/nexuiz/mainwindow.c [deleted file]
qcsrc/menu/nexuiz/maplist.c [deleted file]
qcsrc/menu/nexuiz/modbutton.c [deleted file]
qcsrc/menu/nexuiz/nexposee.c [deleted file]
qcsrc/menu/nexuiz/playerlist.c [deleted file]
qcsrc/menu/nexuiz/playermodel.c [deleted file]
qcsrc/menu/nexuiz/radiobutton.c [deleted file]
qcsrc/menu/nexuiz/rootdialog.c [deleted file]
qcsrc/menu/nexuiz/serverlist.c [deleted file]
qcsrc/menu/nexuiz/skinlist.c [deleted file]
qcsrc/menu/nexuiz/slider.c [deleted file]
qcsrc/menu/nexuiz/slider_decibels.c [deleted file]
qcsrc/menu/nexuiz/slider_resolution.c [deleted file]
qcsrc/menu/nexuiz/tab.c [deleted file]
qcsrc/menu/nexuiz/tabcontroller.c [deleted file]
qcsrc/menu/nexuiz/textlabel.c [deleted file]
qcsrc/menu/nexuiz/textslider.c [deleted file]
qcsrc/menu/nexuiz/util.qc [deleted file]
qcsrc/menu/nexuiz/util.qh [deleted file]
qcsrc/menu/nexuiz/weaponslist.c [deleted file]
qcsrc/menu/progs.src
qcsrc/menu/xonotic/bigbutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/bigcommandbutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/button.c [new file with mode: 0644]
qcsrc/menu/xonotic/campaign.c [new file with mode: 0644]
qcsrc/menu/xonotic/charmap.c [new file with mode: 0644]
qcsrc/menu/xonotic/checkbox.c [new file with mode: 0644]
qcsrc/menu/xonotic/checkbox_slider_invalid.c [new file with mode: 0644]
qcsrc/menu/xonotic/colorbutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/colorpicker.c [new file with mode: 0644]
qcsrc/menu/xonotic/commandbutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/credits.c [new file with mode: 0644]
qcsrc/menu/xonotic/crosshairbutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/cvarlist.c [new file with mode: 0644]
qcsrc/menu/xonotic/demolist.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_credits.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_create.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_demo.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_join.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_news.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_quit.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_audio.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_effects.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_input.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_input_userbind.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_misc.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_misc_cvars.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_network.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_settings_video.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_singleplayer.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_singleplayer_winner.c [new file with mode: 0644]
qcsrc/menu/xonotic/dialog_teamselect.c [new file with mode: 0644]
qcsrc/menu/xonotic/gametypebutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/image.c [new file with mode: 0644]
qcsrc/menu/xonotic/inputbox.c [new file with mode: 0644]
qcsrc/menu/xonotic/keybinder.c [new file with mode: 0644]
qcsrc/menu/xonotic/listbox.c [new file with mode: 0644]
qcsrc/menu/xonotic/mainwindow.c [new file with mode: 0644]
qcsrc/menu/xonotic/maplist.c [new file with mode: 0644]
qcsrc/menu/xonotic/modbutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/nexposee.c [new file with mode: 0644]
qcsrc/menu/xonotic/playerlist.c [new file with mode: 0644]
qcsrc/menu/xonotic/playermodel.c [new file with mode: 0644]
qcsrc/menu/xonotic/radiobutton.c [new file with mode: 0644]
qcsrc/menu/xonotic/rootdialog.c [new file with mode: 0644]
qcsrc/menu/xonotic/serverlist.c [new file with mode: 0644]
qcsrc/menu/xonotic/skinlist.c [new file with mode: 0644]
qcsrc/menu/xonotic/slider.c [new file with mode: 0644]
qcsrc/menu/xonotic/slider_decibels.c [new file with mode: 0644]
qcsrc/menu/xonotic/slider_resolution.c [new file with mode: 0644]
qcsrc/menu/xonotic/tab.c [new file with mode: 0644]
qcsrc/menu/xonotic/tabcontroller.c [new file with mode: 0644]
qcsrc/menu/xonotic/textlabel.c [new file with mode: 0644]
qcsrc/menu/xonotic/textslider.c [new file with mode: 0644]
qcsrc/menu/xonotic/util.qc [new file with mode: 0644]
qcsrc/menu/xonotic/util.qh [new file with mode: 0644]
qcsrc/menu/xonotic/weaponslist.c [new file with mode: 0644]
qcsrc/nexuiz.ncb [deleted file]
qcsrc/nexuiz.sln [deleted file]
qcsrc/nexuiz.suo [deleted file]
qcsrc/nexuiz.vcproj [deleted file]
qcsrc/nexuiz.vcproj.user [deleted file]
qcsrc/server-testcase/run.sh
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/clientcommands.qc
qcsrc/server/defs.qh
qcsrc/server/extensions.qh
qcsrc/server/g_hook.qc
qcsrc/server/g_swamp.qc
qcsrc/server/gamecommand.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/monsters/defs.qc
qcsrc/server/race.qc
qcsrc/server/scores.qc
qcsrc/server/t_items.qc
qcsrc/server/t_quake.qc
qcsrc/server/t_quake3.qc
qcsrc/server/t_swamp.qc
qcsrc/server/teamplay.qc
qcsrc/server/todo.txt
scripts/default_project.proj
scripts/entities.def
scripts/liquids.shader
scripts/newsky_nebulae.txt
scripts/reaper.shader
scripts/sav-liquids.shader
server.cfg
serverbench.cfg
sound/cyberparcour01/rocket.txt
tooltips.db
xonotic-credits.txt [new file with mode: 0644]

index 16975394961dbe14af2143b99d5dd8ec241e559d..7128da2d683edadfd6d829cdc585b831a0b31689 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ FTEQCCFLAGS_MENU ?=
 # It will automagically add an engine check with -TID and then change back to -TFTE
 FTEQCCFLAGS_CSPROGS ?= 
 
 # It will automagically add an engine check with -TID and then change back to -TFTE
 FTEQCCFLAGS_CSPROGS ?= 
 
-# nexuiz svn build system overrides this by command line argument
+# xonotic svn build system overrides this by command line argument
 NEX_BUILDSYSTEM =
 
 all: qc
 NEX_BUILDSYSTEM =
 
 all: qc
@@ -22,7 +22,7 @@ all: qc
 .PHONY: update-cvarcount
 update-cvarcount:
        [ "$(NEX_BUILDSYSTEM)" = "" ] || [ "$(NEX_BUILDSYSTEM)" = "1" ]
 .PHONY: update-cvarcount
 update-cvarcount:
        [ "$(NEX_BUILDSYSTEM)" = "" ] || [ "$(NEX_BUILDSYSTEM)" = "1" ]
-       [ "$(NEX_BUILDSYSTEM)" != "" ] || { ! [ -f ../misc/netradiant-NexuizPack/nexuiz.game/data/entities.def ] || $(DIFF) scripts/entities.def ../misc/netradiant-NexuizPack/nexuiz.game/data/entities.def || { echo entities.def mismatch, please merge ../misc/netradiant-NexuizPack/nexuiz.game/data/entities.def and scripts/entities.def; exit 1; }; }
+       [ "$(NEX_BUILDSYSTEM)" != "" ] || { ! [ -f ../misc/netradiant-XonoticPack/xonotic.game/data/entities.def ] || $(DIFF) scripts/entities.def ../misc/netradiant-XonoticPack/xonotic.game/data/entities.def || { echo entities.def mismatch, please merge ../misc/netradiant-XonoticPack/xonotic.game/data/entities.def and scripts/entities.def; exit 1; }; }
        [ "$(NEX_BUILDSYSTEM)" != "" ] || { DO_NOT_RUN_MAKE=1 sh update-cvarcount.sh; }
 
 .PHONY: qc
        [ "$(NEX_BUILDSYSTEM)" != "" ] || { DO_NOT_RUN_MAKE=1 sh update-cvarcount.sh; }
 
 .PHONY: qc
@@ -79,7 +79,7 @@ $(PK3NAME): qc
                                ABSPK3NAME=$$PWD/$$ABSPK3NAME; \
                                ;; \
                esac; \
                                ABSPK3NAME=$$PWD/$$ABSPK3NAME; \
                                ;; \
                esac; \
-               TDIR=`mktemp -d -t nexuizpk3.XXXXXX`; \
+               TDIR=`mktemp -d -t xonoticpk3.XXXXXX`; \
                cp -v progs.dat csprogs.dat menu.dat $$TDIR/; \
                svn export --force . $$TDIR; \
                cd $$TDIR; \
                cp -v progs.dat csprogs.dat menu.dat $$TDIR/; \
                svn export --force . $$TDIR; \
                cd $$TDIR; \
@@ -131,7 +131,7 @@ git-update:
 git-commit:
        git commit -a || true
        if echo -n 'Also send to server? Hit Enter for yes, ^C for no. '; read -r L; then \
 git-commit:
        git commit -a || true
        if echo -n 'Also send to server? Hit Enter for yes, ^C for no. '; read -r L; then \
-               git config svn-remote.svn.url svn://svn.icculus.org/nexuiz; \
+               git config svn-remote.svn.url svn://svn.icculus.org/xonotic; \
                git config svn-remote.svn.fetch trunk:refs/remotes/origin/master; \
                git svn dcommit; \
        fi
                git config svn-remote.svn.fetch trunk:refs/remotes/origin/master; \
                git svn dcommit; \
        fi
index 30d33a7c1ad90696eb50e4f69339d67998d1e9af..0143318be3e98c8aa12e4a1f110730582142e8e6 100644 (file)
@@ -2,7 +2,7 @@
 seta menu_vid_conwidth $vid_conwidth
 seta menu_vid_conheight $vid_conheight
 
 seta menu_vid_conwidth $vid_conwidth
 seta menu_vid_conheight $vid_conheight
 
-// fix cvar settings of the engine that Nexuiz is not compatible with
+// fix cvar settings of the engine that Xonotic is not compatible with
 alias _update_generic_r_dynamic_0 "r_dynamic 1; r_shadow_realtime_dlight 1"
 alias _update_generic_r_dynamic_1 ""
 alias _update_generic "_update_generic_r_dynamic_$r_dynamic"
 alias _update_generic_r_dynamic_0 "r_dynamic 1; r_shadow_realtime_dlight 1"
 alias _update_generic_r_dynamic_1 ""
 alias _update_generic "_update_generic_r_dynamic_$r_dynamic"
index a5c1b20be4fa6887f99e039f8262685da13fa4ba..8cf217ce4fc7b26b84e88912e239cf97d3ca2d0a 100644 (file)
@@ -1,4 +1,4 @@
-exec defaultNexuiz.cfg
+exec defaultXonotic.cfg
 
 
-// we're not nexuiz 2.6 yet
+// we're not xonotic 2.6 yet
 //exec default25.cfg
 //exec default25.cfg
index e1ce3b4fb7693a061c05c05991e1873b234715f1..26ffd4147c2832487edefdf897e1f08c6def67b9 100644 (file)
@@ -1,6 +1,6 @@
-exec defaultNexuiz.cfg
+exec defaultXonotic.cfg
 
 
-// Settings changed by Nexuiz Havoc
+// Settings changed by Xonotic Havoc
 
 timelimit_override 10
 fraglimit_override 0
 
 timelimit_override 10
 fraglimit_override 0
@@ -24,7 +24,7 @@ cl_bob 0
 cl_bobmodel 0
 v_kicktime 0
 gl_polyblend 0.2
 cl_bobmodel 0
 v_kicktime 0
 gl_polyblend 0.2
-hostname "Nexuiz Havoc $g_nexuizversion Server"
+hostname "Xonotic Havoc $g_xonoticversion Server"
 set g_norecoil 1
 seta r_ambient 20
 seta menu_skin "simplygray"
 set g_norecoil 1
 seta r_ambient 20
 seta menu_skin "simplygray"
diff --git a/defaultNexuiz.cfg b/defaultNexuiz.cfg
deleted file mode 100644 (file)
index fbb753a..0000000
+++ /dev/null
@@ -1,1778 +0,0 @@
-set g_nexuizversion 2.5svn     "Nexuiz version (formatted for humans)"
-
-//!<showbrand
-showbrand 3
-echo
-echo A warning about this being a SVN development version was set up.
-echo This build shall be used for development and testing only!
-echo
-echo If you want to disable this warning, add the line
-echo   showbrand 0
-echo to your autoexec.cfg.
-echo
-//!>showbrand
-
-// changes a cvar and reports it to the server (for the menu to notify the
-// server about changes)
-alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
-
-// detect dedicated server or client
-alias "_detect_dedicated_$qport" "$*"
-alias "_detect_dedicated_0" ""
-alias if_dedicated "_detect_dedicated_$qport ${* asis}"
-alias if_client "${* asis}"
-if_dedicated alias if_client ""
-
-seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
-
-// Nexuiz version (formatted for machines)
-// used to determine if a client version is compatible
-// this doesn't have to be bumped with every release
-// bump when clients become incompatible or any other perfectly good reason
-// (e.g. game data incompatibility, engine version incompatibility, etc
-// note: this automatically filters the server browser, clients of the new
-// version won't see old servers, and clients of the old version won't see new
-// servers either
-//
-// e.g. Nexuiz 1.5.1 RC1 will be 15101
-gameversion 20000
-gameversion_min 20000 // 2.5.2 still used this
-gameversion_max 20699 // 2.5 version allows any 2.6 release, but no more
-
-// compatibility guideline:
-//   version a.b.c   = a0b0c
-//   gameversion_min = a0(b-1)00 // show servers of the previous "line"
-//   gameversion_max = a0(b+1)99 // show servers of the next "line"
-// example: 2.6.3
-//   gameversion 20603
-//   gameversion_min 20500
-//   gameversion_max 20799
-// however, in 2.5.x, we will:
-//   gameversion = 20000 // let other 2.5 clients connect
-//   gameversion_min = 20000 // 2.5.x still has this, we cannot block it within 2.5
-// however, in 2.6.x, we will just:
-//   gameversion_min = 20000 // show 2.5 servers
-
-// say aliases
-alias asay_ctf_flagcarrier "say_team flag carrier at %y"
-alias asay_ctf_haveflag "say_team (%l) have the flag"
-alias asay_willgo "say_team will go to %y"
-alias asay_support "say_team (%l) need help, %h%%"
-alias asay_killed "say_team got killed at %d"
-alias asay_noammo "say_team (%l) need %W for %w"
-alias asay_drop "say_team (%l) dropped %w ; impulse 17"
-
-// other aliases
-alias +hook +button6
-alias -hook -button6
-alias ready "cmd ready"
-alias lockteams "sv_cmd lockteams"
-alias unlockteams "sv_cmd unlockteams"
-alias nospectators "sv_cmd nospectators"
-alias cointoss "sv_cmd cointoss"
-alias timeout "cmd timeout" //use this command to call a timeout
-alias timein "cmd timein" //use this command to resume the game before timeout is finished
-
-alias bsp "ls maps/*.bsp"
-alias chmap "changelevel $*"
-alias gotomap "sv_cmd gotomap \"$1\""
-
-alias rec "record demos/$1"
-alias ply "playdemo $1"
-alias tdem "timedemo $1"
-
-alias dropweapon "impulse 17"
-alias +show_info +button7
-alias -show_info -button7
-
-alias team_red "cmd selectteam red; cmd join"
-alias team_blue "cmd selectteam blue; cmd join"
-alias team_pink "cmd selectteam pink; cmd join"
-alias team_yellow "cmd selectteam yellow; cmd join"
-alias team_auto "cmd selectteam auto; cmd join"
-bind f6 team_auto
-
-alias movetoteam_red "sv_cmd movetoteam $1 red"
-alias movetoteam_blue "sv_cmd movetoteam $1 blue"
-alias movetoteam_pink "sv_cmd movetoteam $1 pink"
-alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
-alias movetoteam_auto "sv_cmd movetoteam $1 auto"
-
-// merge lightmaps up to 1024x1024 textures
-// the default of 2048x2048 is too heavy for my rig (SavageX)
-mod_q3bsp_lightmapmergepower 3
-
-// player defaults
-_cl_color 102
-_cl_name Player
-_cl_playermodel models/player/marine.zym
-_cl_playerskin 0
-crosshair 1
-seta crosshair_per_weapon 0    "when 1, each gun will display a different crosshair"
-seta crosshair_color_override 0        "when 1, crosshair_color_* overrides the per-weapon color"
-seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
-seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
-seta crosshair_hittest 1 "do a crosshair hit evaluation; also, the crosshair is scaled by the given number when aiming at an enemy, and blurred when aiming at a team mate"
-seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
-seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
-seta crosshair_laser ""        "crosshair to display when wielding the laser"
-seta crosshair_laser_color_red 1       "crosshair color red component to display when wielding the laser"
-seta crosshair_laser_color_green 0.35  "crosshair color green component to display when wielding the laser"
-seta crosshair_laser_color_blue 0.2    "crosshair color blue component to display when wielding the laser"
-seta crosshair_laser_color_alpha 0.75  "crosshair alpha value to display when wielding the laser"
-seta crosshair_laser_size 0.4  "crosshair size when wielding the laser"
-seta crosshair_shotgun ""      "crosshair to display when wielding the shotgun"
-seta crosshair_shotgun_color_red 0.7   "crosshair color red component to display when wielding the shotgun"
-seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
-seta crosshair_shotgun_color_blue 0.7  "crosshair color blue component to display when wielding the shotgun"
-seta crosshair_shotgun_color_alpha 1.1 "crosshair alpha value to display when wielding the shotgun"
-seta crosshair_shotgun_size 0.65       "crosshair size when wielding the shotgun"
-seta crosshair_uzi ""  "crosshair to display when wielding the machinegun"
-seta crosshair_uzi_color_red 0.4       "crosshair color red component to display when wielding the machinegun"
-seta crosshair_uzi_color_green 0.9     "crosshair color green component to display when wielding the machinegun"
-seta crosshair_uzi_color_blue 0.35     "crosshair color blue component to display when wielding the machinegun"
-seta crosshair_uzi_color_alpha 0.9     "crosshair alpha value to display when wielding the machinegun"
-seta crosshair_uzi_size 0.6    "crosshair size when wielding the machinegun"
-seta crosshair_grenadelauncher ""      "crosshair to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_red 1     "crosshair color red component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_green 0.15        "crosshair color green component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_blue 0    "crosshair color blue component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_alpha 1.15        "crosshair alpha value to display when wielding the mortar"
-seta crosshair_grenadelauncher_size 0.7        "crosshair size when wielding the mortar"
-seta crosshair_electro ""      "crosshair to display when wielding the electro"
-seta crosshair_electro_color_red 0.35  "crosshair color red component to display when wielding the electro"
-seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
-seta crosshair_electro_color_blue 1    "crosshair color blue component to display when wielding the electro"
-seta crosshair_electro_color_alpha 1   "crosshair alpha value to display when wielding the electro"
-seta crosshair_electro_size 0.5        "crosshair size when wielding the electro"
-seta crosshair_crylink ""      "crosshair to display when wielding the crylink"
-seta crosshair_crylink_color_red 0.85  "crosshair color red component to display when wielding the crylink"
-seta crosshair_crylink_color_green 0.25        "crosshair color green component to display when wielding the crylink"
-seta crosshair_crylink_color_blue 1    "crosshair color blue component to display when wielding the crylink"
-seta crosshair_crylink_color_alpha 0.85        "crosshair alpha value to display when wielding the crylink"
-seta crosshair_crylink_size 0.4        "crosshair size when wielding the crylink"
-seta crosshair_nex ""  "crosshair to display when wielding the nex gun"
-seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
-seta crosshair_nex_color_green 0.9     "crosshair color green component to display when wielding the nex gun"
-seta crosshair_nex_color_blue 1        "crosshair color blue component to display when wielding the nex gun"
-seta crosshair_nex_color_alpha 0.85    "crosshair alpha value to display when wielding the nex gun"
-seta crosshair_nex_size 0.65   "crosshair size when wielding the nex gun"
-seta crosshair_hagar ""        "crosshair to display when wielding the hagar"
-seta crosshair_hagar_color_red 0.85    "crosshair color red component to display when wielding the hagar"
-seta crosshair_hagar_color_green 0.5   "crosshair color green component to display when wielding the hagar"
-seta crosshair_hagar_color_blue 0.35   "crosshair color blue component to display when wielding the hagar"
-seta crosshair_hagar_color_alpha 1     "crosshair alpha value to display when wielding the hagar"
-seta crosshair_hagar_size 0.8  "crosshair size when wielding the hagar"
-seta crosshair_rocketlauncher ""       "crosshair to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_red 1      "crosshair color red component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_blue 0.2   "crosshair color blue component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_alpha 1    "crosshair alpha value to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_size 0.5875      "crosshair size when wielding the rocketlauncher"
-seta crosshair_porto ""        "crosshair to display when wielding the porto"
-seta crosshair_porto_color_red 0.5     "crosshair color red component to display when wielding the porto"
-seta crosshair_porto_color_green 1     "crosshair color green component to display when wielding the porto"
-seta crosshair_porto_color_blue 0.5    "crosshair color blue component to display when wielding the porto"
-seta crosshair_porto_color_alpha 0.85  "crosshair alpha value to display when wielding the porto"
-seta crosshair_porto_size 0.6  "crosshair size when wielding the porto"
-seta crosshair_minstanex ""    "crosshair to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_red 0.65        "crosshair color red component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_green 0.65      "crosshair color green component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_blue 1  "crosshair color blue component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_alpha 1 "crosshair alpha value to display when wielding the minstanex gun"
-seta crosshair_minstanex_size 0.4      "crosshair size when wielding the minstanex gun"
-seta crosshair_hook "" "crosshair to display when wielding the hook"
-seta crosshair_hook_color_red 0.65     "crosshair color red component to display when wielding the hook"
-seta crosshair_hook_color_green 1      "crosshair color green component to display when wielding the hook"
-seta crosshair_hook_color_blue 0.85    "crosshair color blue component to display when wielding the hook"
-seta crosshair_hook_color_alpha 0.85   "crosshair alpha value to display when wielding the hook"
-seta crosshair_hook_size 0.5   "crosshair size when wielding the hook"
-seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
-seta crosshair_hlac_color_red 1        "crosshair color red component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_green 0.65   "crosshair color green component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_blue 0.2     "crosshair color blue component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_alpha 1      "crosshair alpha value to display when wielding the H.L.A.C."
-seta crosshair_hlac_size 0.6   "crosshair size when wielding the H.L.A.C."
-seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_red 0.85     "crosshair color red component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_green 0.5    "crosshair color green component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_blue 0.25    "crosshair color blue component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_alpha 1      "crosshair alpha value to display when wielding the campingrifle"
-seta crosshair_campingrifle_size 0.65  "crosshair size when wielding the campingrifle"
-seta crosshair_campingrifle_ring_size 1.5      "bullet counter ring size around campingrifle crosshair, multiple of crosshair_campingrifle_size"
-seta crosshair_tuba "" "crosshair to display when wielding the tuba"
-seta crosshair_tuba_color_red 0.85     "crosshair color red component to display when wielding the tuba"
-seta crosshair_tuba_color_green 0.5    "crosshair color green component to display when wielding the tuba"
-seta crosshair_tuba_color_blue 0.25    "crosshair color blue component to display when wielding the tuba"
-seta crosshair_tuba_color_alpha 1      "crosshair alpha value to display when wielding the tuba"
-seta crosshair_tuba_size 1     "crosshair size when wielding the tuba"
-seta crosshair_fireball ""     "crosshair to display when wielding the fireball"
-seta crosshair_fireball_color_red 0.2  "crosshair color red component to display when wielding the fireball"
-seta crosshair_fireball_color_green 1.0        "crosshair color green component to display when wielding the fireball"
-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"
-fov 90
-seta cl_velocityzoom 0 "velocity based zooming of fov, negative values zoom out"
-seta cl_velocityzoomtime 0.3   "time value for averaging speed values"
-seta cl_zoomfactor 5   "how much +zoom will zoom (1-16)"
-seta cl_zoomspeed 3.5  "how fast it will zoom (0.5-16), negative values mean instant zoom"
-seta cl_zoomsensitivity 0      "how zoom changes sensitivity (0 = weakest, 1 = strongest)"
-freelook 1
-sensitivity 6
-v_gamma 1.125000
-viewsize 100
-bgmvolume 1
-volume 0.5
-// fullscreen 1024x768x32bit
-vid_bitsperpixel 32
-vid_fullscreen 1
-vid_width 1024
-vid_height 768
-vid_pixelheight 1
-seta menu_vid_width 1024
-seta menu_vid_height 768
-seta menu_vid_pixelheight 1
-seta menu_vid_scale 0
-// 2D resolution 800x600
-vid_conwidth 800
-vid_conheight 600
-// menu_conwidth, menu_conheight are set inside quake.rc
-v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
-
-// these settings determine how much the view is affected by movement/damage
-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_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_rollangle 0 // amount of view tilt when strafing, default is 2.0
-v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
-gl_polyblend 0.5 // whether to use screen tints, default is 1
-r_motionblur 0 // motion blur value, default is 0
-r_damageblur 0 // motion blur when damaged, default is 0
-
-seta vid_x11_display ""        "nexuiz-linux-*.sh will use this to start nexuiz on an other/new X display"
-// This can have three possible settings:
-//     ""              run as usual
-//     ":n"            use DISPLAY=:n, create it if needed
-//     ":n/layout"     use DISPLAY=:n, create it if needed with ServerLayout layout
-
-cl_autodemo_nameformat demos/%Y-%m-%d_%H-%M
-
-// taunts and voices
-seta cl_autotaunt 0 "automatically taunt enemies when fragging them"
-seta sv_taunt 1 "allow taunts on the server"
-seta sv_autotaunt 1 "allow autotaunts on the server"
-seta cl_voice_directional 1    "0 = all voices are non-directional, 1 = all voices are directional, 2 = only taunts are directional"
-seta cl_voice_directional_taunt_attenuation 0.5 "this defines the distance from which taunts can be heared"
-
-// server settings
-hostname "Nexuiz $g_nexuizversion Server"
-set sv_mapchange_delay 5
-set minplayers 0 "number of players playing at the same time (if not enough real players are there the remaining slots are filled with bots)"
-sv_cullentities_trace 1
-r_cullentities_trace 1
-
-// restart server if all players hit "ready"-button
-set sv_ready_restart 0 "if set to 1 allow a map to be restarted once all players pressed the \"ready\" button'"
-set sv_ready_restart_after_countdown 0 "if set to 1 the players and map items are reset after the countdown ended, otherwise they're reset already at the beginning of the countdown"
-set sv_ready_restart_repeatable 0      "allows the players to restart the game as often as needed"
-
-//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
-set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
-
-set g_maxplayers 0     "maximum number of players allowed to play at the same time, set to 0 to allow all players to join the game"
-set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectators\" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked"
-
-//tournament mod
-set g_warmup 0 "split the game into a warmup- and match-stage when set to 1"
-set g_warmup_limit 60  "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)"
-set g_warmup_allow_timeout 0   "if set to 1 timeouts can also be called in the warmup-stage, when sv_timeout is set to 1"
-set g_warmup_allguns 0 "if set players start with all guns in warmup mode"
-
-set g_chat_nospectators 0      "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
-set sv_vote_nospectators 0     "if set only players can call a vote (thus spectators and observers can't call a vote)"
-
-alias g_tourney "g_tourney_$1"
-alias g_tourney_1 "g_warmup 1; g_chat_nospectators 2; sv_vote_nospectators 1"
-alias g_tourney_0 "g_warmup 0; g_chat_nospectators 0; sv_vote_nospectators 0"
-
-set sv_timeout 0       "allows a player to call a timeout, this will pause the game for some time"
-set sv_timeout_length 120      "how long the game will be paused at max, in seconds"
-set sv_timeout_number 2        "how many timeouts one player is allowed to call (gets reset after a restart)"
-set sv_timeout_leadtime 4      "how long the players will be informed that a timeout was called before it starts, in seconds"
-set sv_timeout_resumetime 3    "how long the remaining timeout-time will be after a player called the timein command"
-
-set g_allow_oldnexbeam 0 "If enabled, clients are allowed to use old v2.3 Nexgun beam"
-seta cl_particles_oldnexbeam 0 "Uses the old v2.3 Nexgun beam instead of the new beam, only works if server allows it (g_allow_oldnexbeam 1)"
-set sv_qcweaponanimation 0
-
-set g_telefrags 1
-set g_telefrags_avoid 0
-set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
-
-// fragmessage: This allows extra information to be displayed with the frag centerprints. 
-set sv_fragmessage_information_ping 0 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
-set sv_fragmessage_information_handicap 1 "Enable handicap display information, 0 = Never display; 1 = Only when the player has handicap on; 2 = Always display (Displays Off if off)"
-set sv_fragmessage_information_stats 0 "Enable statistics (health/armor) display information, 0 = Never display; 1 = Always display (Only available for the person who was killed)"
-set sv_fragmessage_information_typefrag 1 "Enable typefrag display information, 0 = Never display; 1 = Always display"
-
-// use default physics
-set sv_friction_on_land 0
-exec physics26.cfg
-
-set sv_player_viewoffset "0 0 35" "view offset of the player model"
-set sv_player_mins "-16 -16 -24" "playermodel mins"
-set sv_player_maxs "16 16 45" "playermodel maxs"
-set sv_player_crouch_viewoffset "0 0 15" "view offset of the player model when crouched"
-set sv_player_crouch_mins "-16 -16 -24" "mins of a crouched playermodel"
-set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel"
-
-set sv_pogostick 1 "don't require releasing the space bar for jumping again"
-set sv_doublejump 0 "allow Quake 2-style double jumps"
-set sv_jumpspeedcap_min "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
-set sv_jumpspeedcap_max "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
-set sv_jumpspeedcap_max_disable_on_ramps 0 "disable max jumpspeedcap on ramps to preserve the old rampjump style"
-
-seta sv_precacheplayermodels 1
-seta sv_precacheweapons 0
-seta sv_precacheitems 0
-set sv_spectator_speed_multiplier 1.5
-seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
-seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
-seta sv_defaultplayermodel "models/player/nexus.zym" "default model selection, only works if sv_defaultcharacter is set to 1"
-seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1"
-seta sv_defaultplayermodel_red ""      "\"\" means see sv_defaultplayermodel"
-seta sv_defaultplayerskin_red 0
-seta sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
-seta sv_defaultplayerskin_blue 0
-seta sv_defaultplayermodel_yellow "" "\"\" means see sv_defaultplayermodel"
-seta sv_defaultplayerskin_yellow 0
-seta sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
-seta sv_defaultplayerskin_pink 0
-seta sv_defaultplayercolors "" "set to 16*shirt+pants to force a color, note: it does NOT depend on defaultcharacter! Set to \"\" to disable"
-set sv_autoscreenshot 0 "if set to 1, the server forces all clients to create a local screenshot once the map ended"
-net_messagetimeout 300
-net_connecttimeout 30
-sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
-set ekg 0      "Throw huge amounts of gibs"
-
-cl_movement 1
-cl_stairsmoothspeed 200
-cl_forwardspeed $sv_maxspeed
-cl_backspeed $sv_maxspeed
-cl_sidespeed $sv_maxspeed
-cl_upspeed $sv_maxspeed
-cl_movement_accelerate $sv_accelerate
-cl_movement_airaccel_qw $sv_airaccel_qw
-cl_movement_airaccel_sideways_friction $sv_airaccel_sideways_friction
-cl_movement_airaccelerate $sv_airaccelerate
-cl_movement_edgefriction $edgefriction
-cl_movement_friction $sv_friction
-cl_movement_jumpvelocity $sv_jumpvelocity
-cl_movement_maxairspeed $sv_maxairspeed
-cl_movement_maxspeed $sv_maxspeed
-cl_movement_stepheight $sv_stepheight
-cl_movement_stopspeed $sv_stopspeed
-cl_movement_track_canjump 0 // till DP bug gets fixed
-cl_movement_wallfriction $sv_wallfriction
-cl_movement_wateraccelerate $sv_wateraccelerate
-cl_movement_waterfriction $sv_waterfriction
-
-seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they are better than what you are carrying"
-alias autoswitch "set cl_autoswitch $1 ; cmd autoswitch $1"
-
-set bot_config_file bots.txt "Name and path of the bot configuration file"
-set bot_number 0       "Minimum number of bots"
-seta bot_usemodelnames 0       "Use player model names for bot names"
-set bot_nofire 0       "When set, bots never fire. Mainly for testing in g_waypointeditor mode"
-seta bot_prefix [BOT]  "Prefix in front of the bot names"
-seta bot_suffix ""     "Suffix behind the bot names"
-seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"
-// general bot AI cvars
-set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 3 "How often a new objective is chosen"
-set bot_ai_enemydetectioninterval 0.5 "How often bots pick a new target"
-set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
-set bot_ai_dodgeupdateinterval 0.1 "How often scan for items to dodge. Currently not in use."
-set bot_ai_chooseweaponinterval 0.3 "How often the best weapon according to the situation will be chosen"
-set bot_ai_dangerdetectioninterval 0.1 "How often scan for waypoints with dangers near"
-set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
-set bot_ai_aimskill_blendrate 2        "How much correction will be applied to the aiming angle"
-set bot_ai_aimskill_fixedrate 15
-set bot_ai_aimskill_firetolerance_distdegrees 180
-set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
-set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
-set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
-set bot_ai_keyboard_distance 250 "Keyboard emulation is disabled after this distance to the goal"
-set bot_ai_keyboard_treshold 0.57
-set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
-set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
-set bot_ai_custom_weapon_priority_distances "300 850"  "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far   "minstanex nex campingrifle rocketlauncher grenadelauncher electro hagar hlac crylink laser uzi fireball shotgun tuba" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba hagar crylink grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority"
-set bot_ai_weapon_combo 1      "Enable bots to do weapon combos"
-set bot_ai_weapon_combo_threshold 0.3  "Try to make a combo N seconds after the last attack"
-set bot_ai_friends_aware_pickup_radius "500"   "Bots will not pickup items if a team mate is this distance near the item"
-set bot_ai_ignoregoal_timeout 3        "Ignore goals making bots to get stuck in front of a wall for N seconds"
-set bot_ai_bunnyhop_skilloffset 7      "Bots with skill equal or greater than this value will perform the  \"bunnyhop\" technique"
-set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance"
-set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal"
-set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"
-set bot_god 0 "god mode for bots"
-set bot_ai_navigation_jetpack 0 "Enable bots to navigat maps using the jetpack"
-set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
-// Better don't touch these, there are hard to tweak!
-set bot_ai_aimskill_order_mix_1st 0.01 "Amount of the 1st filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_2nd 0.1 "Amount of the 1st filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_3th 0.01 "Amount of the 1st filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_4th 0.05 "Amount of the 1st filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_5th 0.01 "Amount of the 1st filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_filter_1st 0.4 "Position filter"
-set bot_ai_aimskill_order_filter_2nd 0.4 "Movement filter"
-set bot_ai_aimskill_order_filter_3th 0.2 "Acceleration filter"
-set bot_ai_aimskill_order_filter_4th 0.4 "Position prediction filter. Used rarely"
-set bot_ai_aimskill_order_filter_5th 0.5 "Movement prediction filter. Used rarely"
-
-// waypoint editor enable
-set g_waypointeditor 0
-set bot_ignore_bots 0  "When set, bots don't shoot at other bots"
-set bot_join_empty 0   "When set, bots also play if no player has joined the server"
-set bot_vs_human 0     "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count)"
-
-alias g_waypointeditor_spawn "impulse 103"
-alias g_waypointeditor_remove "impulse 104"
-alias g_waypointeditor_relinkall "impulse 105"
-alias g_waypointeditor_saveall "impulse 106"
-alias g_waypointeditor_unreachable "impulse 107"
-
-locs_enable 0
-pausable 0
-seta g_spawnshieldtime 0.3 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
-seta g_antilag 2       "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
-set g_antilag_nudge 0 "don't touch"
-set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
-set g_shootfromclient 1 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed, and defaulted to, too; see also cl_gunalign"
-set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
-set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
-set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
-set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
-set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)"
-set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
-set g_powerup_superhealth 1 "if set to 0 the mega health powerup will not spawn on the map"
-set g_powerup_strength 1 "if set to 0 the strength powerup will not spawn on the map"
-set g_powerup_shield 1 "if set to 0 the shield (invincibility) powerup will not spawn on the map"
-set g_balance_powerup_timer 1 "if set to 0 the powerups dont wear off"
-set g_use_ammunition 1 "if set to 0 all weapons you pick up have unlimited ammunition"
-set g_pickup_items 1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map"
-set g_minstagib 0      "enable minstagib"
-set g_minstagib_extralives 2   "how many extra lives you will get per powerup"
-set g_minstagib_ammo_start 10  "starting ammo"
-set g_minstagib_ammo_drop 5    "how much ammo you'll get for weapons or cells"
-set g_minstagib_invis_alpha 0.15
-set g_minstagib_speed_jumpheight 1.8 "jump height multiplier that applies while you carry the invincibility powerup"
-set g_minstagib_speed_moverate 1.25 "speed-multiplier that applies while you carry the invincibility powerup"
-set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
-set g_weaponarena "0"  "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
-set g_weaponarena_random "0"   "if set to a number, only that weapon count is given on every spawn (randomly)"
-set g_laserguided_missile 0 "if set to 1 the rockets of the rocket launcher can be steered using a laserpointer"
-set g_midair 0 "if set to 1 you can only apply damage to your opponent while he is airborne"
-set g_midair_shieldtime 0.3 "number of seconds you are still invincible since you lost contact to the ground"
-set g_spawnsound 1 "set to 0 if you don't want to hear the spawn sound when a player spawns"
-set g_spawnpoints_autodrop 0 "if set to 1, automatically drop spawn point locations if they were placed too high"
-set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid"
-set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once <g_respawn_delay> seconds are over"
-set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)"
-set g_fullbrightitems 0 "brightens up items"
-set g_nodepthtestplayers 0 "disables depth testing on players"
-set g_nodepthtestitems 0 "disables depth testing on items"
-set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"
-set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"
-set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"
-seta g_maplist_mostrecent_count 3      "number of most recent maps that are blocked from being played again"
-seta g_maplist "accident aggressor aneurysm basement basementctf bleach bloodprison bloodprisonctf bluesky cyberparcour01 darkzone desertfactory dieselpower downer eggandbacon evilspace farewell final_rage nr_piece-o-cake ons-reborn racetrack reslimed ruiner runningman runningman_1on1remix runningmanctf silvercity skyway slimepit soylent starship stormkeep2 strength toxic warfare"
-seta g_maplist_index 0 "this is used internally for saving position in maplist cycle"
-seta g_maplist_selectrandom 0  "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
-seta g_maplist_shuffle 1       "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list"
-set g_maplist_check_waypoints 0        "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
-set samelevel 0 "when 1, always play the same level over and over again"
-set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone into a death trap"
-
-set g_cloaked 0 "display all players mostly invisible"
-set g_player_alpha 1
-set g_player_brightness 0      "set to 2 for brighter players"
-seta g_balance_cloaked_alpha 0.25
-
-set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
-
-set welcome_message_time 8
-
-alias clearmap "disconnect"
-
-set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
-
-set leadlimit 0
-
-// this means that timelimit can be overidden globally and fraglimit can be overidden for each game mode: DM/TDM, Domination, CTF, and Runematch.
-seta timelimit_override -1     "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta fraglimit_override -1     "Frag limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta leadlimit_override -1     "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta capturelimit_override -1  "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta captureleadlimit_override -1      "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_ctf_capture_limit -1    "CTF capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_ctf_capture_leadlimit -1        "CTF capture lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_arena_point_limit -1    "Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_arena_point_leadlimit -1        "Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_domination_point_limit -1       "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_domination_point_leadlimit -1   "Domination point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_runematch_point_limit -1        "Runematch point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_runematch_point_leadlimit -1    "Runematch point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_keyhunt_point_limit -1  "Keyhunt point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_keyhunt_point_leadlimit -1      "Keyhunt point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_race_laps_limit -1      "Race laps limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_nexball_goallimit -1 "Nexball goal limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_nexball_goalleadlimit -1 "Nexball goal lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-
-seta g_ctf_win_mode 0  "0: captures only, 1: captures, then points, 2: points only"
-seta g_ctf_ignore_frags 0      "1: regular frags give no points"
-
-// 50% of the spawns shall be far away from any players
-set g_spawn_furthest 0.5
-// respawn delay
-set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
-set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
-// when variables are set to 0, they take over the global setting...
-// to force disable delay or waves, set them to 0.125
-set g_ctf_respawn_delay 0
-set g_ctf_respawn_waves 0
-set g_dm_respawn_delay 0
-set g_dm_respawn_waves 0
-set g_dom_respawn_delay 0
-set g_dom_respawn_waves 0
-set g_lms_respawn_delay 0
-set g_lms_respawn_waves 0
-set g_rune_respawn_delay 0
-set g_rune_respawn_waves 0
-set g_tdm_respawn_delay 0
-set g_tdm_respawn_waves 0
-set g_kh_respawn_delay 0
-set g_kh_respawn_waves 0
-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_nexball_respawn_delay 0
-set g_nexball_respawn_waves 0
-set g_as_respawn_delay 0
-set g_as_respawn_waves 0
-set g_ons_respawn_delay 0
-set g_ons_respawn_waves 0
-set g_rc_respawn_waves 0
-set g_rc_respawn_delay 0
-set g_cts_respawn_waves 0
-set g_cts_respawn_delay 0
-set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
-
-// overtime
-seta timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
-seta timelimit_overtimes 0 "how many overtimes to add at max"
-seta timelimit_suddendeath 5 "number of minutes suddendeath mode lasts after all overtimes were added and still no winner was found"
-
-// common team values
-set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
-
-seta teamplay_default 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
-seta g_mirrordamage 0.3        "for teamplay 4: mirror damage factor"
-seta g_friendlyfire 0.1        "for teamplay 4: fiendly fire factor"
-seta g_teamdamage_threshold 50 "for teamplay 4: threshold over which to apply mirror damage"
-seta g_teamdamage_resetspeed 30        "for teamplay 4: how fast player's teamdamage count decreases"
-
-set deathmatch_force_teamplay 0        "Always play TDM instead of DM"
-seta g_balance_teams 0 "automatically balance out players entering instead of asking them for their preferred team"
-seta g_balance_teams_force 0   "automatically balance out teams when players move or disconnect"
-seta g_balance_teams_prevent_imbalance 0       "prevent players from changing to larger teams"
-set g_tdm_teams 2 "how many teams are in team deathmatch (set by mapinfo)"
-seta g_tdm_teams_override 0    "how many teams are in team deathmatch"
-set g_tdm_team_spawns 0 "when 1, a map can define team spawnpoints for TDM"
-set g_changeteam_banned 0      "not allowed to change team"
-set g_changeteam_fragtransfer 0        "% of frags you get to keep when you change teams (rounded down)"
-
-set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"
-
-// dm
-set g_dm 1 "Deathmatch: killing any other player is one frag, player with most frags wins"
-set gamecfg 1  // "deathmatch"
-
-// ctf
-set g_ctf 0 "Capture The Flag: take the enemy flag and bring it to yours at your base to score"
-set g_ctf_flag_returntime 30
-set g_ctf_flagcarrier_selfdamage 1
-set g_ctf_flagcarrier_selfforce 1
-set g_ctf_fullbrightflags 0
-set g_ctf_dynamiclights 0
-set g_ctf_allow_drop 1 "dropping allows circumventing carrierkill score, so enable this with care!"
-set g_ctf_reverse 0    "when 1, bases/flags are switched :P you have to capture your OWN flag by bringing it to the ENEMY's"
-set g_balance_ctf_delay_collect 1.0
-set g_balance_ctf_damageforcescale 1
-
-set g_ctf_shield_max_ratio 0   "shield at most 0% of a team from the enemy flag (try: 0.4 for 40%)"
-set g_ctf_shield_min_negscore 20       "shield the player from the flag if he's got -20 points or less"
-set g_ctf_shield_force 100     "push force of the shield"
-
-// fun for server admins
-set g_ctf_flag_red_model "models/ctf/flags.md3"
-set g_ctf_flag_red_skin 0
-set g_ctf_flag_blue_model "models/ctf/flags.md3"
-set g_ctf_flag_blue_skin 1
-set g_ctf_flag_glowtrails 0
-set g_ctf_flag_pickup_effects 1
-set g_ctf_flag_capture_effects 1
-set g_ctf_captimerecord_always 0 "if enabled, assisted CTF records (with other players on the server) are recorded too"
-
-exec ctfscoring-ai.cfg
-
-// runematch
-set g_runematch                                                0 "Runematch: pick up and hold the runes, special items that give you points, a special power (rune) and a disadvantage (curse)"
-set g_runematch_pointrate                              5
-set g_runematch_fixedspawns                            1 "use fixed runematch spawns if available"
-set g_runematch_pointamt                                       1
-set g_runematch_shuffletime                            30 "how often runes change position"
-set g_runematch_respawntime                            15 "how soon after being dropped to respawn"
-set g_runematch_frags_killedby_runeholder              4
-set g_runematch_frags_killed_runeholder                        5
-set g_runematch_frags_norune                           0
-set g_runematch_drop_runes_max                         2 "only drop up to 2 runes, the rest should respawn"
-set g_runematch_allow_same                             0 "allow matching rune-curse pairs"
-set g_runematch_rune_alpha                             0.78
-set g_runematch_rune_effects                           544 "EF_ADDITIVE + EF_FULLBRIGHT = 544"
-set g_runematch_rune_glow_size                         0
-set g_runematch_rune_glow_color                                0
-set g_runematch_rune_color_strength                    1.0
-// strength/weakness
-set g_balance_rune_strength_damage                     2.0
-set g_balance_rune_strength_force                      1.5
-set g_balance_curse_weak_damage                                0.5
-set g_balance_curse_weak_force                         0.6
-set g_balance_rune_strength_combo_damage       0.9
-set g_balance_rune_strength_combo_force                        1.0
-// defense/vulner
-set g_balance_rune_defense_takedamage                  0.5
-set g_balance_curse_vulner_takedamage                  2.0
-set g_balance_rune_defense_combo_takedamage            1.0
-// vampire/empathy
-set g_balance_rune_vampire_absorb                      0.4
-set g_balance_curse_empathy_takedamage                 -0.4
-set g_balance_rune_vampire_combo_absorb                        -0.1
-set g_balance_rune_vampire_maxhealth                   500
-set g_balance_curse_empathy_minhealth                  20
-set g_balance_rune_vampire_combo_minhealth             40
-// regen/venom
-set g_balance_rune_regen_hpmod                         1.75
-set g_balance_curse_venom_hpmod                                0.6
-set g_balance_rune_regen_combo_hpmod                   0.9
-set g_balance_rune_regen_regenrate                     3.0
-set g_balance_curse_venom_rotrate                      3.0
-set g_balance_rune_regen_combo_regenrate       0.5
-set g_balance_rune_regen_combo_rotrate                 1.5
-set g_balance_rune_regen_limitmod                      1
-set g_balance_curse_venom_limitmod                     1
-set g_balance_rune_regen_combo_limitmod                        1
-// speed/slow
-set g_balance_rune_speed_atkrate                               0.66
-set g_balance_curse_slow_atkrate                               1.5
-set g_balance_rune_speed_combo_atkrate                 1.2
-set g_balance_rune_speed_moverate                      1.25
-set g_balance_curse_slow_moverate                      0.8
-set g_balance_rune_speed_combo_moverate                        0.9
-set g_balance_rune_speed_jumpheight                    1.4
-set g_balance_curse_slow_jumpheight                    1.0
-set g_balance_rune_speed_combo_jumpheight              1.0
-
-// domination
-set g_domination                       0 "Domination: capture and hold control points to gain points"
-set g_domination_default_teams         2 "default number of teams for maps that aren't domination-specific"
-seta g_domination_teams_override               0 "use a specific number of teams in domination games (minimum 2), disables dom_team entities"
-set g_domination_disable_frags         0 "players can't get frags normally, only get points from kills"
-set g_domination_point_amt             0 "override: how many points to get per ping"
-set g_domination_point_fullbright      0 "domination point fullbright"
-set g_domination_point_rate            0 "override: how often to give those points"
-set g_domination_point_capturetime     0.1 "how long it takes to capture a point (given no interference)"
-set g_domination_point_glow            0 "domination point glow (warning, slow)"
-//set g_domination_balance_team_points 1 "# of points received is based on team sizes"
-
-// last man standing
-set g_lms 0 "Last Man Standing: everyone starts with a certain amount of lives, and the survivor wins"
-set g_lms_lives_override -1
-set g_lms_regenerate 0
-set g_lms_campcheck_interval 10
-set g_lms_campcheck_message "^1Don't camp!"
-set g_lms_campcheck_damage 100
-set g_lms_campcheck_distance 1800
-set g_lms_last_join 3  "if g_lms_join_anytime is false, new players can only join if the worst active player has more than (fraglimit - g_lms_last_join) lives"
-set g_lms_join_anytime 1       "if true, new players can join, but get same amount of lives as the worst player"
-
-// arena
-set g_arena 0 "Arena: many one-on-one rounds are played to find the winner"
-set g_arena_maxspawned 2       "maximum number of players to spawn at once (the rest is spectating, waiting for their turn)"
-set g_arena_roundbased 1       "if disabled, the next player will spawn as soon as someone dies"
-set g_arena_warmup 5   "time, newly spawned players have to prepare themselves in round based matches"
-set g_arena_powerups 0 "enables powerups (superhealth, strength and shield), which are removed by default"
-
-// ca
-set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round."
-set g_ca_point_limit 10 "point limit 10 is standard for clan arena"
-set g_ca_point_leadlimit 0
-set g_ca_warmup 10 "how long the players will have time to run around the map before the round starts"
-
-// onslaught
-set g_onslaught 0 "Onslaught: take control points towards the enemy generator and then destroy it"
-set g_onslaught_gen_health 5000
-set g_onslaught_cp_health 1000
-set g_onslaught_cp_buildhealth 100
-set g_onslaught_cp_buildtime 10
-set g_onslaught_cp_regen 20
-
-// assault
-set g_assault 0 "Assault: attack the enemy base as fast as you can, then defend the base against the enemy for that time to win"
-
-// race
-set g_race 0 "Race: be faster than your opponents"
-set g_race_qualifying_timelimit 0
-set g_race_qualifying_timelimit_override -1
-set g_race_teams 0     "when 2, 3, or 4, the race is played as a team game (the team members can add up their laps)"
-
-// cts
-set g_cts 0 "CTS: complete the stage"
-
-// nexball
-set g_nexball 0 "Nexball: Basketball and Soccer go Nexuiz"
-
-set g_nexball_basketball_effects_default     8    "default: dim light. The original version used 1024 (fire) but it gives bad performance"
-set g_balance_nexball_primary_speed       1000    "launching speed"
-set g_balance_nexball_primary_refire         0.7  "launching refire"
-set g_balance_nexball_primary_animtime       0.3  "launching animtime"
-set g_balance_nexball_secondary_animtime     0.3  "launching animtime"
-set g_balance_nexball_secondary_speed     3000    "stealing projectile speed"
-set g_balance_nexball_secondary_lifetime     0.15 "stealing projectile lifetime"
-set g_balance_nexball_secondary_force      500    "stealing projectile force"
-set g_balance_nexball_secondary_refire       0.6  "stealing projectile refire"
-set g_balance_nexball_secondary_animtime     0.3  "stealing projectile animtime"
-
-// -1: MrBougo's first try, not very playable but working...
-//     The ball gets the player's velocity * 1.5 + a vertical boost
-//  0: Revenant style
-//     Player's velocity + a boost where he's looking at + a boost
-//     perpendicularly to the first boost, that is upwards relatively
-//     to the view angle
-//  1: MrBougo's modded Rev style 1
-//     The 2nd Rev boost is always vertical
-//  2: MrBougo's modded Rev style 2
-//     The 1st Rev boost is always horizontal
-//     The 2nd Rev boost is always vertical
-set g_nexball_football_physics  2  "0: Revenant's original movement, 1: 0 but half independant of aiming height, 2: 1 fully independant, -1: first recode try"
-set g_nexball_basketball_bouncefactor 0.6    "velocity loss when the ball bounces"
-set g_nexball_basketball_bouncestop   0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
-set g_nexball_football_bouncefactor   0.6    "velocity loss when the ball bounces"
-set g_nexball_football_bouncestop     0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
-
-set g_nexball_football_boost_forward      100   "forward velocity boost when the ball is touched"
-set g_nexball_football_boost_up           200   "vertical velocity boost when the ball is touched"
-
-set g_nexball_basketball_delay_hold           20    "time before a player who caught the ball loses it (anti-ballcamp)"
-set g_nexball_basketball_delay_hold_forteam   60    "time before a ball reset when a team holds the ball for too long"
-set g_nexball_basketball_teamsteal             1    "1 to allow players to steal from teammates, 0 to disallow"
-
-set g_nexball_basketball_carrier_speed         0.9  "speed multiplier for the ballcarrier"
-
-set g_nexball_meter_period                  1    "time to make a full cycle on the power meter"
-set g_nexball_basketball_meter              1    "use the power meter for basketball"
-set g_nexball_basketball_meter_minpower   0.5    "minimal multiplier to the launching speed when using the power meter"
-set g_nexball_basketball_meter_maxpower   1.2    "maximal multiplier to the launching speed when using the power meter"
-
-set g_nexball_delay_goal     3    "delay between a goal and a ball reset"
-set g_nexball_delay_idle     10   "maximal idle time before a reset"
-set g_nexball_delay_start    3    "time the ball stands on its spawn before being released"
-set g_nexball_delay_collect  0.5  "time before the same player can catch the ball he launched"
-
-set g_nexball_sound_bounce   1    "bouncing sound (0: off)"
-
-set g_nexball_basketball_trail  1  "1 to leave a trail"
-set g_nexball_football_trail    0  "1 to leave a trail"
-set g_nexball_trail_color     254  "1-256 for different colors (Quake palette, 254 is white)"
-
-set g_nexball_radar_showallplayers 1  "1: show every player and the ball on the radar  0: only show teammates and the ball on the radar"
-
-// server game balance settings
-// powerup balance settings
-// weapon balance settings follow
-exec balance.cfg
-
-set g_bloodloss 0   "amount of health below which blood loss occurs"
-
-set g_footsteps 0      "serverside footstep sounds"
-
-// effects
-r_picmipsprites 0 // Nexuiz uses sprites that should never be picmipped (team mate, typing, waypoints)
-r_mipsprites 1
-r_mipskins 1
-r_shadow_realtime_world_lightmaps 1
-seta r_ambient 4
-cl_decals_fadetime 1
-cl_decals_time 2
-seta cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
-seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
-seta cl_particlegibs 0 "simpler gibs"
-seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
-seta cl_gibs_lifetime 14 "average lifetime of gibs"
-seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
-seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
-seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
-seta cl_gibs_ticrate 0.1 "ticrate for gibs"
-seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
-seta cl_casings 1 "enable or disable bullet casings"
-seta cl_casings_shell_time 30 "shell casing lifetime"
-seta cl_casings_bronze_time 10 "bullet casings lifetime"
-seta cl_casings_ticrate 0.1 "ticrate for casings"
-seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"
-seta cl_projectiles_sloppy 0 "sloppy projectiles, may temporarily penetrate walls"
-cl_stainmaps 0
-cl_particles_smoke 1
-vid_gl20 1
-r_glsl_deluxemapping 1
-r_glsl_offsetmapping 0
-r_glsl_offsetmapping_reliefmapping 0
-r_glsl_offsetmapping_scale 0.02
-// execute effects-normal.cfg to make sure that all effect settings are reset
-alias menu_sync "" // will be re-aliased later
-exec effects-normal.cfg
-
-// misc
-fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
-scr_conalpha 1
-scr_conbrightness 0.2
-scr_screenshot_jpeg 1
-scr_screenshot_jpeg_quality 0.9
-sv_maxvelocity 1000000000
-cl_sound_wizardhit ""
-cl_sound_hknighthit ""
-cl_sound_tink1 weapons/tink1.wav
-cl_sound_ric1 weapons/ric1.wav
-cl_sound_ric2 weapons/ric2.wav
-cl_sound_ric3 weapons/ric3.wav
-cl_sound_r_exp3 ""
-sv_sound_land ""
-sv_sound_watersplash ""
-seta cl_sound_maptime_warning "1" "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
-seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
-
-seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
-seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
-
-// startmap_dm is used when running with the -listen or -dedicated commandline options
-set serverconfig server.cfg
-alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1; map _init/_init"
-alias sv_loadconfig "exec $serverconfig"
-alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. $* \"; quit_and_redirect self"
-
-// aliases:
-alias +attack2 +button3
-alias -attack2 -button3
-alias +zoom +button4
-alias -zoom -button4
-alias +crouch +button5
-alias -crouch -button5
-alias weapnext "_weapnext_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}"
-alias _weapnext_000 "impulse 10"
-alias _weapnext_001 "impulse 10"
-alias _weapnext_010 "impulse 10"
-alias _weapnext_011 "impulse 10"
-alias _weapnext_020 "impulse 10"
-alias _weapnext_021 "impulse 10"
-alias _weapnext_100 "impulse 10"
-alias _weapnext_101 "impulse 15"
-alias _weapnext_110 "impulse 18"
-alias _weapnext_111 "impulse 15"
-alias _weapnext_120 "impulse 18"
-alias _weapnext_121 "impulse 15"
-alias weaplast "impulse 11"
-alias weapprev "_weapprev_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}"
-alias _weapprev_000 "impulse 12"
-alias _weapprev_001 "impulse 12"
-alias _weapprev_010 "impulse 12"
-alias _weapprev_011 "impulse 12"
-alias _weapprev_020 "impulse 12"
-alias _weapprev_021 "impulse 12"
-alias _weapprev_100 "impulse 12"
-alias _weapprev_101 "impulse 16"
-alias _weapprev_110 "impulse 19"
-alias _weapprev_111 "impulse 16"
-alias _weapprev_120 "impulse 19"
-alias _weapprev_121 "impulse 16"
-set _supports_weaponpriority 0 "set to 1 by csqc if supported, and to 0 on disconnect"
-alias weapbest "impulse 13"
-
-alias reload "impulse 20"
-
-// movement
-bind w +forward
-bind a +moveleft
-bind s +back
-bind d +moveright
-bind UPARROW +forward
-bind LEFTARROW +moveleft
-bind DOWNARROW +back
-bind RIGHTARROW +moveright
-bind SHIFT +crouch
-bind ENTER +jump
-bind SPACE +jump
-
-// weapons
-bind 1 "impulse 1"
-bind 2 "impulse 2"
-bind 3 "impulse 3"
-bind 4 "impulse 4"
-bind 5 "impulse 5"
-bind 6 "impulse 6"
-bind 7 "impulse 7"
-bind 8 "impulse 8"
-bind 9 "impulse 9"
-bind 0 "impulse 14" // cycles the superweapons
-bind q weaplast
-bind MOUSE1 +attack
-bind MOUSE2 +attack2
-bind MOUSE3 +zoom
-bind MOUSE4 weaplast
-bind MOUSE5 +hook
-bind MWHEELUP weapnext
-bind MWHEELDOWN weapprev
-bind r reload
-bind BACKSPACE dropweapon
-bind g dropweapon
-bind f +use
-
-// misc
-bind e +hook
-bind ` toggleconsole
-bind ~ toggleconsole
-bind TAB +showscores
-bind ESCAPE togglemenu
-bind t messagemode
-bind y messagemode2
-bind z messagemode2
-bind u "+con_chat_maximize"
-bind i +show_info
-bind PAUSE pause
-bind F10 quit
-bind F11 disconnect
-bind F12 screenshot
-bind F4 ready
-bind m radar
-bind ALT +showaccuracy
-
-// Gamepad defaults. Tested with Logitech Rumblepad 2, I hope similar ones works as well.
-bind JOY1 "+crouch"
-bind JOY2 "+jump"
-bind JOY3 "weapprev"
-bind JOY4 "weapnext"
-bind JOY5 "+attack2"
-bind JOY6 "+attack"
-bind JOY7 "+zoom"
-bind JOY8 "dropweapon"
-bind JOY9 "menu_showteamselect"
-bind JOY10 "+show_info"
-bind JOY11 "+showscores"
-bind JOY12 "+con_chat_maximize"
-seta joyadvanced "1"
-seta joyadvaxisr "2"
-seta joyadvaxisx "3"
-seta joyadvaxisy "1"
-seta joyadvaxisz "4"
-seta joysidesensitivity "1.0"
-seta joypitchsensitivity "0.9"
-seta joyyawsensitivity "-1.8"
-// SDL only
-seta joy_deadzoneforward "0.05"
-seta joy_deadzonepitch "0.05"
-seta joy_deadzoneside "0.05"
-seta joy_deadzoneup "0.05"
-seta joy_deadzoneyaw "0.05"
-seta joy_sensitivitypitch "0.9"
-seta joy_sensitivityyaw "-1.8"
-
-// team say
-bind kp_ins messagemode
-bind kp_del messagemode2
-bind kp_end "+userbind 1"
-bind kp_downarrow "+userbind 2"
-bind kp_pgdn "+userbind 3"
-bind kp_leftarrow "+userbind 4"
-bind kp_5 "+userbind 6"
-bind kp_rightarrow "+userbind 7"
-bind kp_home "+userbind 9"
-bind kp_uparrow "+userbind 10"
-bind kp_pgup "+userbind 11"
-bind kp_multiply "+userbind 12"
-bind kp_slash "+userbind 13"
-bind kp_enter "+userbind 16"
-bind kp_plus "+userbind 17"
-bind kp_minus "+userbind 18"
-
-set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted"
-set sv_vote_only_commands ""
-set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" "maybe add kickban here (but then sv_vote_master 0)"
-set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"
-set sv_vote_call 1     "users can call a vote for the above commands"
-set sv_vote_master 1   "users can call a vote to become master"
-set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
-set sv_vote_change 0   "set to 1 to allow to change you vote/mind"
-set sv_vote_singlecount 0      "set to 1 to count votes once after timeout or to 0 to count with every vote"
-set sv_vote_timeout 60 "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   "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"
-alias vstatus "cmd vote status"
-alias vcall "cmd vote call $*"
-alias vstop "cmd vote stop"
-alias vmaster "cmd vote master"
-alias vlogin "cmd vote login $*"
-alias vdo "cmd vote do $*"
-alias vyes "cmd vote yes"
-alias vno "cmd vote no"
-alias vdontcare "cmd vote dontcare"
-alias vabstain "cmd vote abstain"
-
-alias vmap "vcall gotomap $1"
-alias vnextmap "vcall nextmap $1"
-alias vkick "vcall kick $1"
-alias vkickban "vcall kickban $1"
-alias vend "vcall endmatch"
-alias vdomap "vdo gotomap $1"
-alias vdokick "vdo kick $*"
-alias vdokickban "vdo kickban $*"
-alias vdoend "vdo endmatch"
-
-alias lsmaps "cmd lsmaps" // lists all maps on server (for vmap, suggestmap, vnextmap)
-alias lsnewmaps "cmd lsnewmaps" // lists all maps on server that do not yet have a record set (race/cts)
-bind F1 vyes
-bind F2 vno
-
-//used for spectate/observer mode
-alias spec "cmd spectate"
-bind F3 spec
-
-// NixNex (No-Items x Nexuiz) - at each time, everyone uses the same weapon,
-// and in regular intervals, this weapon is cycled
-set g_nixnex 0 "No Items Nexuiz - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on"
-set g_nixnex_with_laser 0 "always carry the laser as an additional weapon in NixNex"
-set g_nixnex_with_healtharmor 0 "when 1, health and armor still show up in NixNex"
-set g_nixnex_with_powerups 0 "when 1, powerups still show up in NixNex"
-
-// score log
-set sv_logscores_console 0     "print scores to server console"
-set sv_logscores_file 0        "print scores to file"
-set sv_logscores_filename scores.log   "filename"
-set sv_logscores_bots 0        "exclude bots by default"
-
-// spam (frag/capture) log
-set sv_eventlog 0      "the master switch for efficiency reasons"
-set sv_eventlog_console 1
-set sv_eventlog_files 0
-set sv_eventlog_files_timestamps 1
-seta sv_eventlog_files_counter 0
-set sv_eventlog_files_nameprefix nexuiz
-set sv_eventlog_files_namesuffix .log
-
-set nextmap "" "override the maplist when switching to the next map"
-set lastlevel ""
-set quit_when_empty 0  "set to 1, then the server exits when the next level would start but is empty"
-set quit_and_redirect ""       "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
-
-// singleplayer campaign
-set g_campaign 0
-seta g_campaign_name "nexuiz25"
-set g_campaign_skill 0
-set g_campaignnexuiz20_index 0
-set g_campaignnexuiz25_index 1
-
-alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
-alias singleplayer_continue "set scmenu_campaign_goto -1"
-alias singleplayer_levellist "set scmenu_campaign_dump 1; togglemenu; wait; togglemenu"
-
-// Green's fullbright skins
-alias cl_fbskin_green "playermodel models/player/nexus.zym; playerskin 6; color 3 3"
-alias cl_fbskin_red "playermodel models/player/nexus.zym; playerskin 6; color 4 4"
-alias cl_fbskin_orange "playermodel models/player/nexus.zym; playerskin 6; color 14 14"
-alias cl_fbskin_off "playermodel models/player/nexus.zym; playerskin 0"
-alias sv_fbskin_green "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 51"
-alias sv_fbskin_red "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 68"
-alias sv_fbskin_orange "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 238"
-alias sv_fbskin_off "g_fullbrightplayers 0; sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
-
-seta sv_servermodelsonly 1
-
-cl_curl_enabled 1
-cl_curl_maxspeed 300
-sv_curl_defaulturl "http://www.nexuiz.com/contentdownload/getmap.php?file="
-
-set sv_motd ""
-
-seta cl_shownames 1    "show player names pointed to (0: never, 1: teamplay only, 2: always)"
-set sv_allow_shownames 1
-
-set g_waypoints_for_items 1    "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
-
-seta g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
-seta g_maplist_votable_keeptwotime 15
-seta g_maplist_votable_timeout 30      "timeout for the map voting; must be below 50 seconds!"
-seta g_maplist_votable_suggestions 2
-seta g_maplist_votable_suggestions_override_mostrecent 0
-seta g_maplist_votable_nodetail 1      "nodetail only shows total count instead of all vote counts per map, so votes don't influence others that much"
-seta g_maplist_votable_abstain 0       "when 1, you can abstain from your vote"
-seta g_maplist_votable_screenshot_dir "maps levelshots"        "where to look for map screenshots"
-alias suggestmap "cmd suggestmap $1"
-
-set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax 2        "normal chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst 2       "normal chat: allow bursts of so many chat lines"
-set g_chat_flood_spl_team 1    "team chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax_team 2   "team chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst_team 2  "team chat: allow bursts of so many chat lines"
-set g_chat_flood_spl_tell 1    "private chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax_tell 2   "private chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst_tell 2  "private chat: allow bursts of so many chat lines"
-set g_chat_flood_notify_flooder 1      "when 0, the flooder still can see his own message"
-set g_chat_teamcolors 0        "colorize nicknames in team color for chat"
-set g_voice_flood_spv 4        "normal voices: seconds between voices to not count as flooding"
-set g_voice_flood_spv_team 2   "team voices: seconds between voices to not count as flooding"
-set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
-set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
-set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking"
-set g_nick_flood_penalty_red 30 "number of changes to allow before totally disorienting the player"
-
-set g_waypointsprite_normdistance 512
-set g_waypointsprite_minscale 0.5
-set g_waypointsprite_minalpha 0.4
-set g_waypointsprite_distancealphaexponent 2
-set g_waypointsprite_timealphaexponent 1
-set g_waypointsprite_deployed_lifetime 10
-set g_waypointsprite_deadlifetime 1
-set g_waypointsprite_limitedrange 5120
-set g_waypointsprite_stuffbinds 0
-seta g_waypointsprite_scale 1
-seta g_waypointsprite_alpha 1 "This allows the client to control transparency of the waypoint"
-seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
-seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
-seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
-seta g_waypointsprite_crosshairfadealpha 0.25 "alpha multiplier near crosshair"
-seta g_waypointsprite_crosshairfadescale 1 "scale multiplier near the crosshair"
-seta g_waypointsprite_crosshairfadedistance 150 "distance in virtual pixels from crosshair where to start fading"
-seta g_waypointsprite_distancefadealpha 1 "alpha multiplier near distance"
-seta g_waypointsprite_distancefadescale 0.7 "scale multiplier near the distance"
-seta g_waypointsprite_distancefadedistancemultiplier 0.5 "distance in map sizes from distance where to stop fading"
-alias "g_waypointsprite_personal"      "impulse 30"
-alias "g_waypointsprite_personal_p"    "impulse 31"
-alias "g_waypointsprite_personal_d"    "impulse 32"
-alias "g_waypointsprite_team_helpme"   "impulse 33"
-alias "g_waypointsprite_team_here"     "impulse 34"
-alias "g_waypointsprite_team_here_p"   "impulse 35"
-alias "g_waypointsprite_team_here_d"   "impulse 36"
-alias "g_waypointsprite_team_danger"   "impulse 37"
-alias "g_waypointsprite_team_danger_p" "impulse 38"
-alias "g_waypointsprite_team_danger_d" "impulse 39"
-alias "g_waypointsprite_clear_personal"        "impulse 47"
-alias "g_waypointsprite_clear" "impulse 48"
-alias "g_waypointsprite_toggle"        "impulse 49"
-// key for that?
-seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
-
-// command extension
-alias qc_cmd   "sv_cmd $*" // menu QC will override this to menu_cmd
-alias adminmsg "sv_cmd adminmsg $*"
-alias teamstatus       "cmd teamstatus; sv_cmd teamstatus" // yes, it is broken on listen servers that way, but well, who cares :P
-alias printstats       "sv_cmd printstats" // print status on demand
-alias g_maplist_add    "qc_cmd maplist add $*"
-alias g_maplist_remove "qc_cmd maplist remove $*"
-alias g_maplist_putfirst       "qc_cmd maplist remove $* ; qc_cmd maplist add $*"
-alias g_maplist_shufflenow     "qc_cmd maplist shuffle"
-alias g_maplist_cleanup        "qc_cmd maplist cleanup" // removes maps that don't exist from the map list
-alias gametype "sv_cmd gametype $*"
-
-alias addfav "qc_cmd addtolist net_slist_favorites $*"
-alias addvote "qc_cmd addtolist sv_vote_commands $*"
-
-// key hunt
-set g_keyhunt 0 "Key Hunt: collect all keys from the enemies and bring them together to score"
-set g_balance_keyhunt_delay_return 60
-set g_balance_keyhunt_delay_round 5
-set g_balance_keyhunt_delay_tracking 10
-set g_balance_keyhunt_delay_fadeout 2
-set g_balance_keyhunt_delay_collect 1.5
-set g_balance_keyhunt_delay_drop 0.4
-set g_balance_keyhunt_maxdist 150
-set g_balance_keyhunt_score_collect 3
-set g_balance_keyhunt_score_carrierfrag 2
-set g_balance_keyhunt_score_capture 100
-set g_balance_keyhunt_score_push 60
-set g_balance_keyhunt_score_destroyed 50
-set g_balance_keyhunt_score_destroyed_ownfactor 1
-set g_balance_keyhunt_dropvelocity 300
-set g_balance_keyhunt_throwvelocity 400
-set g_balance_keyhunt_protecttime 0.8
-set g_balance_keyhunt_damageforcescale 1
-seta g_keyhunt_teams_override 0
-set g_keyhunt_teams 0
-
-// so it can be stuffcmd-ed still
-set cl_gravity 800     "but ignored anyway"
-
-set g_ban_default_bantime 5400 "90 minutes"
-set g_ban_default_masksize 3   "whole 255.255.255.0 networks (set to 4 for single IPs); when UID support is compiled in, masksize 0 means banning by UID"
-set g_banned_list ""   "format: IP remainingtime IP remainingtime ..."
-alias bans "sv_cmd bans"
-alias ban "sv_cmd ban $*"         // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds)
-alias kickban "sv_cmd kickban $*" // usage: kickban # playerno bantime(seconds) masksize(bytes)
-alias unban "sv_cmd unban $*"     // usage: unban 3 (number from bans)
-
-r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
-
-// settemp subsystem. Do not touch. Usage: settemp variable value, next map resets it.
-set settemp_list 0
-set settemp_idx 0
-set _settemp_var UNUSED
-alias settemp "_settemp_var \"_settemp_x$settemp_idx\"; qc_cmd rpn /settemp_idx settemp_idx 1 add def; _settemp \"$1\" \"$2\""
-alias _settemp "settemp_list \"1 $1 $_settemp_var $settemp_list\"; set $_settemp_var \"${$1}\"; $1 \"$2\""
-alias settemp_restore "_settemp_restore_${settemp_list asis}"
-alias _settemp_restore_0 "set settemp_var 0; set settemp_list 0"
-alias _settemp_restore_1 "$1 \"${$2}\"; _settemp_restore_${3- asis}"
-
-// usercommands. These can be edited and bound by the menu.
-seta "userbind1_press" "say_team quad soon";  seta "userbind1_release" "";  seta "userbind1_description" "team: quad soon"
-seta "userbind2_press" "say_team free item %x^7 (l:%y^7); g_waypointsprite_team_here_p";  seta "userbind2_release" "";  seta "userbind2_description" "team: free item, icon"
-seta "userbind3_press" "say_team took item (l:%l^7); g_waypointsprite_team_here";  seta "userbind3_release" "";  seta "userbind3_description" "team: took item, icon"
-seta "userbind4_press" "say_team negative";  seta "userbind4_release" "";  seta "userbind4_description" "team: negative"
-seta "userbind5_press" "say_team positive";  seta "userbind5_release" "";  seta "userbind5_description" "team: positive"
-seta "userbind6_press" "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_helpme; cmd voice needhelp";  seta "userbind6_release" "";  seta "userbind6_description" "team: need help, icon"
-seta "userbind7_press" "say_team enemy seen (l:%y^7); g_waypointsprite_team_danger_p; cmd voice incoming";  seta "userbind7_release" "";  seta "userbind7_description" "team: enemy seen, icon"
-seta "userbind8_press" "say_team flag seen (l:%y^7); g_waypointsprite_team_here_p; cmd voice seenflag";  seta "userbind8_release" "";  seta "userbind8_description" "team: flag seen, icon"
-seta "userbind9_press" "say_team defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here";  seta "userbind9_release" "";  seta "userbind9_description" "team: defending, icon"
-seta "userbind10_press" "say_team roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here";  seta "userbind10_release" "";  seta "userbind10_description" "team: roaming, icon"
-seta "userbind11_press" "say_team attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here";  seta "userbind11_release" "";  seta "userbind11_description" "team: attacking, icon"
-seta "userbind12_press" "say_team killed flagcarrier (l:%y^7); g_waypointsprite_team_p"; seta "userbind12_release" ""; seta "userbind12_description" "team: killed flag, icon"
-seta "userbind13_press" "say_team dropped flag (l:%d^7); g_waypointsprite_team_here_d"; seta "userbind13_release" ""; seta "userbind13_description" "team: dropped flag, icon"
-seta "userbind14_press" "say_team dropped gun %w^7 (l:%l^7); g_waypointsprite_team_here; wait; dropweapon"; seta "userbind14_release" ""; seta "userbind14_description" "team: drop gun, icon"
-seta "userbind15_press" "say_team dropped flag/key %w^7 (l:%l^7); g_waypointsprite_team_here; wait; +use"; seta "userbind15_release" "-use"; seta "userbind15_description" "team: drop flag/key, icon"
-seta "userbind16_press" "say :-) / nice one"; seta "userbind16_release" ""; seta "userbind16_description" "chat: nice one"
-seta "userbind17_press" "say good game"; seta "userbind17_release" ""; seta "userbind17_description" "chat: good game"
-seta "userbind18_press" "say hi / good luck and have fun"; seta "userbind18_release" ""; seta "userbind18_description" "chat: hi / good luck"
-seta "userbind19_press" "+showscores; +con_chat_maximize"; seta "userbind19_release" "-showscores; -con_chat_maximize"; seta "userbind19_description" "scoreboard / chat history"
-seta "userbind20_press" "toggle cl_capturevideo"; seta "userbind20_release" ""; seta "userbind20_description" "toggle recording .avi"
-seta "userbind21_press" "toggle vid_fullscreen; vid_restart"; seta "userbind21_release" ""; seta "userbind21_description" "toggle fullscreen"
-seta "userbind22_press" ""; seta "userbind22_release" ""; seta "userbind22_description" ""
-seta "userbind23_press" ""; seta "userbind23_release" ""; seta "userbind23_description" ""
-seta "userbind24_press" ""; seta "userbind24_release" ""; seta "userbind24_description" ""
-seta "userbind25_press" ""; seta "userbind25_release" ""; seta "userbind25_description" ""
-seta "userbind26_press" ""; seta "userbind26_release" ""; seta "userbind26_description" ""
-seta "userbind27_press" ""; seta "userbind27_release" ""; seta "userbind27_description" ""
-seta "userbind28_press" ""; seta "userbind28_release" ""; seta "userbind28_description" ""
-seta "userbind29_press" ""; seta "userbind29_release" ""; seta "userbind29_description" ""
-seta "userbind30_press" ""; seta "userbind30_release" ""; seta "userbind30_description" ""
-seta "userbind31_press" ""; seta "userbind31_release" ""; seta "userbind31_description" ""
-seta "userbind32_press" ""; seta "userbind32_release" ""; seta "userbind32_description" ""
-alias _userbind_call "${$1}"
-alias +userbind "_userbind_call userbind${1}_press"
-alias -userbind "_userbind_call userbind${1}_release"
-
-seta menu_skin "wickedz"
-set menu_slowmo 1
-seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
-
-r_textbrightness 0.2
-r_textcontrast 0.8
-r_textshadow 1
-
-// good settings for these fonts
-con_chat 5
-con_chatpos -9
-con_chatsize 10
-con_chatwidth 0.6
-con_notifysize 10
-con_notifyalign 0
-
-sbar_info_pos 50
-seta sbar_alpha_bg 0.8 "alpha value of the HUD background"
-seta sbar_alpha_fg 1 "alpha value of the HUD foreground items"
-seta sbar_border_thickness 1 "scoreboard border thickness"
-seta sbar_accuracy_border_thickness 1 "accuracy stats border thickness"
-seta sbar_accuracy_doublerows 0 "use two rows instead of one"
-seta sbar_accuracy_yellow 40 "percentage at which the accuracy color is yellow"
-seta sbar_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard"
-seta sbar_accuracy_hud 1 "0 = no weapon accuracy bar on the weapon icons"
-seta sbar_color_bg_r 0 "red color component of the HUD background"
-seta sbar_color_bg_g 0.25 "green color component of the HUD background"
-seta sbar_color_bg_b 0.17 "blue color component of the HUD background"
-seta sbar_color_bg_team 0.5 "team color multiplier of the HUD background"
-seta sbar_scoreboard_alpha_bg 0.6 "scoreboard background alpha"
-seta sbar_scoreboard_alpha_fg 1 "scoreboard foreground alpha"
-seta sbar_scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
-seta sbar_scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self" 
-seta sbar_scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
-seta sbar_scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
-seta sbar_scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
-seta sbar_scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on sbar_scoreboard_highlight 1)"
-seta sbar_scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
-seta sbar_hudselector 1        "0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display"
-seta sbar_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
-seta sbar_showweaponicons 1 "1 = show icons of weapons that you have"
-seta sbar_timer_increment 0 "1 = show elapsed time on the timer"
-seta sbar_timer_scale 1 "scale multiplier of the timer"
-seta sbar_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted"
-
-// for menu server list (eventually make them have engine support?)
-seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
-seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
-set menu_slist_modfilter "=" // set to either: !modname or modname. modname of = means "same as we are running now".
-
-// for menu weapon arena
-set menu_weaponarena_with_laser 0 "also enable the Laser in this weapon arena"
-
-seta menu_maxplayers 8 "maxplayers value when the menu starts a game"
-
-// command executed before loading a map by the menu
-// makes sure maxplayers is at least minplayers or bot_number + 1
-alias _menu_loadmap_prepare_maxpl "maxplayers $_menu_loadmap_maxplayers"
-alias menu_loadmap_prepare "disconnect; wait; g_campaign 0; menu_cmd rpn /_menu_loadmap_maxplayers menu_maxplayers minplayers bot_number 1 add max max def; _menu_loadmap_prepare_maxpl; g_maplist_shufflenow"
-
-// useful vote aliases
-set timelimit_increment 5
-set timelimit_decrement 5
-set timelimit_min 5
-set timelimit_max 60
-alias extendmatchtime "sv_cmd rpn /timelimit timelimit timelimit_max timelimit timelimit_increment add bound def"
-alias reducematchtime "sv_cmd rpn /timelimit timelimit timelimit_decrement sub timelimit_min timelimit bound def"
-alias endmatch "timelimit -1"
-
-// useful keybind to maximize the chat area temporarily
-set _backup_con_chatvars_set 0
-alias _restore_con_chatvars_0 ""
-alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites"
-alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set"
-alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites"
-alias _backup_con_chatvars_1 ""
-alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set"
-alias +con_chat_maximize "_backup_con_chatvars; con_chatpos -9; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
-alias -con_chat_maximize "_restore_con_chatvars"
-
-// tab completion
-set con_completion_playdemo    *.dem
-set con_completion_timedemo    *.dem
-set con_completion_ply         *.dem
-set con_completion_tdem                *.dem
-set con_completion_exec                *.cfg
-set con_completion_chmap       map
-set con_completion_gotomap     map
-set con_completion_vmap                map
-set con_completion_vnextmap    map
-set con_completion_vdomap      map
-
-// these non-saved engine cvars shall be savedG
-seta cl_port $cl_port
-seta r_showsurfaces $r_showsurfaces
-seta r_ambient $r_ambient
-seta skill $skill
-seta gl_finish $gl_finish
-seta v_kicktime $v_kicktime
-seta r_subdivisions_tolerance $r_subdivisions_tolerance
-
-// ticrate
-sys_ticrate 0.0166667
-cl_netfps 60 // should match
-sv_gameplayfix_delayprojectiles 0
-sv_gameplayfix_q2airaccelerate 1
-
-// delay for "kill" to prevent abuse
-set g_balance_kill_delay 5
-
-// this feature is currently buggy in the engine (it appears to PREVENT any dropping in lots of maps, leading to weirdly aligned entities, and in some cases even CAUSES them to drop through solid, like in facing worlds nex)
-sv_gameplayfix_droptofloorstartsolid 0
-
-seta gl_texturecompression 0
-gl_texturecompression_color 1
-gl_texturecompression_gloss 1
-gl_texturecompression_glow 1
-gl_texturecompression_lightcubemaps 1
-gl_texturecompression_q3bsplightmaps 0
-gl_texturecompression_sky 1
-
-set menu_mouse_absolute 0      "TODO make this seta if the engine understands this right"
-seta menu_mouse_speed 1 "speed multiplier for the mouse in the menu (does not affect in-game aiming)"
-set menu_use_default_hostname 1
-alias sethostname "set menu_use_default_hostname 0; hostname $*"
-
-// 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
-
-// Audio track names (for old-style "cd loop NUMBER" usage)
-set g_cdtracks_remaplist "digital-pursuit breakdown-easy brainsukker chaos-fog infight neuronal-diving subcities thru-the-mirror calling-bogus beast-of-insanity thunder brokenlight brokenlight stairs sixtyfour_ desert3 ninesix sixtyfour_revisited northern-lights" "list used by mapinfo system to automatically assign cdtracks - must match the cd remap command"
-set g_cdtracks_dontusebydefault "digital-pursuit thunder brokenlight" "list used by mapinfo system to automatically assign cdtracks - must be a subset of g_cdtracks_remaplist"
-cd remap $g_cdtracks_remaplist
-set sv_intermission_cdtrack ""
-set menu_cdtrack brokenlight
-
-// maxidle (in seconds): kick players idle for more than that amount of time
-set sv_maxidle 0
-// when sv_maxidle is not 0, assume spectators are idle too
-set sv_maxidle_spectatorsareidle 0
-
-// CTF capture limit placeholder cvar
-set capturelimit 0
-
-// sbar: font size
-seta sbar_fontsize 11
-seta sbar_fontsize_spec 16
-seta scr_centersize 11
-seta sbar_width 560
-// alias sbar_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; sbar_columns_set"
-alias sbar_font "set _requested_sbar_font \"${*}\""
-seta sbar_columns default
-sbar_font gfx/vera-sans 8 12 16 24 32
-seta sbar_showbinds 1  "display actions / bound keys in the strings shown during the game. 0 displays only actions, 1 displays only bound keys, 2 displays both"
-seta sbar_showbinds_limit 2    "maximum number of bound keys to show for an action. 0 for unlimited"
-
-// these entities are not referenced by anything directly, they just represent
-// teams and are found by find() when needed
-prvm_leaktest_ignore_classnames "ctf_team dom_team tdm_team"
-
-sv_allowdownloads_inarchive 1 // for csprogs.dat
-
-set g_jump_grunt 0     "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
-
-alias allready "sv_cmd allready"
-
-// note: these cvars use weapon NUMBERS. Use the menu to edit this cvar, or look the numbers up in qcsrc/common/constants.qh.
-seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher fireball hlac hagar crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
-seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list"
-seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun.  Default value: explosives"
-seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser"      "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun.  Default value: energy"
-seta cl_weaponpriority2 "minstanex nex campingrifle"                    "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun.  Default value: hitscan exact"
-seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun"        "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun.  Default value: hitscan all"
-seta cl_weaponpriority4 "grenadelauncher hlac hagar crylink shotgun"    "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun.  Default value: spam weapons"
-seta cl_weaponpriority5 "laser hook porto"                              "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun.  Default value: weapons for moving"
-seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun"
-seta cl_weaponpriority7 "" "use impulse 207 for prev gun from this list, 217 for best gun, 227 for next gun"
-seta cl_weaponpriority8 "" "use impulse 208 for prev gun from this list, 218 for best gun, 228 for next gun"
-seta cl_weaponpriority9 "" "use impulse 209 for prev gun from this list, 219 for best gun, 229 for next gun"
-
-seta sv_status_privacy 1       "hide IP addresses from \"status\" replies shown to clients"
-
-
-seta cl_teamradar 1    "show radar in teammatches when available"
-seta cl_teamradar_background_alpha 0   "set to -1 to disable"
-seta cl_teamradar_foreground_alpha 0.8 "alpha of the map"
-seta cl_teamradar_scale 4096 "distance you can see on the team radar"
-seta cl_teamradar_rotation 0   "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north"
-seta cl_teamradar_size "128 128" "size of the team radar in pixels"
-seta cl_teamradar_position "1 0" "1 0 would be upper right corner, 0.5 0.5 the center, append a 2 at the end to disable the corner hack, and a 1 to disable half the hack"
-seta cl_teamradar_zoommode 0   "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
-alias cl_teamradar_rotate "toggle cl_teamradar_rotation 0 1 2 3 4"
-
-set g_maplist_allow_hidden 0           "allow hidden maps to be, e.g., voted for and in the maplist"
-set g_maplist_allow_frustrating 0      "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
-
-seta g_start_delay 0   "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
-       if_dedicated set g_start_delay 15
-
-alias ons_map           "cl_cmd radar" // legacy alias
-alias radar             "cl_cmd radar"
-alias sbar_columns_set  "cl_cmd sbar_columns_set $*"
-alias sbar_columns_help "cl_cmd sbar_columns_help $*"
-
-alias _gl_flashblend_update_00 "gl_flashblend 1"
-alias _gl_flashblend_update_10 "gl_flashblend 0"
-alias _gl_flashblend_update_01 "gl_flashblend 0"
-alias _gl_flashblend_update_11 "gl_flashblend 0"
-alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_showsurfaces"
-
-set sv_clones 0        "number of clones a player may make (reset by the \"kill\" command)"
-
-set cl_handicap 1      "the higher, the more damage you will receive (client setting)"
-
-exec turrets.cfg
-
-// must be at the bottom of this file:
-// alias for switching the teamselect menu
-alias menu_showteamselect "menu_cmd directmenu TeamSelect"
-alias menu_sync "menu_cmd sync"
-bind f5 menu_showteamselect
-
-set g_bugrigs 0
-set g_bugrigs_planar_movement 1        "BROTRR bug emulation"
-set g_bugrigs_planar_movement_car_jumping 1    "my own bug"
-set g_bugrigs_reverse_speeding 1       "BROTRR bug emulation"
-set g_bugrigs_reverse_spinning 1       "BROTRR bug emulation"
-set g_bugrigs_reverse_stopping 1       "BROTRR bug emulation"
-set g_bugrigs_air_steering 1   "NFS bug emulation"
-set g_bugrigs_angle_smoothing 5        "smooth the car angle a bit, looks nice"
-set g_bugrigs_friction_floor 50        "units/sec friction on floor"
-set g_bugrigs_friction_brake 950       "units/sec friction for braking"
-set g_bugrigs_friction_air 0.00001     "(very small) v <- v - v^2 * g_bugrigs_friction_air"
-set g_bugrigs_accel 800        "acceleration"
-set g_bugrigs_speed_ref 400    "reference speed for accel and steer responsiveness"
-set g_bugrigs_speed_pow 2      "reference power for accel and steer responsiveness"
-set g_bugrigs_steer 1  "steering amount"
-
-set g_touchexplode 0
-set g_touchexplode_radius 50
-set g_touchexplode_damage 10
-set g_touchexplode_edgedamage 0
-set g_touchexplode_force 150
-
-set g_ban_sync_uri ""  "sync using this ban list provider (empty string to disable)"
-set g_ban_sync_interval 5      "sync every 5 minutes"
-set g_ban_sync_trusted_servers ""      "request ban lists from these nexuiz servers (do not include your own server there, or unbanning may fail)"
-set g_ban_sync_timeout 45      "time out in seconds for the ban sync requests"
-set g_ban_sync_trusted_servers_verify 0        "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
-
-set g_showweaponspawns 0       "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"
-
-// ballistics use physical units, but qu based
-//   Quake-Newton: 1 qN  = 1 qu * 1 g / 1 s^2
-//   Quake-Joule:  1 qJ  = 1 qN * 1 qu
-//   Quake-Pascal: 1 qPa = 1 qN / 1 qu^2
-
-set g_ballistics_materialconstant 1414213562
-set g_ballistics_mindistance 16
-// unit: qJ / qu^3 (energy needed per volume unit of solid to push/burn away
-// parameter: bullet constant: mass / area in g/qu^2
-// = mass / (pi/4 * caliber^2)
-// with caliber in inches, mass in grams:
-// = 1.273239544735163 * mass / caliber^2
-// with caliber in inches, mass in grains:
-// = 0.082633246453312 * mass / caliber^2
-
-// bullet max travel distance inside solid:
-//   0.5 * v^2 * bulletconstant / g_ballistics_materialconstant
-
-// some bullet constants:
-//   http://hypertextbook.com/facts/2000/ShantayArmstrong.shtml
-//     second bullet: caliber .45, mass 16.2g, bullet constant 101.859163578813
-//     third bullet: caliber .338, mass 16.2g, bullet constant 180.5476053421592
-//     fourth bullet: caliber .25, mass 2.3g, bullet constant 46.85521524625399
-//   http://en.wikipedia.org/wiki/.50_BMG
-//     caliber .5, 360 grains, bullet constant 118.9918748927693
-//   AK-47:
-//     caliber .3, 62 grains, bullet constant 56.92512533450383
-//   .3 winchester magnum:
-//     caliber .3, 150 grains, bullet constant 137.7220774221867
-
-set cl_stripcolorcodes 0       "experimental feature (notes: strips ALL color codes from messages!)"
-
-sv_status_show_qcstatus 1      "Nexuiz uses this field instead of frags"
-set g_full_getstatus_responses 0       "this currently breaks qstat"
-
-// Demo camera
-set camera_enable              0       "Enables the camera for demo playback"
-set camera_free                0       "Free camera instead of chasing the player"
-set camera_reset               0       "Resets the camera position and switch to chase mode"
-set camera_speed_roll          0.9     "Camera rotation speed"
-set camera_speed_chase                 4       "Camera movement speed on the x/y/z axis while chasing the player"
-set camera_speed_free          8       "Camera movement speed on the x/y/z axis in free mode"
-set camera_speed_attenuation   10      "Camera movements attenuation factor. Bigger is smoother. Applies to mouse movements"
-set camera_mouse_treshold      0.5     "Use to ignore small mouse movements. This allows for smoother camera control"
-set camera_chase_smoothly      0       "Attenuate player movements (only in chase mode)"
-set camera_look_player         0       "Always look to the player. Mouse input is ignored in this mode"
-set camera_look_attenuation    8       "Attenuation of \"looking\" movements, only if camera_look_player is set. Bigger is smoother"
-set camera_forward_follows     1       "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking"
-
-// "Gentle mode": show no blood
-seta sv_gentle 0       "force gentle mode for everyone, also remove references to acts of killing from the messages"
-seta cl_gentle 0       "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
-
-seta cl_racetimer_position 0.25 "Y-axis positioning of the race timer (from 0 to 1)"
-seta cl_showpressedkeys        0       "Show which movement keys someone is pressing: 1 for spectating, 2 for always"
-seta cl_showpressedkeys_position "0.5 0.8"     "1 0 would be upper right corner, 0.5 0.5 the center"
-
-seta cl_showspeed 0 "show the XY speed of the player"
-seta cl_showspeed_unit 0 "unit selection (0 = qu/s (no postfix), 1 = qu/s, 2 = m/s, 3 = km/h, 4 = mph, 5 = knots)"
-seta cl_showspeed_z 0 "include the speed on the Z-axis"
-seta cl_showspeed_size 30 "size of the numbers"
-seta cl_showspeed_position 0.7 "Y-axis positioning of the numbers"
-
-seta cl_showacceleration 0 "show the XY acceleration of the player"
-seta cl_showacceleration_z 0 "include the speed on the Z-axis"
-seta cl_showacceleration_size 40 "height of the bar"
-seta cl_showacceleration_scale 5 "X-axis scale of the bar"
-seta cl_showacceleration_alpha 0.5 "alpha of the bar"
-seta cl_showacceleration_color_custom 0 "0 = dynamic color depending on acceleration, 1 = use custom color"
-seta cl_showacceleration_color "1 0 0" "color of the bar, needs cl_showacceleration_color_custom to be 1"
-seta cl_showacceleration_position 0.6 "Y-axis positioning of the bar"
-
-set g_jetpack 0 "Jetpack mutator (uses the hook's button, can't coexist with the offhand hook, but only with the onhand one)"
-
-set g_running_guns 0 "... or wonder, till it drives you mad, what would have followed if you had."
-
-set cl_effects_lightningarc_simple 0
-set cl_effects_lightningarc_segmentlength 64
-set cl_effects_lightningarc_drift_start 0.45
-set cl_effects_lightningarc_drift_end 0.1
-set cl_effects_lightningarc_branchfactor_start 0.25
-set cl_effects_lightningarc_branchfactor_add 0.1
-
-set g_hitplots 0 "when set to 1, hitplots are stored by the server to provide a means of proving that a triggerbot was used"
-seta g_hitplots_individuals "" "the individuals, by IP, that should have their hitplots recorded"
-alias g_hitplots_add "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 union def"
-alias g_hitplots_remove "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 difference def"
-
-alias mute "prvm_edictset server $1 muted 1" // I am lazy and not making an actual command of this
-alias unmute "prvm_edictset server $1 muted 0" // dito
-
-rcon_secure 1
-
-set menu_updatecheck 1
-
-set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
-set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
-
-// broken, sorry (cannot handle weapon attachment properly)
-//seta cl_forceplayermodels 0 "force all players to look like you; WARNING: animations can look very bad with this"
-//seta cl_forceplayermodelsfromnexuiz 0 "force models coming from nexuiz; WARNING: animations can look very bad with this"
-//set sv_clforceplayermodels 1 "allow clients to use cl_forcemodels"
-
-set sv_loddistance1 1024
-set sv_loddistance2 4096
-seta cl_playerdetailreduction 0        "the higher, the less detailed player models are displayed (LOD)"
-
-set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
-
-// hooks
-alias _cl_hook_gamestart "set _cl_hook_gametype $1; _cl_hook_gamestart_stage2"
-alias _cl_hook_gamestart_stage2 "cl_hook_gamestart_all; cl_hook_gamestart_${_cl_hook_gametype}"
-alias cl_hook_gamestart_all
-alias cl_hook_gamestart_nop  //is only called when CSQC unloads before knowing the gametype, very unlikely
-alias cl_hook_gamestart_dm
-alias cl_hook_gamestart_tdm
-alias cl_hook_gamestart_dom
-alias cl_hook_gamestart_ctf
-alias cl_hook_gamestart_rune
-alias cl_hook_gamestart_lms
-alias cl_hook_gamestart_arena
-alias cl_hook_gamestart_ca
-alias cl_hook_gamestart_kh
-alias cl_hook_gamestart_ons
-alias cl_hook_gamestart_as
-alias cl_hook_gamestart_rc
-alias cl_hook_gamestart_nexball
-alias cl_hook_gamestart_cts
-alias cl_hook_gameend
-
-alias _sv_hook_gamestart "set _sv_hook_gametype $1; _sv_hook_gamestart_stage2"
-alias _sv_hook_gamestart_stage2 "sv_hook_gamestart_all; sv_hook_gamestart_${_sv_hook_gametype}"
-alias sv_hook_gamestart_all
-alias sv_hook_gamestart_dm
-alias sv_hook_gamestart_tdm
-alias sv_hook_gamestart_dom
-alias sv_hook_gamestart_ctf
-alias sv_hook_gamestart_rune
-alias sv_hook_gamestart_lms
-alias sv_hook_gamestart_arena
-alias sv_hook_gamestart_ca
-alias sv_hook_gamestart_kh
-alias sv_hook_gamestart_ons
-alias sv_hook_gamestart_as
-alias sv_hook_gamestart_rc
-alias sv_hook_gamestart_nexball
-alias sv_hook_gamestart_cts
-alias sv_hook_gamerestart
-alias sv_hook_gameend
-
-seta cl_casings_maxcount 100 "maximum amount of shell casings (must be at least 1)"
-seta cl_gibs_maxcount 100 "maximum amount of gibs (must be at least 1)"
-seta cl_vehicle_spiderbot_cross_alpha 0.6
-seta cl_vehicle_spiderbot_cross_size 1
-
-//cl_gunalign calculator
-seta menu_cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
-alias _gunalign_01 "cl_gunalign 1"
-alias _gunalign_02 "cl_gunalign 2"
-alias _gunalign_03 "cl_gunalign 3"
-alias _gunalign_04 "cl_gunalign 4"
-alias _gunalign_11 "cl_gunalign 2"
-alias _gunalign_12 "cl_gunalign 1"
-alias _gunalign_13 "cl_gunalign 4"
-alias _gunalign_14 "cl_gunalign 3"
-alias _gunalign_update "_gunalign_$v_flipped$menu_cl_gunalign"
-
-set _menu_alpha "" // will be set by menu QC to the current fading of the menu, can be used by CSQC to fade items
-
-set g_triggerimpulse_accel_power 1 "trigger_impulse accelerator power (applied BEFORE the multiplier)"
-set g_triggerimpulse_accel_multiplier 1 "trigger_impulse accelerator multiplier (applied AFTER the power)"
-set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field multiplier"
-set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
-
-seta g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
-seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
-
-set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file"
-set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file"
-
-seta cl_noantilag 0 "turn this on if you believe antilag is bad"
-
-set sv_pitch_min -35 "minimum aiming angle for shooting direction display of the gun"
-set sv_pitch_max  35 "maximum aiming angle for shooting direction display of the gun"
-set sv_pitch_fixyaw 1 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0"
-
-set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
-
-seta g_mapinfo_allow_unsupported_modes_and_let_stuff_break "0" "set to 1 to be able to force game types using g_ cvars even if the map does not support them"
-
-// weapon accuracy stats
-set sv_accuracy_data_share 1 "1 send weapon accuracy data statistics to spectating clients, depends on cl_accuracy_data_share"
-set sv_accuracy_data_send 1 "1 send weapon accuracy data statistics and improved score info to all the clients at the end of the match, depends on cl_accuracy_data_receive, 0 send the current 'player has won' to all the clients"
-set cl_accuracy_data_share 0 "1 share my weapon accuracy data statistics with other players, 0 keep my weapon accuracy data statistics hidden"
-set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the end of the match"
-
-set developer_fteqccbugs 0 "check fteqcc bugs on startup"
-set _allow_unacceptable_compiler_bugs 0 "don't bail out if certain bugs are detected (HANDLE WITH CARE)"
-set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
-set loddebug 0 "force this LOD level"
-set spawn_debugview 0 "display spawnpoints and their rating on spawn to debug spawnpoint rating calculation"
-set g_mutatormsg "" "mutator message"
-set speedmeter 0 "print landing speeds"
-set developer_shtest 0 "experimental speedhack detection"
-set waypoint_benchmark 0 "quit after waypoint loading to benchmark bot navigation code"
-set g_debug_bot_commands 0 "print scripted bot commands before executing"
-
-// debug cvars for keyhunt attaching
-set _angles "0 0 0"
-set _origin "0 0 0"
-
-// campaign internal, set when loading a campaign map1G
-set _campaign_index ""
-set _campaign_name ""
-
-// define some engine cvars that we need even on dedicated server
-set r_showbboxes 0
-
-// we REALLY need the end pos nudging DP bug workaround for trace-to-end-of-solid to work
-collision_endposnudge 1
-
-// animation tuning
-set cl_lerpanim_maxdelta_framegroups 0.05 // must be faster than fastest weapon refire
-set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server controlled anim (e.g. animinfo stuff)
-
-// FIXME temporary
-set menu_font_size_snapping_fix 1
-
-// player ID
-seta _cl_userid "" "player ID (e.g. for tournaments)"
-
-// FIXME workaround for engine bug
-sv_gameplayfix_nudgeoutofsolid 0
-// to div0: remove this once 5b7ac1706712977bbc0297d2d53294e73574c7cd (svn r9537) is in the stable branch of the engine again
diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg
new file mode 100644 (file)
index 0000000..b43b813
--- /dev/null
@@ -0,0 +1,1778 @@
+set g_xonoticversion 2.5svn    "Xonotic version (formatted for humans)"
+
+//!<showbrand
+showbrand 3
+echo
+echo A warning about this being a SVN development version was set up.
+echo This build shall be used for development and testing only!
+echo
+echo If you want to disable this warning, add the line
+echo   showbrand 0
+echo to your autoexec.cfg.
+echo
+//!>showbrand
+
+// changes a cvar and reports it to the server (for the menu to notify the
+// server about changes)
+alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
+
+// detect dedicated server or client
+alias "_detect_dedicated_$qport" "$*"
+alias "_detect_dedicated_0" ""
+alias if_dedicated "_detect_dedicated_$qport ${* asis}"
+alias if_client "${* asis}"
+if_dedicated alias if_client ""
+
+seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
+
+// Xonotic version (formatted for machines)
+// used to determine if a client version is compatible
+// this doesn't have to be bumped with every release
+// bump when clients become incompatible or any other perfectly good reason
+// (e.g. game data incompatibility, engine version incompatibility, etc
+// note: this automatically filters the server browser, clients of the new
+// version won't see old servers, and clients of the old version won't see new
+// servers either
+//
+// e.g. Xonotic 1.5.1 RC1 will be 15101
+gameversion 20000
+gameversion_min 20000 // 2.5.2 still used this
+gameversion_max 20699 // 2.5 version allows any 2.6 release, but no more
+
+// compatibility guideline:
+//   version a.b.c   = a0b0c
+//   gameversion_min = a0(b-1)00 // show servers of the previous "line"
+//   gameversion_max = a0(b+1)99 // show servers of the next "line"
+// example: 2.6.3
+//   gameversion 20603
+//   gameversion_min 20500
+//   gameversion_max 20799
+// however, in 2.5.x, we will:
+//   gameversion = 20000 // let other 2.5 clients connect
+//   gameversion_min = 20000 // 2.5.x still has this, we cannot block it within 2.5
+// however, in 2.6.x, we will just:
+//   gameversion_min = 20000 // show 2.5 servers
+
+// say aliases
+alias asay_ctf_flagcarrier "say_team flag carrier at %y"
+alias asay_ctf_haveflag "say_team (%l) have the flag"
+alias asay_willgo "say_team will go to %y"
+alias asay_support "say_team (%l) need help, %h%%"
+alias asay_killed "say_team got killed at %d"
+alias asay_noammo "say_team (%l) need %W for %w"
+alias asay_drop "say_team (%l) dropped %w ; impulse 17"
+
+// other aliases
+alias +hook +button6
+alias -hook -button6
+alias ready "cmd ready"
+alias lockteams "sv_cmd lockteams"
+alias unlockteams "sv_cmd unlockteams"
+alias nospectators "sv_cmd nospectators"
+alias cointoss "sv_cmd cointoss"
+alias timeout "cmd timeout" //use this command to call a timeout
+alias timein "cmd timein" //use this command to resume the game before timeout is finished
+
+alias bsp "ls maps/*.bsp"
+alias chmap "changelevel $*"
+alias gotomap "sv_cmd gotomap \"$1\""
+
+alias rec "record demos/$1"
+alias ply "playdemo $1"
+alias tdem "timedemo $1"
+
+alias dropweapon "impulse 17"
+alias +show_info +button7
+alias -show_info -button7
+
+alias team_red "cmd selectteam red; cmd join"
+alias team_blue "cmd selectteam blue; cmd join"
+alias team_pink "cmd selectteam pink; cmd join"
+alias team_yellow "cmd selectteam yellow; cmd join"
+alias team_auto "cmd selectteam auto; cmd join"
+bind f6 team_auto
+
+alias movetoteam_red "sv_cmd movetoteam $1 red"
+alias movetoteam_blue "sv_cmd movetoteam $1 blue"
+alias movetoteam_pink "sv_cmd movetoteam $1 pink"
+alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
+alias movetoteam_auto "sv_cmd movetoteam $1 auto"
+
+// merge lightmaps up to 1024x1024 textures
+// the default of 2048x2048 is too heavy for my rig (SavageX)
+mod_q3bsp_lightmapmergepower 3
+
+// player defaults
+_cl_color 102
+_cl_name Player
+_cl_playermodel models/player/marine.zym
+_cl_playerskin 0
+crosshair 1
+seta crosshair_per_weapon 0    "when 1, each gun will display a different crosshair"
+seta crosshair_color_override 0        "when 1, crosshair_color_* overrides the per-weapon color"
+seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
+seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
+seta crosshair_hittest 1 "do a crosshair hit evaluation; also, the crosshair is scaled by the given number when aiming at an enemy, and blurred when aiming at a team mate"
+seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
+seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
+seta crosshair_laser ""        "crosshair to display when wielding the laser"
+seta crosshair_laser_color_red 1       "crosshair color red component to display when wielding the laser"
+seta crosshair_laser_color_green 0.35  "crosshair color green component to display when wielding the laser"
+seta crosshair_laser_color_blue 0.2    "crosshair color blue component to display when wielding the laser"
+seta crosshair_laser_color_alpha 0.75  "crosshair alpha value to display when wielding the laser"
+seta crosshair_laser_size 0.4  "crosshair size when wielding the laser"
+seta crosshair_shotgun ""      "crosshair to display when wielding the shotgun"
+seta crosshair_shotgun_color_red 0.7   "crosshair color red component to display when wielding the shotgun"
+seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
+seta crosshair_shotgun_color_blue 0.7  "crosshair color blue component to display when wielding the shotgun"
+seta crosshair_shotgun_color_alpha 1.1 "crosshair alpha value to display when wielding the shotgun"
+seta crosshair_shotgun_size 0.65       "crosshair size when wielding the shotgun"
+seta crosshair_uzi ""  "crosshair to display when wielding the machinegun"
+seta crosshair_uzi_color_red 0.4       "crosshair color red component to display when wielding the machinegun"
+seta crosshair_uzi_color_green 0.9     "crosshair color green component to display when wielding the machinegun"
+seta crosshair_uzi_color_blue 0.35     "crosshair color blue component to display when wielding the machinegun"
+seta crosshair_uzi_color_alpha 0.9     "crosshair alpha value to display when wielding the machinegun"
+seta crosshair_uzi_size 0.6    "crosshair size when wielding the machinegun"
+seta crosshair_grenadelauncher ""      "crosshair to display when wielding the mortar"
+seta crosshair_grenadelauncher_color_red 1     "crosshair color red component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color_green 0.15        "crosshair color green component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color_blue 0    "crosshair color blue component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color_alpha 1.15        "crosshair alpha value to display when wielding the mortar"
+seta crosshair_grenadelauncher_size 0.7        "crosshair size when wielding the mortar"
+seta crosshair_electro ""      "crosshair to display when wielding the electro"
+seta crosshair_electro_color_red 0.35  "crosshair color red component to display when wielding the electro"
+seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
+seta crosshair_electro_color_blue 1    "crosshair color blue component to display when wielding the electro"
+seta crosshair_electro_color_alpha 1   "crosshair alpha value to display when wielding the electro"
+seta crosshair_electro_size 0.5        "crosshair size when wielding the electro"
+seta crosshair_crylink ""      "crosshair to display when wielding the crylink"
+seta crosshair_crylink_color_red 0.85  "crosshair color red component to display when wielding the crylink"
+seta crosshair_crylink_color_green 0.25        "crosshair color green component to display when wielding the crylink"
+seta crosshair_crylink_color_blue 1    "crosshair color blue component to display when wielding the crylink"
+seta crosshair_crylink_color_alpha 0.85        "crosshair alpha value to display when wielding the crylink"
+seta crosshair_crylink_size 0.4        "crosshair size when wielding the crylink"
+seta crosshair_nex ""  "crosshair to display when wielding the nex gun"
+seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
+seta crosshair_nex_color_green 0.9     "crosshair color green component to display when wielding the nex gun"
+seta crosshair_nex_color_blue 1        "crosshair color blue component to display when wielding the nex gun"
+seta crosshair_nex_color_alpha 0.85    "crosshair alpha value to display when wielding the nex gun"
+seta crosshair_nex_size 0.65   "crosshair size when wielding the nex gun"
+seta crosshair_hagar ""        "crosshair to display when wielding the hagar"
+seta crosshair_hagar_color_red 0.85    "crosshair color red component to display when wielding the hagar"
+seta crosshair_hagar_color_green 0.5   "crosshair color green component to display when wielding the hagar"
+seta crosshair_hagar_color_blue 0.35   "crosshair color blue component to display when wielding the hagar"
+seta crosshair_hagar_color_alpha 1     "crosshair alpha value to display when wielding the hagar"
+seta crosshair_hagar_size 0.8  "crosshair size when wielding the hagar"
+seta crosshair_rocketlauncher ""       "crosshair to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color_red 1      "crosshair color red component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color_blue 0.2   "crosshair color blue component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color_alpha 1    "crosshair alpha value to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_size 0.5875      "crosshair size when wielding the rocketlauncher"
+seta crosshair_porto ""        "crosshair to display when wielding the porto"
+seta crosshair_porto_color_red 0.5     "crosshair color red component to display when wielding the porto"
+seta crosshair_porto_color_green 1     "crosshair color green component to display when wielding the porto"
+seta crosshair_porto_color_blue 0.5    "crosshair color blue component to display when wielding the porto"
+seta crosshair_porto_color_alpha 0.85  "crosshair alpha value to display when wielding the porto"
+seta crosshair_porto_size 0.6  "crosshair size when wielding the porto"
+seta crosshair_minstanex ""    "crosshair to display when wielding the minstanex gun"
+seta crosshair_minstanex_color_red 0.65        "crosshair color red component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color_green 0.65      "crosshair color green component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color_blue 1  "crosshair color blue component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color_alpha 1 "crosshair alpha value to display when wielding the minstanex gun"
+seta crosshair_minstanex_size 0.4      "crosshair size when wielding the minstanex gun"
+seta crosshair_hook "" "crosshair to display when wielding the hook"
+seta crosshair_hook_color_red 0.65     "crosshair color red component to display when wielding the hook"
+seta crosshair_hook_color_green 1      "crosshair color green component to display when wielding the hook"
+seta crosshair_hook_color_blue 0.85    "crosshair color blue component to display when wielding the hook"
+seta crosshair_hook_color_alpha 0.85   "crosshair alpha value to display when wielding the hook"
+seta crosshair_hook_size 0.5   "crosshair size when wielding the hook"
+seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
+seta crosshair_hlac_color_red 1        "crosshair color red component to display when wielding the H.L.A.C."
+seta crosshair_hlac_color_green 0.65   "crosshair color green component to display when wielding the H.L.A.C."
+seta crosshair_hlac_color_blue 0.2     "crosshair color blue component to display when wielding the H.L.A.C."
+seta crosshair_hlac_color_alpha 1      "crosshair alpha value to display when wielding the H.L.A.C."
+seta crosshair_hlac_size 0.6   "crosshair size when wielding the H.L.A.C."
+seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
+seta crosshair_campingrifle_color_red 0.85     "crosshair color red component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color_green 0.5    "crosshair color green component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color_blue 0.25    "crosshair color blue component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color_alpha 1      "crosshair alpha value to display when wielding the campingrifle"
+seta crosshair_campingrifle_size 0.65  "crosshair size when wielding the campingrifle"
+seta crosshair_campingrifle_ring_size 1.5      "bullet counter ring size around campingrifle crosshair, multiple of crosshair_campingrifle_size"
+seta crosshair_tuba "" "crosshair to display when wielding the tuba"
+seta crosshair_tuba_color_red 0.85     "crosshair color red component to display when wielding the tuba"
+seta crosshair_tuba_color_green 0.5    "crosshair color green component to display when wielding the tuba"
+seta crosshair_tuba_color_blue 0.25    "crosshair color blue component to display when wielding the tuba"
+seta crosshair_tuba_color_alpha 1      "crosshair alpha value to display when wielding the tuba"
+seta crosshair_tuba_size 1     "crosshair size when wielding the tuba"
+seta crosshair_fireball ""     "crosshair to display when wielding the fireball"
+seta crosshair_fireball_color_red 0.2  "crosshair color red component to display when wielding the fireball"
+seta crosshair_fireball_color_green 1.0        "crosshair color green component to display when wielding the fireball"
+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"
+fov 90
+seta cl_velocityzoom 0 "velocity based zooming of fov, negative values zoom out"
+seta cl_velocityzoomtime 0.3   "time value for averaging speed values"
+seta cl_zoomfactor 5   "how much +zoom will zoom (1-16)"
+seta cl_zoomspeed 3.5  "how fast it will zoom (0.5-16), negative values mean instant zoom"
+seta cl_zoomsensitivity 0      "how zoom changes sensitivity (0 = weakest, 1 = strongest)"
+freelook 1
+sensitivity 6
+v_gamma 1.125000
+viewsize 100
+bgmvolume 1
+volume 0.5
+// fullscreen 1024x768x32bit
+vid_bitsperpixel 32
+vid_fullscreen 1
+vid_width 1024
+vid_height 768
+vid_pixelheight 1
+seta menu_vid_width 1024
+seta menu_vid_height 768
+seta menu_vid_pixelheight 1
+seta menu_vid_scale 0
+// 2D resolution 800x600
+vid_conwidth 800
+vid_conheight 600
+// menu_conwidth, menu_conheight are set inside quake.rc
+v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
+
+// these settings determine how much the view is affected by movement/damage
+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_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_rollangle 0 // amount of view tilt when strafing, default is 2.0
+v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
+gl_polyblend 0.5 // whether to use screen tints, default is 1
+r_motionblur 0 // motion blur value, default is 0
+r_damageblur 0 // motion blur when damaged, default is 0
+
+seta vid_x11_display ""        "xonotic-linux-*.sh will use this to start xonotic on an other/new X display"
+// This can have three possible settings:
+//     ""              run as usual
+//     ":n"            use DISPLAY=:n, create it if needed
+//     ":n/layout"     use DISPLAY=:n, create it if needed with ServerLayout layout
+
+cl_autodemo_nameformat demos/%Y-%m-%d_%H-%M
+
+// taunts and voices
+seta cl_autotaunt 0 "automatically taunt enemies when fragging them"
+seta sv_taunt 1 "allow taunts on the server"
+seta sv_autotaunt 1 "allow autotaunts on the server"
+seta cl_voice_directional 1    "0 = all voices are non-directional, 1 = all voices are directional, 2 = only taunts are directional"
+seta cl_voice_directional_taunt_attenuation 0.5 "this defines the distance from which taunts can be heared"
+
+// server settings
+hostname "Xonotic $g_xonoticversion Server"
+set sv_mapchange_delay 5
+set minplayers 0 "number of players playing at the same time (if not enough real players are there the remaining slots are filled with bots)"
+sv_cullentities_trace 1
+r_cullentities_trace 1
+
+// restart server if all players hit "ready"-button
+set sv_ready_restart 0 "if set to 1 allow a map to be restarted once all players pressed the \"ready\" button'"
+set sv_ready_restart_after_countdown 0 "if set to 1 the players and map items are reset after the countdown ended, otherwise they're reset already at the beginning of the countdown"
+set sv_ready_restart_repeatable 0      "allows the players to restart the game as often as needed"
+
+//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
+set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
+
+set g_maxplayers 0     "maximum number of players allowed to play at the same time, set to 0 to allow all players to join the game"
+set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectators\" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked"
+
+//tournament mod
+set g_warmup 0 "split the game into a warmup- and match-stage when set to 1"
+set g_warmup_limit 60  "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)"
+set g_warmup_allow_timeout 0   "if set to 1 timeouts can also be called in the warmup-stage, when sv_timeout is set to 1"
+set g_warmup_allguns 0 "if set players start with all guns in warmup mode"
+
+set g_chat_nospectators 0      "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
+set sv_vote_nospectators 0     "if set only players can call a vote (thus spectators and observers can't call a vote)"
+
+alias g_tourney "g_tourney_$1"
+alias g_tourney_1 "g_warmup 1; g_chat_nospectators 2; sv_vote_nospectators 1"
+alias g_tourney_0 "g_warmup 0; g_chat_nospectators 0; sv_vote_nospectators 0"
+
+set sv_timeout 0       "allows a player to call a timeout, this will pause the game for some time"
+set sv_timeout_length 120      "how long the game will be paused at max, in seconds"
+set sv_timeout_number 2        "how many timeouts one player is allowed to call (gets reset after a restart)"
+set sv_timeout_leadtime 4      "how long the players will be informed that a timeout was called before it starts, in seconds"
+set sv_timeout_resumetime 3    "how long the remaining timeout-time will be after a player called the timein command"
+
+set g_allow_oldnexbeam 0 "If enabled, clients are allowed to use old v2.3 Nexgun beam"
+seta cl_particles_oldnexbeam 0 "Uses the old v2.3 Nexgun beam instead of the new beam, only works if server allows it (g_allow_oldnexbeam 1)"
+set sv_qcweaponanimation 0
+
+set g_telefrags 1
+set g_telefrags_avoid 0
+set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
+
+// fragmessage: This allows extra information to be displayed with the frag centerprints. 
+set sv_fragmessage_information_ping 0 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
+set sv_fragmessage_information_handicap 1 "Enable handicap display information, 0 = Never display; 1 = Only when the player has handicap on; 2 = Always display (Displays Off if off)"
+set sv_fragmessage_information_stats 0 "Enable statistics (health/armor) display information, 0 = Never display; 1 = Always display (Only available for the person who was killed)"
+set sv_fragmessage_information_typefrag 1 "Enable typefrag display information, 0 = Never display; 1 = Always display"
+
+// use default physics
+set sv_friction_on_land 0
+exec physics26.cfg
+
+set sv_player_viewoffset "0 0 35" "view offset of the player model"
+set sv_player_mins "-16 -16 -24" "playermodel mins"
+set sv_player_maxs "16 16 45" "playermodel maxs"
+set sv_player_crouch_viewoffset "0 0 15" "view offset of the player model when crouched"
+set sv_player_crouch_mins "-16 -16 -24" "mins of a crouched playermodel"
+set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel"
+
+set sv_pogostick 1 "don't require releasing the space bar for jumping again"
+set sv_doublejump 0 "allow Quake 2-style double jumps"
+set sv_jumpspeedcap_min "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
+set sv_jumpspeedcap_max "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
+set sv_jumpspeedcap_max_disable_on_ramps 0 "disable max jumpspeedcap on ramps to preserve the old rampjump style"
+
+seta sv_precacheplayermodels 1
+seta sv_precacheweapons 0
+seta sv_precacheitems 0
+set sv_spectator_speed_multiplier 1.5
+seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
+seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
+seta sv_defaultplayermodel "models/player/nexus.zym" "default model selection, only works if sv_defaultcharacter is set to 1"
+seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1"
+seta sv_defaultplayermodel_red ""      "\"\" means see sv_defaultplayermodel"
+seta sv_defaultplayerskin_red 0
+seta sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
+seta sv_defaultplayerskin_blue 0
+seta sv_defaultplayermodel_yellow "" "\"\" means see sv_defaultplayermodel"
+seta sv_defaultplayerskin_yellow 0
+seta sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
+seta sv_defaultplayerskin_pink 0
+seta sv_defaultplayercolors "" "set to 16*shirt+pants to force a color, note: it does NOT depend on defaultcharacter! Set to \"\" to disable"
+set sv_autoscreenshot 0 "if set to 1, the server forces all clients to create a local screenshot once the map ended"
+net_messagetimeout 300
+net_connecttimeout 30
+sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
+set ekg 0      "Throw huge amounts of gibs"
+
+cl_movement 1
+cl_stairsmoothspeed 200
+cl_forwardspeed $sv_maxspeed
+cl_backspeed $sv_maxspeed
+cl_sidespeed $sv_maxspeed
+cl_upspeed $sv_maxspeed
+cl_movement_accelerate $sv_accelerate
+cl_movement_airaccel_qw $sv_airaccel_qw
+cl_movement_airaccel_sideways_friction $sv_airaccel_sideways_friction
+cl_movement_airaccelerate $sv_airaccelerate
+cl_movement_edgefriction $edgefriction
+cl_movement_friction $sv_friction
+cl_movement_jumpvelocity $sv_jumpvelocity
+cl_movement_maxairspeed $sv_maxairspeed
+cl_movement_maxspeed $sv_maxspeed
+cl_movement_stepheight $sv_stepheight
+cl_movement_stopspeed $sv_stopspeed
+cl_movement_track_canjump 0 // till DP bug gets fixed
+cl_movement_wallfriction $sv_wallfriction
+cl_movement_wateraccelerate $sv_wateraccelerate
+cl_movement_waterfriction $sv_waterfriction
+
+seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they are better than what you are carrying"
+alias autoswitch "set cl_autoswitch $1 ; cmd autoswitch $1"
+
+set bot_config_file bots.txt "Name and path of the bot configuration file"
+set bot_number 0       "Minimum number of bots"
+seta bot_usemodelnames 0       "Use player model names for bot names"
+set bot_nofire 0       "When set, bots never fire. Mainly for testing in g_waypointeditor mode"
+seta bot_prefix [BOT]  "Prefix in front of the bot names"
+seta bot_suffix ""     "Suffix behind the bot names"
+seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"
+// general bot AI cvars
+set bot_ai_thinkinterval 0.05
+set bot_ai_strategyinterval 3 "How often a new objective is chosen"
+set bot_ai_enemydetectioninterval 0.5 "How often bots pick a new target"
+set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
+set bot_ai_dodgeupdateinterval 0.1 "How often scan for items to dodge. Currently not in use."
+set bot_ai_chooseweaponinterval 0.3 "How often the best weapon according to the situation will be chosen"
+set bot_ai_dangerdetectioninterval 0.1 "How often scan for waypoints with dangers near"
+set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
+set bot_ai_aimskill_blendrate 2        "How much correction will be applied to the aiming angle"
+set bot_ai_aimskill_fixedrate 15
+set bot_ai_aimskill_firetolerance_distdegrees 180
+set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
+set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
+set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
+set bot_ai_keyboard_distance 250 "Keyboard emulation is disabled after this distance to the goal"
+set bot_ai_keyboard_treshold 0.57
+set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
+set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
+set bot_ai_custom_weapon_priority_distances "300 850"  "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
+set bot_ai_custom_weapon_priority_far   "minstanex nex campingrifle rocketlauncher grenadelauncher electro hagar hlac crylink laser uzi fireball shotgun tuba" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba hagar crylink grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority"
+set bot_ai_weapon_combo 1      "Enable bots to do weapon combos"
+set bot_ai_weapon_combo_threshold 0.3  "Try to make a combo N seconds after the last attack"
+set bot_ai_friends_aware_pickup_radius "500"   "Bots will not pickup items if a team mate is this distance near the item"
+set bot_ai_ignoregoal_timeout 3        "Ignore goals making bots to get stuck in front of a wall for N seconds"
+set bot_ai_bunnyhop_skilloffset 7      "Bots with skill equal or greater than this value will perform the  \"bunnyhop\" technique"
+set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance"
+set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal"
+set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"
+set bot_god 0 "god mode for bots"
+set bot_ai_navigation_jetpack 0 "Enable bots to navigat maps using the jetpack"
+set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
+// Better don't touch these, there are hard to tweak!
+set bot_ai_aimskill_order_mix_1st 0.01 "Amount of the 1st filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_2nd 0.1 "Amount of the 1st filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_3th 0.01 "Amount of the 1st filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_4th 0.05 "Amount of the 1st filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_5th 0.01 "Amount of the 1st filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_filter_1st 0.4 "Position filter"
+set bot_ai_aimskill_order_filter_2nd 0.4 "Movement filter"
+set bot_ai_aimskill_order_filter_3th 0.2 "Acceleration filter"
+set bot_ai_aimskill_order_filter_4th 0.4 "Position prediction filter. Used rarely"
+set bot_ai_aimskill_order_filter_5th 0.5 "Movement prediction filter. Used rarely"
+
+// waypoint editor enable
+set g_waypointeditor 0
+set bot_ignore_bots 0  "When set, bots don't shoot at other bots"
+set bot_join_empty 0   "When set, bots also play if no player has joined the server"
+set bot_vs_human 0     "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count)"
+
+alias g_waypointeditor_spawn "impulse 103"
+alias g_waypointeditor_remove "impulse 104"
+alias g_waypointeditor_relinkall "impulse 105"
+alias g_waypointeditor_saveall "impulse 106"
+alias g_waypointeditor_unreachable "impulse 107"
+
+locs_enable 0
+pausable 0
+seta g_spawnshieldtime 0.3 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
+seta g_antilag 2       "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
+set g_antilag_nudge 0 "don't touch"
+set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
+set g_shootfromclient 1 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed, and defaulted to, too; see also cl_gunalign"
+set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
+set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
+set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
+set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
+set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)"
+set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
+set g_powerup_superhealth 1 "if set to 0 the mega health powerup will not spawn on the map"
+set g_powerup_strength 1 "if set to 0 the strength powerup will not spawn on the map"
+set g_powerup_shield 1 "if set to 0 the shield (invincibility) powerup will not spawn on the map"
+set g_balance_powerup_timer 1 "if set to 0 the powerups dont wear off"
+set g_use_ammunition 1 "if set to 0 all weapons you pick up have unlimited ammunition"
+set g_pickup_items 1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map"
+set g_minstagib 0      "enable minstagib"
+set g_minstagib_extralives 2   "how many extra lives you will get per powerup"
+set g_minstagib_ammo_start 10  "starting ammo"
+set g_minstagib_ammo_drop 5    "how much ammo you'll get for weapons or cells"
+set g_minstagib_invis_alpha 0.15
+set g_minstagib_speed_jumpheight 1.8 "jump height multiplier that applies while you carry the invincibility powerup"
+set g_minstagib_speed_moverate 1.25 "speed-multiplier that applies while you carry the invincibility powerup"
+set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
+set g_weaponarena "0"  "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
+set g_weaponarena_random "0"   "if set to a number, only that weapon count is given on every spawn (randomly)"
+set g_laserguided_missile 0 "if set to 1 the rockets of the rocket launcher can be steered using a laserpointer"
+set g_midair 0 "if set to 1 you can only apply damage to your opponent while he is airborne"
+set g_midair_shieldtime 0.3 "number of seconds you are still invincible since you lost contact to the ground"
+set g_spawnsound 1 "set to 0 if you don't want to hear the spawn sound when a player spawns"
+set g_spawnpoints_autodrop 0 "if set to 1, automatically drop spawn point locations if they were placed too high"
+set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid"
+set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once <g_respawn_delay> seconds are over"
+set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)"
+set g_fullbrightitems 0 "brightens up items"
+set g_nodepthtestplayers 0 "disables depth testing on players"
+set g_nodepthtestitems 0 "disables depth testing on items"
+set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"
+set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"
+set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"
+seta g_maplist_mostrecent_count 3      "number of most recent maps that are blocked from being played again"
+seta g_maplist "accident aggressor aneurysm basement basementctf bleach bloodprison bloodprisonctf bluesky cyberparcour01 darkzone desertfactory dieselpower downer eggandbacon evilspace farewell final_rage nr_piece-o-cake ons-reborn racetrack reslimed ruiner runningman runningman_1on1remix runningmanctf silvercity skyway slimepit soylent starship stormkeep2 strength toxic warfare"
+seta g_maplist_index 0 "this is used internally for saving position in maplist cycle"
+seta g_maplist_selectrandom 0  "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
+seta g_maplist_shuffle 1       "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list"
+set g_maplist_check_waypoints 0        "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
+set samelevel 0 "when 1, always play the same level over and over again"
+set g_maxpushtime 8.0 "timeout for kill credit when your damage knocks someone into a death trap"
+
+set g_cloaked 0 "display all players mostly invisible"
+set g_player_alpha 1
+set g_player_brightness 0      "set to 2 for brighter players"
+seta g_balance_cloaked_alpha 0.25
+
+set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
+
+set welcome_message_time 8
+
+alias clearmap "disconnect"
+
+set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
+
+set leadlimit 0
+
+// this means that timelimit can be overidden globally and fraglimit can be overidden for each game mode: DM/TDM, Domination, CTF, and Runematch.
+seta timelimit_override -1     "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta fraglimit_override -1     "Frag limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta leadlimit_override -1     "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta capturelimit_override -1  "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta captureleadlimit_override -1      "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_ctf_capture_limit -1    "CTF capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_ctf_capture_leadlimit -1        "CTF capture lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_arena_point_limit -1    "Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_arena_point_leadlimit -1        "Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_domination_point_limit -1       "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_domination_point_leadlimit -1   "Domination point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_runematch_point_limit -1        "Runematch point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_runematch_point_leadlimit -1    "Runematch point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_keyhunt_point_limit -1  "Keyhunt point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_keyhunt_point_leadlimit -1      "Keyhunt point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_race_laps_limit -1      "Race laps limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_nexball_goallimit -1 "Nexball goal limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+seta g_nexball_goalleadlimit -1 "Nexball goal lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+
+seta g_ctf_win_mode 0  "0: captures only, 1: captures, then points, 2: points only"
+seta g_ctf_ignore_frags 0      "1: regular frags give no points"
+
+// 50% of the spawns shall be far away from any players
+set g_spawn_furthest 0.5
+// respawn delay
+set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
+set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
+// when variables are set to 0, they take over the global setting...
+// to force disable delay or waves, set them to 0.125
+set g_ctf_respawn_delay 0
+set g_ctf_respawn_waves 0
+set g_dm_respawn_delay 0
+set g_dm_respawn_waves 0
+set g_dom_respawn_delay 0
+set g_dom_respawn_waves 0
+set g_lms_respawn_delay 0
+set g_lms_respawn_waves 0
+set g_rune_respawn_delay 0
+set g_rune_respawn_waves 0
+set g_tdm_respawn_delay 0
+set g_tdm_respawn_waves 0
+set g_kh_respawn_delay 0
+set g_kh_respawn_waves 0
+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_nexball_respawn_delay 0
+set g_nexball_respawn_waves 0
+set g_as_respawn_delay 0
+set g_as_respawn_waves 0
+set g_ons_respawn_delay 0
+set g_ons_respawn_waves 0
+set g_rc_respawn_waves 0
+set g_rc_respawn_delay 0
+set g_cts_respawn_waves 0
+set g_cts_respawn_delay 0
+set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
+
+// overtime
+seta timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
+seta timelimit_overtimes 0 "how many overtimes to add at max"
+seta timelimit_suddendeath 5 "number of minutes suddendeath mode lasts after all overtimes were added and still no winner was found"
+
+// common team values
+set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
+
+seta teamplay_default 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
+seta g_mirrordamage 0.3        "for teamplay 4: mirror damage factor"
+seta g_friendlyfire 0.1        "for teamplay 4: fiendly fire factor"
+seta g_teamdamage_threshold 50 "for teamplay 4: threshold over which to apply mirror damage"
+seta g_teamdamage_resetspeed 30        "for teamplay 4: how fast player's teamdamage count decreases"
+
+set deathmatch_force_teamplay 0        "Always play TDM instead of DM"
+seta g_balance_teams 0 "automatically balance out players entering instead of asking them for their preferred team"
+seta g_balance_teams_force 0   "automatically balance out teams when players move or disconnect"
+seta g_balance_teams_prevent_imbalance 0       "prevent players from changing to larger teams"
+set g_tdm_teams 2 "how many teams are in team deathmatch (set by mapinfo)"
+seta g_tdm_teams_override 0    "how many teams are in team deathmatch"
+set g_tdm_team_spawns 0 "when 1, a map can define team spawnpoints for TDM"
+set g_changeteam_banned 0      "not allowed to change team"
+set g_changeteam_fragtransfer 0        "% of frags you get to keep when you change teams (rounded down)"
+
+set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"
+
+// dm
+set g_dm 1 "Deathmatch: killing any other player is one frag, player with most frags wins"
+set gamecfg 1  // "deathmatch"
+
+// ctf
+set g_ctf 0 "Capture The Flag: take the enemy flag and bring it to yours at your base to score"
+set g_ctf_flag_returntime 30
+set g_ctf_flagcarrier_selfdamage 1
+set g_ctf_flagcarrier_selfforce 1
+set g_ctf_fullbrightflags 0
+set g_ctf_dynamiclights 0
+set g_ctf_allow_drop 1 "dropping allows circumventing carrierkill score, so enable this with care!"
+set g_ctf_reverse 0    "when 1, bases/flags are switched :P you have to capture your OWN flag by bringing it to the ENEMY's"
+set g_balance_ctf_delay_collect 1.0
+set g_balance_ctf_damageforcescale 1
+
+set g_ctf_shield_max_ratio 0   "shield at most 0% of a team from the enemy flag (try: 0.4 for 40%)"
+set g_ctf_shield_min_negscore 20       "shield the player from the flag if he's got -20 points or less"
+set g_ctf_shield_force 100     "push force of the shield"
+
+// fun for server admins
+set g_ctf_flag_red_model "models/ctf/flags.md3"
+set g_ctf_flag_red_skin 0
+set g_ctf_flag_blue_model "models/ctf/flags.md3"
+set g_ctf_flag_blue_skin 1
+set g_ctf_flag_glowtrails 0
+set g_ctf_flag_pickup_effects 1
+set g_ctf_flag_capture_effects 1
+set g_ctf_captimerecord_always 0 "if enabled, assisted CTF records (with other players on the server) are recorded too"
+
+exec ctfscoring-ai.cfg
+
+// runematch
+set g_runematch                                                0 "Runematch: pick up and hold the runes, special items that give you points, a special power (rune) and a disadvantage (curse)"
+set g_runematch_pointrate                              5
+set g_runematch_fixedspawns                            1 "use fixed runematch spawns if available"
+set g_runematch_pointamt                                       1
+set g_runematch_shuffletime                            30 "how often runes change position"
+set g_runematch_respawntime                            15 "how soon after being dropped to respawn"
+set g_runematch_frags_killedby_runeholder              4
+set g_runematch_frags_killed_runeholder                        5
+set g_runematch_frags_norune                           0
+set g_runematch_drop_runes_max                         2 "only drop up to 2 runes, the rest should respawn"
+set g_runematch_allow_same                             0 "allow matching rune-curse pairs"
+set g_runematch_rune_alpha                             0.78
+set g_runematch_rune_effects                           544 "EF_ADDITIVE + EF_FULLBRIGHT = 544"
+set g_runematch_rune_glow_size                         0
+set g_runematch_rune_glow_color                                0
+set g_runematch_rune_color_strength                    1.0
+// strength/weakness
+set g_balance_rune_strength_damage                     2.0
+set g_balance_rune_strength_force                      1.5
+set g_balance_curse_weak_damage                                0.5
+set g_balance_curse_weak_force                         0.6
+set g_balance_rune_strength_combo_damage       0.9
+set g_balance_rune_strength_combo_force                        1.0
+// defense/vulner
+set g_balance_rune_defense_takedamage                  0.5
+set g_balance_curse_vulner_takedamage                  2.0
+set g_balance_rune_defense_combo_takedamage            1.0
+// vampire/empathy
+set g_balance_rune_vampire_absorb                      0.4
+set g_balance_curse_empathy_takedamage                 -0.4
+set g_balance_rune_vampire_combo_absorb                        -0.1
+set g_balance_rune_vampire_maxhealth                   500
+set g_balance_curse_empathy_minhealth                  20
+set g_balance_rune_vampire_combo_minhealth             40
+// regen/venom
+set g_balance_rune_regen_hpmod                         1.75
+set g_balance_curse_venom_hpmod                                0.6
+set g_balance_rune_regen_combo_hpmod                   0.9
+set g_balance_rune_regen_regenrate                     3.0
+set g_balance_curse_venom_rotrate                      3.0
+set g_balance_rune_regen_combo_regenrate       0.5
+set g_balance_rune_regen_combo_rotrate                 1.5
+set g_balance_rune_regen_limitmod                      1
+set g_balance_curse_venom_limitmod                     1
+set g_balance_rune_regen_combo_limitmod                        1
+// speed/slow
+set g_balance_rune_speed_atkrate                               0.66
+set g_balance_curse_slow_atkrate                               1.5
+set g_balance_rune_speed_combo_atkrate                 1.2
+set g_balance_rune_speed_moverate                      1.25
+set g_balance_curse_slow_moverate                      0.8
+set g_balance_rune_speed_combo_moverate                        0.9
+set g_balance_rune_speed_jumpheight                    1.4
+set g_balance_curse_slow_jumpheight                    1.0
+set g_balance_rune_speed_combo_jumpheight              1.0
+
+// domination
+set g_domination                       0 "Domination: capture and hold control points to gain points"
+set g_domination_default_teams         2 "default number of teams for maps that aren't domination-specific"
+seta g_domination_teams_override               0 "use a specific number of teams in domination games (minimum 2), disables dom_team entities"
+set g_domination_disable_frags         0 "players can't get frags normally, only get points from kills"
+set g_domination_point_amt             0 "override: how many points to get per ping"
+set g_domination_point_fullbright      0 "domination point fullbright"
+set g_domination_point_rate            0 "override: how often to give those points"
+set g_domination_point_capturetime     0.1 "how long it takes to capture a point (given no interference)"
+set g_domination_point_glow            0 "domination point glow (warning, slow)"
+//set g_domination_balance_team_points 1 "# of points received is based on team sizes"
+
+// last man standing
+set g_lms 0 "Last Man Standing: everyone starts with a certain amount of lives, and the survivor wins"
+set g_lms_lives_override -1
+set g_lms_regenerate 0
+set g_lms_campcheck_interval 10
+set g_lms_campcheck_message "^1Don't camp!"
+set g_lms_campcheck_damage 100
+set g_lms_campcheck_distance 1800
+set g_lms_last_join 3  "if g_lms_join_anytime is false, new players can only join if the worst active player has more than (fraglimit - g_lms_last_join) lives"
+set g_lms_join_anytime 1       "if true, new players can join, but get same amount of lives as the worst player"
+
+// arena
+set g_arena 0 "Arena: many one-on-one rounds are played to find the winner"
+set g_arena_maxspawned 2       "maximum number of players to spawn at once (the rest is spectating, waiting for their turn)"
+set g_arena_roundbased 1       "if disabled, the next player will spawn as soon as someone dies"
+set g_arena_warmup 5   "time, newly spawned players have to prepare themselves in round based matches"
+set g_arena_powerups 0 "enables powerups (superhealth, strength and shield), which are removed by default"
+
+// ca
+set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round."
+set g_ca_point_limit 10 "point limit 10 is standard for clan arena"
+set g_ca_point_leadlimit 0
+set g_ca_warmup 10 "how long the players will have time to run around the map before the round starts"
+
+// onslaught
+set g_onslaught 0 "Onslaught: take control points towards the enemy generator and then destroy it"
+set g_onslaught_gen_health 5000
+set g_onslaught_cp_health 1000
+set g_onslaught_cp_buildhealth 100
+set g_onslaught_cp_buildtime 10
+set g_onslaught_cp_regen 20
+
+// assault
+set g_assault 0 "Assault: attack the enemy base as fast as you can, then defend the base against the enemy for that time to win"
+
+// race
+set g_race 0 "Race: be faster than your opponents"
+set g_race_qualifying_timelimit 0
+set g_race_qualifying_timelimit_override -1
+set g_race_teams 0     "when 2, 3, or 4, the race is played as a team game (the team members can add up their laps)"
+
+// cts
+set g_cts 0 "CTS: complete the stage"
+
+// nexball
+set g_nexball 0 "Nexball: Basketball and Soccer go Xonotic"
+
+set g_nexball_basketball_effects_default     8    "default: dim light. The original version used 1024 (fire) but it gives bad performance"
+set g_balance_nexball_primary_speed       1000    "launching speed"
+set g_balance_nexball_primary_refire         0.7  "launching refire"
+set g_balance_nexball_primary_animtime       0.3  "launching animtime"
+set g_balance_nexball_secondary_animtime     0.3  "launching animtime"
+set g_balance_nexball_secondary_speed     3000    "stealing projectile speed"
+set g_balance_nexball_secondary_lifetime     0.15 "stealing projectile lifetime"
+set g_balance_nexball_secondary_force      500    "stealing projectile force"
+set g_balance_nexball_secondary_refire       0.6  "stealing projectile refire"
+set g_balance_nexball_secondary_animtime     0.3  "stealing projectile animtime"
+
+// -1: MrBougo's first try, not very playable but working...
+//     The ball gets the player's velocity * 1.5 + a vertical boost
+//  0: Revenant style
+//     Player's velocity + a boost where he's looking at + a boost
+//     perpendicularly to the first boost, that is upwards relatively
+//     to the view angle
+//  1: MrBougo's modded Rev style 1
+//     The 2nd Rev boost is always vertical
+//  2: MrBougo's modded Rev style 2
+//     The 1st Rev boost is always horizontal
+//     The 2nd Rev boost is always vertical
+set g_nexball_football_physics  2  "0: Revenant's original movement, 1: 0 but half independant of aiming height, 2: 1 fully independant, -1: first recode try"
+set g_nexball_basketball_bouncefactor 0.6    "velocity loss when the ball bounces"
+set g_nexball_basketball_bouncestop   0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
+set g_nexball_football_bouncefactor   0.6    "velocity loss when the ball bounces"
+set g_nexball_football_bouncestop     0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
+
+set g_nexball_football_boost_forward      100   "forward velocity boost when the ball is touched"
+set g_nexball_football_boost_up           200   "vertical velocity boost when the ball is touched"
+
+set g_nexball_basketball_delay_hold           20    "time before a player who caught the ball loses it (anti-ballcamp)"
+set g_nexball_basketball_delay_hold_forteam   60    "time before a ball reset when a team holds the ball for too long"
+set g_nexball_basketball_teamsteal             1    "1 to allow players to steal from teammates, 0 to disallow"
+
+set g_nexball_basketball_carrier_speed         0.9  "speed multiplier for the ballcarrier"
+
+set g_nexball_meter_period                  1    "time to make a full cycle on the power meter"
+set g_nexball_basketball_meter              1    "use the power meter for basketball"
+set g_nexball_basketball_meter_minpower   0.5    "minimal multiplier to the launching speed when using the power meter"
+set g_nexball_basketball_meter_maxpower   1.2    "maximal multiplier to the launching speed when using the power meter"
+
+set g_nexball_delay_goal     3    "delay between a goal and a ball reset"
+set g_nexball_delay_idle     10   "maximal idle time before a reset"
+set g_nexball_delay_start    3    "time the ball stands on its spawn before being released"
+set g_nexball_delay_collect  0.5  "time before the same player can catch the ball he launched"
+
+set g_nexball_sound_bounce   1    "bouncing sound (0: off)"
+
+set g_nexball_basketball_trail  1  "1 to leave a trail"
+set g_nexball_football_trail    0  "1 to leave a trail"
+set g_nexball_trail_color     254  "1-256 for different colors (Quake palette, 254 is white)"
+
+set g_nexball_radar_showallplayers 1  "1: show every player and the ball on the radar  0: only show teammates and the ball on the radar"
+
+// server game balance settings
+// powerup balance settings
+// weapon balance settings follow
+exec balance.cfg
+
+set g_bloodloss 0   "amount of health below which blood loss occurs"
+
+set g_footsteps 0      "serverside footstep sounds"
+
+// effects
+r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
+r_mipsprites 1
+r_mipskins 1
+r_shadow_realtime_world_lightmaps 1
+seta r_ambient 4
+cl_decals_fadetime 1
+cl_decals_time 2
+seta cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
+seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
+seta cl_particlegibs 0 "simpler gibs"
+seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
+seta cl_gibs_lifetime 14 "average lifetime of gibs"
+seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
+seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
+seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
+seta cl_gibs_ticrate 0.1 "ticrate for gibs"
+seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
+seta cl_casings 1 "enable or disable bullet casings"
+seta cl_casings_shell_time 30 "shell casing lifetime"
+seta cl_casings_bronze_time 10 "bullet casings lifetime"
+seta cl_casings_ticrate 0.1 "ticrate for casings"
+seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"
+seta cl_projectiles_sloppy 0 "sloppy projectiles, may temporarily penetrate walls"
+cl_stainmaps 0
+cl_particles_smoke 1
+vid_gl20 1
+r_glsl_deluxemapping 1
+r_glsl_offsetmapping 0
+r_glsl_offsetmapping_reliefmapping 0
+r_glsl_offsetmapping_scale 0.02
+// execute effects-normal.cfg to make sure that all effect settings are reset
+alias menu_sync "" // will be re-aliased later
+exec effects-normal.cfg
+
+// misc
+fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
+scr_conalpha 1
+scr_conbrightness 0.2
+scr_screenshot_jpeg 1
+scr_screenshot_jpeg_quality 0.9
+sv_maxvelocity 1000000000
+cl_sound_wizardhit ""
+cl_sound_hknighthit ""
+cl_sound_tink1 weapons/tink1.wav
+cl_sound_ric1 weapons/ric1.wav
+cl_sound_ric2 weapons/ric2.wav
+cl_sound_ric3 weapons/ric3.wav
+cl_sound_r_exp3 ""
+sv_sound_land ""
+sv_sound_watersplash ""
+seta cl_sound_maptime_warning "1" "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
+seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
+
+seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
+seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
+
+// startmap_dm is used when running with the -listen or -dedicated commandline options
+set serverconfig server.cfg
+alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1; map _init/_init"
+alias sv_loadconfig "exec $serverconfig"
+alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. $* \"; quit_and_redirect self"
+
+// aliases:
+alias +attack2 +button3
+alias -attack2 -button3
+alias +zoom +button4
+alias -zoom -button4
+alias +crouch +button5
+alias -crouch -button5
+alias weapnext "_weapnext_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}"
+alias _weapnext_000 "impulse 10"
+alias _weapnext_001 "impulse 10"
+alias _weapnext_010 "impulse 10"
+alias _weapnext_011 "impulse 10"
+alias _weapnext_020 "impulse 10"
+alias _weapnext_021 "impulse 10"
+alias _weapnext_100 "impulse 10"
+alias _weapnext_101 "impulse 15"
+alias _weapnext_110 "impulse 18"
+alias _weapnext_111 "impulse 15"
+alias _weapnext_120 "impulse 18"
+alias _weapnext_121 "impulse 15"
+alias weaplast "impulse 11"
+alias weapprev "_weapprev_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}"
+alias _weapprev_000 "impulse 12"
+alias _weapprev_001 "impulse 12"
+alias _weapprev_010 "impulse 12"
+alias _weapprev_011 "impulse 12"
+alias _weapprev_020 "impulse 12"
+alias _weapprev_021 "impulse 12"
+alias _weapprev_100 "impulse 12"
+alias _weapprev_101 "impulse 16"
+alias _weapprev_110 "impulse 19"
+alias _weapprev_111 "impulse 16"
+alias _weapprev_120 "impulse 19"
+alias _weapprev_121 "impulse 16"
+set _supports_weaponpriority 0 "set to 1 by csqc if supported, and to 0 on disconnect"
+alias weapbest "impulse 13"
+
+alias reload "impulse 20"
+
+// movement
+bind w +forward
+bind a +moveleft
+bind s +back
+bind d +moveright
+bind UPARROW +forward
+bind LEFTARROW +moveleft
+bind DOWNARROW +back
+bind RIGHTARROW +moveright
+bind SHIFT +crouch
+bind ENTER +jump
+bind SPACE +jump
+
+// weapons
+bind 1 "impulse 1"
+bind 2 "impulse 2"
+bind 3 "impulse 3"
+bind 4 "impulse 4"
+bind 5 "impulse 5"
+bind 6 "impulse 6"
+bind 7 "impulse 7"
+bind 8 "impulse 8"
+bind 9 "impulse 9"
+bind 0 "impulse 14" // cycles the superweapons
+bind q weaplast
+bind MOUSE1 +attack
+bind MOUSE2 +attack2
+bind MOUSE3 +zoom
+bind MOUSE4 weaplast
+bind MOUSE5 +hook
+bind MWHEELUP weapnext
+bind MWHEELDOWN weapprev
+bind r reload
+bind BACKSPACE dropweapon
+bind g dropweapon
+bind f +use
+
+// misc
+bind e +hook
+bind ` toggleconsole
+bind ~ toggleconsole
+bind TAB +showscores
+bind ESCAPE togglemenu
+bind t messagemode
+bind y messagemode2
+bind z messagemode2
+bind u "+con_chat_maximize"
+bind i +show_info
+bind PAUSE pause
+bind F10 quit
+bind F11 disconnect
+bind F12 screenshot
+bind F4 ready
+bind m radar
+bind ALT +showaccuracy
+
+// Gamepad defaults. Tested with Logitech Rumblepad 2, I hope similar ones works as well.
+bind JOY1 "+crouch"
+bind JOY2 "+jump"
+bind JOY3 "weapprev"
+bind JOY4 "weapnext"
+bind JOY5 "+attack2"
+bind JOY6 "+attack"
+bind JOY7 "+zoom"
+bind JOY8 "dropweapon"
+bind JOY9 "menu_showteamselect"
+bind JOY10 "+show_info"
+bind JOY11 "+showscores"
+bind JOY12 "+con_chat_maximize"
+seta joyadvanced "1"
+seta joyadvaxisr "2"
+seta joyadvaxisx "3"
+seta joyadvaxisy "1"
+seta joyadvaxisz "4"
+seta joysidesensitivity "1.0"
+seta joypitchsensitivity "0.9"
+seta joyyawsensitivity "-1.8"
+// SDL only
+seta joy_deadzoneforward "0.05"
+seta joy_deadzonepitch "0.05"
+seta joy_deadzoneside "0.05"
+seta joy_deadzoneup "0.05"
+seta joy_deadzoneyaw "0.05"
+seta joy_sensitivitypitch "0.9"
+seta joy_sensitivityyaw "-1.8"
+
+// team say
+bind kp_ins messagemode
+bind kp_del messagemode2
+bind kp_end "+userbind 1"
+bind kp_downarrow "+userbind 2"
+bind kp_pgdn "+userbind 3"
+bind kp_leftarrow "+userbind 4"
+bind kp_5 "+userbind 6"
+bind kp_rightarrow "+userbind 7"
+bind kp_home "+userbind 9"
+bind kp_uparrow "+userbind 10"
+bind kp_pgup "+userbind 11"
+bind kp_multiply "+userbind 12"
+bind kp_slash "+userbind 13"
+bind kp_enter "+userbind 16"
+bind kp_plus "+userbind 17"
+bind kp_minus "+userbind 18"
+
+set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted"
+set sv_vote_only_commands ""
+set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" "maybe add kickban here (but then sv_vote_master 0)"
+set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"
+set sv_vote_call 1     "users can call a vote for the above commands"
+set sv_vote_master 1   "users can call a vote to become master"
+set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
+set sv_vote_change 0   "set to 1 to allow to change you vote/mind"
+set sv_vote_singlecount 0      "set to 1 to count votes once after timeout or to 0 to count with every vote"
+set sv_vote_timeout 60 "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   "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"
+alias vstatus "cmd vote status"
+alias vcall "cmd vote call $*"
+alias vstop "cmd vote stop"
+alias vmaster "cmd vote master"
+alias vlogin "cmd vote login $*"
+alias vdo "cmd vote do $*"
+alias vyes "cmd vote yes"
+alias vno "cmd vote no"
+alias vdontcare "cmd vote dontcare"
+alias vabstain "cmd vote abstain"
+
+alias vmap "vcall gotomap $1"
+alias vnextmap "vcall nextmap $1"
+alias vkick "vcall kick $1"
+alias vkickban "vcall kickban $1"
+alias vend "vcall endmatch"
+alias vdomap "vdo gotomap $1"
+alias vdokick "vdo kick $*"
+alias vdokickban "vdo kickban $*"
+alias vdoend "vdo endmatch"
+
+alias lsmaps "cmd lsmaps" // lists all maps on server (for vmap, suggestmap, vnextmap)
+alias lsnewmaps "cmd lsnewmaps" // lists all maps on server that do not yet have a record set (race/cts)
+bind F1 vyes
+bind F2 vno
+
+//used for spectate/observer mode
+alias spec "cmd spectate"
+bind F3 spec
+
+// NixNex (No-Items x Xonotic) - at each time, everyone uses the same weapon,
+// and in regular intervals, this weapon is cycled
+set g_nixnex 0 "No Items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on"
+set g_nixnex_with_laser 0 "always carry the laser as an additional weapon in NixNex"
+set g_nixnex_with_healtharmor 0 "when 1, health and armor still show up in NixNex"
+set g_nixnex_with_powerups 0 "when 1, powerups still show up in NixNex"
+
+// score log
+set sv_logscores_console 0     "print scores to server console"
+set sv_logscores_file 0        "print scores to file"
+set sv_logscores_filename scores.log   "filename"
+set sv_logscores_bots 0        "exclude bots by default"
+
+// spam (frag/capture) log
+set sv_eventlog 0      "the master switch for efficiency reasons"
+set sv_eventlog_console 1
+set sv_eventlog_files 0
+set sv_eventlog_files_timestamps 1
+seta sv_eventlog_files_counter 0
+set sv_eventlog_files_nameprefix xonotic
+set sv_eventlog_files_namesuffix .log
+
+set nextmap "" "override the maplist when switching to the next map"
+set lastlevel ""
+set quit_when_empty 0  "set to 1, then the server exits when the next level would start but is empty"
+set quit_and_redirect ""       "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
+
+// singleplayer campaign
+set g_campaign 0
+seta g_campaign_name "xonotic25"
+set g_campaign_skill 0
+set g_campaignxonotic20_index 0
+set g_campaignxonotic25_index 1
+
+alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
+alias singleplayer_continue "set scmenu_campaign_goto -1"
+alias singleplayer_levellist "set scmenu_campaign_dump 1; togglemenu; wait; togglemenu"
+
+// Green's fullbright skins
+alias cl_fbskin_green "playermodel models/player/nexus.zym; playerskin 6; color 3 3"
+alias cl_fbskin_red "playermodel models/player/nexus.zym; playerskin 6; color 4 4"
+alias cl_fbskin_orange "playermodel models/player/nexus.zym; playerskin 6; color 14 14"
+alias cl_fbskin_off "playermodel models/player/nexus.zym; playerskin 0"
+alias sv_fbskin_green "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 51"
+alias sv_fbskin_red "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 68"
+alias sv_fbskin_orange "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 238"
+alias sv_fbskin_off "g_fullbrightplayers 0; sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
+
+seta sv_servermodelsonly 1
+
+cl_curl_enabled 1
+cl_curl_maxspeed 300
+sv_curl_defaulturl "http://www.xonotic.com/contentdownload/getmap.php?file="
+
+set sv_motd ""
+
+seta cl_shownames 1    "show player names pointed to (0: never, 1: teamplay only, 2: always)"
+set sv_allow_shownames 1
+
+set g_waypoints_for_items 1    "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
+
+seta g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
+seta g_maplist_votable_keeptwotime 15
+seta g_maplist_votable_timeout 30      "timeout for the map voting; must be below 50 seconds!"
+seta g_maplist_votable_suggestions 2
+seta g_maplist_votable_suggestions_override_mostrecent 0
+seta g_maplist_votable_nodetail 1      "nodetail only shows total count instead of all vote counts per map, so votes don't influence others that much"
+seta g_maplist_votable_abstain 0       "when 1, you can abstain from your vote"
+seta g_maplist_votable_screenshot_dir "maps levelshots"        "where to look for map screenshots"
+alias suggestmap "cmd suggestmap $1"
+
+set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax 2        "normal chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst 2       "normal chat: allow bursts of so many chat lines"
+set g_chat_flood_spl_team 1    "team chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax_team 2   "team chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst_team 2  "team chat: allow bursts of so many chat lines"
+set g_chat_flood_spl_tell 1    "private chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax_tell 2   "private chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst_tell 2  "private chat: allow bursts of so many chat lines"
+set g_chat_flood_notify_flooder 1      "when 0, the flooder still can see his own message"
+set g_chat_teamcolors 0        "colorize nicknames in team color for chat"
+set g_voice_flood_spv 4        "normal voices: seconds between voices to not count as flooding"
+set g_voice_flood_spv_team 2   "team voices: seconds between voices to not count as flooding"
+set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
+set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
+set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking"
+set g_nick_flood_penalty_red 30 "number of changes to allow before totally disorienting the player"
+
+set g_waypointsprite_normdistance 512
+set g_waypointsprite_minscale 0.5
+set g_waypointsprite_minalpha 0.4
+set g_waypointsprite_distancealphaexponent 2
+set g_waypointsprite_timealphaexponent 1
+set g_waypointsprite_deployed_lifetime 10
+set g_waypointsprite_deadlifetime 1
+set g_waypointsprite_limitedrange 5120
+set g_waypointsprite_stuffbinds 0
+seta g_waypointsprite_scale 1
+seta g_waypointsprite_alpha 1 "This allows the client to control transparency of the waypoint"
+seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
+seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
+seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
+seta g_waypointsprite_crosshairfadealpha 0.25 "alpha multiplier near crosshair"
+seta g_waypointsprite_crosshairfadescale 1 "scale multiplier near the crosshair"
+seta g_waypointsprite_crosshairfadedistance 150 "distance in virtual pixels from crosshair where to start fading"
+seta g_waypointsprite_distancefadealpha 1 "alpha multiplier near distance"
+seta g_waypointsprite_distancefadescale 0.7 "scale multiplier near the distance"
+seta g_waypointsprite_distancefadedistancemultiplier 0.5 "distance in map sizes from distance where to stop fading"
+alias "g_waypointsprite_personal"      "impulse 30"
+alias "g_waypointsprite_personal_p"    "impulse 31"
+alias "g_waypointsprite_personal_d"    "impulse 32"
+alias "g_waypointsprite_team_helpme"   "impulse 33"
+alias "g_waypointsprite_team_here"     "impulse 34"
+alias "g_waypointsprite_team_here_p"   "impulse 35"
+alias "g_waypointsprite_team_here_d"   "impulse 36"
+alias "g_waypointsprite_team_danger"   "impulse 37"
+alias "g_waypointsprite_team_danger_p" "impulse 38"
+alias "g_waypointsprite_team_danger_d" "impulse 39"
+alias "g_waypointsprite_clear_personal"        "impulse 47"
+alias "g_waypointsprite_clear" "impulse 48"
+alias "g_waypointsprite_toggle"        "impulse 49"
+// key for that?
+seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
+
+// command extension
+alias qc_cmd   "sv_cmd $*" // menu QC will override this to menu_cmd
+alias adminmsg "sv_cmd adminmsg $*"
+alias teamstatus       "cmd teamstatus; sv_cmd teamstatus" // yes, it is broken on listen servers that way, but well, who cares :P
+alias printstats       "sv_cmd printstats" // print status on demand
+alias g_maplist_add    "qc_cmd maplist add $*"
+alias g_maplist_remove "qc_cmd maplist remove $*"
+alias g_maplist_putfirst       "qc_cmd maplist remove $* ; qc_cmd maplist add $*"
+alias g_maplist_shufflenow     "qc_cmd maplist shuffle"
+alias g_maplist_cleanup        "qc_cmd maplist cleanup" // removes maps that don't exist from the map list
+alias gametype "sv_cmd gametype $*"
+
+alias addfav "qc_cmd addtolist net_slist_favorites $*"
+alias addvote "qc_cmd addtolist sv_vote_commands $*"
+
+// key hunt
+set g_keyhunt 0 "Key Hunt: collect all keys from the enemies and bring them together to score"
+set g_balance_keyhunt_delay_return 60
+set g_balance_keyhunt_delay_round 5
+set g_balance_keyhunt_delay_tracking 10
+set g_balance_keyhunt_delay_fadeout 2
+set g_balance_keyhunt_delay_collect 1.5
+set g_balance_keyhunt_delay_drop 0.4
+set g_balance_keyhunt_maxdist 150
+set g_balance_keyhunt_score_collect 3
+set g_balance_keyhunt_score_carrierfrag 2
+set g_balance_keyhunt_score_capture 100
+set g_balance_keyhunt_score_push 60
+set g_balance_keyhunt_score_destroyed 50
+set g_balance_keyhunt_score_destroyed_ownfactor 1
+set g_balance_keyhunt_dropvelocity 300
+set g_balance_keyhunt_throwvelocity 400
+set g_balance_keyhunt_protecttime 0.8
+set g_balance_keyhunt_damageforcescale 1
+seta g_keyhunt_teams_override 0
+set g_keyhunt_teams 0
+
+// so it can be stuffcmd-ed still
+set cl_gravity 800     "but ignored anyway"
+
+set g_ban_default_bantime 5400 "90 minutes"
+set g_ban_default_masksize 3   "whole 255.255.255.0 networks (set to 4 for single IPs); when UID support is compiled in, masksize 0 means banning by UID"
+set g_banned_list ""   "format: IP remainingtime IP remainingtime ..."
+alias bans "sv_cmd bans"
+alias ban "sv_cmd ban $*"         // usage: ban address(maybe incomplete, like 1.2.3) bantime(seconds)
+alias kickban "sv_cmd kickban $*" // usage: kickban # playerno bantime(seconds) masksize(bytes)
+alias unban "sv_cmd unban $*"     // usage: unban 3 (number from bans)
+
+r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
+
+// settemp subsystem. Do not touch. Usage: settemp variable value, next map resets it.
+set settemp_list 0
+set settemp_idx 0
+set _settemp_var UNUSED
+alias settemp "_settemp_var \"_settemp_x$settemp_idx\"; qc_cmd rpn /settemp_idx settemp_idx 1 add def; _settemp \"$1\" \"$2\""
+alias _settemp "settemp_list \"1 $1 $_settemp_var $settemp_list\"; set $_settemp_var \"${$1}\"; $1 \"$2\""
+alias settemp_restore "_settemp_restore_${settemp_list asis}"
+alias _settemp_restore_0 "set settemp_var 0; set settemp_list 0"
+alias _settemp_restore_1 "$1 \"${$2}\"; _settemp_restore_${3- asis}"
+
+// usercommands. These can be edited and bound by the menu.
+seta "userbind1_press" "say_team quad soon";  seta "userbind1_release" "";  seta "userbind1_description" "team: quad soon"
+seta "userbind2_press" "say_team free item %x^7 (l:%y^7); g_waypointsprite_team_here_p";  seta "userbind2_release" "";  seta "userbind2_description" "team: free item, icon"
+seta "userbind3_press" "say_team took item (l:%l^7); g_waypointsprite_team_here";  seta "userbind3_release" "";  seta "userbind3_description" "team: took item, icon"
+seta "userbind4_press" "say_team negative";  seta "userbind4_release" "";  seta "userbind4_description" "team: negative"
+seta "userbind5_press" "say_team positive";  seta "userbind5_release" "";  seta "userbind5_description" "team: positive"
+seta "userbind6_press" "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_helpme; cmd voice needhelp";  seta "userbind6_release" "";  seta "userbind6_description" "team: need help, icon"
+seta "userbind7_press" "say_team enemy seen (l:%y^7); g_waypointsprite_team_danger_p; cmd voice incoming";  seta "userbind7_release" "";  seta "userbind7_description" "team: enemy seen, icon"
+seta "userbind8_press" "say_team flag seen (l:%y^7); g_waypointsprite_team_here_p; cmd voice seenflag";  seta "userbind8_release" "";  seta "userbind8_description" "team: flag seen, icon"
+seta "userbind9_press" "say_team defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here";  seta "userbind9_release" "";  seta "userbind9_description" "team: defending, icon"
+seta "userbind10_press" "say_team roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here";  seta "userbind10_release" "";  seta "userbind10_description" "team: roaming, icon"
+seta "userbind11_press" "say_team attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here";  seta "userbind11_release" "";  seta "userbind11_description" "team: attacking, icon"
+seta "userbind12_press" "say_team killed flagcarrier (l:%y^7); g_waypointsprite_team_p"; seta "userbind12_release" ""; seta "userbind12_description" "team: killed flag, icon"
+seta "userbind13_press" "say_team dropped flag (l:%d^7); g_waypointsprite_team_here_d"; seta "userbind13_release" ""; seta "userbind13_description" "team: dropped flag, icon"
+seta "userbind14_press" "say_team dropped gun %w^7 (l:%l^7); g_waypointsprite_team_here; wait; dropweapon"; seta "userbind14_release" ""; seta "userbind14_description" "team: drop gun, icon"
+seta "userbind15_press" "say_team dropped flag/key %w^7 (l:%l^7); g_waypointsprite_team_here; wait; +use"; seta "userbind15_release" "-use"; seta "userbind15_description" "team: drop flag/key, icon"
+seta "userbind16_press" "say :-) / nice one"; seta "userbind16_release" ""; seta "userbind16_description" "chat: nice one"
+seta "userbind17_press" "say good game"; seta "userbind17_release" ""; seta "userbind17_description" "chat: good game"
+seta "userbind18_press" "say hi / good luck and have fun"; seta "userbind18_release" ""; seta "userbind18_description" "chat: hi / good luck"
+seta "userbind19_press" "+showscores; +con_chat_maximize"; seta "userbind19_release" "-showscores; -con_chat_maximize"; seta "userbind19_description" "scoreboard / chat history"
+seta "userbind20_press" "toggle cl_capturevideo"; seta "userbind20_release" ""; seta "userbind20_description" "toggle recording .avi"
+seta "userbind21_press" "toggle vid_fullscreen; vid_restart"; seta "userbind21_release" ""; seta "userbind21_description" "toggle fullscreen"
+seta "userbind22_press" ""; seta "userbind22_release" ""; seta "userbind22_description" ""
+seta "userbind23_press" ""; seta "userbind23_release" ""; seta "userbind23_description" ""
+seta "userbind24_press" ""; seta "userbind24_release" ""; seta "userbind24_description" ""
+seta "userbind25_press" ""; seta "userbind25_release" ""; seta "userbind25_description" ""
+seta "userbind26_press" ""; seta "userbind26_release" ""; seta "userbind26_description" ""
+seta "userbind27_press" ""; seta "userbind27_release" ""; seta "userbind27_description" ""
+seta "userbind28_press" ""; seta "userbind28_release" ""; seta "userbind28_description" ""
+seta "userbind29_press" ""; seta "userbind29_release" ""; seta "userbind29_description" ""
+seta "userbind30_press" ""; seta "userbind30_release" ""; seta "userbind30_description" ""
+seta "userbind31_press" ""; seta "userbind31_release" ""; seta "userbind31_description" ""
+seta "userbind32_press" ""; seta "userbind32_release" ""; seta "userbind32_description" ""
+alias _userbind_call "${$1}"
+alias +userbind "_userbind_call userbind${1}_press"
+alias -userbind "_userbind_call userbind${1}_release"
+
+seta menu_skin "wickedz"
+set menu_slowmo 1
+seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
+
+r_textbrightness 0.2
+r_textcontrast 0.8
+r_textshadow 1
+
+// good settings for these fonts
+con_chat 5
+con_chatpos -9
+con_chatsize 10
+con_chatwidth 0.6
+con_notifysize 10
+con_notifyalign 0
+
+sbar_info_pos 50
+seta sbar_alpha_bg 0.8 "alpha value of the HUD background"
+seta sbar_alpha_fg 1 "alpha value of the HUD foreground items"
+seta sbar_border_thickness 1 "scoreboard border thickness"
+seta sbar_accuracy_border_thickness 1 "accuracy stats border thickness"
+seta sbar_accuracy_doublerows 0 "use two rows instead of one"
+seta sbar_accuracy_yellow 40 "percentage at which the accuracy color is yellow"
+seta sbar_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard"
+seta sbar_accuracy_hud 1 "0 = no weapon accuracy bar on the weapon icons"
+seta sbar_color_bg_r 0 "red color component of the HUD background"
+seta sbar_color_bg_g 0.25 "green color component of the HUD background"
+seta sbar_color_bg_b 0.17 "blue color component of the HUD background"
+seta sbar_color_bg_team 0.5 "team color multiplier of the HUD background"
+seta sbar_scoreboard_alpha_bg 0.6 "scoreboard background alpha"
+seta sbar_scoreboard_alpha_fg 1 "scoreboard foreground alpha"
+seta sbar_scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
+seta sbar_scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self" 
+seta sbar_scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
+seta sbar_scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
+seta sbar_scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
+seta sbar_scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on sbar_scoreboard_highlight 1)"
+seta sbar_scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
+seta sbar_hudselector 1        "0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display"
+seta sbar_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
+seta sbar_showweaponicons 1 "1 = show icons of weapons that you have"
+seta sbar_timer_increment 0 "1 = show elapsed time on the timer"
+seta sbar_timer_scale 1 "scale multiplier of the timer"
+seta sbar_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted"
+
+// for menu server list (eventually make them have engine support?)
+seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
+seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
+set menu_slist_modfilter "=" // set to either: !modname or modname. modname of = means "same as we are running now".
+
+// for menu weapon arena
+set menu_weaponarena_with_laser 0 "also enable the Laser in this weapon arena"
+
+seta menu_maxplayers 8 "maxplayers value when the menu starts a game"
+
+// command executed before loading a map by the menu
+// makes sure maxplayers is at least minplayers or bot_number + 1
+alias _menu_loadmap_prepare_maxpl "maxplayers $_menu_loadmap_maxplayers"
+alias menu_loadmap_prepare "disconnect; wait; g_campaign 0; menu_cmd rpn /_menu_loadmap_maxplayers menu_maxplayers minplayers bot_number 1 add max max def; _menu_loadmap_prepare_maxpl; g_maplist_shufflenow"
+
+// useful vote aliases
+set timelimit_increment 5
+set timelimit_decrement 5
+set timelimit_min 5
+set timelimit_max 60
+alias extendmatchtime "sv_cmd rpn /timelimit timelimit timelimit_max timelimit timelimit_increment add bound def"
+alias reducematchtime "sv_cmd rpn /timelimit timelimit timelimit_decrement sub timelimit_min timelimit bound def"
+alias endmatch "timelimit -1"
+
+// useful keybind to maximize the chat area temporarily
+set _backup_con_chatvars_set 0
+alias _restore_con_chatvars_0 ""
+alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites"
+alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set"
+alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites"
+alias _backup_con_chatvars_1 ""
+alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set"
+alias +con_chat_maximize "_backup_con_chatvars; con_chatpos -9; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
+alias -con_chat_maximize "_restore_con_chatvars"
+
+// tab completion
+set con_completion_playdemo    *.dem
+set con_completion_timedemo    *.dem
+set con_completion_ply         *.dem
+set con_completion_tdem                *.dem
+set con_completion_exec                *.cfg
+set con_completion_chmap       map
+set con_completion_gotomap     map
+set con_completion_vmap                map
+set con_completion_vnextmap    map
+set con_completion_vdomap      map
+
+// these non-saved engine cvars shall be savedG
+seta cl_port $cl_port
+seta r_showsurfaces $r_showsurfaces
+seta r_ambient $r_ambient
+seta skill $skill
+seta gl_finish $gl_finish
+seta v_kicktime $v_kicktime
+seta r_subdivisions_tolerance $r_subdivisions_tolerance
+
+// ticrate
+sys_ticrate 0.0166667
+cl_netfps 60 // should match
+sv_gameplayfix_delayprojectiles 0
+sv_gameplayfix_q2airaccelerate 1
+
+// delay for "kill" to prevent abuse
+set g_balance_kill_delay 5
+
+// this feature is currently buggy in the engine (it appears to PREVENT any dropping in lots of maps, leading to weirdly aligned entities, and in some cases even CAUSES them to drop through solid, like in facing worlds nex)
+sv_gameplayfix_droptofloorstartsolid 0
+
+seta gl_texturecompression 0
+gl_texturecompression_color 1
+gl_texturecompression_gloss 1
+gl_texturecompression_glow 1
+gl_texturecompression_lightcubemaps 1
+gl_texturecompression_q3bsplightmaps 0
+gl_texturecompression_sky 1
+
+set menu_mouse_absolute 0      "TODO make this seta if the engine understands this right"
+seta menu_mouse_speed 1 "speed multiplier for the mouse in the menu (does not affect in-game aiming)"
+set menu_use_default_hostname 1
+alias sethostname "set menu_use_default_hostname 0; hostname $*"
+
+// 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
+
+// Audio track names (for old-style "cd loop NUMBER" usage)
+set g_cdtracks_remaplist "digital-pursuit breakdown-easy brainsukker chaos-fog infight neuronal-diving subcities thru-the-mirror calling-bogus beast-of-insanity thunder brokenlight brokenlight stairs sixtyfour_ desert3 ninesix sixtyfour_revisited northern-lights" "list used by mapinfo system to automatically assign cdtracks - must match the cd remap command"
+set g_cdtracks_dontusebydefault "digital-pursuit thunder brokenlight" "list used by mapinfo system to automatically assign cdtracks - must be a subset of g_cdtracks_remaplist"
+cd remap $g_cdtracks_remaplist
+set sv_intermission_cdtrack ""
+set menu_cdtrack brokenlight
+
+// maxidle (in seconds): kick players idle for more than that amount of time
+set sv_maxidle 0
+// when sv_maxidle is not 0, assume spectators are idle too
+set sv_maxidle_spectatorsareidle 0
+
+// CTF capture limit placeholder cvar
+set capturelimit 0
+
+// sbar: font size
+seta sbar_fontsize 11
+seta sbar_fontsize_spec 16
+seta scr_centersize 11
+seta sbar_width 560
+// alias sbar_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; sbar_columns_set"
+alias sbar_font "set _requested_sbar_font \"${*}\""
+seta sbar_columns default
+sbar_font gfx/vera-sans 8 12 16 24 32
+seta sbar_showbinds 1  "display actions / bound keys in the strings shown during the game. 0 displays only actions, 1 displays only bound keys, 2 displays both"
+seta sbar_showbinds_limit 2    "maximum number of bound keys to show for an action. 0 for unlimited"
+
+// these entities are not referenced by anything directly, they just represent
+// teams and are found by find() when needed
+prvm_leaktest_ignore_classnames "ctf_team dom_team tdm_team"
+
+sv_allowdownloads_inarchive 1 // for csprogs.dat
+
+set g_jump_grunt 0     "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
+
+alias allready "sv_cmd allready"
+
+// note: these cvars use weapon NUMBERS. Use the menu to edit this cvar, or look the numbers up in qcsrc/common/constants.qh.
+seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher fireball hlac hagar crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
+seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list"
+seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun.  Default value: explosives"
+seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser"      "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun.  Default value: energy"
+seta cl_weaponpriority2 "minstanex nex campingrifle"                    "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun.  Default value: hitscan exact"
+seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun"        "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun.  Default value: hitscan all"
+seta cl_weaponpriority4 "grenadelauncher hlac hagar crylink shotgun"    "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun.  Default value: spam weapons"
+seta cl_weaponpriority5 "laser hook porto"                              "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun.  Default value: weapons for moving"
+seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun"
+seta cl_weaponpriority7 "" "use impulse 207 for prev gun from this list, 217 for best gun, 227 for next gun"
+seta cl_weaponpriority8 "" "use impulse 208 for prev gun from this list, 218 for best gun, 228 for next gun"
+seta cl_weaponpriority9 "" "use impulse 209 for prev gun from this list, 219 for best gun, 229 for next gun"
+
+seta sv_status_privacy 1       "hide IP addresses from \"status\" replies shown to clients"
+
+
+seta cl_teamradar 1    "show radar in teammatches when available"
+seta cl_teamradar_background_alpha 0   "set to -1 to disable"
+seta cl_teamradar_foreground_alpha 0.8 "alpha of the map"
+seta cl_teamradar_scale 4096 "distance you can see on the team radar"
+seta cl_teamradar_rotation 0   "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north"
+seta cl_teamradar_size "128 128" "size of the team radar in pixels"
+seta cl_teamradar_position "1 0" "1 0 would be upper right corner, 0.5 0.5 the center, append a 2 at the end to disable the corner hack, and a 1 to disable half the hack"
+seta cl_teamradar_zoommode 0   "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
+alias cl_teamradar_rotate "toggle cl_teamradar_rotation 0 1 2 3 4"
+
+set g_maplist_allow_hidden 0           "allow hidden maps to be, e.g., voted for and in the maplist"
+set g_maplist_allow_frustrating 0      "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
+
+seta g_start_delay 0   "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
+       if_dedicated set g_start_delay 15
+
+alias ons_map           "cl_cmd radar" // legacy alias
+alias radar             "cl_cmd radar"
+alias sbar_columns_set  "cl_cmd sbar_columns_set $*"
+alias sbar_columns_help "cl_cmd sbar_columns_help $*"
+
+alias _gl_flashblend_update_00 "gl_flashblend 1"
+alias _gl_flashblend_update_10 "gl_flashblend 0"
+alias _gl_flashblend_update_01 "gl_flashblend 0"
+alias _gl_flashblend_update_11 "gl_flashblend 0"
+alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_showsurfaces"
+
+set sv_clones 0        "number of clones a player may make (reset by the \"kill\" command)"
+
+set cl_handicap 1      "the higher, the more damage you will receive (client setting)"
+
+exec turrets.cfg
+
+// must be at the bottom of this file:
+// alias for switching the teamselect menu
+alias menu_showteamselect "menu_cmd directmenu TeamSelect"
+alias menu_sync "menu_cmd sync"
+bind f5 menu_showteamselect
+
+set g_bugrigs 0
+set g_bugrigs_planar_movement 1        "BROTRR bug emulation"
+set g_bugrigs_planar_movement_car_jumping 1    "my own bug"
+set g_bugrigs_reverse_speeding 1       "BROTRR bug emulation"
+set g_bugrigs_reverse_spinning 1       "BROTRR bug emulation"
+set g_bugrigs_reverse_stopping 1       "BROTRR bug emulation"
+set g_bugrigs_air_steering 1   "NFS bug emulation"
+set g_bugrigs_angle_smoothing 5        "smooth the car angle a bit, looks nice"
+set g_bugrigs_friction_floor 50        "units/sec friction on floor"
+set g_bugrigs_friction_brake 950       "units/sec friction for braking"
+set g_bugrigs_friction_air 0.00001     "(very small) v <- v - v^2 * g_bugrigs_friction_air"
+set g_bugrigs_accel 800        "acceleration"
+set g_bugrigs_speed_ref 400    "reference speed for accel and steer responsiveness"
+set g_bugrigs_speed_pow 2      "reference power for accel and steer responsiveness"
+set g_bugrigs_steer 1  "steering amount"
+
+set g_touchexplode 0
+set g_touchexplode_radius 50
+set g_touchexplode_damage 10
+set g_touchexplode_edgedamage 0
+set g_touchexplode_force 150
+
+set g_ban_sync_uri ""  "sync using this ban list provider (empty string to disable)"
+set g_ban_sync_interval 5      "sync every 5 minutes"
+set g_ban_sync_trusted_servers ""      "request ban lists from these xonotic servers (do not include your own server there, or unbanning may fail)"
+set g_ban_sync_timeout 45      "time out in seconds for the ban sync requests"
+set g_ban_sync_trusted_servers_verify 0        "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
+
+set g_showweaponspawns 0       "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"
+
+// ballistics use physical units, but qu based
+//   Quake-Newton: 1 qN  = 1 qu * 1 g / 1 s^2
+//   Quake-Joule:  1 qJ  = 1 qN * 1 qu
+//   Quake-Pascal: 1 qPa = 1 qN / 1 qu^2
+
+set g_ballistics_materialconstant 1414213562
+set g_ballistics_mindistance 16
+// unit: qJ / qu^3 (energy needed per volume unit of solid to push/burn away
+// parameter: bullet constant: mass / area in g/qu^2
+// = mass / (pi/4 * caliber^2)
+// with caliber in inches, mass in grams:
+// = 1.273239544735163 * mass / caliber^2
+// with caliber in inches, mass in grains:
+// = 0.082633246453312 * mass / caliber^2
+
+// bullet max travel distance inside solid:
+//   0.5 * v^2 * bulletconstant / g_ballistics_materialconstant
+
+// some bullet constants:
+//   http://hypertextbook.com/facts/2000/ShantayArmstrong.shtml
+//     second bullet: caliber .45, mass 16.2g, bullet constant 101.859163578813
+//     third bullet: caliber .338, mass 16.2g, bullet constant 180.5476053421592
+//     fourth bullet: caliber .25, mass 2.3g, bullet constant 46.85521524625399
+//   http://en.wikipedia.org/wiki/.50_BMG
+//     caliber .5, 360 grains, bullet constant 118.9918748927693
+//   AK-47:
+//     caliber .3, 62 grains, bullet constant 56.92512533450383
+//   .3 winchester magnum:
+//     caliber .3, 150 grains, bullet constant 137.7220774221867
+
+set cl_stripcolorcodes 0       "experimental feature (notes: strips ALL color codes from messages!)"
+
+sv_status_show_qcstatus 1      "Xonotic uses this field instead of frags"
+set g_full_getstatus_responses 0       "this currently breaks qstat"
+
+// Demo camera
+set camera_enable              0       "Enables the camera for demo playback"
+set camera_free                0       "Free camera instead of chasing the player"
+set camera_reset               0       "Resets the camera position and switch to chase mode"
+set camera_speed_roll          0.9     "Camera rotation speed"
+set camera_speed_chase                 4       "Camera movement speed on the x/y/z axis while chasing the player"
+set camera_speed_free          8       "Camera movement speed on the x/y/z axis in free mode"
+set camera_speed_attenuation   10      "Camera movements attenuation factor. Bigger is smoother. Applies to mouse movements"
+set camera_mouse_treshold      0.5     "Use to ignore small mouse movements. This allows for smoother camera control"
+set camera_chase_smoothly      0       "Attenuate player movements (only in chase mode)"
+set camera_look_player         0       "Always look to the player. Mouse input is ignored in this mode"
+set camera_look_attenuation    8       "Attenuation of \"looking\" movements, only if camera_look_player is set. Bigger is smoother"
+set camera_forward_follows     1       "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking"
+
+// "Gentle mode": show no blood
+seta sv_gentle 0       "force gentle mode for everyone, also remove references to acts of killing from the messages"
+seta cl_gentle 0       "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
+
+seta cl_racetimer_position 0.25 "Y-axis positioning of the race timer (from 0 to 1)"
+seta cl_showpressedkeys        0       "Show which movement keys someone is pressing: 1 for spectating, 2 for always"
+seta cl_showpressedkeys_position "0.5 0.8"     "1 0 would be upper right corner, 0.5 0.5 the center"
+
+seta cl_showspeed 0 "show the XY speed of the player"
+seta cl_showspeed_unit 0 "unit selection (0 = qu/s (no postfix), 1 = qu/s, 2 = m/s, 3 = km/h, 4 = mph, 5 = knots)"
+seta cl_showspeed_z 0 "include the speed on the Z-axis"
+seta cl_showspeed_size 30 "size of the numbers"
+seta cl_showspeed_position 0.7 "Y-axis positioning of the numbers"
+
+seta cl_showacceleration 0 "show the XY acceleration of the player"
+seta cl_showacceleration_z 0 "include the speed on the Z-axis"
+seta cl_showacceleration_size 40 "height of the bar"
+seta cl_showacceleration_scale 5 "X-axis scale of the bar"
+seta cl_showacceleration_alpha 0.5 "alpha of the bar"
+seta cl_showacceleration_color_custom 0 "0 = dynamic color depending on acceleration, 1 = use custom color"
+seta cl_showacceleration_color "1 0 0" "color of the bar, needs cl_showacceleration_color_custom to be 1"
+seta cl_showacceleration_position 0.6 "Y-axis positioning of the bar"
+
+set g_jetpack 0 "Jetpack mutator (uses the hook's button, can't coexist with the offhand hook, but only with the onhand one)"
+
+set g_running_guns 0 "... or wonder, till it drives you mad, what would have followed if you had."
+
+set cl_effects_lightningarc_simple 0
+set cl_effects_lightningarc_segmentlength 64
+set cl_effects_lightningarc_drift_start 0.45
+set cl_effects_lightningarc_drift_end 0.1
+set cl_effects_lightningarc_branchfactor_start 0.25
+set cl_effects_lightningarc_branchfactor_add 0.1
+
+set g_hitplots 0 "when set to 1, hitplots are stored by the server to provide a means of proving that a triggerbot was used"
+seta g_hitplots_individuals "" "the individuals, by IP, that should have their hitplots recorded"
+alias g_hitplots_add "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 union def"
+alias g_hitplots_remove "qc_cmd rpn /g_hitplots_individuals g_hitplots_individuals $1 difference def"
+
+alias mute "prvm_edictset server $1 muted 1" // I am lazy and not making an actual command of this
+alias unmute "prvm_edictset server $1 muted 0" // dito
+
+rcon_secure 1
+
+set menu_updatecheck 1
+
+set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
+set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
+
+// broken, sorry (cannot handle weapon attachment properly)
+//seta cl_forceplayermodels 0 "force all players to look like you; WARNING: animations can look very bad with this"
+//seta cl_forceplayermodelsfromxonotic 0 "force models coming from xonotic; WARNING: animations can look very bad with this"
+//set sv_clforceplayermodels 1 "allow clients to use cl_forcemodels"
+
+set sv_loddistance1 1024
+set sv_loddistance2 4096
+seta cl_playerdetailreduction 0        "the higher, the less detailed player models are displayed (LOD)"
+
+set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
+
+// hooks
+alias _cl_hook_gamestart "set _cl_hook_gametype $1; _cl_hook_gamestart_stage2"
+alias _cl_hook_gamestart_stage2 "cl_hook_gamestart_all; cl_hook_gamestart_${_cl_hook_gametype}"
+alias cl_hook_gamestart_all
+alias cl_hook_gamestart_nop  //is only called when CSQC unloads before knowing the gametype, very unlikely
+alias cl_hook_gamestart_dm
+alias cl_hook_gamestart_tdm
+alias cl_hook_gamestart_dom
+alias cl_hook_gamestart_ctf
+alias cl_hook_gamestart_rune
+alias cl_hook_gamestart_lms
+alias cl_hook_gamestart_arena
+alias cl_hook_gamestart_ca
+alias cl_hook_gamestart_kh
+alias cl_hook_gamestart_ons
+alias cl_hook_gamestart_as
+alias cl_hook_gamestart_rc
+alias cl_hook_gamestart_nexball
+alias cl_hook_gamestart_cts
+alias cl_hook_gameend
+
+alias _sv_hook_gamestart "set _sv_hook_gametype $1; _sv_hook_gamestart_stage2"
+alias _sv_hook_gamestart_stage2 "sv_hook_gamestart_all; sv_hook_gamestart_${_sv_hook_gametype}"
+alias sv_hook_gamestart_all
+alias sv_hook_gamestart_dm
+alias sv_hook_gamestart_tdm
+alias sv_hook_gamestart_dom
+alias sv_hook_gamestart_ctf
+alias sv_hook_gamestart_rune
+alias sv_hook_gamestart_lms
+alias sv_hook_gamestart_arena
+alias sv_hook_gamestart_ca
+alias sv_hook_gamestart_kh
+alias sv_hook_gamestart_ons
+alias sv_hook_gamestart_as
+alias sv_hook_gamestart_rc
+alias sv_hook_gamestart_nexball
+alias sv_hook_gamestart_cts
+alias sv_hook_gamerestart
+alias sv_hook_gameend
+
+seta cl_casings_maxcount 100 "maximum amount of shell casings (must be at least 1)"
+seta cl_gibs_maxcount 100 "maximum amount of gibs (must be at least 1)"
+seta cl_vehicle_spiderbot_cross_alpha 0.6
+seta cl_vehicle_spiderbot_cross_size 1
+
+//cl_gunalign calculator
+seta menu_cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
+alias _gunalign_01 "cl_gunalign 1"
+alias _gunalign_02 "cl_gunalign 2"
+alias _gunalign_03 "cl_gunalign 3"
+alias _gunalign_04 "cl_gunalign 4"
+alias _gunalign_11 "cl_gunalign 2"
+alias _gunalign_12 "cl_gunalign 1"
+alias _gunalign_13 "cl_gunalign 4"
+alias _gunalign_14 "cl_gunalign 3"
+alias _gunalign_update "_gunalign_$v_flipped$menu_cl_gunalign"
+
+set _menu_alpha "" // will be set by menu QC to the current fading of the menu, can be used by CSQC to fade items
+
+set g_triggerimpulse_accel_power 1 "trigger_impulse accelerator power (applied BEFORE the multiplier)"
+set g_triggerimpulse_accel_multiplier 1 "trigger_impulse accelerator multiplier (applied AFTER the power)"
+set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field multiplier"
+set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
+
+seta g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
+seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
+
+set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file"
+set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file"
+
+seta cl_noantilag 0 "turn this on if you believe antilag is bad"
+
+set sv_pitch_min -35 "minimum aiming angle for shooting direction display of the gun"
+set sv_pitch_max  35 "maximum aiming angle for shooting direction display of the gun"
+set sv_pitch_fixyaw 1 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0"
+
+set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
+
+seta g_mapinfo_allow_unsupported_modes_and_let_stuff_break "0" "set to 1 to be able to force game types using g_ cvars even if the map does not support them"
+
+// weapon accuracy stats
+set sv_accuracy_data_share 1 "1 send weapon accuracy data statistics to spectating clients, depends on cl_accuracy_data_share"
+set sv_accuracy_data_send 1 "1 send weapon accuracy data statistics and improved score info to all the clients at the end of the match, depends on cl_accuracy_data_receive, 0 send the current 'player has won' to all the clients"
+set cl_accuracy_data_share 0 "1 share my weapon accuracy data statistics with other players, 0 keep my weapon accuracy data statistics hidden"
+set cl_accuracy_data_receive 0 "1 receive weapon accuracy data statistics at the end of the match"
+
+set developer_fteqccbugs 0 "check fteqcc bugs on startup"
+set _allow_unacceptable_compiler_bugs 0 "don't bail out if certain bugs are detected (HANDLE WITH CARE)"
+set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
+set loddebug 0 "force this LOD level"
+set spawn_debugview 0 "display spawnpoints and their rating on spawn to debug spawnpoint rating calculation"
+set g_mutatormsg "" "mutator message"
+set speedmeter 0 "print landing speeds"
+set developer_shtest 0 "experimental speedhack detection"
+set waypoint_benchmark 0 "quit after waypoint loading to benchmark bot navigation code"
+set g_debug_bot_commands 0 "print scripted bot commands before executing"
+
+// debug cvars for keyhunt attaching
+set _angles "0 0 0"
+set _origin "0 0 0"
+
+// campaign internal, set when loading a campaign map1G
+set _campaign_index ""
+set _campaign_name ""
+
+// define some engine cvars that we need even on dedicated server
+set r_showbboxes 0
+
+// we REALLY need the end pos nudging DP bug workaround for trace-to-end-of-solid to work
+collision_endposnudge 1
+
+// animation tuning
+set cl_lerpanim_maxdelta_framegroups 0.05 // must be faster than fastest weapon refire
+set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server controlled anim (e.g. animinfo stuff)
+
+// FIXME temporary
+set menu_font_size_snapping_fix 1
+
+// player ID
+seta _cl_userid "" "player ID (e.g. for tournaments)"
+
+// FIXME workaround for engine bug
+sv_gameplayfix_nudgeoutofsolid 0
+// to div0: remove this once 5b7ac1706712977bbc0297d2d53294e73574c7cd (svn r9537) is in the stable branch of the engine again
diff --git a/demos/bench1.dem b/demos/bench1.dem
deleted file mode 100644 (file)
index 888123e..0000000
Binary files a/demos/bench1.dem and /dev/null differ
diff --git a/demos/demo1.dem b/demos/demo1.dem
deleted file mode 100644 (file)
index ad1a1da..0000000
Binary files a/demos/demo1.dem and /dev/null differ
diff --git a/demos/demo2.dem b/demos/demo2.dem
deleted file mode 100644 (file)
index 557eb0f..0000000
Binary files a/demos/demo2.dem and /dev/null differ
diff --git a/demos/demo3.dem b/demos/demo3.dem
deleted file mode 100644 (file)
index c33193c..0000000
Binary files a/demos/demo3.dem and /dev/null differ
diff --git a/demos/demo4.dem b/demos/demo4.dem
deleted file mode 100644 (file)
index 80f5b61..0000000
Binary files a/demos/demo4.dem and /dev/null differ
diff --git a/demos/demo5.dem b/demos/demo5.dem
deleted file mode 100644 (file)
index c1e1f79..0000000
Binary files a/demos/demo5.dem and /dev/null differ
diff --git a/demos/piece-o-cake.dem b/demos/piece-o-cake.dem
deleted file mode 100644 (file)
index 89fc1ad..0000000
Binary files a/demos/piece-o-cake.dem and /dev/null differ
index 2885afb563c834ae6f7a6203ca53c8783f1d93dc..8ab688d8f480ff042e5ba1aec530b07dd9f251b4 100644 (file)
@@ -1348,8 +1348,8 @@ airfriction 12
 
 // electro trail
 // glowing vapor trail
 
 // electro trail
 // glowing vapor trail
-// used in qcsrc/client/projectile.qc:                 trailparticles(self, particleeffectnum("TR_NEXUIZPLASMA"), from, to)
-effect TR_NEXUIZPLASMA
+// used in qcsrc/client/projectile.qc:                 trailparticles(self, particleeffectnum("TR_XONOTICPLASMA"), from, to)
+effect TR_XONOTICPLASMA
 trailspacing 1
 type static
 color 0x283880 0x283880
 trailspacing 1
 type static
 color 0x283880 0x283880
@@ -1362,7 +1362,7 @@ lighttime 0
 lightcolor 1.5 3 6
 velocitymultiplier -0.1
 // bright sparks
 lightcolor 1.5 3 6
 velocitymultiplier -0.1
 // bright sparks
-effect TR_NEXUIZPLASMA
+effect TR_XONOTICPLASMA
 trailspacing 6
 count 3
 type snow
 trailspacing 6
 count 3
 type snow
index 4b8f58ff3821247ec9e3106a57feb775cee5ebf4..6d8bd90e395ccd39a810e80681bb8e81fb5174de 100644 (file)
@@ -6,8 +6,8 @@
 // NOTE: currently only works with ALSA on Linux, and then like this:
 //   aconnect -l -i
 // Find your MIDI keyboard in this list. Assuming it is client 20, port 0,
 // NOTE: currently only works with ALSA on Linux, and then like this:
 //   aconnect -l -i
 // Find your MIDI keyboard in this list. Assuming it is client 20, port 0,
-// run Nexuiz with:
-//   ./nexuiz -sndseqin 20:0 +exec input-tuba.cfg
+// run Xonotic with:
+//   ./xonotic -sndseqin 20:0 +exec input-tuba.cfg
 // Then, grab a Tuba, then play notes on your MIDI keyboard!
 //
 // If you have no keyboard input, you can map the tuba notes to your keyboard:
 // Then, grab a Tuba, then play notes on your MIDI keyboard!
 //
 // If you have no keyboard input, you can map the tuba notes to your keyboard:
index 927dd6f1d7a39063a008d0347cd93f15d5f559f6..be359dbde3ee8977ab210d7595b8acf4394633cd 100644 (file)
@@ -37,7 +37,7 @@ pngsprite()
    inkscape:export-xdpi="90"
    inkscape:export-ydpi="90"
    sodipodi:docname="template.svg"
    inkscape:export-xdpi="90"
    inkscape:export-ydpi="90"
    sodipodi:docname="template.svg"
-   sodipodi:docbase="/home/rpolzer/software/games/nexuiz/data/models/sprites"
+   sodipodi:docbase="/home/rpolzer/software/games/xonotic/data/models/sprites"
    inkscape:output_extension="org.inkscape.output.svg.inkscape"
    sodipodi:modified="true">
   <defs
    inkscape:output_extension="org.inkscape.output.svg.inkscape"
    sodipodi:modified="true">
   <defs
diff --git a/nexuiz-credits.txt b/nexuiz-credits.txt
deleted file mode 100644 (file)
index c455c48..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-**Team Leaders:
-
-Lee Vermeulen
-*Project Founder and Co-Designer
-
-Forest "LordHavoc" Hale
-*Lead Programmer and Co-Designer
-
-Rudolf "div0" Polzer
-*Programmer
-
-
-**Project maintainers:
-
-Kristian "morfar" Johansson
-
-Maik "SavageX" Merten
-
-
-**Development Team:
-
-Andreas "Black" Kirsch
-*Programmer
-
-Paul "Strahlemann" Evers
-*Level Designer
-
-Peter "Morphed" Pielak
-*Artist
-
-Samual Lenks
-*Programmer
-
-Rasmus "FruitieX" Eskola
-*Artist and Programmer
-
-Saulo "mand1nga" Gil
-*Programmer
-
-Stephan "esteel" Stahl
-*Programmer
-
-Jakob "tZork" Markstrom Grohn
-*Programmer and Artist
-
-Tyler "-z-" Mulligan
-*Web Developer and Interaction Designer
-
-Wolfgang "Blub\0" Bumiller
-*Programmer
-
-Merlijn Hofstra
-*Programmer and server admin
-
-
-
-**Past Team Members
-*In alphabetical order
-*(nickname or surname)
-
-Kurt Dereli
-*Artist
-
-Yves "EviLair" Allaire
-*Artist
-
-Fabien "H. Reaper" Tschirhart
-*Level Designer
-
-"Innovati"
-*Artist
-
-KadaverJack
-*Programmer
-
-William Libert
-* Level Designer
-
-MauveBib
-*Bot Programmer
-
-Rick "Rat" Kelley
-*Lead Animator, Skinner
-
-Michael "Tenshihan" Quinn
-*Sound FX and Player-Voices
-
-Gottfried "Toddd" Hofmann
-*Sound FX
-
-Marko "Urre" Permanto
-*Bot Programmer
-
-Dan "Wazat" Hale
-*Programmer
-
-Garth "Zombie" Hendy
-*Level Designer
-
-
-
-**Special Thanks:
-*In alphabetical order
-*(nickname or surname)
-
-Robert "ai" Kuroto
-*Various models
-
-Chris "amethyst7" Matz
-*Level design
-
-blkrbt
-*Music
-
-Gerd "Elysis" Raudenbusch
-*Music
-
-Marius "GreEn`mArine" Shekow
-*Programmer
-
-Braden "meoblast001" Walters
-*Music
-
-Alexander "motorsep" Zubov
-*Weapon animation
-
-Eric "Munyul Verminard" Sambach
-*Level design
-
-Severin "sev" Meyer
-*Artist
-
-Simon O'Callaghan
-*egyptsoc texture set
-
-Michael "Tenshihan" Quinn
-*Sound effects
-
-Amos "torus" Dudley
-*Announcer voices
-
-Mattrew "Tronyn" Rye
-*Level design
-
-Henning "Tymo" Janssen
-*Level design
-
-Kevin "Tyrann" Shanahan
-*Level design
-
-William "Willis" Weilep
-*Master server host
-
-
-**Thanks:
-
-Attila "WW3" Houtkooper
-BigMac
-Brain Younds
-Christian Ice
-Clinton "Kaziganthe" Freeman
-Dan "Digger" Korostelev
-Donkey
-Dustin Geeraert
-Edgenetwork
-Edward "Ed" Holness
-FrikaC
-Jitspoe
-Jody Gallagher
-Juergen "LowDragon" Timm
-Lee David Ash
-Mathieu "Elric" Olivier
-Mephisto
-MirceaKitsune
-MrBougo
-Munyul
-Netzwerg
-NoelCower
-Parapraxis
-Petithomme
-Q1 Retexturing Project
-Qantourisc
-Ronan
-Sajt
-Shaggy
-Shank
-SomeGuy
-Spike
-Spirit
-Steve Vermeulen
-Supajoe
-Tei
-Tomaz
-Ulrich Galbraith
-Vortex
-Zenex
-dstrek
-lcatlnx
-leileilol
-michaelb
-terencehill
diff --git a/nexuiz.modinfo b/nexuiz.modinfo
deleted file mode 100644 (file)
index 2a6d70b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-'progs.dat'
-'Nexuiz'
index 80d1013a466b178c276ce84fba6c0fc1a4554057..30f22a6cbc8e4f0a0ac843064df4e36880383c45 100644 (file)
@@ -1,4 +1,4 @@
-// Nexuiz 1.0 physics
+// Xonotic 1.0 physics
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 100
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 100
index b3278b74c1c7600b701a7b40aa569bd079c91065..46d6587b9e49af9a84b690d306a5d1ae871f7207 100644 (file)
@@ -1,4 +1,4 @@
-// Nexuiz 1.5 physics
+// Xonotic 1.5 physics
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
index 76513eae243979ede828b88a99134eda5491c944..e56e6f1a334a84c2e219bd82a577db4e96584d7b 100644 (file)
@@ -1,4 +1,4 @@
-// experimental post-Nexuiz 1.5 physics (never released)
+// experimental post-Xonotic 1.5 physics (never released)
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
index eb43d3f3bb7b32affe70ac92e8357620196105f9..528f62336bdf65b4ca90d78469cdbfc3277a1ce1 100644 (file)
@@ -1,4 +1,4 @@
-// experimental post-Nexuiz 1.5 physics (never released)
+// experimental post-Xonotic 1.5 physics (never released)
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 25
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 25
index 4234d0d19cbef2ab4fb8a130e09978e720107b9a..bdf1525518be8ffadbefede42bb266a339bcfde6 100644 (file)
@@ -1,4 +1,4 @@
-// experimental post-Nexuiz 1.5 physics (never released)
+// experimental post-Xonotic 1.5 physics (never released)
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 50
index 7c7c4a00b5209e6966a883f7abcebb9c434e4fe7..6aaf747cc1c05ddac18ecf178af1dba271667f5f 100644 (file)
@@ -1,4 +1,4 @@
-// Quake, Bunny Reintroduced (Nexuiz 2.0 to 2.4.2 physics)
+// Quake, Bunny Reintroduced (Xonotic 2.0 to 2.4.2 physics)
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 8df1375b09e7ad0e396c73a4f91da2c90713bd30..b60f74b9a580c8e046da2cff350e07bb3ff72a8c 100644 (file)
@@ -1,4 +1,4 @@
-// Nexuiz 2.5 physics
+// Xonotic 2.5 physics
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 19005e958ea7a496b7e7e1a885694476bc9e5b9c..a31467897663c3b706e5a0ab69b99e4983bb5301 100644 (file)
@@ -1,4 +1,4 @@
-// Nexuiz 2.6 physics
+// Xonotic 2.6 physics
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 7b83e682e5c58815b3fcdd88d7e1263dd3a07958..78d4240430771aec3fc85b43529e2a73b702d6f7 100644 (file)
@@ -1,4 +1,4 @@
-// Nexuiz Havoc physics (work in progress)
+// Xonotic Havoc physics (work in progress)
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
 sv_gravity 800
 sv_maxspeed 400
 sv_maxairspeed 220
index 3340c8648408089338b84b6c6bcb33c9353c1a01..363a425558d4e48e363f41bd513b247b7d2d3fb1 100644 (file)
@@ -1,4 +1,4 @@
-// Nexuiz 2.0-2.4.2 physics minus QW-bunnyhopping-bug, faster onground accel, CPMA air control
+// Xonotic 2.0-2.4.2 physics minus QW-bunnyhopping-bug, faster onground accel, CPMA air control
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 320
 sv_gravity 800
 sv_maxspeed 320
 sv_maxairspeed 320
index 904f2d7c44628a9a385ca95cc007ed2d18130742..51cf682f360ca615174528c9f98ebbf6e132f6ed 100644 (file)
@@ -5,7 +5,7 @@ sv_maxairspeed 30
 sv_stopspeed 100
 sv_accelerate 10
 sv_airaccelerate 106.66666666666666666666
 sv_stopspeed 100
 sv_accelerate 10
 sv_airaccelerate 106.66666666666666666666
-// it is 10 in Quake 1, but the Nexuiz player physics code does not 100% match an oddity of Quake 1, but matches Quake 2 and 3 more
+// it is 10 in Quake 1, but the Xonotic player physics code does not 100% match an oddity of Quake 1, but matches Quake 2 and 3 more
 sv_friction 4
 edgefriction 1
 sv_stepheight 18
 sv_friction 4
 edgefriction 1
 sv_stepheight 18
index 27d77f374d4fbf9db218862402942e5a7f2f3337..76c0ba17d91919283ae4ac2849fae94d2a9c79cc 100644 (file)
@@ -5,7 +5,7 @@ sv_maxairspeed 30
 sv_stopspeed 100
 sv_accelerate 10
 sv_airaccelerate 106.66666666666666666666
 sv_stopspeed 100
 sv_accelerate 10
 sv_airaccelerate 106.66666666666666666666
-// it is 10 in Quake 2, but the Nexuiz player physics code does not 100% match an oddity of Quake 1, but matches Quake 2 and 3 more
+// it is 10 in Quake 2, but the Xonotic player physics code does not 100% match an oddity of Quake 1, but matches Quake 2 and 3 more
 sv_friction 6
 edgefriction 1
 sv_stepheight 18
 sv_friction 6
 edgefriction 1
 sv_stepheight 18
index 2730a322d22f52ee7a262ff128d52603ed1c44b3..97debdfacd388320f8ea8e9b325685c17b102a07 100644 (file)
@@ -249,14 +249,14 @@ void Ent_Projectile()
                self.traileffect = 0;
                switch(self.cnt)
                {
                self.traileffect = 0;
                switch(self.cnt)
                {
-                       case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
+                       case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum("TR_XONOTICPLASMA"); break;
                        case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); self.scale = 2; break;
                        case PROJECTILE_BULLET: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
                        case PROJECTILE_BULLET_GLOWING: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
                        case PROJECTILE_BULLET_GLOWING_TRACER: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_rifle"); break;
                        case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
                        case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
                        case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); self.scale = 2; break;
                        case PROJECTILE_BULLET: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
                        case PROJECTILE_BULLET_GLOWING: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
                        case PROJECTILE_BULLET_GLOWING_TRACER: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_rifle"); break;
                        case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
                        case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-                       case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
+                       case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_XONOTICPLASMA"); break;
                        case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
                        case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
                        case PROJECTILE_LASER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(""); break;
                        case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
                        case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
                        case PROJECTILE_LASER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(""); break;
index 001bf1f835a849c93bd56634ddc1aaea41f71c21..1ac07ce4c71c4380d02b7c28bbe7a3cc83254062 100644 (file)
@@ -212,7 +212,7 @@ void teamradar_loadcvars()
                cl_teamradar_zoommode = cvar("cl_teamradar_zoommode");
 
                // others default to 0
                cl_teamradar_zoommode = cvar("cl_teamradar_zoommode");
 
                // others default to 0
-               // match this to defaultNexuiz.cfg!
+               // match this to defaultXonotic.cfg!
                if(!cl_teamradar_scale) cl_teamradar_scale = 4096;
                if(!cl_teamradar_background_alpha) cl_teamradar_background_alpha = 0.4 * sbar_alpha_fg;
                if(!cl_teamradar_foreground_alpha) cl_teamradar_foreground_alpha = 0.8 * sbar_alpha_fg;
                if(!cl_teamradar_scale) cl_teamradar_scale = 4096;
                if(!cl_teamradar_background_alpha) cl_teamradar_background_alpha = 0.4 * sbar_alpha_fg;
                if(!cl_teamradar_foreground_alpha) cl_teamradar_foreground_alpha = 0.8 * sbar_alpha_fg;
index f954ed953415311cf93da4feebfaf9bce5eb69bc..cdd3a3185b9c94ef16b495d6bcbaca7c1f439d7e 100644 (file)
@@ -352,7 +352,7 @@ const float STAT_VEHICLESTAT_RELOAD2 = 66;
 #define SP_SCORE 3
 // game mode specific indices are not in common/, but in server/scores_rules.qc!
 
 #define SP_SCORE 3
 // game mode specific indices are not in common/, but in server/scores_rules.qc!
 
-// this assignment must match menu/nexuiz/dialog_settings_misc.c!
+// this assignment must match menu/xonotic/dialog_settings_misc.c!
 float  CHAN_AUTO                               = 0;
        // on world: announcers, ...                     INFO
        // on players: item pickup                       ITEMS
 float  CHAN_AUTO                               = 0;
        // on world: announcers, ...                     INFO
        // on players: item pickup                       ITEMS
index 0a8de3e4a776fd0c5d557aa127687b28f3f1347d..72d23f45e38de991f56a8bab3a9e26123d0066f1 100644 (file)
 #include "item/listbox.c"
 #include "item/inputbox.c"
 #include "item/gecko.c"
 #include "item/listbox.c"
 #include "item/inputbox.c"
 #include "item/gecko.c"
-#include "nexuiz/dialog.c"
-#include "nexuiz/tab.c"
-#include "nexuiz/mainwindow.c"
-#include "nexuiz/button.c"
-#include "nexuiz/bigbutton.c"
-#include "nexuiz/commandbutton.c"
-#include "nexuiz/bigcommandbutton.c"
-#include "nexuiz/modbutton.c"
-#include "nexuiz/dialog_teamselect.c"
-#include "nexuiz/dialog_settings.c"
-#include "nexuiz/dialog_settings_video.c"
-#include "nexuiz/dialog_settings_effects.c"
-#include "nexuiz/dialog_settings_audio.c"
-#include "nexuiz/dialog_settings_network.c"
-#include "nexuiz/dialog_settings_misc.c"
-#include "nexuiz/dialog_multiplayer.c"
-#include "nexuiz/dialog_multiplayer_playersetup.c"
-#include "nexuiz/tabcontroller.c"
-#include "nexuiz/textlabel.c"
-#include "nexuiz/slider.c"
-#include "nexuiz/slider_resolution.c"
-#include "nexuiz/checkbox.c"
-#include "nexuiz/radiobutton.c"
-#include "nexuiz/nexposee.c"
-#include "nexuiz/rootdialog.c"
-#include "nexuiz/textslider.c"
-#include "nexuiz/colorbutton.c"
-#include "nexuiz/dialog_multiplayer_join.c"
-#include "nexuiz/dialog_multiplayer_join_serverinfo.c"
-#include "nexuiz/playerlist.c"
-#include "nexuiz/listbox.c"
-#include "nexuiz/serverlist.c"
-#include "nexuiz/inputbox.c"
-#include "nexuiz/dialog_quit.c"
-#include "nexuiz/dialog_multiplayer_create.c"
-#include "nexuiz/dialog_multiplayer_create_mutators.c"
-#include "nexuiz/dialog_multiplayer_create_advanced.c"
-#include "nexuiz/dialog_multiplayer_create_mapinfo.c"
-#include "nexuiz/gametypebutton.c"
-#include "nexuiz/maplist.c"
-#include "nexuiz/skinlist.c"
-#include "nexuiz/image.c"
-#include "nexuiz/crosshairbutton.c"
-#include "nexuiz/playermodel.c"
-#include "nexuiz/dialog_news.c"
-#include "nexuiz/checkbox_slider_invalid.c"
-#include "nexuiz/charmap.c"
-#include "nexuiz/keybinder.c"
-#include "nexuiz/dialog_settings_input.c"
-#include "nexuiz/dialog_settings_input_userbind.c"
-#include "nexuiz/slider_decibels.c"
-#include "nexuiz/dialog_singleplayer.c"
-#include "nexuiz/campaign.c"
-#include "nexuiz/dialog_singleplayer_winner.c"
-#include "nexuiz/dialog_credits.c"
-#include "nexuiz/credits.c"
-#include "nexuiz/dialog_multiplayer_playersetup_weapons.c"
-#include "nexuiz/weaponslist.c"
-#include "nexuiz/dialog_multiplayer_playersetup_radar.c"
-#include "nexuiz/dialog_multiplayer_demo.c"
-#include "nexuiz/demolist.c"
-#include "nexuiz/colorpicker.c"
-#include "nexuiz/cvarlist.c"
-#include "nexuiz/dialog_settings_misc_cvars.c"
+#include "xonotic/dialog.c"
+#include "xonotic/tab.c"
+#include "xonotic/mainwindow.c"
+#include "xonotic/button.c"
+#include "xonotic/bigbutton.c"
+#include "xonotic/commandbutton.c"
+#include "xonotic/bigcommandbutton.c"
+#include "xonotic/modbutton.c"
+#include "xonotic/dialog_teamselect.c"
+#include "xonotic/dialog_settings.c"
+#include "xonotic/dialog_settings_video.c"
+#include "xonotic/dialog_settings_effects.c"
+#include "xonotic/dialog_settings_audio.c"
+#include "xonotic/dialog_settings_network.c"
+#include "xonotic/dialog_settings_misc.c"
+#include "xonotic/dialog_multiplayer.c"
+#include "xonotic/dialog_multiplayer_playersetup.c"
+#include "xonotic/tabcontroller.c"
+#include "xonotic/textlabel.c"
+#include "xonotic/slider.c"
+#include "xonotic/slider_resolution.c"
+#include "xonotic/checkbox.c"
+#include "xonotic/radiobutton.c"
+#include "xonotic/nexposee.c"
+#include "xonotic/rootdialog.c"
+#include "xonotic/textslider.c"
+#include "xonotic/colorbutton.c"
+#include "xonotic/dialog_multiplayer_join.c"
+#include "xonotic/dialog_multiplayer_join_serverinfo.c"
+#include "xonotic/playerlist.c"
+#include "xonotic/listbox.c"
+#include "xonotic/serverlist.c"
+#include "xonotic/inputbox.c"
+#include "xonotic/dialog_quit.c"
+#include "xonotic/dialog_multiplayer_create.c"
+#include "xonotic/dialog_multiplayer_create_mutators.c"
+#include "xonotic/dialog_multiplayer_create_advanced.c"
+#include "xonotic/dialog_multiplayer_create_mapinfo.c"
+#include "xonotic/gametypebutton.c"
+#include "xonotic/maplist.c"
+#include "xonotic/skinlist.c"
+#include "xonotic/image.c"
+#include "xonotic/crosshairbutton.c"
+#include "xonotic/playermodel.c"
+#include "xonotic/dialog_news.c"
+#include "xonotic/checkbox_slider_invalid.c"
+#include "xonotic/charmap.c"
+#include "xonotic/keybinder.c"
+#include "xonotic/dialog_settings_input.c"
+#include "xonotic/dialog_settings_input_userbind.c"
+#include "xonotic/slider_decibels.c"
+#include "xonotic/dialog_singleplayer.c"
+#include "xonotic/campaign.c"
+#include "xonotic/dialog_singleplayer_winner.c"
+#include "xonotic/dialog_credits.c"
+#include "xonotic/credits.c"
+#include "xonotic/dialog_multiplayer_playersetup_weapons.c"
+#include "xonotic/weaponslist.c"
+#include "xonotic/dialog_multiplayer_playersetup_radar.c"
+#include "xonotic/dialog_multiplayer_demo.c"
+#include "xonotic/demolist.c"
+#include "xonotic/colorpicker.c"
+#include "xonotic/cvarlist.c"
+#include "xonotic/dialog_settings_misc_cvars.c"
diff --git a/qcsrc/menu/nexuiz/bigbutton.c b/qcsrc/menu/nexuiz/bigbutton.c
deleted file mode 100644 (file)
index 76755da..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizBigButton) EXTENDS(NexuizButton)
-       METHOD(NexuizBigButton, configureNexuizBigButton, void(entity, string, vector))
-       ATTRIB(NexuizBigButton, image, string, SKINGFX_BUTTON_BIG)
-       ATTRIB(NexuizBigButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
-ENDCLASS(NexuizButton)
-entity makeNexuizButton(string theText, vector theColor);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizBigButton(string theText, vector theColor)
-{
-       entity me;
-       me = spawnNexuizBigButton();
-       me.configureNexuizBigButton(me, theText, theColor);
-       return me;
-}
-
-void configureNexuizBigButtonNexuizBigButton(entity me, string theText, vector theColor)
-{
-       me.configureNexuizButton(me, theText, theColor);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/bigcommandbutton.c b/qcsrc/menu/nexuiz/bigcommandbutton.c
deleted file mode 100644 (file)
index 90dedff..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizBigCommandButton) EXTENDS(NexuizCommandButton)
-       METHOD(NexuizBigCommandButton, configureNexuizBigCommandButton, void(entity, string, vector, string, float))
-       ATTRIB(NexuizBigCommandButton, image, string, SKINGFX_BUTTON_BIG)
-       ATTRIB(NexuizBigCommandButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
-ENDCLASS(NexuizCommandButton)
-entity makeNexuizBigCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizBigCommandButton(string theText, vector theColor, string theCommand, float theFlags)
-{
-       entity me;
-       me = spawnNexuizBigCommandButton();
-       me.configureNexuizBigCommandButton(me, theText, theColor, theCommand, theFlags);
-       return me;
-}
-
-void configureNexuizBigCommandButtonNexuizBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
-{
-       me.configureNexuizCommandButton(me, theText, theColor, theCommand, theFlags);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/button.c b/qcsrc/menu/nexuiz/button.c
deleted file mode 100644 (file)
index 1078b0e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizButton) EXTENDS(Button)
-       METHOD(NexuizButton, configureNexuizButton, void(entity, string, vector))
-       ATTRIB(NexuizButton, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizButton, image, string, SKINGFX_BUTTON)
-       ATTRIB(NexuizButton, grayImage, string, SKINGFX_BUTTON_GRAY)
-       ATTRIB(NexuizButton, color, vector, SKINCOLOR_BUTTON_N)
-       ATTRIB(NexuizButton, colorC, vector, SKINCOLOR_BUTTON_C)
-       ATTRIB(NexuizButton, colorF, vector, SKINCOLOR_BUTTON_F)
-       ATTRIB(NexuizButton, colorD, vector, SKINCOLOR_BUTTON_D)
-       ATTRIB(NexuizButton, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizButton, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizButton)
-entity makeNexuizButton(string theText, vector theColor);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizButton(string theText, vector theColor)
-{
-       entity me;
-       me = spawnNexuizButton();
-       me.configureNexuizButton(me, theText, theColor);
-       return me;
-}
-
-void configureNexuizButtonNexuizButton(entity me, string theText, vector theColor)
-{
-       if(theColor == '0 0 0')
-       {
-               me.configureButton(me, theText, me.fontSize, me.image);
-       }
-       else
-       {
-               me.configureButton(me, theText, me.fontSize, me.grayImage);
-               me.color = theColor;
-               me.colorC = theColor;
-               me.colorF = theColor;
-       }
-       me.tooltip = getZonedTooltipForIdentifier(strcat(currentDialog.classname, "/", me.text));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/campaign.c b/qcsrc/menu/nexuiz/campaign.c
deleted file mode 100644 (file)
index 3dba3e0..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCampaignList) EXTENDS(NexuizListBox)
-       METHOD(NexuizCampaignList, configureNexuizCampaignList, void(entity))
-       ATTRIB(NexuizCampaignList, rowsPerItem, float, 10)
-       METHOD(NexuizCampaignList, draw, void(entity))
-       METHOD(NexuizCampaignList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizCampaignList, clickListBoxItem, void(entity, float, vector))
-       METHOD(NexuizCampaignList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizCampaignList, setSelected, void(entity, float))
-       METHOD(NexuizCampaignList, keyDown, float(entity, float, float, float))
-       METHOD(NexuizCampaignList, campaignGo, void(entity, float))
-       METHOD(NexuizCampaignList, destroy, void(entity))
-
-       ATTRIB(NexuizCampaignList, campaignGlob, float, 0)
-       ATTRIB(NexuizCampaignList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizCampaignList, columnPreviewOrigin, float, 0)
-       ATTRIB(NexuizCampaignList, columnPreviewSize, float, 0)
-       ATTRIB(NexuizCampaignList, columnNameOrigin, float, 0)
-       ATTRIB(NexuizCampaignList, columnNameSize, float, 0)
-       ATTRIB(NexuizCampaignList, columnCheckMarkOrigin, float, 0)
-       ATTRIB(NexuizCampaignList, columnCheckMarkSize, float, 0)
-       ATTRIB(NexuizCampaignList, checkMarkOrigin, vector, '0 0 0')
-       ATTRIB(NexuizCampaignList, checkMarkSize, vector, '0 0 0')
-       ATTRIB(NexuizCampaignList, realUpperMargin1, float, 0)
-       ATTRIB(NexuizCampaignList, realUpperMargin2, float, 0)
-
-       ATTRIB(NexuizCampaignList, lastClickedMap, float, -1)
-       ATTRIB(NexuizCampaignList, lastClickedTime, float, 0)
-
-       ATTRIB(NexuizCampaignList, origin, vector, '0 0 0')
-       ATTRIB(NexuizCampaignList, itemAbsSize, vector, '0 0 0')
-       ATTRIB(NexuizCampaignList, emptyLineHeight, float, 0.5)
-
-       ATTRIB(NexuizCampaignList, campaignIndex, float, 0)
-       ATTRIB(NexuizCampaignList, cvarName, string, string_null)
-       METHOD(NexuizCampaignList, loadCvars, void(entity))
-       METHOD(NexuizCampaignList, saveCvars, void(entity))
-
-       ATTRIB(NexuizCampaignList, buttonNext, entity, NULL)
-       ATTRIB(NexuizCampaignList, buttonPrev, entity, NULL)
-       ATTRIB(NexuizCampaignList, labelTitle, entity, NULL)
-ENDCLASS(NexuizCampaignList)
-entity makeNexuizCampaignList();
-void CampaignList_LoadMap(entity btn, entity me);
-void MultiCampaign_Next(entity btn, entity me);
-void MultiCampaign_Prev(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-string campaign_longdesc_wrapped[CAMPAIGN_MAX_ENTRIES];
-
-void rewrapCampaign(float w, float l0, float emptyheight, vector theFontSize)
-{
-       float i, j;
-       float n, l;
-       string r, s;
-       for(i = 0; i < campaign_entries; ++i)
-       {
-               l = l0;
-               if(campaign_longdesc_wrapped[i])
-                       strunzone(campaign_longdesc_wrapped[i]);
-               n = tokenizebyseparator(campaign_longdesc[i], "\n");
-               r = "";
-               for(j = 0; j < n; ++j)
-               {
-                       s = argv(j);
-                       if(s == "")
-                       {
-                               l -= emptyheight;
-                               r = strcat(r, "\n");
-                               continue;
-                       }
-
-                       getWrappedLine_remaining = s;
-                       while(getWrappedLine_remaining)
-                       {
-                               s = getWrappedLine(w, theFontSize, draw_TextWidth_WithoutColors);
-                               if(--l < 0) goto toolong;
-                               r = strcat(r, s, "\n");
-                       }
-               }
-               goto nottoolong;
-:toolong
-               while(substring(r, strlen(r) - 1, 1) == "\n")
-                       r = substring(r, 0, strlen(r) - 1);
-               r = strcat(r, "...\n");
-:nottoolong
-               campaign_longdesc_wrapped[i] = strzone(substring(r, 0, strlen(r) - 1));
-       }
-}
-
-entity makeNexuizCampaignList()
-{
-       entity me;
-       me = spawnNexuizCampaignList();
-       me.configureNexuizCampaignList(me);
-       return me;
-}
-void configureNexuizCampaignListNexuizCampaignList(entity me)
-{
-       me.configureNexuizListBox(me);
-       me.campaignGlob = search_begin("maps/campaign*.txt", TRUE, TRUE);
-       me.loadCvars(me);
-       me.campaignGo(me, 0); // takes care of enabling/disabling buttons too
-}
-
-void destroyNexuizCampaignList(entity me)
-{
-       if(me.campaignGlob >= 0)
-               search_end(me.campaignGlob);
-}
-
-void loadCvarsNexuizCampaignList(entity me)
-{
-       // read campaign cvars
-       if(campaign_name)
-               strunzone(campaign_name);
-       if(me.cvarName)
-               strunzone(me.cvarName);
-       campaign_name = strzone(cvar_string("g_campaign_name"));
-       me.cvarName = strzone(strcat("g_campaign", campaign_name, "_index"));
-       registercvar(me.cvarName, "", 0); // saved by server QC anyway
-       CampaignFile_Unload();
-       CampaignFile_Load(0, CAMPAIGN_MAX_ENTRIES);
-       me.campaignIndex = bound(0, cvar(me.cvarName), campaign_entries);
-       cvar_set(me.cvarName, ftos(me.campaignIndex));
-       if(me.columnNameSize)
-               rewrapCampaign(me.columnNameSize, me.rowsPerItem - 3, me.emptyLineHeight, me.realFontSize);
-       me.nItems = min(me.campaignIndex + 2, campaign_entries);
-       me.selectedItem = min(me.campaignIndex, me.nItems - 1);
-       me.scrollPos = me.nItems * me.itemHeight - 1;
-       if(me.labelTitle)
-               me.labelTitle.setText(me.labelTitle, campaign_title);
-}
-
-void saveCvarsNexuizCampaignList(entity me)
-{
-       // write campaign cvars
-       // no reason to do this!
-       // cvar_set("g_campaign_name", campaign_name);
-       // cvar_set(me.cvarName, ftos(me.campaignIndex)); // NOTE: only server QC does that!
-}
-
-void campaignGoNexuizCampaignList(entity me, float step)
-{
-       float canNext, canPrev;
-       string s;
-       float i, j, n;
-
-       canNext = canPrev = 0;
-
-       if(me.campaignGlob >= 0)
-       {
-               n = search_getsize(me.campaignGlob);
-               if(n > 0)
-               {
-                       j = -1;
-                       s = strcat("maps/campaign", campaign_name, ".txt");
-                       for(i = 0; i < n; ++i)
-                       {
-                               if(search_getfilename(me.campaignGlob, i) == s)
-                                       j = i;
-                       }
-                       if(j < 0)
-                       {
-                               s = strcat("maps/campaign", cvar_defstring("g_campaign_name"), ".txt");
-                               for(i = 0; i < n; ++i)
-                               {
-                                       if(search_getfilename(me.campaignGlob, i) == s)
-                                               j = i;
-                               }
-                       }
-                       if(j < 0)
-                       {
-                               if(step >= 0)
-                                       j = 0;
-                               else
-                                       j = n - 1;
-                       }
-                       else
-                               j = mod(j + step, n);
-                       s = search_getfilename(me.campaignGlob, j);
-                       s = substring(s, 13, strlen(s) - 17);
-                       cvar_set("g_campaign_name", s);
-                       me.loadCvars(me);
-                       canNext = (j != n - 1);
-                       canPrev = (j != 0);
-               }
-       }
-
-       if(me.buttonNext)
-               me.buttonNext.disabled = !canNext;
-       if(me.buttonPrev)
-               me.buttonPrev.disabled = !canPrev;
-}
-
-void MultiCampaign_Next(entity btn, entity me)
-{
-       me.campaignGo(me, +1);
-}
-void MultiCampaign_Prev(entity btn, entity me)
-{
-       me.campaignGo(me, -1);
-}
-
-void drawNexuizCampaignList(entity me)
-{
-       if(cvar(me.cvarName) != me.campaignIndex || cvar_string("g_campaign_name") != campaign_name)
-               me.loadCvars(me);
-       drawListBox(me);
-}
-
-void resizeNotifyNexuizCampaignList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       me.itemAbsSize = '0 0 0';
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
-       me.realUpperMargin1 = 0.5 * me.realFontSize_y;
-       me.realUpperMargin2 = me.realUpperMargin1 + 2 * me.realFontSize_y;
-
-       me.checkMarkSize = (eX * (me.itemAbsSize_y / me.itemAbsSize_x) + eY) * 0.5;
-
-       me.columnPreviewOrigin = 0;
-       me.columnPreviewSize = me.itemAbsSize_y / me.itemAbsSize_x * 4 / 3;
-       me.columnCheckMarkSize = me.checkMarkSize_x;
-       me.columnNameSize = 1 - me.columnPreviewSize - me.columnCheckMarkSize - 4 * me.realFontSize_x;
-       me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize_x;
-       me.columnCheckMarkOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x * 2;
-
-       me.checkMarkOrigin = eY + eX * (me.columnCheckMarkOrigin + me.columnCheckMarkSize) - me.checkMarkSize;
-
-       rewrapCampaign(me.columnNameSize, me.rowsPerItem - 3, me.emptyLineHeight, me.realFontSize);
-}
-void clickListBoxItemNexuizCampaignList(entity me, float i, vector where)
-{
-       if(i == me.lastClickedMap)
-               if(time < me.lastClickedTime + 0.3)
-               {
-                       // DOUBLE CLICK!
-                       // start game
-                       CampaignList_LoadMap(me, me);
-                       return;
-               }
-       me.lastClickedMap = i;
-       me.lastClickedTime = time;
-}
-void drawListBoxItemNexuizCampaignList(entity me, float i, vector absSize, float isSelected)
-{
-       string s;
-       float p;
-       vector theColor;
-       float theAlpha;
-       float j, n;
-       vector o;
-
-       if(i < me.campaignIndex)
-       {
-               theAlpha = SKINALPHA_CAMPAIGN_SELECTABLE;
-               theColor = SKINCOLOR_CAMPAIGN_SELECTABLE;
-       }
-       else if(i == me.campaignIndex)
-       {
-               theAlpha = SKINALPHA_CAMPAIGN_CURRENT;
-               theColor = SKINCOLOR_CAMPAIGN_CURRENT;
-       }
-       else
-       {
-               theAlpha = SKINALPHA_CAMPAIGN_FUTURE;
-               theColor = SKINCOLOR_CAMPAIGN_FUTURE;
-       }
-
-       if(isSelected)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-
-       s = ftos(p);
-       draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
-       if(i < me.campaignIndex)
-               draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
-       if(i <= me.campaignIndex)
-               s = campaign_shortdesc[i]; // fteqcc sucks
-       else
-               s = "???";
-       s = draw_TextShortenToWidth(strcat("Level ", ftos(i + 1), ": ", s), me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, theColor, theAlpha, 0);
-
-       if(i <= me.campaignIndex)
-       {
-               s = campaign_longdesc_wrapped[i];
-               n = tokenizebyseparator(s, "\n");
-               o = me.realUpperMargin2 * eY + me.columnNameOrigin * eX;
-               for(j = 0; j < n; ++j)
-                       if(argv(j) != "")
-                       {
-                               draw_Text(o, argv(j), me.realFontSize, theColor, theAlpha * SKINALPHA_CAMPAIGN_DESCRIPTION, 0);
-                               o_y += me.realFontSize_y;
-                       }
-                       else
-                               o_y += me.realFontSize_y * me.emptyLineHeight;
-       }
-}
-void CampaignList_LoadMap(entity btn, entity me)
-{
-       if(me.selectedItem >= me.nItems || me.selectedItem < 0)
-               return;
-       CampaignSetup(me.selectedItem);
-}
-
-void setSelectedNexuizCampaignList(entity me, float i)
-{
-       // prevent too late items from being played
-       setSelectedListBox(me, min(i, me.campaignIndex));
-}
-
-float keyDownNexuizCampaignList(entity me, float scan, float ascii, float shift)
-{
-       if(scan == K_ENTER || scan == K_SPACE)
-               CampaignList_LoadMap(me, me);
-       else
-               return keyDownListBox(me, scan, ascii, shift);
-       return 1;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/charmap.c b/qcsrc/menu/nexuiz/charmap.c
deleted file mode 100644 (file)
index d72c460..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCharmap) EXTENDS(Image)
-       METHOD(NexuizCharmap, configureNexuizCharmap, void(entity, entity))
-       METHOD(NexuizCharmap, mousePress, float(entity, vector))
-       METHOD(NexuizCharmap, mouseRelease, float(entity, vector))
-       METHOD(NexuizCharmap, mouseMove, float(entity, vector))
-       METHOD(NexuizCharmap, mouseDrag, float(entity, vector))
-       METHOD(NexuizCharmap, keyDown, float(entity, float, float, float))
-       METHOD(NexuizCharmap, focusLeave, void(entity))
-       METHOD(NexuizCharmap, draw, void(entity))
-       ATTRIB(NexuizCharmap, controlledTextbox, entity, NULL)
-       ATTRIB(NexuizCharmap, image, string, SKINGFX_CHARMAP)
-       ATTRIB(NexuizCharmap, image2, string, SKINGFX_CHARMAP_SELECTED)
-       ATTRIB(NexuizCharmap, focusable, float, 1)
-       ATTRIB(NexuizCharmap, previouslySelectedCharacterCell, float, -1)
-       ATTRIB(NexuizCharmap, selectedCharacterCell, float, 0)
-       ATTRIB(NexuizCharmap, mouseSelectedCharacterCell, float, -1)
-ENDCLASS(NexuizCharmap)
-entity makeNexuizCharmap(entity theTextbox);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizCharmap(entity theTextbox)
-{
-       entity me;
-       me = spawnNexuizCharmap();
-       me.configureNexuizCharmap(me, theTextbox);
-       return me;
-}
-
-string CharMap_CellToChar(float c)
-{
-       if (cvar("utf8_enable")) {
-               if(c == 13)
-                       return chr(0xE000 + 127);
-               else if(c < 32)
-                       return chr(0xE000 + c);
-               else
-                       return chr(0xE000 + c + 96);
-       } else {
-               if(c == 13)
-                       return chr(127);
-               else if(c < 32)
-                       return chr(c);
-               else
-                       return chr(c + 96);
-       }
-}
-
-void configureNexuizCharmapNexuizCharmap(entity me, entity theTextbox)
-{
-       me.controlledTextbox = theTextbox;
-       me.configureImage(me, me.image);
-}
-
-float mouseMoveNexuizCharmap(entity me, vector coords)
-{
-       float x, y, c;
-       x = floor(coords_x * 16);
-       y = floor(coords_y * 10);
-       if(x < 0 || y < 0 || x >= 16 || y >= 10)
-       {
-               me.mouseSelectedCharacterCell = -1;
-               return 0;
-       }
-       c = y * 16 + x;
-       if(c != me.mouseSelectedCharacterCell)
-               me.mouseSelectedCharacterCell = me.selectedCharacterCell = c;
-       return 1;
-}
-float mouseDragNexuizCharmap(entity me, vector coords)
-{
-       return me.mouseMove(me, coords);
-}
-float mousePressNexuizCharmap(entity me, vector coords)
-{
-       me.mouseMove(me, coords);
-       if(me.mouseSelectedCharacterCell >= 0)
-       {
-               me.pressed = 1;
-               me.previouslySelectedCharacterCell = me.selectedCharacterCell;
-       }
-       return 1;
-}
-float mouseReleaseNexuizCharmap(entity me, vector coords)
-{
-       if(!me.pressed)
-               return 0;
-       me.mouseMove(me, coords);
-       if(me.selectedCharacterCell == me.previouslySelectedCharacterCell)
-               me.controlledTextbox.enterText(me.controlledTextbox, CharMap_CellToChar(me.selectedCharacterCell));
-       me.pressed = 0;
-       return 1;
-}
-float keyDownNexuizCharmap(entity me, float key, float ascii, float shift)
-{
-       switch(key)
-       {
-               case K_LEFTARROW:
-                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 159, 160);
-                       return 1;
-               case K_RIGHTARROW:
-                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 1, 160);
-                       return 1;
-               case K_UPARROW:
-                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 144, 160);
-                       return 1;
-               case K_DOWNARROW:
-                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 16, 160);
-                       return 1;
-               case K_HOME:
-                       me.selectedCharacterCell = 0;
-                       return 1;
-               case K_END:
-                       me.selectedCharacterCell = 159;
-                       return 1;
-               case K_SPACE:
-               case K_ENTER:
-               case K_INS:
-                       me.controlledTextbox.enterText(me.controlledTextbox, CharMap_CellToChar(me.selectedCharacterCell));
-                       return 1;
-               default:
-                       return me.controlledTextbox.keyDown(me.controlledTextbox, key, ascii, shift);
-       }
-}
-void focusLeaveNexuizCharmap(entity me)
-{
-       me.controlledTextbox.saveCvars(me.controlledTextbox);
-}
-void drawNexuizCharmap(entity me)
-{
-       if(me.focused)
-       {
-               if(!me.pressed || (me.selectedCharacterCell == me.previouslySelectedCharacterCell))
-               {
-                       vector c;
-                       c = eX * (mod(me.selectedCharacterCell, 16) / 16.0);
-                       c += eY * (floor(me.selectedCharacterCell / 16.0) / 10.0);
-                       draw_Picture(c, me.image2, '0.0625 0.1 0', '1 1 1', 1);
-               }
-       }
-       drawImage(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/checkbox.c b/qcsrc/menu/nexuiz/checkbox.c
deleted file mode 100644 (file)
index 9234ff7..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCheckBox) EXTENDS(CheckBox)
-       METHOD(NexuizCheckBox, configureNexuizCheckBox, void(entity, float, float, string, string))
-       METHOD(NexuizCheckBox, setChecked, void(entity, float))
-       ATTRIB(NexuizCheckBox, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizCheckBox, image, string, SKINGFX_CHECKBOX)
-       ATTRIB(NexuizCheckBox, yesValue, float, 1)
-       ATTRIB(NexuizCheckBox, noValue, float, 0)
-
-       ATTRIB(NexuizCheckBox, color, vector, SKINCOLOR_CHECKBOX_N)
-       ATTRIB(NexuizCheckBox, colorC, vector, SKINCOLOR_CHECKBOX_C)
-       ATTRIB(NexuizCheckBox, colorF, vector, SKINCOLOR_CHECKBOX_F)
-       ATTRIB(NexuizCheckBox, colorD, vector, SKINCOLOR_CHECKBOX_D)
-
-       ATTRIB(NexuizCheckBox, cvarName, string, string_null)
-       METHOD(NexuizCheckBox, loadCvars, void(entity))
-       METHOD(NexuizCheckBox, saveCvars, void(entity))
-
-       ATTRIB(NexuizCheckBox, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizCheckBox, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizCheckBox)
-entity makeNexuizCheckBox(float, string, string);
-entity makeNexuizCheckBoxEx(float, float, string, string);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizCheckBox(float isInverted, string theCvar, string theText)
-{
-       float y, n;
-       if(isInverted > 1)
-       {
-               n = isInverted - 1;
-               y = -n;
-       }
-       else if(isInverted < -1)
-       {
-               n = isInverted + 1;
-               y = -n;
-       }
-       else if(isInverted == 1)
-       {
-               n = 1;
-               y = 0;
-       }
-       else
-       {
-               n = 0;
-               y = 1;
-       }
-       return makeNexuizCheckBoxEx(y, n, theCvar, theText);
-}
-entity makeNexuizCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText)
-{
-       entity me;
-       me = spawnNexuizCheckBox();
-       me.configureNexuizCheckBox(me, theYesValue, theNoValue, theCvar, theText);
-       return me;
-}
-void configureNexuizCheckBoxNexuizCheckBox(entity me, float theYesValue, float theNoValue, string theCvar, string theText)
-{
-       me.yesValue = theYesValue;
-       me.noValue = theNoValue;
-       me.checked = 0;
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.tooltip = getZonedTooltipForIdentifier(theCvar);
-               me.loadCvars(me);
-       }
-       me.configureCheckBox(me, theText, me.fontSize, me.image);
-}
-void setCheckedNexuizCheckBox(entity me, float val)
-{
-       if(val != me.checked)
-       {
-               me.checked = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizCheckBox(entity me)
-{
-       float m, d;
-
-       if not(me.cvarName)
-               return;
-
-       m = (me.yesValue + me.noValue) * 0.5;
-       d = (cvar(me.cvarName) - m) / (me.yesValue - m);
-       me.checked = (d > 0);
-}
-void saveCvarsNexuizCheckBox(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       if(me.checked)
-               cvar_set(me.cvarName, ftos(me.yesValue));
-       else
-               cvar_set(me.cvarName, ftos(me.noValue));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/checkbox_slider_invalid.c b/qcsrc/menu/nexuiz/checkbox_slider_invalid.c
deleted file mode 100644 (file)
index c057d72..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizSliderCheckBox) EXTENDS(CheckBox)
-       METHOD(NexuizSliderCheckBox, configureNexuizSliderCheckBox, void(entity, float, float, entity, string))
-       METHOD(NexuizSliderCheckBox, setChecked, void(entity, float))
-       METHOD(NexuizSliderCheckBox, draw, void(entity))
-       ATTRIB(NexuizSliderCheckBox, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizSliderCheckBox, image, string, SKINGFX_CHECKBOX)
-
-       ATTRIB(NexuizSliderCheckBox, color, vector, SKINCOLOR_CHECKBOX_N)
-       ATTRIB(NexuizSliderCheckBox, colorC, vector, SKINCOLOR_CHECKBOX_C)
-       ATTRIB(NexuizSliderCheckBox, colorF, vector, SKINCOLOR_CHECKBOX_F)
-       ATTRIB(NexuizSliderCheckBox, colorD, vector, SKINCOLOR_CHECKBOX_D)
-
-       ATTRIB(NexuizSliderCheckBox, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizSliderCheckBox, disabledAlpha, float, SKINALPHA_DISABLED)
-
-       ATTRIB(NexuizSliderCheckBox, controlledSlider, entity, NULL)
-       ATTRIB(NexuizSliderCheckBox, offValue, float, -1)
-       ATTRIB(NexuizSliderCheckBox, inverted, float, 0)
-       ATTRIB(NexuizSliderCheckBox, savedValue, float, -1)
-ENDCLASS(NexuizSliderCheckBox)
-entity makeNexuizSliderCheckBox(float, float, entity, string);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizSliderCheckBox(float theOffValue, float isInverted, entity theControlledSlider, string theText)
-{
-       entity me;
-       me = spawnNexuizSliderCheckBox();
-       me.configureNexuizSliderCheckBox(me, theOffValue, isInverted, theControlledSlider, theText);
-       return me;
-}
-void configureNexuizSliderCheckBoxNexuizSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText)
-{
-       me.offValue = theOffValue;
-       me.inverted = isInverted;
-       me.checked = (theControlledSlider.value == theOffValue);
-       if(theControlledSlider.value == median(theControlledSlider.valueMin, theControlledSlider.value, theControlledSlider.valueMax))
-               me.savedValue = theControlledSlider.value;
-       else
-               me.savedValue = theControlledSlider.valueMin; 
-       me.controlledSlider = theControlledSlider;
-       me.configureCheckBox(me, theText, me.fontSize, me.image);
-       me.tooltip = theControlledSlider.tooltip;
-}
-void drawNexuizSliderCheckBox(entity me)
-{
-       me.checked = ((me.controlledSlider.value == me.offValue) != me.inverted);
-       if(me.controlledSlider.value == median(me.controlledSlider.valueMin, me.controlledSlider.value, me.controlledSlider.valueMax))
-               me.savedValue = me.controlledSlider.value;
-       drawCheckBox(me);
-}
-void setCheckedNexuizSliderCheckBox(entity me, float val)
-{
-       if(me.checked == val)
-               return;
-       me.checked = val;
-       if(val == me.inverted)
-               me.controlledSlider.setValue(me.controlledSlider, median(me.controlledSlider.valueMin, me.savedValue, me.controlledSlider.valueMax));
-       else
-               me.controlledSlider.setValue(me.controlledSlider, me.offValue);
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/colorbutton.c b/qcsrc/menu/nexuiz/colorbutton.c
deleted file mode 100644 (file)
index b52c6f5..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizColorButton) EXTENDS(RadioButton)
-       METHOD(NexuizColorButton, configureNexuizColorButton, void(entity, float, float, float))
-       METHOD(NexuizColorButton, setChecked, void(entity, float))
-       METHOD(NexuizColorButton, draw, void(entity))
-       ATTRIB(NexuizColorButton, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizColorButton, image, string, SKINGFX_COLORBUTTON)
-       ATTRIB(NexuizColorButton, image2, string, SKINGFX_COLORBUTTON_COLOR)
-
-       ATTRIB(NexuizColorButton, useDownAsChecked, float, 1)
-
-       ATTRIB(NexuizColorButton, cvarPart, float, 0)
-       ATTRIB(NexuizColorButton, cvarName, string, string_null)
-       ATTRIB(NexuizColorButton, cvarValueFloat, float, 0)
-       METHOD(NexuizColorButton, loadCvars, void(entity))
-       METHOD(NexuizColorButton, saveCvars, void(entity))
-ENDCLASS(NexuizColorButton)
-entity makeNexuizColorButton(float, float, float);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizColorButton(float theGroup, float theColor, float theValue)
-{
-       entity me;
-       me = spawnNexuizColorButton();
-       me.configureNexuizColorButton(me, theGroup, theColor, theValue);
-       return me;
-}
-void configureNexuizColorButtonNexuizColorButton(entity me, float theGroup, float theColor, float theValue)
-{
-       me.cvarName = "_cl_color";
-       me.cvarValueFloat = theValue;
-       me.cvarPart = theColor;
-       me.loadCvars(me);
-       me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
-       me.srcMulti = 1;
-       me.src2 = me.image2;
-}
-void setCheckedNexuizColorButton(entity me, float val)
-{
-       if(val != me.checked)
-       {
-               me.checked = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizColorButton(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       if(me.cvarPart == 1)
-               me.checked = (cvar(me.cvarName) & 240) == me.cvarValueFloat * 16;
-       else
-               me.checked = (cvar(me.cvarName) & 15) == me.cvarValueFloat;
-}
-void saveCvarsNexuizColorButton(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       if(me.checked)
-       {
-               if(me.cvarPart == 1)
-                       cvar_set(me.cvarName, ftos(cvar(me.cvarName) & 15 + me.cvarValueFloat * 16));
-               else
-                       cvar_set(me.cvarName, ftos(cvar(me.cvarName) & 240 + me.cvarValueFloat));
-       }
-       // TODO on an apply button, read _cl_color and execute the color command for it
-}
-void drawNexuizColorButton(entity me)
-{
-       me.color2 = colormapPaletteColor(me.cvarValueFloat, me.cvarPart);
-       drawCheckBox(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/colorpicker.c b/qcsrc/menu/nexuiz/colorpicker.c
deleted file mode 100644 (file)
index ba1a3a3..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizColorpicker) EXTENDS(Image)
-       METHOD(NexuizColorpicker, configureNexuizColorpicker, void(entity, entity))
-       METHOD(NexuizColorpicker, mousePress, float(entity, vector))
-       METHOD(NexuizColorpicker, mouseRelease, float(entity, vector))
-       METHOD(NexuizColorpicker, mouseDrag, float(entity, vector))
-       ATTRIB(NexuizColorpicker, controlledTextbox, entity, NULL)
-       ATTRIB(NexuizColorpicker, image, string, SKINGFX_COLORPICKER)
-       ATTRIB(NexuizColorpicker, imagemargin, vector, SKINMARGIN_COLORPICKER)
-       ATTRIB(NexuizColorpicker, focusable, float, 1)
-       METHOD(NexuizColorpicker, focusLeave, void(entity))
-       METHOD(NexuizColorpicker, keyDown, float(entity, float, float, float))
-       METHOD(NexuizColorpicker, draw, void(entity))
-ENDCLASS(NexuizColorpicker)
-entity makeNexuizColorpicker(entity theTextbox);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizColorpicker(entity theTextbox)
-{
-       entity me;
-       me = spawnNexuizColorpicker();
-       me.configureNexuizColorpicker(me, theTextbox);
-       return me;
-}
-
-void configureNexuizColorpickerNexuizColorpicker(entity me, entity theTextbox)
-{
-       me.controlledTextbox = theTextbox;
-       me.configureImage(me, me.image);
-}
-
-float mousePressNexuizColorpicker(entity me, vector coords)
-{
-       me.mouseDrag(me, coords);
-       return 1;
-}
-
-// must match hslimage.c
-vector hslimage_color(vector v, vector margin)
-{
-    v_x = (v_x - margin_x) / (1 - 2 * margin_x);
-    v_y = (v_y - margin_y) / (1 - 2 * margin_y);
-    if(v_x < 0) v_x = 0;
-    if(v_y < 0) v_y = 0;
-    if(v_x > 1) v_x = 1;
-    if(v_y > 1) v_y = 1;
-    if(v_y > 0.875) // grey bar
-        return hsl_to_rgb(eZ * v_x);
-    else
-        return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ);
-}
-
-float mouseDragNexuizColorpicker(entity me, vector coords)
-{
-       float i;
-       for(;;)
-       {
-               i = me.controlledTextbox.cursorPos;
-               if(i >= 2)
-               {
-                       if(substring(me.controlledTextbox.text, i-2, 1) == "^")
-                               if(strstrofs("0123456789", substring(me.controlledTextbox.text, i-1, 1), 0) >= 0)
-                               {
-                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                       continue;
-                               }
-               }
-
-               if(i >= 5)
-               {
-                       if(substring(me.controlledTextbox.text, i-5, 2) == "^x")
-                               if(strstrofs("0123456789abcdefABCDEF", substring(me.controlledTextbox.text, i-3, 1), 0) >= 0)
-                                       if(strstrofs("0123456789abcdefABCDEF", substring(me.controlledTextbox.text, i-2, 1), 0) >= 0)
-                                               if(strstrofs("0123456789abcdefABCDEF", substring(me.controlledTextbox.text, i-1, 1), 0) >= 0)
-                                               {
-                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
-                                                       continue;
-                                               }
-               }
-               break;
-       }
-
-       vector margin;
-       margin = me.imagemargin;
-       if(coords_x >= margin_x)
-       if(coords_y >= margin_y)
-       if(coords_x <= 1 - margin_x)
-       if(coords_y <= 1 - margin_y)
-               me.controlledTextbox.enterText(me.controlledTextbox, rgb_to_hexcolor(hslimage_color(coords, margin)));
-
-       return 1;
-}
-
-float mouseReleaseNexuizColorpicker(entity me, vector coords)
-{
-       me.mouseDrag(me, coords);
-       return 1;
-}
-
-void focusLeaveNexuizColorpicker(entity me)
-{
-       me.controlledTextbox.saveCvars(me.controlledTextbox);
-}
-float keyDownNexuizColorpicker(entity me, float key, float ascii, float shift)
-{
-       return me.controlledTextbox.keyDown(me.controlledTextbox, key, ascii, shift);
-}
-void drawNexuizColorpicker(entity me)
-{
-       drawImage(me);
-
-       float B, C, aC;
-       C = cvar("r_textcontrast");
-       B = cvar("r_textbrightness");
-
-       // for this to work, C/(1-B) must be in 0..1
-       // B must be < 1
-       // C must be < 1-B
-       
-       B = bound(0, B, 1);
-       C = bound(0, C, 1-B);
-
-       aC = 1 - C / (1 - B);
-
-       draw_Picture(me.imgOrigin, strcat(me.src, "_m"), me.imgSize, '0 0 0', aC);
-       draw_Picture(me.imgOrigin, strcat(me.src, "_m"), me.imgSize, me.color, B);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/commandbutton.c b/qcsrc/menu/nexuiz/commandbutton.c
deleted file mode 100644 (file)
index 24a83bc..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef COMMANDBUTTON_CLOSE
-# define COMMANDBUTTON_CLOSE 1
-# define COMMANDBUTTON_APPLY 2
-//# define COMMANDBUTTON_REVERT 4
-#endif
-
-#ifdef INTERFACE
-CLASS(NexuizCommandButton) EXTENDS(NexuizButton)
-       METHOD(NexuizCommandButton, configureNexuizCommandButton, void(entity, string, vector, string, float))
-       ATTRIB(NexuizCommandButton, onClickCommand, string, string_null)
-       ATTRIB(NexuizCommandButton, flags, float, 0)
-ENDCLASS(NexuizCommandButton)
-entity makeNexuizCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizCommandButton(string theText, vector theColor, string theCommand, float theFlags)
-{
-       entity me;
-       me = spawnNexuizCommandButton();
-       me.configureNexuizCommandButton(me, theText, theColor, theCommand, theFlags);
-       return me;
-}
-
-void NexuizCommandButton_Click(entity me, entity other)
-{
-       //if(me.flags & COMMANDBUTTON_APPLY)
-       //      saveAllCvars(me.parent);
-       cmd("\n", me.onClickCommand, "\n");
-       //if(me.flags & COMMANDBUTTON_REVERT)
-       //      loadAllCvars(me.parent);
-       if(me.flags & COMMANDBUTTON_CLOSE)
-               m_goto(string_null);
-}
-
-void configureNexuizCommandButtonNexuizCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
-{
-       me.configureNexuizButton(me, theText, theColor);
-       me.onClickCommand = theCommand;
-       me.flags = theFlags;
-       me.onClick = NexuizCommandButton_Click;
-       me.onClickEntity = me;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/credits.c b/qcsrc/menu/nexuiz/credits.c
deleted file mode 100644 (file)
index 032904c..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCreditsList) EXTENDS(NexuizListBox)
-       METHOD(NexuizCreditsList, configureNexuizCreditsList, void(entity))
-       ATTRIB(NexuizCreditsList, rowsPerItem, float, 1)
-       METHOD(NexuizCreditsList, draw, void(entity))
-       METHOD(NexuizCreditsList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizCreditsList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizCreditsList, keyDown, float(entity, float, float, float))
-       METHOD(NexuizCreditsList, destroy, void(entity))
-
-       ATTRIB(NexuizCreditsList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizCreditsList, realUpperMargin, float, 0)
-       ATTRIB(NexuizCreditsList, bufferIndex, float, 0)
-       ATTRIB(NexuizCreditsList, scrolling, float, 0)
-
-       ATTRIB(NexuizListBox, alphaBG, float, 0)
-ENDCLASS(NexuizCreditsList)
-entity makeNexuizCreditsList();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizCreditsList()
-{
-       entity me;
-       me = spawnNexuizCreditsList();
-       me.configureNexuizCreditsList(me);
-       return me;
-}
-void configureNexuizCreditsListNexuizCreditsList(entity me)
-{
-       me.configureNexuizListBox(me);
-       // load the file
-       me.bufferIndex = buf_load("nexuiz-credits.txt");
-       me.nItems = buf_getsize(me.bufferIndex);
-}
-void destroyNexuizCreditsList(entity me)
-{
-       buf_del(me.bufferIndex);
-}
-void drawNexuizCreditsList(entity me)
-{
-       float i;
-       if(me.scrolling)
-       {
-               me.scrollPos = bound(0, (time - me.scrolling) * me.itemHeight, me.nItems * me.itemHeight - 1);
-               i = min(me.selectedItem, floor((me.scrollPos + 1) / me.itemHeight - 1));
-               i = max(i, ceil(me.scrollPos / me.itemHeight));
-               me.setSelected(me, i);
-       }
-       drawListBox(me);
-}
-void resizeNotifyNexuizCreditsList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
-       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
-       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-}
-void drawListBoxItemNexuizCreditsList(entity me, float i, vector absSize, float isSelected)
-{
-       // layout: Ping, Credits name, Map name, NP, TP, MP
-       string s;
-       float theAlpha;
-       vector theColor;
-
-       s = bufstr_get(me.bufferIndex, i);
-
-       if(substring(s, 0, 2) == "**")
-       {
-               s = substring(s, 2, strlen(s) - 2);
-               theColor = SKINCOLOR_CREDITS_TITLE;
-               theAlpha = SKINALPHA_CREDITS_TITLE;
-       }
-       else if(substring(s, 0, 1) == "*")
-       {
-               s = substring(s, 1, strlen(s) - 1);
-               theColor = SKINCOLOR_CREDITS_FUNCTION;
-               theAlpha = SKINALPHA_CREDITS_FUNCTION;
-       }
-       else
-       {
-               theColor = SKINCOLOR_CREDITS_PERSON;
-               theAlpha = SKINALPHA_CREDITS_PERSON;
-       }
-
-       draw_CenterText(me.realUpperMargin * eY + 0.5 * eX, s, me.realFontSize, theColor, theAlpha, 0);
-}
-
-float keyDownNexuizCreditsList(entity me, float scan, float ascii, float shift)
-{
-       float i;
-       me.dragScrollTimer = time;
-       me.scrolling = 0;
-
-       if(scan == K_PGUP)
-               me.scrollPos = max(me.scrollPos - 0.5, 0);
-       else if(scan == K_PGDN)
-               me.scrollPos = min(me.scrollPos + 0.5, me.nItems * me.itemHeight - 1);
-       else if(scan == K_UPARROW)
-               me.scrollPos = max(me.scrollPos - me.itemHeight, 0);
-       else if(scan == K_DOWNARROW)
-               me.scrollPos = min(me.scrollPos + me.itemHeight, me.nItems * me.itemHeight - 1);
-       else
-               return keyDownListBox(me, scan, ascii, shift);
-
-       i = min(me.selectedItem, floor((me.scrollPos + 1) / me.itemHeight - 1));
-       i = max(i, ceil(me.scrollPos / me.itemHeight));
-       me.setSelected(me, i);
-
-       return 1;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/crosshairbutton.c b/qcsrc/menu/nexuiz/crosshairbutton.c
deleted file mode 100644 (file)
index aa14d30..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCrosshairButton) EXTENDS(RadioButton)
-       METHOD(NexuizCrosshairButton, configureNexuizCrosshairButton, void(entity, float, float))
-       METHOD(NexuizCrosshairButton, setChecked, void(entity, float))
-       METHOD(NexuizCrosshairButton, draw, void(entity))
-       ATTRIB(NexuizCrosshairButton, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizCrosshairButton, image, string, SKINGFX_CROSSHAIRBUTTON)
-
-       ATTRIB(NexuizCrosshairButton, useDownAsChecked, float, 1)
-       ATTRIB(NexuizCrosshairButton, src3, string, string_null)
-
-       ATTRIB(NexuizCrosshairButton, cvarName, string, string_null)
-       ATTRIB(NexuizCrosshairButton, cvarValueFloat, float, 0)
-       METHOD(NexuizCrosshairButton, loadCvars, void(entity))
-       METHOD(NexuizCrosshairButton, saveCvars, void(entity))
-ENDCLASS(NexuizCrosshairButton)
-entity makeNexuizCrosshairButton(float, float);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizCrosshairButton(float theGroup, float theCrosshair)
-{
-       entity me;
-       me = spawnNexuizCrosshairButton();
-       me.configureNexuizCrosshairButton(me, theGroup, theCrosshair);
-       return me;
-}
-void configureNexuizCrosshairButtonNexuizCrosshairButton(entity me, float theGroup, float theCrosshair)
-{
-       me.cvarName = "crosshair";
-       me.cvarValueFloat = theCrosshair;
-       me.loadCvars(me);
-       me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
-       me.srcMulti = 1;
-       me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
-}
-void setCheckedNexuizCrosshairButton(entity me, float val)
-{
-       if(val != me.checked)
-       {
-               me.checked = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizCrosshairButton(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       me.checked = (cvar(me.cvarName) == me.cvarValueFloat);
-}
-void saveCvarsNexuizCrosshairButton(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       if(me.checked)
-               cvar_set(me.cvarName, ftos(me.cvarValueFloat));
-       // TODO on an apply button, read _cl_color and execute the color command for it
-}
-void drawNexuizCrosshairButton(entity me)
-{
-       vector sz, rgb;
-       float a;
-
-       rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");
-       a = cvar("crosshair_color_alpha");
-
-       if(!me.checked && !me.focused)
-       {
-               a *= me.disabledAlpha;
-               rgb = '1 1 1';
-       }
-
-       drawCheckBox(me);
-
-       sz = draw_PictureSize(me.src3);
-       sz = globalToBoxSize(sz, draw_scale);
-       sz = sz * cvar("crosshair_size");
-       if(sz_x > 0.95)
-               sz = sz * (0.95 / sz_x);
-       if(sz_y > 0.95)
-               sz = sz * (0.95 / sz_y);
-
-       draw_Picture('0.5 0.5 0' - 0.5 * sz, me.src3, sz, rgb, a);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/cvarlist.c b/qcsrc/menu/nexuiz/cvarlist.c
deleted file mode 100644 (file)
index 105ea9e..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCvarList) EXTENDS(NexuizListBox)
-       METHOD(NexuizCvarList, configureNexuizCvarList, void(entity))
-       ATTRIB(NexuizCvarList, rowsPerItem, float, 1)
-       METHOD(NexuizCvarList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizCvarList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizCvarList, keyDown, float(entity, float, float, float))
-
-       METHOD(NexuizCvarList, destroy, void(entity))
-
-       ATTRIB(NexuizCvarList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizCvarList, realUpperMargin, float, 0)
-       ATTRIB(NexuizCvarList, columnNameOrigin, float, 0)
-       ATTRIB(NexuizCvarList, columnNameSize, float, 0)
-       ATTRIB(NexuizCvarList, columnValueOrigin, float, 0)
-       ATTRIB(NexuizCvarList, columnValueSize, float, 0)
-
-       METHOD(NexuizCvarList, setSelected, void(entity, float))
-       ATTRIB(NexuizCvarList, controlledTextbox, entity, NULL)
-       ATTRIB(NexuizCvarList, cvarNameBox, entity, NULL)
-       ATTRIB(NexuizCvarList, cvarDescriptionBox, entity, NULL)
-       ATTRIB(NexuizCvarList, cvarTypeBox, entity, NULL)
-       ATTRIB(NexuizCvarList, cvarValueBox, entity, NULL)
-       ATTRIB(NexuizCvarList, cvarDefaultBox, entity, NULL)
-
-       ATTRIB(NexuizCvarList, handle, float, -1)
-       ATTRIB(NexuizCvarList, cvarName, string, string_null)
-       ATTRIB(NexuizCvarList, cvarDescription, string, string_null)
-       ATTRIB(NexuizCvarList, cvarType, string, string_null)
-       ATTRIB(NexuizCvarList, cvarDefault, string, string_null)
-ENDCLASS(NexuizCvarList)
-entity makeNexuizCvarList();
-void CvarList_Filter_Change(entity box, entity me);
-void CvarList_Value_Change(entity box, entity me);
-void CvarList_Revert_Click(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizCvarList()
-{
-       entity me;
-       me = spawnNexuizCvarList();
-       me.configureNexuizCvarList(me);
-       return me;
-}
-void configureNexuizCvarListNexuizCvarList(entity me)
-{
-       me.configureNexuizListBox(me);
-
-       me.handle = buf_create();
-       buf_cvarlist(me.handle, "", "_");
-       me.nItems = buf_getsize(me.handle);
-}
-void destroyNexuizCvarList(entity me)
-{
-       buf_del(me.handle);
-}
-void setSelectedNexuizCvarList(entity me, float i)
-{
-       string s;
-
-       setSelectedListBox(me, i);
-       if(me.nItems == 0)
-               return;
-       
-       if(me.cvarName)
-               strunzone(me.cvarName);
-       if(me.cvarDescription)
-               strunzone(me.cvarDescription);
-       if(me.cvarType)
-               strunzone(me.cvarType);
-       if(me.cvarDefault)
-               strunzone(me.cvarDefault);
-       me.cvarName = strzone(bufstr_get(me.handle, me.selectedItem));
-       me.cvarDescription = strzone(cvar_description(me.cvarName));
-       me.cvarDefault = strzone(cvar_defstring(me.cvarName));
-
-       float t;
-       t = cvar_type(me.cvarName);
-       me.cvarType = "";
-       if(t & CVAR_TYPEFLAG_SAVED)
-               me.cvarType = strcat(me.cvarType, ", will be saved to config.cfg");
-       else
-               me.cvarType = strcat(me.cvarType, ", will not be saved");
-       if(t & CVAR_TYPEFLAG_PRIVATE)
-               me.cvarType = strcat(me.cvarType, ", private");
-       if(t & CVAR_TYPEFLAG_ENGINE)
-               me.cvarType = strcat(me.cvarType, ", engine setting");
-       if(t & CVAR_TYPEFLAG_READONLY)
-               me.cvarType = strcat(me.cvarType, ", read only");
-       me.cvarType = strzone(substring(me.cvarType, 2, strlen(me.cvarType) - 2));
-
-       me.cvarNameBox.setText(me.cvarNameBox, me.cvarName);
-       me.cvarDescriptionBox.setText(me.cvarDescriptionBox, me.cvarDescription);
-       me.cvarTypeBox.setText(me.cvarTypeBox, me.cvarType);
-       me.cvarDefaultBox.setText(me.cvarDefaultBox, me.cvarDefault);
-
-       // this one can handle tempstrings
-       s = cvar_string(me.cvarName);
-       me.cvarValueBox.setText(me.cvarValueBox, s);
-       me.cvarValueBox.cursorPos = strlen(s);
-}
-void CvarList_Filter_Change(entity box, entity me)
-{
-       buf_cvarlist(me.handle, box.text, "_");
-       me.nItems = buf_getsize(me.handle);
-
-       me.setSelected(me, 0);
-}
-void resizeNotifyNexuizCvarList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
-       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
-       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-
-       me.columnNameOrigin = 0;
-       me.columnValueSize = me.realFontSize_x * 20;
-       me.columnNameSize = 1 - me.columnValueSize - me.realFontSize_x;
-       me.columnValueOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
-
-       me.setSelected(me, me.selectedItem);
-}
-void drawListBoxItemNexuizCvarList(entity me, float i, vector absSize, float isSelected)
-{
-       string k, v, d;
-       float t;
-
-       vector theColor;
-       float theAlpha;
-
-       string s;
-
-       if(isSelected)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-       
-       k = bufstr_get(me.handle, i);
-
-       v = cvar_string(k);
-       d = cvar_defstring(k);
-       t = cvar_type(k);
-       if(t & CVAR_TYPEFLAG_SAVED)
-               theAlpha = SKINALPHA_CVARLIST_SAVED;
-       else
-               theAlpha = SKINALPHA_CVARLIST_TEMPORARY;
-       if(v == d)
-               theColor = SKINCOLOR_CVARLIST_UNCHANGED;
-       else
-               theColor = SKINCOLOR_CVARLIST_CHANGED;
-
-       s = draw_TextShortenToWidth(k, me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
-       s = draw_TextShortenToWidth(v, me.columnValueSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + me.columnValueOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
-}
-
-float keyDownNexuizCvarList(entity me, float scan, float ascii, float shift)
-{
-       if(keyDownListBox(me, scan, ascii, shift))
-               return 1;
-       else if(!me.controlledTextbox)
-               return 0;
-       else
-               return me.controlledTextbox.keyDown(me.controlledTextbox, scan, ascii, shift);
-}
-
-void CvarList_Value_Change(entity box, entity me)
-{
-       cvar_set(me.cvarNameBox.text, box.text);
-}
-
-void CvarList_Revert_Click(entity btn, entity me)
-{
-       me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
-       me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/demolist.c b/qcsrc/menu/nexuiz/demolist.c
deleted file mode 100644 (file)
index d3d9405..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizDemoList) EXTENDS(NexuizListBox)
-    METHOD(NexuizDemoList, configureNexuizDemoList, void(entity))
-    ATTRIB(NexuizDemoList, rowsPerItem, float, 1)
-    METHOD(NexuizDemoList, resizeNotify, void(entity, vector, vector, vector, vector))
-    METHOD(NexuizDemoList, drawListBoxItem, void(entity, float, vector, float))
-    METHOD(NexuizDemoList, getDemos, void(entity))
-    METHOD(NexuizDemoList, startDemo, void(entity))    
-    METHOD(NexuizDemoList, demoName, string(entity, float))
-    METHOD(NexuizDemoList, clickListBoxItem, void(entity, float, vector))
-    METHOD(NexuizDemoList, keyDown, float(entity, float, float, float))
-    METHOD(NexuizDemoList, destroy, void(entity))
-    METHOD(NexuizDemoList, showNotify, void(entity))
-    ATTRIB(NexuizDemoList, listDemo, float, -1)
-    ATTRIB(NexuizDemoList, realFontSize, vector, '0 0 0')
-    ATTRIB(NexuizDemoList, columnNameOrigin, float, 0)
-    ATTRIB(NexuizDemoList, columnNameSize, float, 0)
-    ATTRIB(NexuizDemoList, realUpperMargin, float, 0)
-    ATTRIB(NexuizDemoList, origin, vector, '0 0 0')
-    ATTRIB(NexuizDemoList, itemAbsSize, vector, '0 0 0')
-    ATTRIB(NexuizDemoList, lastClickedDemo, float, -1)
-    ATTRIB(NexuizDemoList, lastClickedTime, float, 0)
-    ATTRIB(NexuizDemoList, filterString, string, string_null)    
-ENDCLASS(NexuizDemoList)
-
-entity makeNexuizDemoList();
-void StartDemo_Click(entity btn, entity me);
-void TimeDemo_Click(entity btn, entity me);
-void DemoList_Filter_Change(entity box, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-
-entity makeNexuizDemoList()
-{
-    entity me;
-    me = spawnNexuizDemoList();
-    me.configureNexuizDemoList(me);
-    return me;
-}
-
-void configureNexuizDemoListNexuizDemoList(entity me)
-{
-    me.configureNexuizListBox(me);
-    me.getDemos(me);    
-}
-
-string demoNameNexuizDemoList(entity me, float i )
-{
-    string s;
-    s = search_getfilename(me.listDemo, i);
-    s = substring(s, 6, strlen(s) - 6 - 4);  // demos/, .dem
-    return s;
-}
-
-
-void getDemosNexuizDemoList(entity me)
-{
-    string s;
-    
-    if(me.filterString)
-       //subdirectory in filterString allowed    
-       s=strcat("demos/*", me.filterString, "*.dem");          
-    else
-       s="demos/*.dem";
-       
-    //dprint("Search demos with the pattern ", s, "\n");    
-       if(me.listDemo >= 0)
-               search_end(me.listDemo);
-    me.listDemo = search_begin(s, FALSE, TRUE);
-    if(me.listDemo < 0)
-       me.nItems=0;
-    else
-       me.nItems=search_getsize(me.listDemo);                          
-}
-
-void destroyNexuizDemoList(entity me)
-{
-    search_end(me.listDemo);
-}
-
-void resizeNotifyNexuizDemoList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-    me.itemAbsSize = '0 0 0';
-    resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-    me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
-    me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
-    me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-
-    me.columnNameOrigin = me.realFontSize_x;
-    me.columnNameSize = 1 - 2 * me.realFontSize_x;
-}
-
-void drawListBoxItemNexuizDemoList(entity me, float i, vector absSize, float isSelected)
-{
-    string s;
-    if(isSelected)
-       draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-               
-    s = me.demoName(me,i);
-    s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
-    draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);              
-}
-
-void showNotifyNexuizDemoList(entity me)
-{
-    me.getDemos(me);
-}
-
-void DemoList_Filter_Change(entity box, entity me)
-{      
-    if(me.filterString)
-       strunzone(me.filterString);
-    
-    if(box.text != "")
-       me.filterString = strzone(box.text);
-    else
-       me.filterString = string_null;
-               
-    me.getDemos(me);
-}
-
-void startDemoNexuizDemoList(entity me)
-{
-    string s;
-    s = me.demoName(me,me.selectedItem);
-    localcmd("playdemo demos/", s, ".dem\nwait\ntogglemenu\n");        
-}
-
-void StartDemo_Click(entity btn, entity me)
-{
-    me.startDemo(me);
-}
-
-void TimeDemo_Click(entity btn, entity me)
-{
-    string s;
-    s = me.demoName(me,me.selectedItem);
-    localcmd("timedemo demos/", s, ".dem\nwait\ntogglemenu\n");        
-}
-
-void clickListBoxItemNexuizDemoList(entity me, float i, vector where)
-{
-    if(i == me.lastClickedDemo)
-        if(time < me.lastClickedTime + 0.3)
-        {
-            // DOUBLE CLICK!
-            me.setSelected(me, i);
-            me.startDemo(me);
-        }
-    me.lastClickedDemo = i;
-    me.lastClickedTime = time;
-}
-
-float keyDownNexuizDemoList(entity me, float scan, float ascii, float shift)
-{
-    if(scan == K_ENTER) {
-        me.startDemo(me);
-        return 1;
-    }
-    else
-        return keyDownListBox(me, scan, ascii, shift);
-}
-#endif
-
diff --git a/qcsrc/menu/nexuiz/dialog.c b/qcsrc/menu/nexuiz/dialog.c
deleted file mode 100644 (file)
index eb3204d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizDialog) EXTENDS(Dialog)
-       // still to be customized by user
-       /*
-       ATTRIB(NexuizDialog, closable, float, 1)
-       ATTRIB(NexuizDialog, title, string, "Form1") // ;)
-       ATTRIB(NexuizDialog, color, vector, '1 0.5 1')
-       ATTRIB(NexuizDialog, intendedWidth, float, 0)
-       ATTRIB(NexuizDialog, rows, float, 3)
-       ATTRIB(NexuizDialog, columns, float, 2)
-       */
-       ATTRIB(NexuizDialog, marginTop, float, SKINMARGIN_TOP) // pixels
-       ATTRIB(NexuizDialog, marginBottom, float, SKINMARGIN_BOTTOM) // pixels
-       ATTRIB(NexuizDialog, marginLeft, float, SKINMARGIN_LEFT) // pixels
-       ATTRIB(NexuizDialog, marginRight, float, SKINMARGIN_RIGHT) // pixels
-       ATTRIB(NexuizDialog, columnSpacing, float, SKINMARGIN_COLUMNS) // pixels
-       ATTRIB(NexuizDialog, rowSpacing, float, SKINMARGIN_ROWS) // pixels
-       ATTRIB(NexuizDialog, rowHeight, float, SKINFONTSIZE_NORMAL * SKINHEIGHT_NORMAL) // pixels
-       ATTRIB(NexuizDialog, titleHeight, float, SKINFONTSIZE_TITLE * SKINHEIGHT_TITLE) // pixels
-       ATTRIB(NexuizDialog, titleFontSize, float, SKINFONTSIZE_TITLE) // pixels
-
-       ATTRIB(NexuizDialog, backgroundImage, string, SKINGFX_DIALOGBORDER)
-       ATTRIB(NexuizDialog, borderLines, float, SKINHEIGHT_DIALOGBORDER)
-       ATTRIB(NexuizDialog, closeButtonImage, string, SKINGFX_CLOSEBUTTON)
-       ATTRIB(NexuizDialog, zoomedOutTitleBarPosition, float, SKINHEIGHT_ZOOMEDTITLE * 0.5 - 0.5)
-       ATTRIB(NexuizDialog, zoomedOutTitleBar, float, SKINHEIGHT_ZOOMEDTITLE != 0)
-
-       ATTRIB(NexuizDialog, alpha, float, SKINALPHA_TEXT)
-
-       METHOD(NexuizDialog, configureDialog, void(entity))
-ENDCLASS(NexuizDialog)
-entity currentDialog;
-#endif
-
-#ifdef IMPLEMENTATION
-void configureDialogNexuizDialog(entity me)
-{
-       currentDialog = me;
-       configureDialogDialog(me);
-       me.tooltip = getZonedTooltipForIdentifier(me.classname);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_credits.c b/qcsrc/menu/nexuiz/dialog_credits.c
deleted file mode 100644 (file)
index c1d690f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCreditsDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizCreditsDialog, fill, void(entity))
-       METHOD(NexuizCreditsDialog, focusEnter, void(entity))
-       ATTRIB(NexuizCreditsDialog, title, string, "Credits")
-       ATTRIB(NexuizCreditsDialog, color, vector, SKINCOLOR_DIALOG_CREDITS)
-       ATTRIB(NexuizCreditsDialog, intendedWidth, float, SKINWIDTH_CREDITS)
-       ATTRIB(NexuizCreditsDialog, rows, float, SKINROWS_CREDITS)
-       ATTRIB(NexuizCreditsDialog, columns, float, 2)
-       ATTRIB(NexuizCreditsDialog, creditsList, entity, NULL)
-ENDCLASS(NexuizCreditsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void fillNexuizCreditsDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, me.rows - 1, me.columns, me.creditsList = makeNexuizCreditsList());
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-void focusEnterNexuizCreditsDialog(entity me)
-{
-       me.creditsList.scrolling = time + 1;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer.c b/qcsrc/menu/nexuiz/dialog_multiplayer.c
deleted file mode 100644 (file)
index b3113ba..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizMultiplayerDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizMultiplayerDialog, fill, void(entity))
-       ATTRIB(NexuizMultiplayerDialog, title, string, "Multiplayer")
-       ATTRIB(NexuizMultiplayerDialog, color, vector, SKINCOLOR_DIALOG_MULTIPLAYER)
-       ATTRIB(NexuizMultiplayerDialog, intendedWidth, float, 0.96)
-       ATTRIB(NexuizMultiplayerDialog, rows, float, 24)
-       ATTRIB(NexuizMultiplayerDialog, columns, float, 6)
-ENDCLASS(NexuizMultiplayerDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void fillNexuizMultiplayerDialog(entity me)
-{
-       entity mc, e;
-       mc = makeNexuizTabController(me.rows - 2);
-       me.TR(me);
-               me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Servers",  makeNexuizServerListTab()));
-                       setDependentStringNotEqual(e, "_cl_name", "Player");
-               me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Create",  makeNexuizServerCreateTab()));
-                       setDependentStringNotEqual(e, "_cl_name", "Player");
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Demos",   makeNexuizDemoBrowserTab()));
-               me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Player Setup",  makeNexuizPlayerSettingsTab()));
-                       if(cvar_string("_cl_name") == "Player")
-                               e.onClick(e, e.onClickEntity); // lol animation
-
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, me.rows - 2, me.columns, mc);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_create.c b/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
deleted file mode 100644 (file)
index 3276d45..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizServerCreateTab) EXTENDS(NexuizTab)
-       METHOD(NexuizServerCreateTab, fill, void(entity))
-       METHOD(NexuizServerCreateTab, gameTypeChangeNotify, void(entity))
-       ATTRIB(NexuizServerCreateTab, title, string, "Create")
-       ATTRIB(NexuizServerCreateTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizServerCreateTab, rows, float, 22)
-       ATTRIB(NexuizServerCreateTab, columns, float, 6.5)
-
-       ATTRIB(NexuizServerCreateTab, mapListBox, entity, NULL)
-       ATTRIB(NexuizServerCreateTab, sliderFraglimit, entity, NULL)
-       ATTRIB(NexuizServerCreateTab, sliderTimelimit, entity, NULL)
-       ATTRIB(NexuizServerCreateTab, checkboxFraglimit, entity, NULL)
-       ATTRIB(NexuizServerCreateTab, checkboxFraglimitMapinfo, entity, NULL)
-ENDCLASS(NexuizServerCreateTab)
-entity makeNexuizServerCreateTab();
-#endif
-
-#ifdef IMPLEMENTATION
-
-entity makeNexuizServerCreateTab()
-{
-       entity me;
-       me = spawnNexuizServerCreateTab();
-       me.configureDialog(me);
-       return me;
-}
-
-void fillNexuizServerCreateTab(entity me)
-{
-       entity e, e0;
-       float n;
-
-       me.TR(me);
-               n = 6;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_dm", "DM"));
-                       e0 = e;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_lms", "LMS"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_arena", "Arena"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_runematch", "Runematch"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_race", "Race"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_cts", "Race CTS"));
-                       if(e.checked) e0 = NULL;
-       me.TR(me);
-               n = 8;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_tdm", "TDM"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_ctf", "CTF"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_ca", "CA"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_domination", "Domination"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_keyhunt", "Key Hunt"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_assault", "Assault"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_onslaught", "Onslaught"));
-                       if(e.checked) e0 = NULL;
-               me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_nexball", "Nexball"));
-                       if(e.checked) e0 = NULL;
-               if(e0)
-               {
-                       //print("NO CHECK\n");
-                       e0.setChecked(e0, 1);
-               }
-       me.TR(me);
-       me.TR(me);
-               me.mapListBox = makeNexuizMapList();
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Map list:"));
-                       makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
-       me.TR(me);
-               me.TD(me, me.rows - 7, 3, me.mapListBox);
-       me.gotoRC(me, me.rows - 3, 0);
-               me.TDempty(me, 0.5);
-               me.TD(me, 1, 1, e = makeNexuizButton("All", '0 0 0'));
-                       e.onClick = MapList_All;
-                       e.onClickEntity = me.mapListBox;
-               me.TD(me, 1, 1, e = makeNexuizButton("None", '0 0 0'));
-                       e.onClick = MapList_None;
-                       e.onClickEntity = me.mapListBox;
-               me.TDempty(me, 0.5);
-
-       me.gotoRC(me, 3, 3.5); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Match settings:"));
-       me.TR(me);
-               me.sliderTimelimit = makeNexuizSlider(1.0, 60.0, 0.5, "timelimit_override");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, me.sliderTimelimit, "Time limit:"));
-               me.TD(me, 1, 2, me.sliderTimelimit);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeNexuizSliderCheckBox(-1, 0, me.sliderTimelimit, "Use map specified default"));
-       me.TR(me);
-               me.sliderFraglimit = makeNexuizSlider(1.0, 2000.0, 5, "fraglimit_override");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, me.sliderFraglimit, "Point limit:"));
-                       me.checkboxFraglimit = e;
-               me.TD(me, 1, 2, me.sliderFraglimit);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeNexuizSliderCheckBox(-1, 0, me.sliderFraglimit, "Use map specified default"));
-                       me.checkboxFraglimitMapinfo = e;
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Player slots:"));
-               me.TD(me, 1, 2, makeNexuizSlider(1, 32, 1, "menu_maxplayers"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Number of bots:"));
-               me.TD(me, 1, 2, makeNexuizSlider(0, 9, 1, "bot_number"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Bot skill:"));
-                       setDependent(e, "bot_number", 0, -1);
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("skill"));
-                       e.addValue(e, "Botlike", "0");
-                       e.addValue(e, "Beginner", "1");
-                       e.addValue(e, "You will win", "2");
-                       e.addValue(e, "You can win", "3");
-                       e.addValue(e, "You might win", "4");
-                       e.addValue(e, "Advanced", "5");
-                       e.addValue(e, "Expert", "6");
-                       e.addValue(e, "Pro", "7");
-                       e.addValue(e, "Assassin", "8");
-                       e.addValue(e, "Unhuman", "9");
-                       e.addValue(e, "Godlike", "10");
-                       e.configureNexuizTextSliderValues(e);
-                       setDependent(e, "bot_number", 0, -1);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Bot names:"));
-               me.TD(me, 1, 0.7, e = makeNexuizInputBox(1, "bot_prefix"));
-                       setDependent(e, "bot_number", 0, -1);
-               me.TD(me, 1, 0.6, e = makeNexuizTextLabel(0.5, "Shadow"));
-                       setDependent(e, "bot_number", 0, -1);
-               me.TD(me, 1, 0.7, e = makeNexuizInputBox(1, "bot_suffix"));
-                       setDependent(e, "bot_number", 0, -1);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Map voting:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("g_maplist_votable"));
-                       e.addValue(e, "No voting", "0");
-                       e.addValue(e, "2 choices", "2");
-                       e.addValue(e, "3 choices", "3");
-                       e.addValue(e, "4 choices", "4");
-                       e.addValue(e, "5 choices", "5");
-                       e.addValue(e, "6 choices", "6");
-                       e.addValue(e, "7 choices", "7");
-                       e.addValue(e, "8 choices", "8");
-                       e.addValue(e, "9 choices", "9");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
-       me.TR(me);
-       me.TR(me);
-               me.TDempty(me, 0.5);
-               me.TD(me, 1, 2, e = makeNexuizButton("Advanced settings...", '0 0 0'));
-                       e.onClick = DialogOpenButton_Click;
-                       e.onClickEntity = main.advancedDialog;
-                       main.advancedDialog.refilterEntity = me.mapListBox;
-               me.TR(me);
-               me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizButton("Mutators...", '0 0 0'));
-                       e.onClick = DialogOpenButton_Click;
-                       e.onClickEntity = main.mutatorsDialog;
-                       main.mutatorsDialog.refilterEntity = me.mapListBox;
-               me.TD(me, 1, 2, e0 = makeNexuizTextLabel(0, string_null));
-                       e0.textEntity = main.mutatorsDialog;
-                       e0.allowCut = 1;
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, 2, e = makeNexuizModButton("Multiplayer_Create"));
-               me.TD(me, 1, me.columns - 2, e = makeNexuizButton("Start Multiplayer!", '0 0 0'));
-                       e.onClick = MapList_LoadMap;
-                       e.onClickEntity = me.mapListBox;
-                       me.mapListBox.startButton = e;
-
-       me.gameTypeChangeNotify(me);
-}
-
-void GameType_ConfigureSliders(entity e, entity l, entity l2, string pLabel, float pMin, float pMax, float pStep, string pCvar)
-{
-       if(pCvar == "")
-       {
-               e.configureNexuizSlider(e, pMin, pMax, pStep, string_null);
-               l.setText(l, pLabel);
-               e.disabled = l.disabled = l2.disabled = TRUE;
-       }
-       else
-       {
-               e.configureNexuizSlider(e, pMin, pMax, pStep, pCvar);
-               l.setText(l, pLabel);
-               e.disabled = l.disabled = l2.disabled = FALSE;
-       }
-}
-
-void gameTypeChangeNotifyNexuizServerCreateTab(entity me)
-{
-       // tell the map list to update
-       float gt;
-       entity e, l, l2;
-       gt = MapInfo_CurrentGametype();
-       e = me.sliderFraglimit;
-       l = me.checkboxFraglimit;
-       l2 = me.checkboxFraglimitMapinfo;
-       switch(gt)
-       {
-               case MAPINFO_TYPE_CTF:        GameType_ConfigureSliders(e, l, l2, "Capture limit:",   1,   20, 1, "capturelimit_override");     break;
-               case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "g_domination_point_limit"); break;
-               case MAPINFO_TYPE_KEYHUNT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",   200, 1500, 50, "g_keyhunt_point_limit");    break;
-               case MAPINFO_TYPE_RUNEMATCH:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "g_runematch_point_limit");  break;
-               case MAPINFO_TYPE_LMS:        GameType_ConfigureSliders(e, l, l2, "Lives:",           3,   50,  1, "g_lms_lives_override");     break;
-               case MAPINFO_TYPE_RACE:       GameType_ConfigureSliders(e, l, l2, "Laps:",            1,   25,  1, "g_race_laps_limit");        break;
-               case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, l2, "Goals:",           1,   50,  1, "g_nexball_goallimit");      break;
-               case MAPINFO_TYPE_ASSAULT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
-               case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
-               case MAPINFO_TYPE_CTS:        GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
-               default:                      GameType_ConfigureSliders(e, l, l2, "Frag limit:",      5,  100,  5, "fraglimit_override");       break;
-       }
-       me.mapListBox.refilter(me.mapListBox);
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_create_advanced.c b/qcsrc/menu/nexuiz/dialog_multiplayer_create_advanced.c
deleted file mode 100644 (file)
index c454a8c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizAdvancedDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizAdvancedDialog, fill, void(entity))
-       METHOD(NexuizAdvancedDialog, showNotify, void(entity))
-       METHOD(NexuizAdvancedDialog, close, void(entity))
-       ATTRIB(NexuizAdvancedDialog, title, string, "Advanced server settings")
-       ATTRIB(NexuizAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
-       ATTRIB(NexuizAdvancedDialog, intendedWidth, float, 0.5)
-       ATTRIB(NexuizAdvancedDialog, rows, float, 14)
-       ATTRIB(NexuizAdvancedDialog, columns, float, 3)
-       ATTRIB(NexuizAdvancedDialog, refilterEntity, entity, NULL)
-ENDCLASS(NexuizAdvancedDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyNexuizAdvancedDialog(entity me)
-{
-       loadAllCvars(me);
-}
-
-void fillNexuizAdvancedDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, 1, 1.2, makeNexuizTextLabel(0, "Game settings:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizCheckBox(0, "sv_spectate", "Allow spectating"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Spawn shield:"));
-               me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 15, 0.5, "g_spawnshieldtime"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Start delay:"));
-               me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 30, 0.5, "g_start_delay"));
-       me.TR(me);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Game speed:"));
-               me.TD(me, 1, 1.7, e = makeNexuizSlider(0.5, 2.0, 0.1, "slowmo"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizCheckBoxEx(2, 0, "g_antilag", "AntiLag"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1.2, makeNexuizTextLabel(0, "Teamplay settings:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Friendly fire scale:"));
-               me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 1.0, 0.05, "g_friendlyfire"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Friendly fire penalty:"));
-               me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 1.0, 0.05, "g_mirrordamage"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Teams:"));
-               me.TD(me, 1, 1.7, e = makeNexuizTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
-                       e.addValue(e, "Default", "0");
-                       e.addValue(e, "2 teams", "2");
-                       e.addValue(e, "3 teams", "3");
-                       e.addValue(e, "4 teams", "4");
-                       e.configureNexuizTextSliderValues(e);
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-
-void closeNexuizAdvancedDialog(entity me)
-{
-       if(me.refilterEntity)
-               me.refilterEntity.refilter(me.refilterEntity);
-       closeDialog(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c b/qcsrc/menu/nexuiz/dialog_multiplayer_create_mapinfo.c
deleted file mode 100644 (file)
index b6a19fb..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizMapInfoDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizMapInfoDialog, fill, void(entity))
-       METHOD(NexuizMapInfoDialog, loadMapInfo, void(entity, float, entity))
-       ATTRIB(NexuizMapInfoDialog, title, string, "Map Information")
-       ATTRIB(NexuizMapInfoDialog, color, vector, SKINCOLOR_DIALOG_MAPINFO)
-       ATTRIB(NexuizMapInfoDialog, intendedWidth, float, 0.85)
-       ATTRIB(NexuizMapInfoDialog, rows, float, 9)
-       ATTRIB(NexuizMapInfoDialog, columns, float, 10)
-
-       ATTRIB(NexuizMapInfoDialog, previewImage, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, titleLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, authorLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, descriptionLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, featuresLabel, entity, NULL)
-
-       ATTRIB(NexuizMapInfoDialog, typeDeathmatchLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeTDMLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeLMSLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeArenaLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeRuneLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeDominationLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeKeyHuntLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeCTFLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeCALabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeAssaultLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeOnslaughtLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeRaceLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeCTSLabel, entity, NULL)
-       ATTRIB(NexuizMapInfoDialog, typeNexballLabel, entity, NULL)
-
-       ATTRIB(NexuizMapInfoDialog, currentMapIndex, float, 0)
-       ATTRIB(NexuizMapInfoDialog, currentMapBSPName, string, string_null)
-       ATTRIB(NexuizMapInfoDialog, currentMapTitle, string, string_null)
-       ATTRIB(NexuizMapInfoDialog, currentMapAuthor, string, string_null)
-       ATTRIB(NexuizMapInfoDialog, currentMapDescription, string, string_null)
-       ATTRIB(NexuizMapInfoDialog, currentMapPreviewImage, string, string_null)
-       ATTRIB(NexuizMapInfoDialog, currentMapFeaturesText, string, string_null)
-ENDCLASS(NexuizMapInfoDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void loadMapInfoNexuizMapInfoDialog(entity me, float i, entity mlb)
-{
-       me.currentMapIndex = i;
-       me.startButton.onClickEntity = mlb;
-       MapInfo_Get_ByID(i);
-
-       if(me.currentMapBSPName)
-       {
-               strunzone(me.currentMapBSPName);
-               strunzone(me.currentMapTitle);
-               strunzone(me.currentMapAuthor);
-               strunzone(me.currentMapDescription);
-               strunzone(me.currentMapPreviewImage);
-               strunzone(me.currentMapFeaturesText);
-       }
-       me.currentMapBSPName = strzone(MapInfo_Map_bspname);
-       me.currentMapTitle = strzone(MapInfo_Map_title);
-       me.currentMapAuthor = strzone(MapInfo_Map_author);
-       me.currentMapDescription = strzone(MapInfo_Map_description);
-       me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? "Full item placement" : "MinstaGib only");
-       me.currentMapPreviewImage = strzone(strcat("/maps/", MapInfo_Map_bspname));
-
-       me.frame.setText(me.frame, me.currentMapBSPName);
-       me.titleLabel.setText(me.titleLabel, me.currentMapTitle);
-       me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);
-       me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);
-       me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
-       me.previewImage.src = me.currentMapPreviewImage;
-
-       me.typeDeathmatchLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH);
-       me.typeTDMLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH);
-       me.typeLMSLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_LMS);
-       me.typeArenaLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ARENA);
-       me.typeDominationLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DOMINATION);
-       me.typeRuneLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RUNEMATCH);
-       me.typeKeyHuntLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEYHUNT);
-       me.typeCTFLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTF);
-       me.typeCALabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CA);
-       me.typeAssaultLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ASSAULT);
-       me.typeOnslaughtLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ONSLAUGHT);
-       me.typeRaceLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE);
-       me.typeCTSLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTS);
-       me.typeNexballLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_NEXBALL);
-
-       MapInfo_ClearTemps();
-}
-void fillNexuizMapInfoDialog(entity me)
-{
-       entity e;
-       float w, wgt;
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, me.rows - 2, 3, e = makeNexuizImage(string_null, 4.0/3.0));
-               me.previewImage = e;
-       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
-       w = me.columns - me.currentColumn;
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Title:"));
-               me.TD(me, 1, w-1, e = makeNexuizTextLabel(0, ""));
-                       e.colorL = SKINCOLOR_MAPLIST_TITLE;
-                       e.allowCut = 1;
-                       me.titleLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Author:"));
-               me.TD(me, 1, w-1, e = makeNexuizTextLabel(0, ""));
-                       e.colorL = SKINCOLOR_MAPLIST_AUTHOR;
-                       e.allowCut = 1;
-                       me.authorLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Features:"));
-               me.TD(me, 1, w-1, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.featuresLabel = e;
-       me.TR(me);
-               me.TD(me, 1, w, e = makeNexuizTextLabel(0, "Game types:"));
-       me.TR(me); wgt = (w-0.2)/5;
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "DM"));
-                       me.typeDeathmatchLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "TDM"));
-                       me.typeTDMLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "LMS"));
-                       me.typeLMSLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Arena"));
-                       me.typeArenaLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Rune"));
-                       me.typeRuneLabel = e;
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Domination"));
-                       me.typeDominationLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Key Hunt"));
-                       me.typeKeyHuntLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "CTF"));
-                       me.typeCTFLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "CA"));
-                       me.typeCALabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Assault"));
-                       me.typeAssaultLabel = e;
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Onslaught"));
-                       me.typeOnslaughtLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Race"));
-                       me.typeRaceLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "CTS"));
-                       me.typeCTSLabel = e;
-               me.TD(me, 1, wgt, e = makeNexuizTextLabel(0, "Nexball"));
-                       me.typeNexballLabel = e;
-
-       me.gotoRC(me, me.rows - 2, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizTextLabel(0.5, ""));
-                       e.allowCut = 1;
-                       me.descriptionLabel = e;
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TDempty(me, 0.5);
-
-               me.TD(me, 1, me.columns - 5.5, e = makeNexuizButton("Close", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-               me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeNexuizButton("Play", '0 0 0'));
-                       me.startButton.onClick = MapList_LoadMap;
-                       me.startButton.onClickEntity = NULL; // filled later
-               me.TDempty(me, 0.5);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_create_mutators.c b/qcsrc/menu/nexuiz/dialog_multiplayer_create_mutators.c
deleted file mode 100644 (file)
index fddc7cd..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizMutatorsDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizMutatorsDialog, toString, string(entity))
-       METHOD(NexuizMutatorsDialog, fill, void(entity))
-       METHOD(NexuizMutatorsDialog, showNotify, void(entity))
-       METHOD(NexuizMutatorsDialog, close, void(entity))
-       ATTRIB(NexuizMutatorsDialog, title, string, "Mutators")
-       ATTRIB(NexuizMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
-       ATTRIB(NexuizMutatorsDialog, intendedWidth, float, 0.9)
-       ATTRIB(NexuizMutatorsDialog, rows, float, 18)
-       ATTRIB(NexuizMutatorsDialog, columns, float, 6)
-       ATTRIB(NexuizMutatorsDialog, refilterEntity, entity, NULL)
-ENDCLASS(NexuizMutatorsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyNexuizMutatorsDialog(entity me)
-{
-       loadAllCvars(me);
-}
-
-string weaponarenastring;
-string weaponarenastring_cvar;
-string WeaponArenaString()
-{
-       string s;
-       float n, i, j;
-       entity e;
-       s = cvar_string("g_weaponarena");
-       if(s == "0")
-               return "";
-       if(s == "all")
-               return "All Weapons Arena";
-       if(s == "most")
-               return "Most Weapons Arena";
-       if(s == weaponarenastring_cvar)
-               return weaponarenastring;
-       if(weaponarenastring)
-               strunzone(weaponarenastring);
-       if(weaponarenastring_cvar)
-               strunzone(weaponarenastring_cvar);
-
-       weaponarenastring_cvar = strzone(s);
-
-       n = tokenize_console(s);
-       s = "";
-       for(i = 0; i < n; ++i)
-       {
-               for(j = WEP_FIRST; j <= WEP_LAST; ++j)
-               {
-                       e = get_weaponinfo(j);
-                       if(argv(i) == e.netname)
-                               s = strcat(s, " & ", e.message);
-               }
-       }
-       s = strcat(substring(s, 3, strlen(s) - 3), " Arena");
-       
-       weaponarenastring = strzone(s);
-
-       return weaponarenastring;
-}
-
-string toStringNexuizMutatorsDialog(entity me)
-{
-       string s;
-       s = "";
-       if(cvar("g_minstagib"))
-               s = strcat(s, ", MinstaGib");
-       if(cvar("g_nixnex"))
-               s = strcat(s, ", NixNex");
-       if(cvar_string("g_weaponarena") != "0")
-               s = strcat(s, ", ", WeaponArenaString());
-       if(cvar("g_start_weapon_laser") == 0)
-               s = strcat(s, ", No start weapons");
-       if(cvar("sv_gravity") < 800)
-               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"))
-               s = strcat(s, ", LG missiles");
-       if(cvar("g_midair"))
-               s = strcat(s, ", Midair");
-       if(cvar("g_vampire"))
-               s = strcat(s, ", Vampire");
-       if(cvar("g_pinata"))
-               s = strcat(s, ", Pinata");
-       if(cvar("g_weapon_stay"))
-               s = strcat(s, ", Weapons stay");
-       if(cvar("g_bloodloss") > 0)
-               s = strcat(s, ", Bloodloss");
-       if(cvar("g_jetpack"))
-               s = strcat(s, ", Jet pack");
-       if(s == "")
-               return "None";
-       else
-               return substring(s, 2, strlen(s) - 2);
-}
-
-
-
-// WARNING: dirty hack. TODO clean this up by putting this behaviour in extra classes.
-void loadCvarsLaserWeaponArenaWeaponButton(entity me)
-{
-       tokenize_console(cvar_string("g_weaponarena"));
-       me.checked = (argv(0) == me.cvarValue);
-}
-
-void saveCvarsLaserWeaponArenaWeaponButton(entity me)
-{
-       string suffix;
-
-       suffix = "";
-       if(me.cvarValue != "laser" && me.cvarValue != "most")
-               if(cvar("menu_weaponarena_with_laser"))
-                       suffix = " laser";
-       if(me.checked)
-               cvar_set("g_weaponarena", strcat(me.cvarValue, suffix));
-       else
-               cvar_set("g_weaponarena", me.cvarOffValue);
-}
-
-.void(entity) draw_weaponarena;
-.void(entity) saveCvars_weaponarena;
-void saveCvarsLaserWeaponArenaLaserButton(entity me)
-{
-       // run the old function
-       me.saveCvars_weaponarena(me);
-
-       me.disabled = ((cvar_string("g_weaponarena") == "0") || (cvar_string("g_weaponarena") == "laser") || (cvar_string("g_weaponarena") == "most"));
-
-       if not(me.disabled)
-       {
-               // check for the laser suffix
-               string s;
-               s = cvar_string("g_weaponarena");
-               if(me.checked && substring(s, strlen(s) - 6, 6) != " laser")
-                       s = strcat(s, " laser");
-               else if(!me.checked && substring(s, strlen(s) - 6, 6) == " laser")
-                       s = substring(s, 0, strlen(s) - 6);
-               cvar_set("g_weaponarena", s);
-       }
-}
-
-void preDrawLaserWeaponArenaLaserButton(entity me)
-{
-       me.disabled = ((cvar_string("g_weaponarena") == "0") || (cvar_string("g_weaponarena") == "laser") || (cvar_string("g_weaponarena") == "most"));
-       // run the old function
-       me.draw_weaponarena(me);
-}
-// WARNING: end of dirty hack. Do not try this at home.
-
-
-
-void fillNexuizMutatorsDialog(entity me)
-{
-       entity e, s, w;
-       float i, j;
-       string str, hstr;
-       me.TR(me);
-               me.TD(me, 1, 2, makeNexuizTextLabel(0, "Gameplay mutators:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_cloaked", "Cloaked"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_footsteps", "Footsteps"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_midair", "Midair"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_vampire", "Vampire"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizSlider(10, 50, 1, "g_bloodloss");
-               me.TD(me, 1, 2, e = makeNexuizSliderCheckBox(0, 1, s, "Blood loss"));
-       me.TR(me);
-               me.TDempty(me, 0.4);
-               me.TD(me, 1, 1.8, s);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizSlider(80, 400, 8, "sv_gravity");
-                       s.valueDigits = 0;
-                       s.valueDisplayMultiplier = 0.125; // show gravity in percent
-               me.TD(me, 1, 2, e = makeNexuizSliderCheckBox(800, 1, s, "Low gravity"));
-                       e.savedValue = 200; // good on silvercity
-       me.TR(me);
-               me.TDempty(me, 0.4);
-               me.TD(me, 1, 1.8, s);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 2, makeNexuizTextLabel(0, "Weapon & item mutators:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_grappling_hook", "Grappling hook"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_jetpack", "Jet pack"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_laserguided_missile", "Laser guided missiles"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_pinata", "Pinata"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizCheckBoxEx(2, 0, "g_weapon_stay", "Weapons stay"));
-       me.TR(me);
-
-       me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 4, makeNexuizTextLabel(0, "Weapon arenas:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, string_null, string_null, "Regular (no arena)"));
-       for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
-       {
-               w = get_weaponinfo(i);
-               if(w.spawnflags & WEP_FLAG_HIDDEN)
-                       continue;
-               if(j & 1 == 0)
-                       me.TR(me);
-               str = w.netname;
-               hstr = w.message;
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_weaponarena", strzone(str), strzone(hstr)));
-                       e.cvarOffValue = "0";
-                       // custom load/save logic that ignores a " laser" suffix, or adds it 
-                       e.loadCvars = loadCvarsLaserWeaponArenaWeaponButton;
-                       e.saveCvars = saveCvarsLaserWeaponArenaWeaponButton;
-                       e.loadCvars(e);
-               ++j;
-       }
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "menu_weaponarena_with_laser", "with laser"));
-                       // hook the draw function to gray it out
-                       e.draw_weaponarena = e.draw;
-                       e.draw = preDrawLaserWeaponArenaLaserButton;
-                       // hook the save function to notify about the cvar
-                       e.saveCvars_weaponarena = e.saveCvars;
-                       e.saveCvars = saveCvarsLaserWeaponArenaLaserButton;
-       me.TR(me);
-               me.TD(me, 1, 4, makeNexuizTextLabel(0, "Special arenas:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_minstagib", string_null, "MinstaGib"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_nixnex", string_null, "NixNex"));
-       me.TR(me);
-               me.TDempty(me, 0.4);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "g_nixnex_with_laser", "with laser"));
-                       setDependent(e, "g_nixnex", 1, 1);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_weaponarena", "most", "Most weapons"));
-                       e.cvarOffValue = "0";
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "g_start_weapon_laser", "0", "No start weapons"));
-                       e.cvarOffValue = "-1";
-                       makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_campingrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba");
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-
-void closeNexuizMutatorsDialog(entity me)
-{
-       if(me.refilterEntity)
-               me.refilterEntity.refilter(me.refilterEntity);
-       closeDialog(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_demo.c b/qcsrc/menu/nexuiz/dialog_multiplayer_demo.c
deleted file mode 100644 (file)
index e974715..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizDemoBrowserTab) EXTENDS(NexuizTab)
-       METHOD(NexuizDemoBrowserTab, fill, void(entity))
-       ATTRIB(NexuizDemoBrowserTab, title, string, "Demo")
-       ATTRIB(NexuizDemoBrowserTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizDemoBrowserTab, rows, float, 22)
-       ATTRIB(NexuizDemoBrowserTab, columns, float, 6.5)
-       ATTRIB(NexuizDemoBrowserTab, name, string, "DemoBroswer")       
-ENDCLASS(NexuizDemoBrowserTab)
-entity makeNexuizDemoBrowserTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizDemoBrowserTab()
-{
-       entity me;
-       me = spawnNexuizDemoBrowserTab();
-       me.configureDialog(me);
-       return me;
-}
-void fillNexuizDemoBrowserTab(entity me)
-{
-       entity e;
-       entity btn;
-       entity dlist;
-
-       me.TR(me);
-               me.TD(me, 1, me.columns, e = makeNexuizCheckBox(0, "cl_autodemo", "Record demos while playing"));
-       me.TR(me);
-       dlist = makeNexuizDemoList();
-       me.TR(me);
-               me.TD(me, 1, 0.5, e = makeNexuizTextLabel(0, "Filter:"));
-               me.TD(me, 1, 0.5, btn = makeNexuizButton("Clear", '0 0 0'));
-                       btn.onClick = InputBox_Clear_Click;
-               me.TD(me, 1, me.columns - 1, e = makeNexuizInputBox(0, string_null));
-                       e.onChange = DemoList_Filter_Change;
-                       e.onChangeEntity = dlist;
-                       btn.onClickEntity = e;
-                       dlist.controlledTextbox = e;
-       me.TR(me);
-               me.TD(me, me.rows - 4, me.columns, dlist);
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns / 2, e = makeNexuizButton("Timedemo", '0 0 0'));
-                       e.onClick = TimeDemo_Click;
-                       e.onClickEntity = dlist;
-               me.TD(me, 1, me.columns / 2, e = makeNexuizButton("Play", '0 0 0'));
-                       e.onClick = StartDemo_Click;
-                       e.onClickEntity = dlist;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_join.c b/qcsrc/menu/nexuiz/dialog_multiplayer_join.c
deleted file mode 100644 (file)
index 142fe8b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizServerListTab) EXTENDS(NexuizTab)
-       METHOD(NexuizServerListTab, fill, void(entity))
-       ATTRIB(NexuizServerListTab, title, string, "Join")
-       ATTRIB(NexuizServerListTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizServerListTab, rows, float, 22)
-       ATTRIB(NexuizServerListTab, columns, float, 6.5)
-ENDCLASS(NexuizServerListTab)
-entity makeNexuizServerListTab();
-#endif
-
-#ifdef IMPLEMENTATION
-
-entity makeNexuizServerListTab()
-{
-       entity me;
-       me = spawnNexuizServerListTab();
-       me.configureDialog(me);
-       return me;
-}
-void fillNexuizServerListTab(entity me)
-{
-       entity e, slist, btn;
-
-       slist  = makeNexuizServerList();
-
-       me.TR(me);
-               me.TD(me, 1, 0.4, e = makeNexuizTextLabel(0, "Filter:"));
-               me.TD(me, 1, 0.6, btn = makeNexuizButton("Clear", '0 0 0'));
-                       btn.onClick = InputBox_Clear_Click;
-               me.TD(me, 1, me.columns - 0.6 * 4 - 0.4, e = makeNexuizInputBox(0, string_null));
-                       e.onChange = ServerList_Filter_Change;
-                       e.onChangeEntity = slist;
-                       btn.onClickEntity = e;
-                       slist.controlledTextbox = e;
-               me.TD(me, 1, 0.6, e = makeNexuizCheckBox(0, "menu_slist_showempty", "Empty"));
-                       slist.filterShowEmpty = e.checked;
-                       e.onClickEntity = slist;
-                       e.onClick = ServerList_ShowEmpty_Click;
-               me.TD(me, 1, 0.6, e = makeNexuizCheckBox(0, "menu_slist_showfull", "Full"));
-                       slist.filterShowFull = e.checked;
-                       e.onClickEntity = slist;
-                       e.onClick = ServerList_ShowFull_Click;
-               me.TD(me, 1, 0.6, e = makeNexuizCheckBox(0, "net_slist_pause", "Pause"));
-
-       me.TR(me);
-               me.TD(me, 1, 1, slist.sortButton1 = makeNexuizButton(string_null, '0 0 0'));
-               me.TD(me, 1, 1, slist.sortButton2 = makeNexuizButton(string_null, '0 0 0'));
-               me.TD(me, 1, 1, slist.sortButton3 = makeNexuizButton(string_null, '0 0 0'));
-               me.TD(me, 1, 1, slist.sortButton4 = makeNexuizButton(string_null, '0 0 0'));
-               me.TD(me, 1, 1, slist.sortButton5 = makeNexuizButton(string_null, '0 0 0'));
-       me.TR(me);
-               me.TD(me, me.rows - 4, me.columns, slist);
-
-       me.gotoRC(me, me.rows - 2, 0);
-               me.TD(me, 1, 0.6, e = makeNexuizTextLabel(0, "Address:"));
-               me.TD(me, 1, 2.9, e = makeNexuizInputBox(0, string_null));
-                       e.onEnter = ServerList_Connect_Click;
-                       e.onEnterEntity = slist;
-                       slist.ipAddressBox = e;
-               me.TD(me, 1, 1.5, e = makeNexuizButton("", '0 0 0'));
-                       e.onClick = ServerList_Favorite_Click;
-                       e.onClickEntity = slist;
-                       slist.favoriteButton = e;
-               me.TD(me, 1, 1.5, e = makeNexuizButton("Info", '0 0 0'));
-                       e.onClick = ServerList_Info_Click;
-                       e.onClickEntity = slist;
-                       slist.infoButton = e;
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeNexuizModButton("Multiplayer_Join"));
-               me.TD(me, 1, me.columns - 2, e = makeNexuizButton("Join!", '0 0 0'));
-                       e.onClick = ServerList_Connect_Click;
-                       e.onClickEntity = slist;
-                       slist.connectButton = e;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_join_serverinfo.c b/qcsrc/menu/nexuiz/dialog_multiplayer_join_serverinfo.c
deleted file mode 100644 (file)
index 6db5cf1..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizServerInfoDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizServerInfoDialog, fill, void(entity))
-       METHOD(NexuizServerInfoDialog, loadServerInfo, void(entity, float))
-       ATTRIB(NexuizServerInfoDialog, title, string, "Server Information")
-       ATTRIB(NexuizServerInfoDialog, color, vector, SKINCOLOR_DIALOG_SERVERINFO)
-       ATTRIB(NexuizServerInfoDialog, intendedWidth, float, 0.68)
-       ATTRIB(NexuizServerInfoDialog, rows, float, 11)
-       ATTRIB(NexuizServerInfoDialog, columns, float, 12)
-
-       ATTRIB(NexuizServerInfoDialog, currentServerName, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerCName, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerType, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerMap, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerPlayers, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerNumPlayers, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerNumBots, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerMod, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerVersion, string, string_null)
-       ATTRIB(NexuizServerInfoDialog, currentServerPing, string, string_null)
-
-       ATTRIB(NexuizServerInfoDialog, nameLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, cnameLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, typeLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, mapLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, rawPlayerList, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, numPlayersLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, numBotsLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, modLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, versionLabel, entity, NULL)
-       ATTRIB(NexuizServerInfoDialog, pingLabel, entity, NULL)
-ENDCLASS(NexuizServerInfoDialog)
-
-float SLIST_FIELD_NAME;
-float SLIST_FIELD_CNAME;
-float SLIST_FIELD_QCSTATUS;
-float SLIST_FIELD_MAP;
-float SLIST_FIELD_PLAYERS;
-float SLIST_FIELD_NUMHUMANS;
-float SLIST_FIELD_MAXPLAYERS;
-float SLIST_FIELD_NUMBOTS;
-float SLIST_FIELD_MOD;
-float SLIST_FIELD_PING;
-void Join_Click(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-void loadServerInfoNexuizServerInfoDialog(entity me, float i)
-{
-       float m;
-       string s, typestr, versionstr, numh, maxp;
-
-       SLIST_FIELD_NAME = gethostcacheindexforkey("name");
-       me.currentServerName = strzone(gethostcachestring(SLIST_FIELD_NAME, i));
-       me.nameLabel.setText(me.nameLabel, me.currentServerName);
-
-       SLIST_FIELD_CNAME = gethostcacheindexforkey("cname");
-       me.currentServerCName = strzone(gethostcachestring(SLIST_FIELD_CNAME, i));
-       me.cnameLabel.setText(me.cnameLabel, me.currentServerCName);
-
-       SLIST_FIELD_QCSTATUS = gethostcacheindexforkey("qcstatus");
-       s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
-       m = tokenizebyseparator(s, ":");
-       if(m > 1)
-       {
-               typestr = argv (0);
-               versionstr = argv(1);
-       }
-       else
-       {
-               typestr = "N/A";
-               versionstr = "N/A";
-       }
-       me.currentServerType = strzone(typestr);
-       me.typeLabel.setText(me.typeLabel, me.currentServerType);
-
-
-       SLIST_FIELD_MAP = gethostcacheindexforkey("map");
-       me.currentServerMap = strzone(gethostcachestring(SLIST_FIELD_MAP, i));
-       me.mapLabel.setText(me.mapLabel, me.currentServerMap);
-
-       SLIST_FIELD_PLAYERS = gethostcacheindexforkey("players");
-       me.currentServerPlayers = strzone(gethostcachestring(SLIST_FIELD_PLAYERS, i));
-       me.rawPlayerList.setPlayerList(me.rawPlayerList, me.currentServerPlayers);
-
-       SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey("numhumans");
-       numh = ftos(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i));
-       SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey("maxplayers");
-       maxp = ftos(gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i));
-       me.currentServerNumPlayers = strzone(strcat(numh,"/",maxp));
-       me.numPlayersLabel.setText(me.numPlayersLabel, me.currentServerNumPlayers);
-
-       SLIST_FIELD_NUMBOTS = gethostcacheindexforkey("numbots");
-       s = ftos(gethostcachenumber(SLIST_FIELD_NUMBOTS, i));
-       me.currentServerNumBots = strzone(s);
-       me.numBotsLabel.setText(me.numBotsLabel, me.currentServerNumBots);
-
-       SLIST_FIELD_MOD = gethostcacheindexforkey("mod");
-       me.currentServerMod = strzone(gethostcachestring(SLIST_FIELD_MOD, i));
-       me.modLabel.setText(me.modLabel, me.currentServerMod);
-
-       me.currentServerVersion = strzone(versionstr);
-       me.versionLabel.setText(me.versionLabel, me.currentServerVersion);
-
-       SLIST_FIELD_PING = gethostcacheindexforkey("ping");
-       s = ftos(gethostcachenumber(SLIST_FIELD_PING, i));
-       me.currentServerPing = strzone(s);
-       me.pingLabel.setText(me.pingLabel, me.currentServerPing);
-}
-
-void fillNexuizServerInfoDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, 1, me.columns, e = makeNexuizTextLabel(0.5, ""));
-                       e.colorL = SKINCOLOR_SERVERINFO_NAME;
-                       e.allowCut = 1;
-                       me.nameLabel = e;
-       me.TR(me);
-               me.TD(me, 1, me.columns, e = makeNexuizTextLabel(0.5, ""));
-                       e.colorL = SKINCOLOR_SERVERINFO_IP;
-                       e.allowCut = 1;
-                       me.cnameLabel = e;
-
-       me.TR(me);
-               me.TD(me, 1, 5.5, e = makeNexuizTextLabel(0, "Players:"));
-       me.TR(me);
-               me.TD(me, me.rows - 4, 6, e = makeNexuizPlayerList());
-                       me.rawPlayerList = e;
-
-       me.gotoRC(me, 1, 6.25); me.setFirstColumn(me, me.currentColumn);
-
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Type:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.typeLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Map:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.mapLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Players:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.numPlayersLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Bots:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.numBotsLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Mod:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.modLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Version:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.versionLabel = e;
-       me.TR(me);
-               me.TD(me, 1, 1.75, e = makeNexuizTextLabel(0, "Ping:"));
-               me.TD(me, 1, 4.0, e = makeNexuizTextLabel(0, ""));
-                       e.allowCut = 1;
-                       me.pingLabel = e;
-
-       me.gotoRC(me, me.rows - 1, 0);
-
-               me.TD(me, 1, me.columns - 6, e = makeNexuizButton("Close", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-               me.TD(me, 1, me.columns - 6, e = makeNexuizButton("Join!", '0 0 0'));
-                       e.onClick = Join_Click;
-                       e.onClickEntity = me;
-}
-
-void Join_Click(entity btn, entity me)
-{
-       localcmd("connect ", me.currentServerCName, "\n");
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c b/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
deleted file mode 100644 (file)
index 53e2682..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizPlayerSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizPlayerSettingsTab, fill, void(entity))
-       METHOD(NexuizPlayerSettingsTab, draw, void(entity))
-       ATTRIB(NexuizPlayerSettingsTab, title, string, "Player Setup")
-       ATTRIB(NexuizPlayerSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizPlayerSettingsTab, rows, float, 22)
-       ATTRIB(NexuizPlayerSettingsTab, columns, float, 6.5)
-       ATTRIB(NexuizPlayerSettingsTab, playerNameLabel, entity, NULL)
-       ATTRIB(NexuizPlayerSettingsTab, playerNameLabelAlpha, float, 0)
-ENDCLASS(NexuizPlayerSettingsTab)
-entity makeNexuizPlayerSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizPlayerSettingsTab()
-{
-       entity me;
-       me = spawnNexuizPlayerSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-void drawNexuizPlayerSettingsTab(entity me)
-{
-       if(cvar_string("_cl_name") == "Player")
-               me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
-       else
-               me.playerNameLabel.alpha = me.playerNameLabelAlpha;
-       drawContainer(me);
-}
-void fillNexuizPlayerSettingsTab(entity me)
-{
-       entity e, pms, sl, label, e0, box;
-       float i, r, m, n;
-
-       me.TR(me);
-               me.TD(me, 1, 0.5, me.playerNameLabel = makeNexuizTextLabel(0, "Name:"));
-                       me.playerNameLabelAlpha = me.playerNameLabel.alpha;
-               me.TD(me, 1, 2.5, label = makeNexuizTextLabel(0, string_null));
-                       label.allowCut = 1;
-                       label.allowColors = 1;
-                       label.alpha = 1;
-       me.TR(me);
-               me.TD(me, 1, 3.0, box = makeNexuizInputBox(1, "_cl_name"));
-                       box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
-                       box.maxLength = 63;
-                       label.textEntity = box;
-       me.TR(me);
-               me.TD(me, 5, 1, e = makeNexuizColorpicker(box));
-               me.TD(me, 5, 2, e = makeNexuizCharmap(box));
-       me.TR(me);
-       me.TR(me);
-       me.TR(me);
-       me.TR(me);
-       me.TR(me);
-       me.TR(me);
-       me.gotoRC(me, 8, 0.0);
-               pms = makeNexuizPlayerModelSelector();
-               me.TD(me, 1, 0.6, e = makeNexuizTextLabel(1, "Model:"));
-               me.TD(me, 1, 0.3, e = makeNexuizButton("<<", '0 0 0'));
-                       e.onClick = PlayerModelSelector_Prev_Click;
-                       e.onClickEntity = pms;
-               me.TD(me, me.rows - me.currentRow - 1, 1.8, pms);
-               me.TD(me, 1, 0.3, e = makeNexuizButton(">>", '0 0 0'));
-                       e.onClick = PlayerModelSelector_Next_Click;
-                       e.onClickEntity = pms;
-       me.TR(me);
-               r = me.currentRow;
-               m = me.rows - r - 2;
-               n = 16 - !cvar("developer");
-               m = m / (n - 1);
-               for(i = 0; i < n; ++i)
-               {
-                       me.gotoRC(me, r + i * m, 0.1);
-                       me.TDNoMargin(me, m, 0.2, e = makeNexuizColorButton(1, 0, i), '0 1 0');
-               }
-               for(i = 0; i < n; ++i)
-               {
-                       me.gotoRC(me, r + i * m, 0.4);
-                       me.TDNoMargin(me, m, 0.2, e = makeNexuizColorButton(2, 1, i), '0 1 0');
-               }
-
-       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Field of View:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(60, 130, 1, "fov"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Damage kick:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0, 0.5, 0.05, "v_kicktime"));
-       me.TR(me);
-               sl = makeNexuizSlider(0.45, 0.75, 0.01, "cl_bobcycle");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, sl, "View bobbing:"));
-               me.TD(me, 1, 2, sl);
-       
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Zoom Factor:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(2, 16, 0.5, "cl_zoomfactor"));
-       me.TR(me);
-               sl = makeNexuizSlider(1, 8, 0.5, "cl_zoomspeed");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(-1, 1, sl, "Zoom speed:"));
-               me.TD(me, 1, 2, sl);
-       me.TR(me);
-               me.TD(me, 1, 1.5, e = makeNexuizButton("Weapon settings...", '0 0 0'));
-                       e.onClick = DialogOpenButton_Click;
-                       e.onClickEntity = main.weaponsDialog;
-               me.TD(me, 1, 1.5, e0 = makeNexuizTextLabel(0, string_null));
-                       e0.textEntity = main.weaponsDialog;
-                       e0.allowCut = 1;
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "crosshair_per_weapon", "Per weapon crosshairs"));
-               me.TD(me, 1, 1.3, e = makeNexuizCheckBox(1, "crosshair_color_override", "& crosshair colors"));
-               setDependent(e, "crosshair_per_weapon", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair:"));
-               for(i = 1; i <= 10; ++i) {
-                       me.TDNoMargin(me, 1, 2 / 10, e = makeNexuizCrosshairButton(3, i), '1 1 0');
-                       setDependent(e, "crosshair_per_weapon", 0, 0);
-               }
-       me.TR(me);
-               me.TDempty(me, 1);
-               for(i = 11; i <= 20; ++i) {
-                       me.TDNoMargin(me, 1, 2 / 10, e = makeNexuizCrosshairButton(3, i), '1 1 0');
-                       setDependent(e, "crosshair_per_weapon", 0, 0);
-               }
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Size:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.40, 2, 0.05, "crosshair_size"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Alpha:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_alpha"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Red:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_red"));
-               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Green:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_green"));
-               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Blue:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_blue"));
-               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Hit test:"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(1, "crosshair_hittest", "0",    "None"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(1, "crosshair_hittest", "1",    "TrueAim"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
-       me.TR(me);
-               me.TDempty(me, 0.4);
-               me.TD(me, 1, 2.2, e = makeNexuizButton("Radar, HUD & Waypoints...", '0 0 0'));
-                       e.onClick = DialogOpenButton_Click;
-                       e.onClickEntity = main.radarDialog;
-               me.TDempty(me, 0.5);
-       me.TR(me);
-       #ifdef ALLOW_FORCEMODELS
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Force Models:"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(2, string_null, string_null, "None"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(2, "cl_forceplayermodelsfromnexuiz", string_null, "Custom"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(2, "cl_forceplayermodels", string_null, "All"));
-       #endif
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_gentle", "Disable gore effects"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Gibs:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("cl_nogibs"));
-                       e.addValue(e, "None", "1");
-                       e.addValue(e, "Few", "0.75");
-                       e.addValue(e, "Many", "0.5");
-                       e.addValue(e, "Lots", "0");
-                       e.configureNexuizTextSliderValues(e);
-                       setDependent(e, "cl_gentle", 0, 0);
-       me.TR(me);
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromnexuiz;sendcvar cl_forceplayermodels", COMMANDBUTTON_APPLY));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c b/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c
deleted file mode 100644 (file)
index 59223ab..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizRadarDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizRadarDialog, toString, string(entity))
-       METHOD(NexuizRadarDialog, fill, void(entity))
-       METHOD(NexuizRadarDialog, showNotify, void(entity))
-       ATTRIB(NexuizRadarDialog, title, string, "Radar, HUD & Waypoints")
-       ATTRIB(NexuizRadarDialog, color, vector, SKINCOLOR_DIALOG_RADAR)
-       ATTRIB(NexuizRadarDialog, intendedWidth, float, 0.7)
-       ATTRIB(NexuizRadarDialog, rows, float, 19)
-       ATTRIB(NexuizRadarDialog, columns, float, 4)
-ENDCLASS(NexuizRadarDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyNexuizRadarDialog(entity me)
-{
-        loadAllCvars(me);
-}
-string toStringNexuizRadarDialog(entity me)
-{
-       return "XXX";
-}
-void fillNexuizRadarDialog(entity me)
-{
-       entity e, sl;
-       me.TR(me);
-               me.TD(me, 1, 4, makeNexuizTextLabel(0, "Radar settings:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Position:"));
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0 0", "Top left"));
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0.5 0", "Top middle"));
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "1 0", "Top right"));
-       me.TR(me);
-               me.TDempty(me, 1);
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0 0.5", "Middle left"));
-               me.TDempty(me, 1);
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "1 0.5", "Middle right"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Size:"));
-               me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_teamradar_size"));
-                       e.addValue(e, "96x96", "96 96");
-                       e.addValue(e, "128x96", "128 96");
-                       e.addValue(e, "128x128", "128 128");
-                       e.addValue(e, "192x144", "192 144");
-                       e.addValue(e, "192x192", "192 192");
-                       e.addValue(e, "256x192", "256 192");
-                       e.addValue(e, "256x256", "256 256");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               sl = makeNexuizSlider(0.20, 1, 0.01, "cl_teamradar_background_alpha");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1, 1, sl, "Background:"));
-               me.TD(me, 1, 3, sl);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 4, makeNexuizTextLabel(0, "HUD settings:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizCheckBoxEx(100, 110, "viewsize", "Background:"));
-               me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_alpha_bg"));
-                       setDependent(e, "viewsize", 0, 100);
-               me.TR(me);
-                       me.TDempty(me, 0.2);
-                       me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default red:"));
-                       me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_r"));
-                               setDependent(e, "viewsize", 0, 100);
-               me.TR(me);
-                       me.TDempty(me, 0.2);
-                       me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default green:"));
-                       me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_g"));
-                               setDependent(e, "viewsize", 0, 100);
-               me.TR(me);
-                       me.TDempty(me, 0.2);
-                       me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default blue:"));
-                       me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_b"));
-                               setDependent(e, "viewsize", 0, 100);
-               me.TR(me);
-                       me.TDempty(me, 0.2);
-                       me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Team color:"));
-                       me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "sbar_color_bg_team"));
-                               setDependent(e, "viewsize", 0, 100);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 4, makeNexuizTextLabel(0, "Waypoint settings:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 3.8, e = makeNexuizCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint scale:"));
-                       me.TD(me, 1, 3, e = makeNexuizSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
-                               setDependent(e, "cl_hidewaypoints", 0, 0);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint alpha:"));
-                       me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
-                               setDependent(e, "cl_hidewaypoints", 0, 0);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Show names:"));
-               me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_shownames"));
-                       e.addValue(e, "Never", "0");
-                       e.addValue(e, "Teammates", "1");
-                       e.addValue(e, "All players", "2");
-                       e.configureNexuizTextSliderValues(e);
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c b/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c
deleted file mode 100644 (file)
index b6cc105..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizWeaponsDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizWeaponsDialog, toString, string(entity))
-       METHOD(NexuizWeaponsDialog, fill, void(entity))
-       METHOD(NexuizWeaponsDialog, showNotify, void(entity))
-       ATTRIB(NexuizWeaponsDialog, title, string, "Weapon settings")
-       ATTRIB(NexuizWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
-       ATTRIB(NexuizWeaponsDialog, intendedWidth, float, 0.5)
-       ATTRIB(NexuizWeaponsDialog, rows, float, 17)
-       ATTRIB(NexuizWeaponsDialog, columns, float, 4)
-       ATTRIB(NexuizWeaponsDialog, weaponsList, entity, NULL)
-ENDCLASS(NexuizWeaponsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyNexuizWeaponsDialog(entity me)
-{
-        loadAllCvars(me);
-}
-string toStringNexuizWeaponsDialog(entity me)
-{
-       return me.weaponsList.toString(me.weaponsList);
-}
-void fillNexuizWeaponsDialog(entity me)
-{
-       entity e;
-
-       me.TR(me);
-               me.TD(me, 1, 4, makeNexuizTextLabel(0, "Weapon priority list:"));
-       me.TR(me);
-               me.TD(me, 9, 4, e = me.weaponsList = makeNexuizWeaponsList());
-       me.gotoRC(me, 10, 0);
-               me.TDempty(me, 1);
-               me.TD(me, 1, 1, e = makeNexuizButton("Up", '0 0 0'));
-                       e.onClick = WeaponsList_MoveUp_Click;
-                       e.onClickEntity = me.weaponsList;
-               me.TD(me, 1, 1, e = makeNexuizButton("Down", '0 0 0'));
-                       e.onClick = WeaponsList_MoveDown_Click;
-                       e.onClickEntity = me.weaponsList;
-       me.gotoRC(me, 11, 0);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "r_drawviewmodel", "Draw 1st person weapon model"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_gunalign", "4", "Left align"));
-                       setDependent(e, "r_drawviewmodel", 1, 1);
-               me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_gunalign", "3", "Right align"));
-                       setDependent(e, "r_drawviewmodel", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "v_flipped", "Flip view horizontally"));
-       me.TR(me);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_news.c b/qcsrc/menu/nexuiz/dialog_news.c
deleted file mode 100644 (file)
index 101ecf1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizNewsDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizNewsDialog, fill, void(entity))
-       ATTRIB(NexuizNewsDialog, title, string, "News")
-       ATTRIB(NexuizNewsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
-       ATTRIB(NexuizNewsDialog, intendedWidth, float, 0.96)
-       ATTRIB(NexuizNewsDialog, rows, float, 24)
-       ATTRIB(NexuizNewsDialog, columns, float, 1)
-ENDCLASS(NexuizNewsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void fillNexuizNewsDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, 24, 1, e = spawnGecko());
-               e.configureBrowser( e, "http://alientrap.org/nexuiz/index.php?module=news" );
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_quit.c b/qcsrc/menu/nexuiz/dialog_quit.c
deleted file mode 100644 (file)
index f2142d4..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizQuitDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizQuitDialog, fill, void(entity))
-       ATTRIB(NexuizQuitDialog, title, string, "Quit")
-       ATTRIB(NexuizQuitDialog, color, vector, SKINCOLOR_DIALOG_QUIT)
-       ATTRIB(NexuizQuitDialog, intendedWidth, float, 0.5)
-       ATTRIB(NexuizQuitDialog, rows, float, 3)
-       ATTRIB(NexuizQuitDialog, columns, float, 2)
-ENDCLASS(NexuizQuitDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void fillNexuizQuitDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, 1, 2, makeNexuizTextLabel(0.5, "Are you sure you want to quit?"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizCommandButton("Yes", '1 0 0', "quit", 0));
-               me.TD(me, 1, 1, e = makeNexuizButton("No", '0 1 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings.c b/qcsrc/menu/nexuiz/dialog_settings.c
deleted file mode 100644 (file)
index 6f54755..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizSettingsDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizSettingsDialog, fill, void(entity))
-       ATTRIB(NexuizSettingsDialog, title, string, "Settings")
-       ATTRIB(NexuizSettingsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
-       ATTRIB(NexuizSettingsDialog, intendedWidth, float, 0.96)
-       ATTRIB(NexuizSettingsDialog, rows, float, 19)
-       ATTRIB(NexuizSettingsDialog, columns, float, 6)
-ENDCLASS(NexuizSettingsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void fillNexuizSettingsDialog(entity me)
-{
-       entity mc;
-       mc = makeNexuizTabController(me.rows - 2);
-       me.TR(me);
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Input",   makeNexuizInputSettingsTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Video",   makeNexuizVideoSettingsTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Effects", makeNexuizEffectsSettingsTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Audio",   makeNexuizAudioSettingsTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Network", makeNexuizNetworkSettingsTab()));
-               me.TD(me, 1, 1, mc.makeTabButton(mc, "Misc",    makeNexuizMiscSettingsTab()));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, me.rows - 2, me.columns, mc);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_audio.c b/qcsrc/menu/nexuiz/dialog_settings_audio.c
deleted file mode 100644 (file)
index bdcf22b..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizAudioSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizAudioSettingsTab, fill, void(entity))
-       ATTRIB(NexuizAudioSettingsTab, title, string, "Audio")
-       ATTRIB(NexuizAudioSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizAudioSettingsTab, rows, float, 17)
-       ATTRIB(NexuizAudioSettingsTab, columns, float, 6.5)
-ENDCLASS(NexuizAudioSettingsTab)
-entity makeNexuizAudioSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizAudioSettingsTab()
-{
-       entity me;
-       me = spawnNexuizAudioSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-
-void fillNexuizAudioSettingsTab(entity me)
-{
-       entity e, s, sl;
-
-       me.TR(me);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "bgmvolume");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Music:"));
-               me.TD(me, 1, 2, s);
-       me.TR(me);
-       me.TR(me);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "volume");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Master:"));
-               me.TD(me, 1, 2, s);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_staticvolume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Ambient:"));
-               makeMulti(s, "snd_entchannel2volume");
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_worldchannel0volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Info:"));
-               makeMulti(s, "snd_csqcchannel0volume");
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_entchannel3volume");
-               makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Items:"));
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_playerchannel6volume");
-               makeMulti(s, "snd_csqcchannel6volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Pain:"));
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_playerchannel7volume");
-               makeMulti(s, "snd_entchannel7volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Player:"));
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_entchannel4volume");
-               makeMulti(s, "snd_playerchannel4volume snd_entchannel6volume snd_csqcchannel4volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Shots:"));
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_playerchannel2volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Voice:"));
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_playerchannel1volume");
-               makeMulti(s, "snd_playerchannel5volume snd_entchannel1volume snd_entchannel5volume");
-               me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Weapons:"));
-               me.TD(me, 1, 2, s);
-               setDependentStringNotEqual(e, "volume", "0");
-               setDependentStringNotEqual(s, "volume", "0");
-       me.TR(me);
-
-       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Frequency:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("snd_speed"));
-                       e.addValue(e, "8 kHz", "8000");
-                       e.addValue(e, "11.025 kHz", "11025");
-                       e.addValue(e, "16 kHz", "16000");
-                       e.addValue(e, "22.05 kHz", "22050");
-                       e.addValue(e, "24 kHz", "24000");
-                       e.addValue(e, "32 kHz", "32000");
-                       e.addValue(e, "44.1 kHz", "44100");
-                       e.addValue(e, "48 kHz", "48000");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Channels:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("snd_channels"));
-                       e.addValue(e, "Mono", "1");
-                       e.addValue(e, "Stereo", "2");
-                       e.addValue(e, "2.1", "3");
-                       e.addValue(e, "3.1", "4");
-                       e.addValue(e, "4.1", "5");
-                       e.addValue(e, "5.1", "6");
-                       e.addValue(e, "6.1", "7");
-                       e.addValue(e, "7.1", "8");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeNexuizCheckBox(0, "snd_swapstereo", "Swap Stereo"));
-               setDependent(e, "snd_channels", 1.5, 0.5);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeNexuizCheckBox(0, "snd_spatialization_control", "Headphone friendly mode"));
-               setDependent(e, "snd_channels", 1.5, 0.5);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Spatial voices:"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(1, "cl_voice_directional", "0", "None"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(1, "cl_voice_directional", "2", "Taunts"));
-               me.TD(me, 1, 2/3, e = makeNexuizRadioButton(1, "cl_voice_directional", "1", "All"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Taunt range:"));
-               setDependent(e, "cl_voice_directional", 0.5, -0.5);
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("cl_voice_directional_taunt_attenuation"));
-                       e.addValue(e, "Very short", "3");
-                       e.addValue(e, "Short", "2");
-                       e.addValue(e, "Normal", "0.5");
-                       e.addValue(e, "Long", "0.25");
-                       e.addValue(e, "Full", "0.015625");
-                       e.configureNexuizTextSliderValues(e);
-               setDependent(e, "cl_voice_directional", 0.5, -0.5);
-       me.TR(me);
-               sl = makeNexuizSlider(0.15, 1, 0.05, "cl_autotaunt");
-                       sl.valueDisplayMultiplier = 100;
-                       sl.valueDigits = 0;
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, sl, "Automatic taunts"));
-               if(sl.value != e.savedValue)
-                       e.savedValue = 0.65; // default
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0.1, "Frequency:"));
-               me.TD(me, 1, 2, sl);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Time warning:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("cl_sound_maptime_warning"));
-                       e.addValue(e, "None", "0");
-                       e.addValue(e, "1 minute", "1");
-                       e.addValue(e, "5 minutes", "2");
-                       e.addValue(e, "Both", "3");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_hitsound", "Hit indicator"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(2, 0, "menu_sounds", "Menu sounds"));
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "snd_restart; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_effects.c b/qcsrc/menu/nexuiz/dialog_settings_effects.c
deleted file mode 100644 (file)
index 15ca3dc..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizEffectsSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizEffectsSettingsTab, fill, void(entity))
-       ATTRIB(NexuizEffectsSettingsTab, title, string, "Effects")
-       ATTRIB(NexuizEffectsSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizEffectsSettingsTab, rows, float, 17)
-       ATTRIB(NexuizEffectsSettingsTab, columns, float, 6.5)
-ENDCLASS(NexuizEffectsSettingsTab)
-entity makeNexuizEffectsSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizEffectsSettingsTab()
-{
-       entity me;
-       me = spawnNexuizEffectsSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-
-float someShadowCvarIsEnabled(entity box)
-{
-       if(cvar("r_shadow_realtime_dlight"))
-               if(cvar("r_shadow_realtime_dlight_shadows"))
-                       return TRUE;
-       if(cvar("r_shadow_realtime_world"))
-               if(cvar("r_shadow_realtime_world_shadows"))
-                       return TRUE;
-       return FALSE;
-}
-
-void fillNexuizEffectsSettingsTab(entity me)
-{
-       entity e, s;
-       float n;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Quality preset:"));
-               n = 5 + 2 * !!cvar("developer");
-               if(cvar("developer"))
-                       me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("OMG!", '1 0 1', "exec effects-omg.cfg", 0));
-               me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("Low", '0 0 0', "exec effects-low.cfg", 0));
-               me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("Medium", '0 0 0', "exec effects-med.cfg", 0));
-               me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("Normal", '0 0 0', "exec effects-normal.cfg", 0));
-               me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("High", '0 0 0', "exec effects-high.cfg", 0));
-               me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("Ultra", '0 0 0', "exec effects-ultra.cfg", 0));
-               if(cvar("developer"))
-                       me.TD(me, 1, 5.5 / n, e = makeNexuizCommandButton("Ultimate", '0 0 0', "exec effects-ultimate.cfg", 0));
-
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Geometry detail:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("r_subdivisions_tolerance"));
-                       e.addValue(e, "Lowest", "16");
-                       e.addValue(e, "Low", "8");
-                       e.addValue(e, "Normal", "4");
-                       e.addValue(e, "Good", "3");
-                       e.addValue(e, "Best", "2");
-                       e.addValue(e, "Insane", "1");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Antialiasing:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("vid_samples"));
-                       e.addValue(e, "Disabled", "1");
-                       e.addValue(e, "2x", "2");
-                       e.addValue(e, "4x", "4");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Texture quality:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("gl_picmip"));
-                       if(cvar("developer"))
-                               e.addValue(e, "Leet", "1337");
-                       e.addValue(e, "Lowest", "4");
-                       e.addValue(e, "Low", "3");
-                       e.addValue(e, "Normal", "2");
-                       e.addValue(e, "Good", "1");
-                       e.addValue(e, "Best", "0");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeNexuizCheckBox(1, "r_picmipworld", "Reduce model texture quality only"));
-                       setDependent(e, "gl_picmip", 0.5, -0.5);
-       me.TR(me);
-       me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Anisotropy:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("gl_texture_anisotropy"));
-                       e.addValue(e, "Disabled", "1");
-                       e.addValue(e, "2x", "2");
-                       e.addValue(e, "4x", "4");
-                       e.addValue(e, "8x", "8");
-                       e.addValue(e, "16x", "16");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Particle quality:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.1, 1.0, 0.05, "cl_particles_quality"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Particle dist.:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(500, 2000, 100, "r_drawparticles_drawdistance"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_decals", "Decals"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Distance:"));
-                       setDependent(e, "cl_decals", 1, 1);
-               me.TD(me, 1, 2, e = makeNexuizSlider(200, 500, 20, "r_drawdecals_drawdistance"));
-                       setDependent(e, "cl_decals", 1, 1);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-           me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Time:"));
-               setDependent(e, "cl_decals", 1, 1);
-           me.TD(me, 1, 2, e = makeNexuizSlider(1, 20, 1, "cl_decals_time"));
-               setDependent(e, "cl_decals", 1, 1);
-
-       me.gotoRC(me, 2, 3.5); me.setFirstColumn(me, me.currentColumn);
-       me.TD(me, 1, 2, e = makeNexuizCheckBox(1, "mod_q3bsp_nolightmaps", "Use lightmaps"));
-       me.TD(me, 1, 1.9, e = makeNexuizCheckBox(0, "r_glsl_deluxemapping", "Deluxe mapping"));
-               setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
-       me.TD(me, 1, 0.7, e = makeNexuizCheckBox(0, "r_shadow_gloss", "Gloss"));
-               setDependentAND3(e, "vid_gl20", 1, 1, "r_glsl_deluxemapping", 1, 2, "mod_q3bsp_nolightmaps", 0, 0);
-       me.TR(me);
-               me.TD(me, 1, 1.5, e = makeNexuizCheckBox(0, "r_glsl_offsetmapping", "Offset mapping"));
-                       setDependent(e, "vid_gl20", 1, 1);
-               me.TD(me, 1, 1.9, e = makeNexuizCheckBox(0, "r_glsl_offsetmapping_reliefmapping", "Relief mapping"));
-                       setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_water", "Reflections:"));
-                       setDependent(e, "vid_gl20", 1, 1);
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("r_water_resolutionmultiplier"));
-                       e.addValue(e, "Blurred", "0.25");
-                       e.addValue(e, "Good", "0.5");
-                       e.addValue(e, "Sharp", "1");
-                       e.configureNexuizTextSliderValues(e);
-                       setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
-       me.TR(me);
-               if(cvar("developer"))
-                       me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(3, 0, "r_showsurfaces", "Show surfaces"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizRadioButton(1, string_null, string_null, "No dynamic lighting"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizRadioButton(1, "gl_flashblend", string_null, "Flash blend approximation"));
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "r_shadow_realtime_dlight", string_null, "Realtime dynamic lighting"));
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_shadow_realtime_dlight_shadows", "Shadows"));
-                       setDependent(e, "r_shadow_realtime_dlight", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "r_shadow_realtime_world", "Realtime world lighting"));
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_shadow_realtime_world_shadows", "Shadows"));
-                       setDependent(e, "r_shadow_realtime_world", 1, 1);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.8, e = makeNexuizCheckBox(0, "r_shadow_usenormalmap", "Use normal maps"));
-                       setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_shadow_shadowmapping", "Soft shadows"));
-                       setDependentWeird(e, someShadowCvarIsEnabled);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_coronas", "Coronas"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_bloom", "Bloom"));
-                       setDependent(e, "r_hdr", 0, 0);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "r_hdr", "High Dynamic Range (HDR)"));
-       
-       me.TR(me);
-               s = makeNexuizSlider(0.1, 1, 0.1, "r_motionblur");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, s, "Motion blur:"));
-               if(s.value != e.savedValue)
-                       e.savedValue = 0.5; // default
-               me.TD(me, 1, 2, s);
-       me.TR(me);
-               s = makeNexuizSlider(0.1, 1, 0.1, "r_damageblur");
-               me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, s, "Damage blur:"));
-               if(s.value != e.savedValue)
-                       e.savedValue = 0.4; // default
-               me.TD(me, 1, 2, s);
-       
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_input.c b/qcsrc/menu/nexuiz/dialog_settings_input.c
deleted file mode 100644 (file)
index 08f0894..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizInputSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizInputSettingsTab, fill, void(entity))
-       ATTRIB(NexuizInputSettingsTab, title, string, "Input")
-       ATTRIB(NexuizInputSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizInputSettingsTab, rows, float, 17)
-       ATTRIB(NexuizInputSettingsTab, columns, float, 6.5)
-ENDCLASS(NexuizInputSettingsTab)
-entity makeNexuizInputSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizInputSettingsTab()
-{
-       entity me;
-       me = spawnNexuizInputSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-void fillNexuizInputSettingsTab(entity me)
-{
-       entity e;
-       entity kb;
-
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Key bindings:"));
-       me.TR(me);
-               me.TD(me, me.rows - 2, 3, kb = makeNexuizKeyBinder());
-       me.gotoRC(me, me.rows - 1, 0);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizButton("Change key...", '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Change;
-                       e.onClickEntity = kb;
-                       kb.keyGrabButton = e;
-               me.TD(me, 1, 1, e = makeNexuizButton("Edit...", '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Edit;
-                       e.onClickEntity = kb;
-                       kb.userbindEditButton = e;
-                       kb.userbindEditDialog = main.userbindEditDialog;
-                       main.userbindEditDialog.keybindBox = kb;
-               me.TD(me, 1, 1, e = makeNexuizButton("Clear", '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Clear;
-                       e.onClickEntity = kb;
-
-       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Sensitivity:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(1, 32, 0.2, "sensitivity"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "UI mouse speed:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.2, 4.0, 0.1, "menu_mouse_speed"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "m_filter", "Mouse filter"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(1.022, "m_pitch", "Invert mouse"));
-       me.TR(me);
-               if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
-                       me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "joy_enable", "Use joystick input"));
-               else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
-                       me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "joystick", "Use joystick input"));
-       me.TR(me);
-               if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
-                       me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "vid_dgamouse", "Turn off OS mouse acceleration"));
-               else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
-                       me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "apple_mouse_noaccel", "Turn off OS mouse acceleration"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "con_closeontoggleconsole", "\"enter console\" also closes"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Show binds:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("sbar_showbinds"));
-                       e.addValue(e, "Actions", "0");
-                       e.addValue(e, "Bound keys", "1");
-                       e.addValue(e, "Both", "2");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(2, 0, "cl_showpressedkeys", "Show pressed keys"));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_input_userbind.c b/qcsrc/menu/nexuiz/dialog_settings_input_userbind.c
deleted file mode 100644 (file)
index a7b4f43..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizUserbindEditDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizUserbindEditDialog, loadUserBind, void(entity, string, string, string))
-       METHOD(NexuizUserbindEditDialog, fill, void(entity))
-       ATTRIB(NexuizUserbindEditDialog, title, string, "User defined key bind")
-       ATTRIB(NexuizUserbindEditDialog, color, vector, SKINCOLOR_DIALOG_USERBIND)
-       ATTRIB(NexuizUserbindEditDialog, intendedWidth, float, 0.7)
-       ATTRIB(NexuizUserbindEditDialog, rows, float, 4)
-       ATTRIB(NexuizUserbindEditDialog, columns, float, 3)
-       ATTRIB(NexuizUserbindEditDialog, keybindBox, entity, NULL)
-
-       ATTRIB(NexuizUserbindEditDialog, nameBox, entity, NULL)
-       ATTRIB(NexuizUserbindEditDialog, commandPressBox, entity, NULL)
-       ATTRIB(NexuizUserbindEditDialog, commandReleaseBox, entity, NULL)
-ENDCLASS(NexuizUserbindEditDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void NexuizUserbindEditDialog_Save(entity btn, entity me)
-{
-       me.keybindBox.editUserbind(me.keybindBox, me.nameBox.text, me.commandPressBox.text, me.commandReleaseBox.text);
-       Dialog_Close(btn, me);
-}
-
-void loadUserBindNexuizUserbindEditDialog(entity me, string theName, string theCommandPress, string theCommandRelease)
-{
-       me.nameBox.setText(me.nameBox, theName);
-               me.nameBox.keyDown(me.nameBox, K_END, 0, 0);
-       me.commandPressBox.setText(me.commandPressBox, theCommandPress);
-               me.nameBox.keyDown(me.commandPressBox, K_END, 0, 0);
-       me.commandReleaseBox.setText(me.commandReleaseBox, theCommandRelease);
-               me.nameBox.keyDown(me.commandReleaseBox, K_END, 0, 0);
-}
-
-void fillNexuizUserbindEditDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Name:"));
-               me.TD(me, 1, me.columns - 1, me.nameBox = makeNexuizInputBox(0, string_null));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Command when pressed:"));
-               me.TD(me, 1, me.columns - 1, me.commandPressBox = makeNexuizInputBox(0, string_null));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Command when released:"));
-               me.TD(me, 1, me.columns - 1, me.commandReleaseBox = makeNexuizInputBox(0, string_null));
-       me.TR(me);
-               me.TD(me, 1, me.columns / 2, e = makeNexuizButton("Save", '0 0 0'));
-                       e.onClick = NexuizUserbindEditDialog_Save;
-                       e.onClickEntity = me;
-               me.TD(me, 1, me.columns / 2, e = makeNexuizButton("Cancel", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_misc.c b/qcsrc/menu/nexuiz/dialog_settings_misc.c
deleted file mode 100644 (file)
index fc7119c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizMiscSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizMiscSettingsTab, fill, void(entity))
-       ATTRIB(NexuizMiscSettingsTab, title, string, "Misc")
-       ATTRIB(NexuizMiscSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizMiscSettingsTab, rows, float, 17)
-       ATTRIB(NexuizMiscSettingsTab, columns, float, 6.5)
-ENDCLASS(NexuizMiscSettingsTab)
-entity makeNexuizMiscSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizMiscSettingsTab()
-{
-       entity me;
-       me = spawnNexuizMiscSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-void fillNexuizMiscSettingsTab(entity me)
-{
-       entity e;
-       entity sk;
-
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Menu skins:"));
-       me.TR(me);
-               me.TD(me, me.rows - 2, 3, sk = makeNexuizSkinList());
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, 3, e = makeNexuizButton("Apply immediately", '0 0 0'));
-                       e.onClick = SetSkin_Click;
-                       e.onClickEntity = sk;
-
-       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "showtime", "Show current time"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "showdate", "Show current date"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "showfps", "Show frames per second"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_showspeed", "Speedometer"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "cl_showspeed_unit", "0", "qu/s (hidden)"));
-                       setDependent(e, "cl_showspeed", 1, 1);
-               me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "cl_showspeed_unit", "1", "qu/s"));
-                       setDependent(e, "cl_showspeed", 1, 1);
-               me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "cl_showspeed_unit", "2", "m/s"));
-                       setDependent(e, "cl_showspeed", 1, 1);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "cl_showspeed_unit", "3", "km/h"));
-                       setDependent(e, "cl_showspeed", 1, 1);
-               me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "cl_showspeed_unit", "4", "mph"));
-                       setDependent(e, "cl_showspeed", 1, 1);
-               me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "cl_showspeed_unit", "5", "knots"));
-                       setDependent(e, "cl_showspeed", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_showacceleration", "Show accelerometer"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8/2, e = makeNexuizTextLabel(0, "Accelerometer scale:"));
-                       setDependent(e, "cl_showacceleration", 1, 1);
-               me.TD(me, 1, 2.8/2, e = makeNexuizSlider(1, 10, 0.5, "cl_showacceleration_scale"));
-                       setDependent(e, "cl_showacceleration", 1, 1);
-       me.TR(me);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeNexuizCheckBox(0, "host_sleep", "Minimize input latency"));
-       me.TR(me);
-       me.TR(me);
-               me.TDempty(me, 0.5);
-               me.TD(me, 1, 2, e = makeNexuizButton("Advanced settings...", '0 0 0'));
-                       e.onClick = DialogOpenButton_Click;
-                       e.onClickEntity = main.cvarsDialog;
-               me.TDempty(me, 0.5);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_misc_cvars.c b/qcsrc/menu/nexuiz/dialog_settings_misc_cvars.c
deleted file mode 100644 (file)
index 7b10a8d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizCvarsDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizCvarsDialog, toString, string(entity))
-       METHOD(NexuizCvarsDialog, fill, void(entity))
-       METHOD(NexuizCvarsDialog, showNotify, void(entity))
-       ATTRIB(NexuizCvarsDialog, title, string, "Advanced settings")
-       ATTRIB(NexuizCvarsDialog, color, vector, SKINCOLOR_DIALOG_CVARS)
-       ATTRIB(NexuizCvarsDialog, intendedWidth, float, 0.8)
-       ATTRIB(NexuizCvarsDialog, rows, float, 25)
-       ATTRIB(NexuizCvarsDialog, columns, float, 6)
-ENDCLASS(NexuizCvarsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyNexuizCvarsDialog(entity me)
-{
-       loadAllCvars(me);
-}
-string toStringNexuizCvarsDialog(entity me)
-{
-       return "XXX";
-}
-void fillNexuizCvarsDialog(entity me)
-{
-       entity e, cvarlist, btn;
-       cvarlist = makeNexuizCvarList();
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Cvar filter:"));
-               me.TD(me, 1, 0.5, btn = makeNexuizButton("Clear", '0 0 0'));
-               me.TD(me, 1, me.columns - 1.5, e = makeNexuizInputBox(0, string_null));
-                       e.onChange = CvarList_Filter_Change;
-                       e.onChangeEntity = cvarlist;
-                       btn.onClick = InputBox_Clear_Click;
-                       btn.onClickEntity = e;
-                       cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
-       me.TR(me);
-               me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
-       me.gotoRC(me, me.rows - 7, 0);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Setting:"));
-               me.TD(me, 1, me.columns - 1, e = makeNexuizTextLabel(0, string_null));
-                       cvarlist.cvarNameBox = e;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Type:"));
-               me.TD(me, 1, me.columns - 1, e = makeNexuizTextLabel(0, string_null));
-                       cvarlist.cvarTypeBox = e;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Value:"));
-               me.TD(me, 1, me.columns - 2, e = makeNexuizInputBox(0, string_null));
-                       cvarlist.cvarValueBox = e;
-                       e.onChange = CvarList_Value_Change;
-                       e.onChangeEntity = cvarlist;
-               me.TD(me, 1, 1, e = makeNexuizButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON));
-                       cvarlist.cvarDefaultBox = e;
-                       e.onClick = CvarList_Revert_Click;
-                       e.onClickEntity = cvarlist;
-                       e.allowCut = 1;
-                       e.marginLeft = e.marginRight = 0.5;
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Description:"));
-               me.TD(me, 1, me.columns - 1, e = makeNexuizTextLabel(0, string_null));
-                       cvarlist.cvarDescriptionBox = e;
-                       e.allowWrap = 1;
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_network.c b/qcsrc/menu/nexuiz/dialog_settings_network.c
deleted file mode 100644 (file)
index 21516b5..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizNetworkSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizNetworkSettingsTab, fill, void(entity))
-       ATTRIB(NexuizNetworkSettingsTab, title, string, "Network")
-       ATTRIB(NexuizNetworkSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizNetworkSettingsTab, rows, float, 17)
-       ATTRIB(NexuizNetworkSettingsTab, columns, float, 6.5)
-ENDCLASS(NexuizNetworkSettingsTab)
-entity makeNexuizNetworkSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizNetworkSettingsTab()
-{
-       entity me;
-       me = spawnNexuizNetworkSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-
-void fillNexuizNetworkSettingsTab(entity me)
-{
-       entity e;
-
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_movement", "Client-side movement prediction"));
-       me.TR(me);
-               //me.TD(me, 1, 3, e = makeNexuizCheckBox(1, "cl_nolerp", "Network update smoothing"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "shownetgraph", "Show netgraph"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Network speed:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("_cl_rate"));
-                       e.addValue(e, "56k", "4000");
-                       e.addValue(e, "ISDN", "7000");
-                       e.addValue(e, "Slow ADSL", "15000");
-                       e.addValue(e, "Fast ADSL", "20000");
-                       e.addValue(e, "Broadband", "66666");
-                       e.configureNexuizTextSliderValues(e);
-    me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Input packets/s:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(20, 100, 1, "cl_netfps"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "HTTP downloads:"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Downloads:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(1, 5, 1, "cl_curl_maxdownloads"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Speed (kB/s):"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(10, 1500, 10, "cl_curl_maxspeed"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Client UDP port:"));
-               me.TD(me, 1, 0.64, e = makeNexuizInputBox(0, "cl_port"));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_settings_video.c b/qcsrc/menu/nexuiz/dialog_settings_video.c
deleted file mode 100644 (file)
index fa9330f..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizVideoSettingsTab) EXTENDS(NexuizTab)
-       METHOD(NexuizVideoSettingsTab, fill, void(entity))
-       ATTRIB(NexuizVideoSettingsTab, title, string, "Video")
-       ATTRIB(NexuizVideoSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(NexuizVideoSettingsTab, rows, float, 17)
-       ATTRIB(NexuizVideoSettingsTab, columns, float, 6.5)
-       ATTRIB(NexuizVideoSettingsTab, name, string, "videosettings")
-ENDCLASS(NexuizVideoSettingsTab)
-entity makeNexuizVideoSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizVideoSettingsTab()
-{
-       entity me;
-       me = spawnNexuizVideoSettingsTab();
-       me.configureDialog(me);
-       return me;
-}
-void fillNexuizVideoSettingsTab(entity me)
-{
-       entity e;
-
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Resolution:"));
-               me.TD(me, 1, 2, e = makeNexuizResolutionSlider());
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Font/UI size:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("menu_vid_scale"));
-                       e.addValue(e, "Unreadable", "-1");
-                       e.addValue(e, "Tiny", "-0.75");
-                       e.addValue(e, "Little", "-0.5");
-                       e.addValue(e, "Small", "-0.25");
-                       e.addValue(e, "Medium", "0");
-                       e.addValue(e, "Large", "0.25");
-                       e.addValue(e, "Huge", "0.5");
-                       e.addValue(e, "Gigantic", "0.75");
-                       e.addValue(e, "Colossal", "1");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Color depth:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(16, 32, 16, "vid_bitsperpixel"));
-       me.TR(me);
-               me.TD(me, 1, 1.5, e = makeNexuizTextLabel(0, "Texture compression"));
-               me.TD(me, 1, 0.5, e = makeNexuizRadioButton(2, "gl_texturecompression", "0", "None"));
-               me.TD(me, 1, 0.5, e = makeNexuizRadioButton(2, "gl_texturecompression", "1", "Fast"));
-               me.TD(me, 1, 0.5, e = makeNexuizRadioButton(2, "gl_texturecompression", "2", "Good"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "vid_fullscreen", "Full screen"));
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "vid_vsync", "Vertical Synchronization"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "vid_gl20", "Use OpenGL 2.0 shaders (GLSL)"));
-       me.TR(me);
-               me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "r_coronas_occlusionquery", "Use Occlusion Queries"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Vertex Buffer Objects (VBOs)"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.9, e = makeNexuizRadioButton(1, "gl_vbo", "0", "Off"));
-               me.TD(me, 1, 2.1, e = makeNexuizRadioButton(1, "gl_vbo", "3", "Vertices, some Tris (compatible)"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 0.9, e = makeNexuizRadioButton(1, "gl_vbo", "2", "Vertices"));
-               me.TD(me, 1, 2.1, e = makeNexuizRadioButton(1, "gl_vbo", "1", "Vertices and Triangles"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Depth first:"));
-               me.TD(me, 1, 2, e = makeNexuizTextSlider("r_depthfirst"));
-                       e.addValue(e, "Disabled", "0");
-                       e.addValue(e, "World", "1");
-                       e.addValue(e, "All", "2");
-                       e.configureNexuizTextSliderValues(e);
-       me.TR(me);
-               if(cvar_type("apple_multithreadedgl") & CVAR_TYPEFLAG_ENGINE)
-                       me.TD(me, 1, 3, e = makeNexuizCheckBox(1, "apple_multithreadedgl", "Disable multithreaded OpenGL"));
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "gl_finish", "Wait for GPU to finish each frame"));
-
-       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Brightness:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.0, 0.5, 0.02, "v_brightness"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Contrast:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(1.0, 3.0, 0.05, "v_contrast"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Gamma:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.5, 2.0, 0.05, "v_gamma"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Contrast boost:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(1.0, 5.0, 0.1, "v_contrastboost"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Saturation:"));
-                       setDependent(e, "vid_gl20", 1, 1);
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.5, 2.0, 0.05, "r_glsl_saturation"));
-                       setDependent(e, "vid_gl20", 1, 1);
-       me.TR(me);
-               me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "v_glslgamma", "Use GLSL to handle color control"));
-                       setDependent(e, "vid_gl20", 1, 1);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Ambient:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0, 20.0, 1.0, "r_ambient"));
-       me.TR(me);
-               me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Intensity:"));
-               me.TD(me, 1, 2, e = makeNexuizSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "menu_cmd setresolution; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_singleplayer.c b/qcsrc/menu/nexuiz/dialog_singleplayer.c
deleted file mode 100644 (file)
index b344255..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizSingleplayerDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizSingleplayerDialog, fill, void(entity))
-       ATTRIB(NexuizSingleplayerDialog, title, string, "Singleplayer")
-       ATTRIB(NexuizSingleplayerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER)
-       ATTRIB(NexuizSingleplayerDialog, intendedWidth, float, 0.80)
-       ATTRIB(NexuizSingleplayerDialog, rows, float, 24)
-       ATTRIB(NexuizSingleplayerDialog, columns, float, 5)
-       ATTRIB(NexuizSingleplayerDialog, campaignBox, entity, NULL)
-ENDCLASS(NexuizSingleplayerDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-
-void InstantAction_LoadMap(entity btn, entity dummy)
-{
-       float glob, i, n, fh;
-       string s;
-       glob = search_begin("maps/*.instantaction", TRUE, TRUE);
-       if(glob < 0)
-               return;
-       i = ceil(random() * search_getsize(glob)) - 1;
-       fh = fopen(search_getfilename(glob, i), FILE_READ);
-       search_end(glob);
-       if(fh < 0)
-               return;
-       while((s = fgets(fh)))
-       {
-               if(substring(s, 0, 4) == "set ")
-                       s = substring(s, 4, strlen(s) - 4);
-               n = tokenize_console(s);
-               if(argv(0) == "bot_number")
-                       cvar_set("bot_number", argv(1));
-               else if(argv(0) == "skill")
-                       cvar_set("skill", argv(1));
-               else if(argv(0) == "timelimit")
-                       cvar_set("timelimit_override", argv(1));
-               else if(argv(0) == "fraglimit")
-                       cvar_set("fraglimit_override", argv(1));
-               else if(argv(0) == "changelevel")
-               {
-                       fclose(fh);
-                       localcmd("\nmenu_loadmap_prepare\n");
-                       MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
-                       MapInfo_LoadMap(argv(1));
-                       cvar_set("lastlevel", "1");
-                       return;
-               }
-       }
-       fclose(fh);
-}
-
-void fillNexuizSingleplayerDialog(entity me)
-{
-       entity e, btnPrev, btnNext, lblTitle;
-
-       me.TR(me);
-               me.TDempty(me, (me.columns - 3) / 2);
-               me.TD(me, 2, 3, e = makeNexuizBigButton("Instant action! (random map with bots)", '0 0 0'));
-                       e.onClick = InstantAction_LoadMap;
-                       e.onClickEntity = NULL;
-       me.TR(me);
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 1, btnPrev = makeNexuizButton("<<", '0 0 0'));
-               me.TD(me, 1, me.columns - 2, lblTitle = makeNexuizTextLabel(0.5, "???"));
-               me.TD(me, 1, 1, btnNext = makeNexuizButton(">>", '0 0 0'));
-       me.TR(me);
-               me.TD(me, me.rows - 5, me.columns, me.campaignBox = makeNexuizCampaignList());
-                       btnPrev.onClick = MultiCampaign_Prev;
-                       btnPrev.onClickEntity = me.campaignBox;
-                       btnNext.onClick = MultiCampaign_Next;
-                       btnNext.onClickEntity = me.campaignBox;
-                       me.campaignBox.buttonNext = btnNext;
-                       me.campaignBox.buttonPrev = btnPrev;
-                       me.campaignBox.labelTitle = lblTitle;
-                       me.campaignBox.campaignGo(me.campaignBox, 0);
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, 2, e = makeNexuizModButton("Singleplayer"));
-               me.TD(me, 1, me.columns - 2 , e = makeNexuizButton("Start Singleplayer!", '0 0 0'));
-                       e.onClick = CampaignList_LoadMap;
-                       e.onClickEntity = me.campaignBox;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_singleplayer_winner.c b/qcsrc/menu/nexuiz/dialog_singleplayer_winner.c
deleted file mode 100644 (file)
index ae6a639..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizWinnerDialog) EXTENDS(NexuizDialog)
-       METHOD(NexuizWinnerDialog, fill, void(entity))
-       ATTRIB(NexuizWinnerDialog, title, string, "Winner")
-       ATTRIB(NexuizWinnerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER)
-       ATTRIB(NexuizWinnerDialog, intendedWidth, float, 0.32)
-       ATTRIB(NexuizWinnerDialog, rows, float, 12)
-       ATTRIB(NexuizWinnerDialog, columns, float, 3)
-ENDCLASS(NexuizWinnerDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void fillNexuizWinnerDialog(entity me)
-{
-       entity e;
-
-       me.TR(me);
-               me.TD(me, me.rows - 2, me.columns, e = makeNexuizImage("/gfx/winner", -1));
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
-                       e.onClick = Dialog_Close;
-                       e.onClickEntity = me;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/dialog_teamselect.c b/qcsrc/menu/nexuiz/dialog_teamselect.c
deleted file mode 100644 (file)
index 2020015..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizTeamSelectDialog) EXTENDS(NexuizRootDialog)
-       METHOD(NexuizTeamSelectDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls
-       METHOD(NexuizTeamSelectDialog, showNotify, void(entity))
-       ATTRIB(NexuizTeamSelectDialog, title, string, "Team Selection") // ;)
-       ATTRIB(NexuizTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
-       ATTRIB(NexuizTeamSelectDialog, intendedWidth, float, 0.4)
-       ATTRIB(NexuizTeamSelectDialog, rows, float, 5)
-       ATTRIB(NexuizTeamSelectDialog, columns, float, 4)
-       ATTRIB(NexuizTeamSelectDialog, name, string, "TeamSelect")
-       ATTRIB(NexuizTeamSelectDialog, team1, entity, NULL)
-       ATTRIB(NexuizTeamSelectDialog, team2, entity, NULL)
-       ATTRIB(NexuizTeamSelectDialog, team3, entity, NULL)
-       ATTRIB(NexuizTeamSelectDialog, team4, entity, NULL)
-ENDCLASS(NexuizTeamSelectDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeTeamButton(string theName, vector theColor, string commandtheName)
-{
-       entity b;
-       b = makeNexuizBigCommandButton(theName, theColor, commandtheName, 1);
-       return b;
-}
-
-void showNotifyNexuizTeamSelectDialog(entity me)
-{
-       float teams, nTeams;
-       teams = cvar("_teams_available");
-       nTeams = 0;
-       me.team1.disabled = !(teams & 1); nTeams += !!(teams & 1);
-       me.team2.disabled = !(teams & 2); nTeams += !!(teams & 2);
-       me.team3.disabled = !(teams & 4); nTeams += !!(teams & 4);
-       me.team4.disabled = !(teams & 8); nTeams += !!(teams & 8);
-}
-
-void fillNexuizTeamSelectDialog(entity me)
-{
-       entity e;
-       me.TR(me);
-               me.TD(me, 2, 4, e = makeTeamButton("join 'best' team (auto-select)", '0 0 0', "cmd selectteam auto; cmd join"));
-                       e.preferredFocusPriority = 1;
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 2, 1, me.team1 = makeTeamButton("red", '1 0.5 0.5', "cmd selectteam red; cmd join"));
-               me.TD(me, 2, 1, me.team2 = makeTeamButton("blue", '0.5 0.5 1', "cmd selectteam blue; cmd join"));
-               me.TD(me, 2, 1, me.team3 = makeTeamButton("yellow", '1 1 0.5', "cmd selectteam yellow; cmd join"));
-               me.TD(me, 2, 1, me.team4 = makeTeamButton("pink", '1 0.5 1', "cmd selectteam pink; cmd join"));
-       me.TR(me);
-       me.TR(me);
-               me.TD(me, 1, 4, makeNexuizCommandButton("spectate", '0 0 0', "cmd spectate", 1));
-}
-#endif
-
-/* Click. The c-word is here so you can grep for it :-) */
diff --git a/qcsrc/menu/nexuiz/gametypebutton.c b/qcsrc/menu/nexuiz/gametypebutton.c
deleted file mode 100644 (file)
index 3308892..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizGametypeButton) EXTENDS(RadioButton)
-       METHOD(NexuizGametypeButton, configureNexuizGametypeButton, void(entity, float, string, string))
-       METHOD(NexuizGametypeButton, setChecked, void(entity, float))
-       ATTRIB(NexuizGametypeButton, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizGametypeButton, image, string, SKINGFX_BUTTON_BIG)
-       ATTRIB(NexuizGametypeButton, color, vector, SKINCOLOR_BUTTON_N)
-       ATTRIB(NexuizGametypeButton, colorC, vector, SKINCOLOR_BUTTON_C)
-       ATTRIB(NexuizGametypeButton, colorF, vector, SKINCOLOR_BUTTON_F)
-       ATTRIB(NexuizGametypeButton, colorD, vector, SKINCOLOR_BUTTON_D)
-       ATTRIB(NexuizGametypeButton, srcMulti, float, 1)
-       ATTRIB(NexuizGametypeButton, useDownAsChecked, float, 1)
-
-       ATTRIB(NexuizGametypeButton, cvarName, string, string_null)
-       METHOD(NexuizGametypeButton, loadCvars, void(entity))
-       METHOD(NexuizGametypeButton, saveCvars, void(entity))
-
-       ATTRIB(NexuizGametypeButton, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizGametypeButton, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizGametypeButton)
-entity makeNexuizGametypeButton(float, string, string);
-#endif
-
-#ifdef IMPLEMENTATION
-void GameTypeButton_Click(entity me, entity other);
-entity makeNexuizGametypeButton(float theGroup, string theCvar, string theText)
-{
-       entity me;
-       me = spawnNexuizGametypeButton();
-       me.configureNexuizGametypeButton(me, theGroup, theCvar, theText);
-       return me;
-}
-void configureNexuizGametypeButtonNexuizGametypeButton(entity me, float theGroup, string theCvar, string theText)
-{
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.tooltip = getZonedTooltipForIdentifier(theCvar);
-               me.loadCvars(me);
-       }
-       me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
-       me.align = 0.5;
-       me.onClick = GameTypeButton_Click;
-       me.onClickEntity = NULL;
-}
-void setCheckedNexuizGametypeButton(entity me, float val)
-{
-       if(val != me.checked)
-       {
-               me.checked = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizGametypeButton(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       me.checked = cvar(me.cvarName);
-}
-void saveCvarsNexuizGametypeButton(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       cvar_set(me.cvarName, ftos(me.checked));
-}
-void GameTypeButton_Click(entity me, entity other)
-{
-       RadioButton_Click(me, other);
-       me.parent.gameTypeChangeNotify(me.parent);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/image.c b/qcsrc/menu/nexuiz/image.c
deleted file mode 100644 (file)
index d646fe2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizImage) EXTENDS(Image)
-       METHOD(NexuizImage, configureNexuizImage, void(entity, string, float))
-ENDCLASS(NexuizImage)
-entity makeNexuizImage(string theImage, float theAspect);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizImage(string theImage, float theAspect)
-{
-       entity me;
-       me = spawnNexuizImage();
-       me.configureNexuizImage(me, theImage, theAspect);
-       return me;
-}
-void configureNexuizImageNexuizImage(entity me, string theImage, float theAspect)
-{
-       me.configureImage(me, theImage);
-       if(theAspect < 0) // use image aspect
-       {
-               vector sz;
-               sz = draw_PictureSize(theImage);
-               me.forcedAspect = sz_x / sz_y;
-       }
-       else
-               me.forcedAspect = theAspect;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/inputbox.c b/qcsrc/menu/nexuiz/inputbox.c
deleted file mode 100644 (file)
index bc69642..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizInputBox) EXTENDS(InputBox)
-       METHOD(NexuizInputBox, configureNexuizInputBox, void(entity, float, string))
-       METHOD(NexuizInputBox, focusLeave, void(entity))
-       METHOD(NexuizInputBox, setText, void(entity, string))
-       ATTRIB(NexuizInputBox, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizInputBox, image, string, SKINGFX_INPUTBOX)
-       ATTRIB(NexuizInputBox, onChange, void(entity, entity), SUB_Null)
-       ATTRIB(NexuizInputBox, onChangeEntity, entity, NULL)
-       ATTRIB(NexuizInputBox, onEnter, void(entity, entity), SUB_Null)
-       ATTRIB(NexuizInputBox, onEnterEntity, entity, NULL)
-       ATTRIB(NexuizInputBox, marginLeft, float, SKINMARGIN_INPUTBOX_CHARS)
-       ATTRIB(NexuizInputBox, marginRight, float, SKINMARGIN_INPUTBOX_CHARS)
-       ATTRIB(NexuizInputBox, color, vector, SKINCOLOR_INPUTBOX_N)
-       ATTRIB(NexuizInputBox, colorF, vector, SKINCOLOR_INPUTBOX_F)
-
-       ATTRIB(NexuizInputBox, alpha, float, SKINALPHA_TEXT)
-
-       ATTRIB(NexuizInputBox, cvarName, string, string_null)
-       METHOD(NexuizInputBox, loadCvars, void(entity))
-       METHOD(NexuizInputBox, saveCvars, void(entity))
-       METHOD(NexuizInputBox, keyDown, float(entity, float, float, float))
-ENDCLASS(NexuizInputBox)
-entity makeNexuizInputBox(float, string);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizInputBox(float doEditColorCodes, string theCvar)
-{
-       entity me;
-       me = spawnNexuizInputBox();
-       me.configureNexuizInputBox(me, doEditColorCodes, theCvar);
-       return me;
-}
-void configureNexuizInputBoxNexuizInputBox(entity me, float doEditColorCodes, string theCvar)
-{
-       me.configureInputBox(me, "", 0, me.fontSize, me.image);
-       me.editColorCodes = doEditColorCodes;
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.tooltip = getZonedTooltipForIdentifier(theCvar);
-               me.loadCvars(me);
-       }
-       me.cursorPos = strlen(me.text);
-}
-void focusLeaveNexuizInputBox(entity me)
-{
-       me.saveCvars(me);
-}
-void setTextNexuizInputBox(entity me, string new)
-{
-       if(me.text != new)
-       {
-               setTextInputBox(me, new);
-               me.onChange(me, me.onChangeEntity);
-       }
-       else
-               setTextInputBox(me, new);
-}
-void loadCvarsNexuizInputBox(entity me)
-{
-       if not(me.cvarName)
-               return;
-       setTextInputBox(me, cvar_string(me.cvarName));
-}
-void saveCvarsNexuizInputBox(entity me)
-{
-       if not(me.cvarName)
-               return;
-       cvar_set(me.cvarName, me.text);
-}
-float keyDownNexuizInputBox(entity me, float key, float ascii, float shift)
-{
-       float r;
-       r = 0;
-       if(key == K_ENTER)
-       {
-               if(me.cvarName)
-               {
-                       me.saveCvars(me);
-                       r = 1;
-               }
-               me.onEnter(me, me.onEnterEntity);
-       }
-       if(keyDownInputBox(me, key, ascii, shift))
-               r = 1;
-       return r;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/keybinder.c b/qcsrc/menu/nexuiz/keybinder.c
deleted file mode 100644 (file)
index 7d9fc6d..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizKeyBinder) EXTENDS(NexuizListBox)
-       METHOD(NexuizKeyBinder, configureNexuizKeyBinder, void(entity))
-       ATTRIB(NexuizKeyBinder, rowsPerItem, float, 1)
-       METHOD(NexuizKeyBinder, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizKeyBinder, clickListBoxItem, void(entity, float, vector))
-       METHOD(NexuizKeyBinder, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizKeyBinder, setSelected, void(entity, float))
-       METHOD(NexuizKeyBinder, keyDown, float(entity, float, float, float))
-       METHOD(NexuizKeyBinder, keyGrabbed, void(entity, float, float))
-
-       ATTRIB(NexuizKeyBinder, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizKeyBinder, realUpperMargin, float, 0)
-       ATTRIB(NexuizKeyBinder, columnFunctionOrigin, float, 0)
-       ATTRIB(NexuizKeyBinder, columnFunctionSize, float, 0)
-       ATTRIB(NexuizKeyBinder, columnKeysOrigin, float, 0)
-       ATTRIB(NexuizKeyBinder, columnKeysSize, float, 0)
-
-       ATTRIB(NexuizKeyBinder, lastClickedKey, float, -1)
-       ATTRIB(NexuizKeyBinder, lastClickedTime, float, 0)
-       ATTRIB(NexuizKeyBinder, previouslySelected, float, -1)
-       ATTRIB(NexuizKeyBinder, inMouseHandler, float, 0)
-       ATTRIB(NexuizKeyBinder, userbindEditButton, entity, NULL)
-       ATTRIB(NexuizKeyBinder, keyGrabButton, entity, NULL)
-       ATTRIB(NexuizKeyBinder, userbindEditDialog, entity, NULL)
-       METHOD(NexuizKeyBinder, editUserbind, void(entity, string, string, string))
-ENDCLASS(NexuizKeyBinder)
-entity makeNexuizKeyBinder();
-void KeyBinder_Bind_Change(entity btn, entity me);
-void KeyBinder_Bind_Clear(entity btn, entity me);
-void KeyBinder_Bind_Edit(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-
-#define MAX_KEYS_PER_FUNCTION 2
-#define MAX_KEYBINDS 256
-string Nexuiz_KeyBinds_Functions[MAX_KEYBINDS];
-string Nexuiz_KeyBinds_Descriptions[MAX_KEYBINDS];
-var float Nexuiz_KeyBinds_Count = -1;
-
-void Nexuiz_KeyBinds_Read()
-{
-       float fh;
-       string s;
-
-       Nexuiz_KeyBinds_Count = 0;
-       fh = fopen("keybinds.txt", FILE_READ);
-       if(fh < 0)
-               return;
-       while((s = fgets(fh)))
-       {
-               if(tokenize_console(s) != 2)
-                       continue;
-               Nexuiz_KeyBinds_Functions[Nexuiz_KeyBinds_Count] = strzone(argv(0));
-               Nexuiz_KeyBinds_Descriptions[Nexuiz_KeyBinds_Count] = strzone(argv(1));
-               ++Nexuiz_KeyBinds_Count;
-               if(Nexuiz_KeyBinds_Count >= MAX_KEYBINDS)
-                       break;
-       }
-       fclose(fh);
-}
-
-entity makeNexuizKeyBinder()
-{
-       entity me;
-       me = spawnNexuizKeyBinder();
-       me.configureNexuizKeyBinder(me);
-       return me;
-}
-void configureNexuizKeyBinderNexuizKeyBinder(entity me)
-{
-       me.configureNexuizListBox(me);
-       if(Nexuiz_KeyBinds_Count < 0)
-               Nexuiz_KeyBinds_Read();
-       me.nItems = Nexuiz_KeyBinds_Count;
-       me.setSelected(me, 0);
-}
-void resizeNotifyNexuizKeyBinder(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
-       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
-       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-
-       me.columnFunctionOrigin = 0;
-       me.columnKeysSize = me.realFontSize_x * 12;
-       me.columnFunctionSize = 1 - me.columnKeysSize - 2 * me.realFontSize_x;
-       me.columnKeysOrigin = me.columnFunctionOrigin + me.columnFunctionSize + me.realFontSize_x;
-
-       if(me.userbindEditButton)
-               me.userbindEditButton.disabled = (substring(Nexuiz_KeyBinds_Descriptions[me.selectedItem], 0, 1) != "$");
-}
-void KeyBinder_Bind_Change(entity btn, entity me)
-{
-       string func;
-
-       func = Nexuiz_KeyBinds_Functions[me.selectedItem];
-       if(func == "")
-               return;
-
-       me.keyGrabButton.forcePressed = 1;
-       keyGrabber = me;
-}
-void keyGrabbedNexuizKeyBinder(entity me, float key, float ascii)
-{
-       float n, j, k, nvalid;
-       string func;
-
-       me.keyGrabButton.forcePressed = 0;
-       if(key == K_ESCAPE)
-               return;
-
-       func = Nexuiz_KeyBinds_Functions[me.selectedItem];
-       if(func == "")
-               return;
-
-       n = tokenize(findkeysforcommand(func)); // uses '...' strings
-       nvalid = 0;
-       for(j = 0; j < n; ++j)
-       {
-               k = stof(argv(j));
-               if(k != -1)
-                       ++nvalid;
-       }
-       if(nvalid >= MAX_KEYS_PER_FUNCTION)
-       {
-               for(j = 0; j < n; ++j)
-               {
-                       k = stof(argv(j));
-                       if(k != -1)
-                               localcmd("\nunbind \"", keynumtostring(k), "\"\n");
-               }
-       }
-       localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
-}
-void editUserbindNexuizKeyBinder(entity me, string theName, string theCommandPress, string theCommandRelease)
-{
-       string func, descr;
-
-       if(!me.userbindEditDialog)
-               return;
-       
-       func = Nexuiz_KeyBinds_Functions[me.selectedItem];
-       if(func == "")
-               return;
-       
-       descr = Nexuiz_KeyBinds_Descriptions[me.selectedItem];
-       if(substring(descr, 0, 1) != "$")
-               return;
-       descr = substring(descr, 1, strlen(descr) - 1);
-
-       // Hooray! It IS a user bind!
-       cvar_set(strcat(descr, "_description"), theName);
-       cvar_set(strcat(descr, "_press"), theCommandPress);
-       cvar_set(strcat(descr, "_release"), theCommandRelease);
-}
-void KeyBinder_Bind_Edit(entity btn, entity me)
-{
-       string func, descr;
-
-       if(!me.userbindEditDialog)
-               return;
-       
-       func = Nexuiz_KeyBinds_Functions[me.selectedItem];
-       if(func == "")
-               return;
-       
-       descr = Nexuiz_KeyBinds_Descriptions[me.selectedItem];
-       if(substring(descr, 0, 1) != "$")
-               return;
-       descr = substring(descr, 1, strlen(descr) - 1);
-
-       // Hooray! It IS a user bind!
-       me.userbindEditDialog.loadUserBind(me.userbindEditDialog, cvar_string(strcat(descr, "_description")), cvar_string(strcat(descr, "_press")), cvar_string(strcat(descr, "_release")));
-
-       DialogOpenButton_Click(btn, me.userbindEditDialog);
-}
-void KeyBinder_Bind_Clear(entity btn, entity me)
-{
-       float n, j, k;
-       string func;
-
-       func = Nexuiz_KeyBinds_Functions[me.selectedItem];
-       if(func == "")
-               return;
-
-       n = tokenize(findkeysforcommand(func)); // uses '...' strings
-       for(j = 0; j < n; ++j)
-       {
-               k = stof(argv(j));
-               if(k != -1)
-                       localcmd("\nunbind \"", keynumtostring(k), "\"\n");
-       }
-
-}
-void clickListBoxItemNexuizKeyBinder(entity me, float i, vector where)
-{
-       if(i == me.lastClickedServer)
-               if(time < me.lastClickedTime + 0.3)
-               {
-                       // DOUBLE CLICK!
-                       KeyBinder_Bind_Change(NULL, me);
-               }
-       me.lastClickedServer = i;
-       me.lastClickedTime = time;
-}
-void setSelectedNexuizKeyBinder(entity me, float i)
-{
-       // handling of "unselectable" items
-       i = floor(0.5 + bound(0, i, me.nItems - 1));
-       if(me.pressed == 0 || me.pressed == 1) // keyboard or scrolling - skip unselectable items
-       {
-               if(i > me.previouslySelected)
-               {
-                       while((i < me.nItems - 1) && (Nexuiz_KeyBinds_Functions[i] == ""))
-                               ++i;
-               }
-               while((i > 0) && (Nexuiz_KeyBinds_Functions[i] == ""))
-                       --i;
-               while((i < me.nItems - 1) && (Nexuiz_KeyBinds_Functions[i] == ""))
-                       ++i;
-       }
-       if(me.pressed == 3) // released the mouse - fall back to last valid item
-       {
-               if(Nexuiz_KeyBinds_Functions[i] == "")
-                       i = me.previouslySelected;
-       }
-       if(Nexuiz_KeyBinds_Functions[i] != "")
-               me.previouslySelected = i;
-       if(me.userbindEditButton)
-               me.userbindEditButton.disabled = (substring(Nexuiz_KeyBinds_Descriptions[i], 0, 1) != "$");
-       setSelectedListBox(me, i);
-}
-float keyDownNexuizKeyBinder(entity me, float key, float ascii, float shift)
-{
-       float r;
-       r = 1;
-       switch(key)
-       {
-               case K_ENTER:
-               case K_SPACE:
-                       KeyBinder_Bind_Change(me, me);
-                       break;
-               case K_DEL:
-               case K_BACKSPACE:
-                       KeyBinder_Bind_Clear(me, me);
-                       break;
-               default:
-                       r = keyDownListBox(me, key, ascii, shift);
-                       break;
-       }
-       return r;
-}
-void drawListBoxItemNexuizKeyBinder(entity me, float i, vector absSize, float isSelected)
-{
-       string s;
-       float j, k, n;
-       vector theColor;
-       float theAlpha;
-       string func, descr;
-       float extraMargin;
-
-       descr = Nexuiz_KeyBinds_Descriptions[i];
-       func = Nexuiz_KeyBinds_Functions[i];
-
-       if(func == "")
-       {
-               theAlpha = 1;
-               theColor = SKINCOLOR_KEYGRABBER_TITLES;
-               theAlpha = SKINALPHA_KEYGRABBER_TITLES;
-               extraMargin = 0;
-       }
-       else
-       {
-               if(isSelected)
-               {
-                       if(keyGrabber == me)
-                               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_WAITING, SKINALPHA_LISTBOX_WAITING);
-                       else
-                               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-               }
-               theAlpha = SKINALPHA_KEYGRABBER_KEYS;
-               theColor = SKINCOLOR_KEYGRABBER_KEYS;
-               extraMargin = me.realFontSize_x * 0.5;
-       }
-
-       if(substring(descr, 0, 1) == "$")
-       {
-               s = substring(descr, 1, strlen(descr) - 1);
-               descr = cvar_string(strcat(s, "_description"));
-               if(descr == "")
-                       descr = s;
-               if(cvar_string(strcat(s, "_press")) == "")
-                       if(cvar_string(strcat(s, "_release")) == "")
-                               theAlpha *= SKINALPHA_DISABLED;
-       }
-
-       draw_Text(me.realUpperMargin * eY + extraMargin * eX, descr, me.realFontSize, theColor, theAlpha, 0);
-       if(func != "")
-       {
-               n = tokenize(findkeysforcommand(func)); // uses '...' strings
-               s = "";
-               for(j = 0; j < n; ++j)
-               {
-                       k = stof(argv(j));
-                       if(k != -1)
-                       {
-                               if(s != "")
-                                       s = strcat(s, ", ");
-                               s = strcat(s, keynumtostring(k));
-                       }
-               }
-               s = draw_TextShortenToWidth(s, me.columnKeysSize, 0, me.realFontSize);
-               draw_CenterText(me.realUpperMargin * eY + (me.columnKeysOrigin + 0.5 * me.columnKeysSize) * eX, s, me.realFontSize, theColor, theAlpha, 0);
-       }
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/listbox.c b/qcsrc/menu/nexuiz/listbox.c
deleted file mode 100644 (file)
index ef52087..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizListBox) EXTENDS(ListBox)
-       METHOD(NexuizListBox, configureNexuizListBox, void(entity))
-       ATTRIB(NexuizListBox, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizListBox, scrollbarWidth, float, SKINWIDTH_SCROLLBAR)
-       ATTRIB(NexuizListBox, src, string, SKINGFX_SCROLLBAR)
-       ATTRIB(NexuizListBox, tolerance, vector, SKINTOLERANCE_SLIDER)
-       ATTRIB(NexuizListBox, rowsPerItem, float, 1)
-       METHOD(NexuizListBox, resizeNotify, void(entity, vector, vector, vector, vector))
-       ATTRIB(NexuizListBox, color, vector, SKINCOLOR_SCROLLBAR_N)
-       ATTRIB(NexuizListBox, colorF, vector, SKINCOLOR_SCROLLBAR_F)
-       ATTRIB(NexuizListBox, color2, vector, SKINCOLOR_SCROLLBAR_S)
-       ATTRIB(NexuizListBox, colorC, vector, SKINCOLOR_SCROLLBAR_C)
-       ATTRIB(NexuizListBox, colorBG, vector, SKINCOLOR_LISTBOX_BACKGROUND)
-       ATTRIB(NexuizListBox, alphaBG, float, SKINALPHA_LISTBOX_BACKGROUND)
-ENDCLASS(NexuizListBox)
-entity makeNexuizListBox();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizListBox()
-{
-       entity me;
-       me = spawnNexuizListBox();
-       me.configureNexuizListBox(me);
-       return me;
-}
-void configureNexuizListBoxNexuizListBox(entity me)
-{
-       me.configureListBox(me, me.scrollbarWidth, 1); // item height gets set up later
-}
-void resizeNotifyNexuizListBox(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       me.itemHeight = me.rowsPerItem * me.fontSize / absSize_y;
-       resizeNotifyListBox(me, relOrigin, relSize, absOrigin, absSize);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/mainwindow.c b/qcsrc/menu/nexuiz/mainwindow.c
deleted file mode 100644 (file)
index d3f7ed1..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifdef INTERFACE
-CLASS(MainWindow) EXTENDS(ModalController)
-       METHOD(MainWindow, configureMainWindow, void(entity))
-       ATTRIB(MainWindow, advancedDialog, entity, NULL)
-       ATTRIB(MainWindow, mutatorsDialog, entity, NULL)
-       ATTRIB(MainWindow, weaponsDialog, entity, NULL)
-       ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
-       ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
-       ATTRIB(MainWindow, winnerDialog, entity, NULL)
-       ATTRIB(MainWindow, radarDialog, entity, NULL)
-       ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
-       ATTRIB(MainWindow, cvarsDialog, entity, NULL)
-       ATTRIB(MainWindow, mainNexposee, entity, NULL)
-       ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
-ENDCLASS(MainWindow)
-#endif
-
-#ifdef IMPLEMENTATION
-
-void DemoButton_Click(entity me, entity other)
-{
-       if(me.text == "Do not press this button again!")
-               DialogOpenButton_Click(me, other);
-       else
-               me.setText(me, "Do not press this button again!");
-}
-
-void configureMainWindowMainWindow(entity me)
-{
-       entity n, i;
-
-       i = spawnNexuizTeamSelectDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.advancedDialog = i = spawnNexuizAdvancedDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.mutatorsDialog = i = spawnNexuizMutatorsDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.mapInfoDialog = i = spawnNexuizMapInfoDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.userbindEditDialog = i = spawnNexuizUserbindEditDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.winnerDialog = i = spawnNexuizWinnerDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.weaponsDialog = i = spawnNexuizWeaponsDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
-       me.radarDialog = i = spawnNexuizRadarDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       me.serverInfoDialog = i = spawnNexuizServerInfoDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       me.cvarsDialog = i = spawnNexuizCvarsDialog();
-       i.configureDialog(i);
-       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       me.mainNexposee = n = spawnNexuizNexposee();
-       /*
-               if(checkextension("DP_GECKO_SUPPORT"))
-               {
-                       i = spawnNexuizNewsDialog();
-                       i.configureDialog(i);
-                       n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-                       n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-               }
-       */
-               i = spawnNexuizSingleplayerDialog();
-               i.configureDialog(i);
-               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-               n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-               
-               i = spawnNexuizMultiplayerDialog();
-               i.configureDialog(i);
-               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-               n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-
-               i = spawnNexuizSettingsDialog();
-               i.configureDialog(i);
-               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-               n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-
-               i = spawnNexuizCreditsDialog();
-               i.configureDialog(i);
-               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-               n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-               n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
-
-               i = spawnNexuizQuitDialog();
-               i.configureDialog(i);
-               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-               n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-               n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
-       me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
-       me.moveItemAfter(me, n, NULL);
-
-       me.initializeDialog(me, n);
-}
-#endif
-
-/* Click. The c-word is here so you can grep for it :-) */
diff --git a/qcsrc/menu/nexuiz/maplist.c b/qcsrc/menu/nexuiz/maplist.c
deleted file mode 100644 (file)
index 093e7eb..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizMapList) EXTENDS(NexuizListBox)
-       METHOD(NexuizMapList, configureNexuizMapList, void(entity))
-       ATTRIB(NexuizMapList, rowsPerItem, float, 4)
-       METHOD(NexuizMapList, draw, void(entity))
-       METHOD(NexuizMapList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizMapList, clickListBoxItem, void(entity, float, vector))
-       METHOD(NexuizMapList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizMapList, refilter, void(entity))
-       METHOD(NexuizMapList, refilterCallback, void(entity, entity))
-       METHOD(NexuizMapList, keyDown, float(entity, float, float, float))
-
-       ATTRIB(NexuizMapList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizMapList, columnPreviewOrigin, float, 0)
-       ATTRIB(NexuizMapList, columnPreviewSize, float, 0)
-       ATTRIB(NexuizMapList, columnNameOrigin, float, 0)
-       ATTRIB(NexuizMapList, columnNameSize, float, 0)
-       ATTRIB(NexuizMapList, checkMarkOrigin, vector, '0 0 0')
-       ATTRIB(NexuizMapList, checkMarkSize, vector, '0 0 0')
-       ATTRIB(NexuizMapList, realUpperMargin1, float, 0)
-       ATTRIB(NexuizMapList, realUpperMargin2, float, 0)
-
-       ATTRIB(NexuizMapList, lastClickedMap, float, -1)
-       ATTRIB(NexuizMapList, lastClickedTime, float, 0)
-
-       ATTRIB(NexuizMapList, lastGametype, float, 0)
-       ATTRIB(NexuizMapList, lastFeatures, float, 0)
-
-       ATTRIB(NexuizMapList, origin, vector, '0 0 0')
-       ATTRIB(NexuizMapList, itemAbsSize, vector, '0 0 0')
-
-       ATTRIB(NexuizMapList, g_maplistCache, string, string_null)
-       METHOD(NexuizMapList, g_maplistCacheToggle, void(entity, float))
-       METHOD(NexuizMapList, g_maplistCacheQuery, float(entity, float))
-
-       ATTRIB(NexuizMapList, startButton, entity, NULL)
-
-       METHOD(NexuizMapList, loadCvars, void(entity))
-
-       ATTRIB(NexuizMapList, typeToSearchString, string, string_null)
-       ATTRIB(NexuizMapList, typeToSearchTime, float, 0)
-
-       METHOD(NexuizMapList, destroy, void(entity))
-
-       ATTRIB(NexuizListBox, alphaBG, float, 0)
-ENDCLASS(NexuizMapList)
-entity makeNexuizMapList();
-void MapList_All(entity btn, entity me);
-void MapList_None(entity btn, entity me);
-void MapList_LoadMap(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-void destroyNexuizMapList(entity me)
-{
-       MapInfo_Shutdown();
-}
-
-entity makeNexuizMapList()
-{
-       entity me;
-       me = spawnNexuizMapList();
-       me.configureNexuizMapList(me);
-       return me;
-}
-
-void configureNexuizMapListNexuizMapList(entity me)
-{
-       me.configureNexuizListBox(me);
-       me.refilter(me);
-}
-
-void loadCvarsNexuizMapList(entity me)
-{
-       me.refilter(me);
-}
-
-float g_maplistCacheQueryNexuizMapList(entity me, float i)
-{
-       return stof(substring(me.g_maplistCache, i, 1));
-}
-void g_maplistCacheToggleNexuizMapList(entity me, float i)
-{
-       string a, b, c, s, bspname;
-       float n;
-       s = me.g_maplistCache;
-       if not(s)
-               return;
-       b = substring(s, i, 1);
-       if(b == "0")
-               b = "1";
-       else if(b == "1")
-               b = "0";
-       else
-               return; // nothing happens
-       a = substring(s, 0, i);
-       c = substring(s, i+1, strlen(s) - (i+1));
-       strunzone(s);
-       me.g_maplistCache = strzone(strcat(a, b, c));
-       // TODO also update the actual cvar
-       if not((bspname = MapInfo_BSPName_ByID(i)))
-               return;
-       if(b == "1")
-               cvar_set("g_maplist", strcat(bspname, " ", cvar_string("g_maplist")));
-       else
-       {
-               s = "";
-               n = tokenize_console(cvar_string("g_maplist"));
-               for(i = 0; i < n; ++i)
-                       if(argv(i) != bspname)
-                               s = strcat(s, " ", argv(i));
-               cvar_set("g_maplist", substring(s, 1, strlen(s) - 1));
-       }
-}
-
-void drawNexuizMapList(entity me)
-{
-       if(me.startButton)
-               me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems));
-       drawListBox(me);
-}
-
-void resizeNotifyNexuizMapList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       me.itemAbsSize = '0 0 0';
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
-       me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize_y);
-       me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize_y;
-
-       me.columnPreviewOrigin = 0;
-       me.columnPreviewSize = me.itemAbsSize_y / me.itemAbsSize_x * 4 / 3;
-       me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize_x;
-       me.columnNameSize = 1 - me.columnPreviewSize - 2 * me.realFontSize_x;
-
-       me.checkMarkSize = (eX * (me.itemAbsSize_y / me.itemAbsSize_x) + eY) * 0.5;
-       me.checkMarkOrigin = eY + eX * (me.columnPreviewOrigin + me.columnPreviewSize) - me.checkMarkSize;
-}
-
-void clickListBoxItemNexuizMapList(entity me, float i, vector where)
-{
-       if(where_x <= me.columnPreviewOrigin + me.columnPreviewSize)
-       {
-               if(where_x >= 0)
-                       me.g_maplistCacheToggle(me, i);
-       }
-       if(where_x >= me.columnNameOrigin)
-               if(where_x <= 1)
-                       {
-                               if(i == me.lastClickedMap)
-                                       if(time < me.lastClickedTime + 0.3)
-                                       {
-                                               // DOUBLE CLICK!
-                                               // pop up map info screen
-                                               main.mapInfoDialog.loadMapInfo(main.mapInfoDialog, i, me);
-                                               DialogOpenButton_Click_withCoords(NULL, main.mapInfoDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * i - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
-                                               return;
-                                       }
-                               me.lastClickedMap = i;
-                               me.lastClickedTime = time;
-                       }
-}
-
-void drawListBoxItemNexuizMapList(entity me, float i, vector absSize, float isSelected)
-{
-       // layout: Ping, Map name, Map name, NP, TP, MP
-       string s;
-       float p;
-       float theAlpha;
-       float included;
-
-       if(!MapInfo_Get_ByID(i))
-               return;
-
-       included = me.g_maplistCacheQuery(me, i);
-       if(included || isSelected)
-               theAlpha = SKINALPHA_MAPLIST_INCLUDEDFG;
-       else
-               theAlpha = SKINALPHA_MAPLIST_NOTINCLUDEDFG;
-
-       if(isSelected)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-       else if(included)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
-
-       s = ftos(p);
-       draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
-       if(included)
-               draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
-       s = draw_TextShortenToWidth(strcat(MapInfo_Map_bspname, ": ", MapInfo_Map_title), me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_MAPLIST_TITLE, theAlpha, 0);
-       s = draw_TextShortenToWidth(MapInfo_Map_author, me.columnNameSize, 0,  me.realFontSize);
-       draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_MAPLIST_AUTHOR, theAlpha, 0);
-
-       MapInfo_ClearTemps();
-}
-
-void refilterNexuizMapList(entity me)
-{
-       float i, j, n;
-       string s;
-       float gt, f;
-       gt = MapInfo_CurrentGametype();
-       f = MapInfo_CurrentFeatures();
-       MapInfo_FilterGametype(gt, f, MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
-       me.nItems = MapInfo_count;
-       for(i = 0; i < MapInfo_count; ++i)
-               draw_PreloadPicture(strcat("/maps/", MapInfo_BSPName_ByID(i)));
-       if(me.g_maplistCache)
-               strunzone(me.g_maplistCache);
-       s = "0";
-       for(i = 1; i < MapInfo_count; i *= 2)
-               s = strcat(s, s);
-       n = tokenize_console(cvar_string("g_maplist"));
-       for(i = 0; i < n; ++i)
-       {
-               j = MapInfo_FindName(argv(i));
-               if(j >= 0)
-                       s = strcat(
-                               substring(s, 0, j),
-                               "1",
-                               substring(s, j+1, MapInfo_count - (j+1))
-                       );
-       }
-       me.g_maplistCache = strzone(s);
-       if(gt != me.lastGametype || f != me.lastFeatures)
-       {
-               me.lastGametype = gt;
-               me.lastFeatures = f;
-               me.setSelected(me, 0);
-       }
-}
-
-void refilterCallbackNexuizMapList(entity me, entity cb)
-{
-       me.refilter(me);
-}
-
-void MapList_All(entity btn, entity me)
-{
-       float i;
-       string s;
-       MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_FORBIDDEN, 0); // all
-       s = "";
-       for(i = 0; i < MapInfo_count; ++i)
-               s = strcat(s, " ", MapInfo_BSPName_ByID(i));
-       cvar_set("g_maplist", substring(s, 1, strlen(s) - 1));
-       me.refilter(me);
-}
-
-void MapList_None(entity btn, entity me)
-{
-       cvar_set("g_maplist", "");
-       me.refilter(me);
-}
-
-void MapList_LoadMap(entity btn, entity me)
-{
-       string m;
-       float i;
-
-       i = me.selectedItem;
-
-       if(btn.parent.instanceOfNexuizMapInfoDialog)
-       {
-               i = btn.parent.currentMapIndex;
-               Dialog_Close(btn, btn.parent);
-       }
-
-       if(i >= me.nItems || i < 0)
-               return;
-
-       m = MapInfo_BSPName_ByID(i);
-       if not(m)
-       {
-               print("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n");
-               return;
-       }
-       if(MapInfo_CheckMap(m))
-       {
-               localcmd("\nmenu_loadmap_prepare\n");
-               if(cvar("menu_use_default_hostname"))
-                       localcmd("hostname \"", strdecolorize(cvar_string("_cl_name")), "'s Nexuiz server\"\n");
-               MapInfo_LoadMap(m);
-       }
-       else
-       {
-               print("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n");
-               me.refilter(me);
-       }
-}
-
-float keyDownNexuizMapList(entity me, float scan, float ascii, float shift)
-{
-       string ch, save;
-       if(scan == K_ENTER)
-       {
-               // pop up map info screen
-               main.mapInfoDialog.loadMapInfo(main.mapInfoDialog, me.selectedItem, me);
-               DialogOpenButton_Click_withCoords(NULL, main.mapInfoDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * me.selectedItem - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
-       }
-       else if(scan == K_SPACE)
-       {
-               me.g_maplistCacheToggle(me, me.selectedItem);
-       }
-       else if(ascii == 43) // +
-       {
-               if not(me.g_maplistCacheQuery(me, me.selectedItem))
-                       me.g_maplistCacheToggle(me, me.selectedItem);
-       }
-       else if(ascii == 45) // -
-       {
-               if(me.g_maplistCacheQuery(me, me.selectedItem))
-                       me.g_maplistCacheToggle(me, me.selectedItem);
-       }
-       else if(scan == K_BACKSPACE)
-       {
-               if(time < me.typeToSearchTime)
-               {
-                       save = substring(me.typeToSearchString, 0, strlen(me.typeToSearchString) - 1);
-                       if(me.typeToSearchString)
-                               strunzone(me.typeToSearchString);
-                       me.typeToSearchString = strzone(save);
-                       me.typeToSearchTime = time + 0.5;
-                       if(strlen(me.typeToSearchString))
-                       {
-                               MapInfo_FindName(me.typeToSearchString);
-                               if(MapInfo_FindName_firstResult >= 0)
-                                       me.setSelected(me, MapInfo_FindName_firstResult);
-                       }
-               }
-       }
-       else if(ascii >= 32 && ascii != 127)
-       {
-               ch = chr(ascii);
-               if(time > me.typeToSearchTime)
-                       save = ch;
-               else
-                       save = strcat(me.typeToSearchString, ch);
-               if(me.typeToSearchString)
-                       strunzone(me.typeToSearchString);
-               me.typeToSearchString = strzone(save);
-               me.typeToSearchTime = time + 0.5;
-               MapInfo_FindName(me.typeToSearchString);
-               if(MapInfo_FindName_firstResult >= 0)
-                       me.setSelected(me, MapInfo_FindName_firstResult);
-       }
-       else
-               return keyDownListBox(me, scan, ascii, shift);
-       return 1;
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/modbutton.c b/qcsrc/menu/nexuiz/modbutton.c
deleted file mode 100644 (file)
index d770ed0..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizModButton) EXTENDS(NexuizButton)
-       METHOD(NexuizModButton, configureNexuizModButton, void(entity, string))
-       ATTRIB(NexuizModButton, destination, string, string_null)
-ENDCLASS(NexuizModButton)
-entity makeNexuizModButton(string menu);
-void NexuizModButton_Click(entity me, entity other);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizModButton(string menu)
-{
-       entity me;
-       me = spawnNexuizModButton();
-       me.configureNexuizModButton(me, menu);
-       return me;
-}
-
-void NexuizModButton_Click(entity me, entity other)
-{
-       string thecmd;
-       thecmd = strcat("\ndisconnect\nmenu_restart");
-
-       if (me.destination != "")
-               thecmd = strcat(thecmd, "\ntogglemenu\ndefer 0.1 \"menu_cmd directmenu ", me.destination,"\"\n");
-
-       if (cvar_string("menu_slist_modfilter") == "havoc")
-               thecmd = strcat("\ngamedir data", thecmd);
-       else
-               thecmd = strcat("\ngamedir havoc", thecmd);
-       cmd(thecmd);
-}
-
-void configureNexuizModButtonNexuizModButton(entity me, string menu)
-{
-       me.configureNexuizButton(me, "", '0 0 0');
-       me.onClick = NexuizModButton_Click;
-       me.onClickEntity = me;
-       me.destination = menu;
-
-       if (cvar_string("menu_slist_modfilter") == "havoc")
-               me.text = "Switch to Nexuiz mode";
-       else
-               me.text = "Switch to Havoc mode";
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/nexposee.c b/qcsrc/menu/nexuiz/nexposee.c
deleted file mode 100644 (file)
index 694eda2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizNexposee) EXTENDS(Nexposee)
-       METHOD(NexuizNexposee, configureNexuizNexposee, void(entity))
-       METHOD(NexuizNexposee, close, void(entity))
-ENDCLASS(NexuizNexposee)
-entity makeNexuizNexposee();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizNexposee()
-{
-       entity me;
-       me = spawnNexuizNexposee();
-       me.configureNexuizNexposee(me);
-       return me;
-}
-
-void configureNexuizNexposeeNexuizNexposee(entity me)
-{
-}
-
-void closeNexuizNexposee(entity me)
-{
-       m_goto(string_null); // hide
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/playerlist.c b/qcsrc/menu/nexuiz/playerlist.c
deleted file mode 100644 (file)
index 6fabbd7..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizPlayerList) EXTENDS(NexuizListBox)
-       ATTRIB(NexuizPlayerList, rowsPerItem, float, 1)
-       METHOD(NexuizPlayerList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizPlayerList, drawListBoxItem, void(entity, float, vector, float))
-       ATTRIB(NexuizPlayerList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizPlayerList, columnNameOrigin, float, 0)
-       ATTRIB(NexuizPlayerList, columnNameSize, float, 0)
-       ATTRIB(NexuizPlayerList, columnScoreOrigin, float, 0)
-       ATTRIB(NexuizPlayerList, columnScoreSize, float, 0)
-       ATTRIB(NexuizPlayerList, realUpperMargin, float, 0)
-       ATTRIB(NexuizPlayerList, origin, vector, '0 0 0')
-       ATTRIB(NexuizPlayerList, itemAbsSize, vector, '0 0 0')
-       METHOD(NexuizPlayerList, setPlayerList, void(entity, string))
-       METHOD(NexuizPlayerList, getPlayerList, string(entity, float, float))
-       ATTRIB(NexuizPlayerList, playerList, float, -1)
-ENDCLASS(NexuizPlayerList)
-entity makeNexuizPlayerList();
-#endif
-
-#ifdef IMPLEMENTATION
-
-#define PLAYERPARM_SCORE 0
-#define PLAYERPARM_PING 1
-#define PLAYERPARM_TEAM 2
-#define PLAYERPARM_NAME 3
-#define PLAYERPARM_COUNT 4
-
-entity makeNexuizPlayerList()
-{
-       entity me;
-       me = spawnNexuizPlayerList();
-       me.configureNexuizListBox(me);
-       return me;
-}
-
-void setPlayerListNexuizPlayerList(entity me, string plist)
-{
-       dprint(plist,"------------\n");
-
-       float buf,i,n;
-       string s;
-
-       buf = buf_create();
-       me.nItems = tokenizebyseparator(plist, "\n");
-       for(i = 0; i < me.nItems; ++i)
-       {
-               bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME, argv(i)); // -666 100 "^4Nex ^2Player"
-       }
-
-       for(i = 0; i < me.nItems; ++i)
-       {
-               s = bufstr_get(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME);
-               n = tokenize_console(s);
-
-               if(n == 4)
-               {
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_SCORE, argv(0)); // -666
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_PING,  argv(1)); // 100
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_TEAM,  argv(2)); // 0 for spec, else 1, 2, 3, 4
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME,  argv(3)); // ^4Nex ^2Player
-               }
-               else
-               {
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_SCORE, argv(0)); // -666
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_PING,  argv(1)); // 100
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_TEAM,  "-1");
-                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME,  argv(2)); // ^4Nex ^2Player
-               }
-       }
-       me.playerList = buf;
-}
-
-string getPlayerListNexuizPlayerList(entity me, float i, float key)
-{
-       return bufstr_get(me.playerList, i * PLAYERPARM_COUNT + key);
-}
-
-void resizeNotifyNexuizPlayerList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       me.itemAbsSize = '0 0 0';
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
-       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-
-       // this list does 1 char left and right margin
-       me.columnScoreSize = 3 * me.realFontSize_x;
-       me.columnNameSize = 1 - 3 * me.realFontSize_x - me.columnScoreSize;
-
-       me.columnNameOrigin = me.realFontSize_x;
-       me.columnScoreOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
-}
-
-void drawListBoxItemNexuizPlayerList(entity me, float i, vector absSize, float isSelected)
-{
-       string s;
-       string score;
-       float t;
-       vector rgb;
-
-       t = stof(me.getPlayerList(me, i, PLAYERPARM_TEAM));
-       if(t == 1)
-               rgb = colormapPaletteColor(4, 0);
-       else if(t == 2)
-               rgb = colormapPaletteColor(13, 0);
-       else if(t == 3)
-               rgb = colormapPaletteColor(12, 0);
-       else if(t == 4)
-               rgb = colormapPaletteColor(9, 0);
-       else
-               rgb = '1 1 1';
-       
-       s = me.getPlayerList(me, i, PLAYERPARM_NAME);
-       score = me.getPlayerList(me, i, PLAYERPARM_SCORE);
-
-       if(substring(score, strlen(score) - 10, 10) == ":spectator")
-       {
-               score = "-666";
-       }
-       else
-       {
-               if((t = strstrofs(score, ":", 0)) >= 0)
-                       score = substring(score, 0, t);
-               if((t = strstrofs(score, ",", 0)) >= 0)
-                       score = substring(score, 0, t);
-       }
-
-       s = draw_TextShortenToWidth(s, me.columnNameSize, 1, me.realFontSize);
-       score = draw_TextShortenToWidth(score, me.columnScoreSize, 0, me.realFontSize);
-
-       draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 1, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', 1, 1);
-       draw_Text(me.realUpperMargin2 * eY + (me.columnScoreOrigin + 1.00 * (me.columnScoreSize - draw_TextWidth(score, 1, me.realFontSize))) * eX, score, me.realFontSize, rgb, 1, 0);
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/playermodel.c b/qcsrc/menu/nexuiz/playermodel.c
deleted file mode 100644 (file)
index 6c7768d..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizPlayerModelSelector) EXTENDS(NexuizImage)
-       METHOD(NexuizPlayerModelSelector, configureNexuizPlayerModelSelector, void(entity))
-       METHOD(NexuizPlayerModelSelector, loadCvars, void(entity))
-       METHOD(NexuizPlayerModelSelector, saveCvars, void(entity))
-       METHOD(NexuizPlayerModelSelector, draw, void(entity))
-       METHOD(NexuizPlayerModelSelector, resizeNotify, void(entity, vector, vector, vector, vector))
-       ATTRIB(NexuizPlayerModelSelector, currentModel, string, string_null)
-       ATTRIB(NexuizPlayerModelSelector, currentSkin, float, 0)
-       ATTRIB(NexuizPlayerModelSelector, currentModelName, string, string_null)
-       ATTRIB(NexuizPlayerModelSelector, currentModelTitle, string, string_null)
-       ATTRIB(NexuizPlayerModelSelector, currentModelTxtName, string, string_null)
-       ATTRIB(NexuizPlayerModelSelector, currentModelDescription, string, string_null)
-       METHOD(NexuizPlayerModelSelector, go, void(entity, float))
-       ATTRIB(NexuizPlayerModelSelector, origin, vector, '0 0 0')
-       ATTRIB(NexuizPlayerModelSelector, size, vector, '0 0 0')
-       ATTRIB(NexuizPlayerModelSelector, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizPlayerModelSelector, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizPlayerModelSelector, titleFontSize, float, SKINFONTSIZE_TITLE)
-ENDCLASS(NexuizPlayerModelSelector)
-entity makeNexuizPlayerModelSelector();
-void PlayerModelSelector_Next_Click(entity btn, entity me);
-void PlayerModelSelector_Prev_Click(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizPlayerModelSelector()
-{
-       entity me;
-       me = spawnNexuizPlayerModelSelector();
-       me.configureNexuizPlayerModelSelector(me);
-       return me;
-}
-
-void configureNexuizPlayerModelSelectorNexuizPlayerModelSelector(entity me)
-{
-       me.configureNexuizImage(me, string_null, 263.0/360.0);
-       me.loadCvars(me);
-}
-
-void loadCvarsNexuizPlayerModelSelector(entity me)
-{
-       float glob, i, fh;
-       string fn;
-       string nm, t, l;
-
-       if(me.currentModel)
-               strunzone(me.currentModel);
-       if(me.currentModelTitle)
-               strunzone(me.currentModelTitle);
-       if(me.currentModelName)
-               strunzone(me.currentModelName);
-       if(me.currentModelTxtName)
-               strunzone(me.currentModelTxtName);
-       if(me.currentModelDescription)
-               strunzone(me.currentModelDescription);
-       me.currentSkin = cvar("_cl_playerskin");
-       me.currentModel = strzone(cvar_string("_cl_playermodel"));
-       me.currentModelName = string_null;
-       me.currentModelDescription = string_null;
-       me.currentModelTitle = string_null;
-       me.currentModelTxtName = string_null;
-
-       // lookup model name
-       glob = search_begin("models/player/*.txt", TRUE, TRUE);
-       if(glob < 0)
-               return;
-       for(i = 0; i < search_getsize(glob); ++i)
-       {
-               fn = search_getfilename(glob, i);
-               fh = fopen(fn, FILE_READ);
-               if(fh < 0)
-                       continue;
-               t = fgets(fh);
-               nm = fgets(fh);
-               if(stof(fgets(fh)) == me.currentSkin)
-               if(fgets(fh) == me.currentModel)
-               {
-                       me.currentModelName = strzone(strcat("/", nm));
-                       me.currentModelTxtName = strzone(fn);
-                       me.currentModelTitle = strzone(t);
-                       me.currentModelDescription = "";
-                       fgets(fh); // Skip species
-                       while((l = fgets(fh)))
-                       {
-                               if(me.currentModelDescription != "")
-                                       me.currentModelDescription = strcat(me.currentModelDescription, "\n");
-                               me.currentModelDescription = strcat(me.currentModelDescription, l);
-                       }
-                       me.currentModelDescription = strzone(me.currentModelDescription);
-                       fclose(fh);
-                       break;
-               }
-               fclose(fh);
-       }
-       search_end(glob);
-}
-
-void goNexuizPlayerModelSelector(entity me, float d)
-{
-       float glob, i, fh;
-       string l;
-
-       glob = search_begin("models/player/*.txt", TRUE, TRUE);
-       if(glob < 0)
-               return;
-       for(i = 0; i < search_getsize(glob); ++i)
-               if(search_getfilename(glob, i) == me.currentModelTxtName)
-                       break;
-       // now i is search_getsize(glob) if not found, and the right index if found.
-       if(i == search_getsize(glob))
-       {
-               if(d < 0)
-                       i = search_getsize(glob) - 1;
-               else
-                       i = 0;
-       }
-       else
-       {
-               i = mod(i + d + search_getsize(glob), search_getsize(glob));
-       }
-
-       if(me.currentModel)
-               strunzone(me.currentModel);
-       if(me.currentModelTitle)
-               strunzone(me.currentModelTitle);
-       if(me.currentModelName)
-               strunzone(me.currentModelName);
-       if(me.currentModelTxtName)
-               strunzone(me.currentModelTxtName);
-       if(me.currentModelDescription)
-               strunzone(me.currentModelDescription);
-
-       // select model #i!
-       me.currentModelTxtName = strzone(search_getfilename(glob, i));
-       fh = fopen(me.currentModelTxtName, FILE_READ);
-       search_end(glob);
-       if(fh < 0)
-               return;
-       me.currentModelTitle = strzone(fgets(fh));
-       me.currentModelName = strzone(strcat("/", fgets(fh)));
-       me.currentSkin = stof(fgets(fh));
-       me.currentModel = strzone(fgets(fh));
-       me.currentModelDescription = "";
-       fgets(fh); // Skip species
-       while((l = fgets(fh)))
-       {
-               if(me.currentModelDescription != "")
-                       me.currentModelDescription = strcat(me.currentModelDescription, "\n");
-               me.currentModelDescription = strcat(me.currentModelDescription, l);
-       }
-       me.currentModelDescription = strzone(me.currentModelDescription);
-       fclose(fh);
-}
-
-void PlayerModelSelector_Next_Click(entity btn, entity me)
-{
-       me.go(me, +1);
-       me.saveCvars(me);
-}
-
-void PlayerModelSelector_Prev_Click(entity btn, entity me)
-{
-       me.go(me, -1);
-       me.saveCvars(me);
-}
-
-void saveCvarsNexuizPlayerModelSelector(entity me)
-{
-       // TODO rather set the _cl ones and apply later?
-       localcmd(strcat("playermodel ", me.currentModel, "\nplayerskin ", ftos(me.currentSkin), "\n"));
-}
-
-void drawNexuizPlayerModelSelector(entity me)
-{
-       float i, n;
-       vector o;
-
-       me.src = me.currentModelName;
-       drawImage(me);
-       me.src = string_null;
-
-       // draw text on the image, handle \n in the description
-       draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE);
-
-       o = '0.5 1 0' - eY * me.realFontSize_y * ((n = tokenizebyseparator(me.currentModelDescription, "\n")) + 0.5);
-       for(i = 0; i < n; ++i)
-       {
-               draw_CenterText(o, argv(i), me.realFontSize, '1 1 1', 1, FALSE);
-               o += eY * me.realFontSize_y;
-       }
-}
-
-void resizeNotifyNexuizPlayerModelSelector(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       resizeNotifyImage(me, relOrigin, relSize, absOrigin, absSize);
-       me.realFontSize_y = me.fontSize / absSize_y;
-       me.realFontSize_x = me.fontSize / absSize_x;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/radiobutton.c b/qcsrc/menu/nexuiz/radiobutton.c
deleted file mode 100644 (file)
index beddaf4..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizRadioButton) EXTENDS(RadioButton)
-       METHOD(NexuizRadioButton, configureNexuizRadioButton, void(entity, float, string, string, string))
-       METHOD(NexuizRadioButton, draw, void(entity))
-       METHOD(NexuizRadioButton, setChecked, void(entity, float))
-       ATTRIB(NexuizRadioButton, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizRadioButton, image, string, SKINGFX_RADIOBUTTON)
-       ATTRIB(NexuizRadioButton, color, vector, SKINCOLOR_RADIOBUTTON_N)
-       ATTRIB(NexuizRadioButton, colorC, vector, SKINCOLOR_RADIOBUTTON_C)
-       ATTRIB(NexuizRadioButton, colorF, vector, SKINCOLOR_RADIOBUTTON_F)
-       ATTRIB(NexuizRadioButton, colorD, vector, SKINCOLOR_RADIOBUTTON_D)
-
-       ATTRIB(NexuizRadioButton, cvarName, string, string_null)
-       ATTRIB(NexuizRadioButton, cvarValue, string, string_null)
-       ATTRIB(NexuizRadioButton, cvarOffValue, string, string_null)
-       METHOD(NexuizRadioButton, loadCvars, void(entity))
-       METHOD(NexuizRadioButton, saveCvars, void(entity))
-
-       ATTRIB(NexuizRadioButton, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizRadioButton, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizRadioButton)
-entity makeNexuizRadioButton(float, string, string, string);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizRadioButton(float theGroup, string theCvar, string theValue, string theText)
-{
-       entity me;
-       me = spawnNexuizRadioButton();
-       me.configureNexuizRadioButton(me, theGroup, theCvar, theValue, theText);
-       return me;
-}
-void configureNexuizRadioButtonNexuizRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText)
-{
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.cvarValue = theValue;
-               me.tooltip = getZonedTooltipForIdentifier(theCvar);
-               me.loadCvars(me);
-       }
-       me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
-}
-void setCheckedNexuizRadioButton(entity me, float val)
-{
-       if(val != me.checked)
-       {
-               me.checked = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizRadioButton(entity me)
-{
-       if(me.cvarValue)
-       {
-               if(me.cvarName)
-                       me.checked = (cvar_string(me.cvarName) == me.cvarValue);
-       }
-       else
-       {
-               if(me.cvarName)
-               {
-                       me.checked = !!cvar(me.cvarName);
-               }
-               else
-               {
-                       // this is difficult
-                       // this is the "generic" selection... but at this time, not
-                       // everything is constructed yet.
-                       // we need to set this later in draw()
-                       me.checked = 0;
-               }
-       }
-}
-void drawNexuizRadioButton(entity me)
-{
-       if not(me.cvarValue)
-               if not(me.cvarName)
-               {
-                       // this is the "other" option
-                       // always select this if none other is
-                       entity e;
-                       float found;
-                       found = 0;
-                       for(e = me.parent.firstChild; e; e = e.nextSibling)
-                               if(e.group == me.group)
-                                       if(e.checked)
-                                               found = 1;
-                       if(!found)
-                               me.setChecked(me, 1);
-               }
-       drawCheckBox(me);
-}
-void saveCvarsNexuizRadioButton(entity me)
-{
-       if(me.cvarValue)
-       {
-               if(me.cvarName)
-               {
-                       if(me.checked)
-                               cvar_set(me.cvarName, me.cvarValue);
-                       else if(me.cvarOffValue)
-                               cvar_set(me.cvarName, me.cvarOffValue);
-               }
-       }
-       else
-       {
-               if(me.cvarName)
-               {
-                       cvar_set(me.cvarName, ftos(me.checked));
-               }
-       }
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/rootdialog.c b/qcsrc/menu/nexuiz/rootdialog.c
deleted file mode 100644 (file)
index c4e7a89..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizRootDialog) EXTENDS(NexuizDialog)
-       // still to be customized by user
-       /*
-       ATTRIB(NexuizDialog, closable, float, 1)
-       ATTRIB(NexuizDialog, title, string, "Form1") // ;)
-       ATTRIB(NexuizDialog, color, vector, '1 0.5 1')
-       ATTRIB(NexuizDialog, intendedWidth, float, 0)
-       ATTRIB(NexuizDialog, rows, float, 3)
-       ATTRIB(NexuizDialog, columns, float, 2)
-       */
-       METHOD(NexuizRootDialog, close, void(entity))
-ENDCLASS(NexuizRootDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void closeNexuizRootDialog(entity me)
-{
-       m_goto(string_null);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/serverlist.c b/qcsrc/menu/nexuiz/serverlist.c
deleted file mode 100644 (file)
index d89f3ff..0000000
+++ /dev/null
@@ -1,611 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizServerList) EXTENDS(NexuizListBox)
-       METHOD(NexuizServerList, configureNexuizServerList, void(entity))
-       ATTRIB(NexuizServerList, rowsPerItem, float, 1)
-       METHOD(NexuizServerList, draw, void(entity))
-       METHOD(NexuizServerList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizServerList, clickListBoxItem, void(entity, float, vector))
-       METHOD(NexuizServerList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizServerList, keyDown, float(entity, float, float, float))
-
-       ATTRIB(NexuizServerList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizServerList, realUpperMargin, float, 0)
-       ATTRIB(NexuizServerList, columnPingOrigin, float, 0)
-       ATTRIB(NexuizServerList, columnPingSize, float, 0)
-       ATTRIB(NexuizServerList, columnNameOrigin, float, 0)
-       ATTRIB(NexuizServerList, columnNameSize, float, 0)
-       ATTRIB(NexuizServerList, columnMapOrigin, float, 0)
-       ATTRIB(NexuizServerList, columnMapSize, float, 0)
-       ATTRIB(NexuizServerList, columnTypeOrigin, float, 0)
-       ATTRIB(NexuizServerList, columnTypeSize, float, 0)
-       ATTRIB(NexuizServerList, columnPlayersOrigin, float, 0)
-       ATTRIB(NexuizServerList, columnPlayersSize, float, 0)
-
-       ATTRIB(NexuizServerList, selectedServer, string, string_null) // to restore selected server when needed
-       METHOD(NexuizServerList, setSelected, void(entity, float))
-       METHOD(NexuizServerList, setSortOrder, void(entity, float, float))
-       ATTRIB(NexuizServerList, filterShowEmpty, float, 1)
-       ATTRIB(NexuizServerList, filterShowFull, float, 1)
-       ATTRIB(NexuizServerList, filterString, string, string_null)
-       ATTRIB(NexuizServerList, controlledTextbox, entity, NULL)
-       ATTRIB(NexuizServerList, ipAddressBox, entity, NULL)
-       ATTRIB(NexuizServerList, favoriteButton, entity, NULL)
-       ATTRIB(NexuizServerList, nextRefreshTime, float, 0)
-       METHOD(NexuizServerList, refreshServerList, void(entity, float)) // refresh mode: 0 = just reparametrize, 1 = send new requests, 2 = clear
-       ATTRIB(NexuizServerList, needsRefresh, float, 1)
-       METHOD(NexuizServerList, focusEnter, void(entity))
-       METHOD(NexuizServerList, positionSortButton, void(entity, entity, float, float, string, void(entity, entity)))
-       ATTRIB(NexuizServerList, sortButton1, entity, NULL)
-       ATTRIB(NexuizServerList, sortButton2, entity, NULL)
-       ATTRIB(NexuizServerList, sortButton3, entity, NULL)
-       ATTRIB(NexuizServerList, sortButton4, entity, NULL)
-       ATTRIB(NexuizServerList, sortButton5, entity, NULL)
-       ATTRIB(NexuizServerList, connectButton, entity, NULL)
-       ATTRIB(NexuizServerList, infoButton, entity, NULL)
-       ATTRIB(NexuizServerList, currentSortOrder, float, 0)
-       ATTRIB(NexuizServerList, currentSortField, float, -1)
-       ATTRIB(NexuizServerList, lastClickedServer, float, -1)
-       ATTRIB(NexuizServerList, lastClickedTime, float, 0)
-
-       ATTRIB(NexuizServerList, ipAddressBoxFocused, float, -1)
-ENDCLASS(NexuizServerList)
-entity makeNexuizServerList();
-void ServerList_Connect_Click(entity btn, entity me);
-void ServerList_ShowEmpty_Click(entity box, entity me);
-void ServerList_ShowFull_Click(entity box, entity me);
-void ServerList_Filter_Change(entity box, entity me);
-void ServerList_Favorite_Click(entity btn, entity me);
-void ServerList_Info_Click(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-float SLIST_FIELD_CNAME;
-float SLIST_FIELD_PING;
-float SLIST_FIELD_GAME;
-float SLIST_FIELD_MOD;
-float SLIST_FIELD_MAP;
-float SLIST_FIELD_NAME;
-float SLIST_FIELD_MAXPLAYERS;
-float SLIST_FIELD_NUMPLAYERS;
-float SLIST_FIELD_NUMHUMANS;
-float SLIST_FIELD_NUMBOTS;
-float SLIST_FIELD_PROTOCOL;
-float SLIST_FIELD_FREESLOTS;
-float SLIST_FIELD_PLAYERS;
-float SLIST_FIELD_QCSTATUS;
-float SLIST_FIELD_ISFAVORITE;
-void ServerList_UpdateFieldIDs()
-{
-       SLIST_FIELD_CNAME = gethostcacheindexforkey( "cname" );
-       SLIST_FIELD_PING = gethostcacheindexforkey( "ping" );
-       SLIST_FIELD_GAME = gethostcacheindexforkey( "game" );
-       SLIST_FIELD_MOD = gethostcacheindexforkey( "mod" );
-       SLIST_FIELD_MAP = gethostcacheindexforkey( "map" );
-       SLIST_FIELD_NAME = gethostcacheindexforkey( "name" );
-       SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey( "maxplayers" );
-       SLIST_FIELD_NUMPLAYERS = gethostcacheindexforkey( "numplayers" );
-       SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey( "numhumans" );
-       SLIST_FIELD_NUMBOTS = gethostcacheindexforkey( "numbots" );
-       SLIST_FIELD_PROTOCOL = gethostcacheindexforkey( "protocol" );
-       SLIST_FIELD_FREESLOTS = gethostcacheindexforkey( "freeslots" );
-       SLIST_FIELD_PLAYERS = gethostcacheindexforkey( "players" );
-       SLIST_FIELD_QCSTATUS = gethostcacheindexforkey( "qcstatus" );
-       SLIST_FIELD_ISFAVORITE = gethostcacheindexforkey( "isfavorite" );
-}
-
-float IsFavorite(string srv)
-{
-       float i, n;
-       srv = netaddress_resolve(srv, 26000);
-       n = tokenize_console(cvar_string("net_slist_favorites"));
-       for(i = 0; i < n; ++i)
-               if(srv == netaddress_resolve(argv(i), 26000))
-                       return TRUE;
-       return FALSE;
-}
-
-void ToggleFavorite(string srv)
-{
-       string s, s0, s1, s2, srv_resolved;
-       float i, n;
-       srv_resolved = netaddress_resolve(srv, 26000);
-       s = cvar_string("net_slist_favorites");
-       n = tokenize_console(s);
-       for(i = 0; i < n; ++i)
-               if(srv_resolved == netaddress_resolve(argv(i), 26000))
-               {
-                       s0 = s1 = s2 = "";
-                       if(i > 0)
-                               s0 = substring(s, 0, argv_end_index(i - 1));
-                       if(i < n-1)
-                               s2 = substring(s, argv_start_index(i + 1), -1);
-                       if(s0 != "" && s2 != "")
-                               s1 = " ";
-                       print("s0 = >>", s0, "<<\ns1 = >>", s1, "<<\ns2 = >>", s2, "<<\n");
-                       cvar_set("net_slist_favorites", strcat(s0, s1, s2));
-                       return;
-               }
-       
-       s1 = "";
-       if(s != "")
-               s1 = " ";
-       cvar_set("net_slist_favorites", strcat(s, " ", srv));
-
-       resorthostcache();
-}
-
-entity makeNexuizServerList()
-{
-       entity me;
-       me = spawnNexuizServerList();
-       me.configureNexuizServerList(me);
-       return me;
-}
-void configureNexuizServerListNexuizServerList(entity me)
-{
-       me.configureNexuizListBox(me);
-
-       ServerList_UpdateFieldIDs();
-
-       me.nItems = 0;
-}
-void setSelectedNexuizServerList(entity me, float i)
-{
-       float save;
-       save = me.selectedItem;
-       setSelectedListBox(me, i);
-       /*
-       if(me.selectedItem == save)
-               return;
-       */
-       if(me.nItems == 0)
-               return;
-       if(gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT) != me.nItems)
-               return; // sorry, it would be wrong
-
-       if(me.selectedServer)
-               strunzone(me.selectedServer);
-       me.selectedServer = strzone(gethostcachestring(SLIST_FIELD_CNAME, me.selectedItem));
-
-       me.ipAddressBox.setText(me.ipAddressBox, me.selectedServer);
-       me.ipAddressBox.cursorPos = strlen(me.selectedServer);
-       me.ipAddressBoxFocused = -1;
-}
-void refreshServerListNexuizServerList(entity me, float mode)
-{
-       // 0: just reparametrize
-       // 1: also ask for new servers
-       // 2: clear
-       //print("refresh of type ", ftos(mode), "\n");
-       /* if(mode == 2) // borken
-       {
-               // clear list
-               localcmd("net_slist\n");
-               me.needsRefresh = 1; // net_slist kills sort order, so we need to restore it later
-       }
-       else */
-       {
-               float m, o;
-               string s, typestr, modstr;
-               s = me.filterString;
-
-               m = strstrofs(s, ":", 0);
-               if(m >= 0)
-               {
-                       typestr = substring(s, 0, m);
-                       s = substring(s, m + 1, strlen(s) - m - 1);
-                       while(substring(s, 0, 1) == " ")
-                               s = substring(s, 1, strlen(s) - 1);
-               }
-               else
-                       typestr = "";
-
-               modstr = cvar_string("menu_slist_modfilter");
-
-               m = SLIST_MASK_AND - 1;
-               resethostcachemasks();
-               if(!me.filterShowFull)
-                       sethostcachemasknumber(++m, SLIST_FIELD_FREESLOTS, 1, SLIST_TEST_GREATEREQUAL);
-               if(!me.filterShowEmpty)
-                       sethostcachemasknumber(++m, SLIST_FIELD_NUMHUMANS, 1, SLIST_TEST_GREATEREQUAL);
-               if(typestr != "")
-                       sethostcachemaskstring(++m, SLIST_FIELD_QCSTATUS, strcat(typestr, ":"), SLIST_TEST_STARTSWITH);
-               if(modstr != "")
-               {
-                       if(substring(modstr, 0, 1) == "!")
-                               sethostcachemaskstring(++m, SLIST_FIELD_MOD, resolvemod(substring(modstr, 1, strlen(modstr) - 1)), SLIST_TEST_NOTEQUAL);
-                       else
-                               sethostcachemaskstring(++m, SLIST_FIELD_MOD, resolvemod(modstr), SLIST_TEST_EQUAL);
-               }
-               m = SLIST_MASK_OR - 1;
-               if(s != "")
-               {
-                       sethostcachemaskstring(++m, SLIST_FIELD_NAME, s, SLIST_TEST_CONTAINS);
-                       sethostcachemaskstring(++m, SLIST_FIELD_MAP, s, SLIST_TEST_CONTAINS);
-                       sethostcachemaskstring(++m, SLIST_FIELD_PLAYERS, s, SLIST_TEST_CONTAINS);
-                       sethostcachemaskstring(++m, SLIST_FIELD_QCSTATUS, strcat(s, ":"), SLIST_TEST_STARTSWITH);
-               }
-               o = 2; // favorites first
-               if(me.currentSortOrder < 0)
-                       o |= 1; // descending
-               sethostcachesort(me.currentSortField, o);
-               resorthostcache();
-               if(mode >= 1)
-                       refreshhostcache();
-       }
-}
-void focusEnterNexuizServerList(entity me)
-{
-       if(time < me.nextRefreshTime)
-       {
-               //print("sorry, no refresh yet\n");
-               return;
-       }
-       me.nextRefreshTime = time + 10;
-       me.refreshServerList(me, 1);
-}
-void drawNexuizServerList(entity me)
-{
-       float i, found, owned;
-
-       if(me.currentSortField == -1)
-       {
-               me.setSortOrder(me, SLIST_FIELD_PING, +1);
-               me.refreshServerList(me, 2);
-       }
-       else if(me.needsRefresh == 1)
-       {
-               me.needsRefresh = 2; // delay by one frame to make sure "slist" has been executed
-       }
-       else if(me.needsRefresh == 2)
-       {
-               me.needsRefresh = 0;
-               me.refreshServerList(me, 0);
-       }
-
-       owned = ((me.selectedServer == me.ipAddressBox.text) && (me.ipAddressBox.text != ""));
-
-       me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT);
-
-       me.connectButton.disabled = ((me.nItems == 0) && (me.ipAddressBox.text == ""));
-       me.infoButton.disabled = ((me.nItems == 0) || !owned);
-
-       found = 0;
-       if(me.selectedServer)
-       {
-               for(i = 0; i < me.nItems; ++i)
-                       if(gethostcachestring(SLIST_FIELD_CNAME, i) == me.selectedServer)
-                       {
-                               if(i != me.selectedItem)
-                               {
-                                       me.lastClickedServer = -1;
-                                       me.selectedItem = i;
-                               }
-                               found = 1;
-                               break;
-                       }
-       }
-       if(!found)
-               if(me.nItems > 0)
-               {
-                       if(me.selectedItem >= me.nItems)
-                               me.selectedItem = me.nItems - 1;
-                       if(me.selectedServer)
-                               strunzone(me.selectedServer);
-                       me.selectedServer = strzone(gethostcachestring(SLIST_FIELD_CNAME, me.selectedItem));
-               }
-
-       if(owned)
-       {
-               if(me.selectedServer != me.ipAddressBox.text)
-               {
-                       me.ipAddressBox.setText(me.ipAddressBox, me.selectedServer);
-                       me.ipAddressBox.cursorPos = strlen(me.selectedServer);
-                       me.ipAddressBoxFocused = -1;
-               }
-       }
-
-       if(me.ipAddressBoxFocused != me.ipAddressBox.focused)
-       {
-               if(me.ipAddressBox.focused || me.ipAddressBoxFocused < 0)
-               {
-                       if(IsFavorite(me.ipAddressBox.text))
-                               me.favoriteButton.setText(me.favoriteButton, "Remove");
-                       else
-                               me.favoriteButton.setText(me.favoriteButton, "Bookmark");
-               }
-               me.ipAddressBoxFocused = me.ipAddressBox.focused;
-       }
-
-       drawListBox(me);
-}
-void ServerList_PingSort_Click(entity btn, entity me)
-{
-       me.setSortOrder(me, SLIST_FIELD_PING, +1);
-}
-void ServerList_NameSort_Click(entity btn, entity me)
-{
-       me.setSortOrder(me, SLIST_FIELD_NAME, -1); // why?
-}
-void ServerList_MapSort_Click(entity btn, entity me)
-{
-       me.setSortOrder(me, SLIST_FIELD_MAP, -1); // why?
-}
-void ServerList_PlayerSort_Click(entity btn, entity me)
-{
-       me.setSortOrder(me, SLIST_FIELD_NUMHUMANS, -1);
-}
-void ServerList_TypeSort_Click(entity btn, entity me)
-{
-       string s, t;
-       float i, m;
-       s = me.filterString;
-       m = strstrofs(s, ":", 0);
-       if(m >= 0)
-       {
-               s = substring(s, 0, m);
-               while(substring(s, m+1, 1) == " ") // skip spaces
-                       ++m;
-       }
-       else
-               s = "";
-
-       for(i = 1; ; ++i) // 20 modes ought to be enough for anyone
-       {
-               t = GametypeNameFromType(i);
-               if(i > 1)
-                       if(t == GametypeNameFromType(0)) // it repeats (default case)
-                       {
-                               // no type was found
-                               // choose the first one
-                               s = t;
-                               break;
-                       }
-               if(s == GametypeNameFromType(i))
-               {
-                       // the type was found
-                       // choose the next one
-                       s = GametypeNameFromType(i + 1);
-                       if(s == GametypeNameFromType(0))
-                               s = "";
-                       break;
-               }
-       }
-
-       if(s != "")
-               s = strcat(s, ":");
-       s = strcat(s, substring(me.filterString, m+1, strlen(me.filterString) - m - 1));
-
-       me.controlledTextbox.setText(me.controlledTextbox, s);
-       me.controlledTextbox.keyDown(me.controlledTextbox, K_END, 0, 0);
-       me.controlledTextbox.keyUp(me.controlledTextbox, K_END, 0, 0);
-       //ServerList_Filter_Change(me.controlledTextbox, me);
-}
-void ServerList_Filter_Change(entity box, entity me)
-{
-       if(me.filterString)
-               strunzone(me.filterString);
-       if(box.text != "")
-               me.filterString = strzone(box.text);
-       else
-               me.filterString = string_null;
-       me.refreshServerList(me, 0);
-
-       me.ipAddressBox.setText(me.ipAddressBox, "");
-       me.ipAddressBox.cursorPos = 0;
-       me.ipAddressBoxFocused = -1;
-}
-void ServerList_ShowEmpty_Click(entity box, entity me)
-{
-       box.setChecked(box, me.filterShowEmpty = !me.filterShowEmpty);
-       me.refreshServerList(me, 0);
-
-       me.ipAddressBox.setText(me.ipAddressBox, "");
-       me.ipAddressBox.cursorPos = 0;
-       me.ipAddressBoxFocused = -1;
-}
-void ServerList_ShowFull_Click(entity box, entity me)
-{
-       box.setChecked(box, me.filterShowFull = !me.filterShowFull);
-       me.refreshServerList(me, 0);
-
-       me.ipAddressBox.setText(me.ipAddressBox, "");
-       me.ipAddressBox.cursorPos = 0;
-       me.ipAddressBoxFocused = -1;
-}
-void setSortOrderNexuizServerList(entity me, float field, float direction)
-{
-       if(me.currentSortField == field)
-               direction = -me.currentSortOrder;
-       me.currentSortOrder = direction;
-       me.currentSortField = field;
-       me.sortButton1.forcePressed = (field == SLIST_FIELD_PING);
-       me.sortButton2.forcePressed = (field == SLIST_FIELD_NAME);
-       me.sortButton3.forcePressed = (field == SLIST_FIELD_MAP);
-       me.sortButton4.forcePressed = 0;
-       me.sortButton5.forcePressed = (field == SLIST_FIELD_NUMHUMANS);
-       me.selectedItem = 0;
-       if(me.selectedServer)
-               strunzone(me.selectedServer);
-       me.selectedServer = string_null;
-       me.refreshServerList(me, 0);
-}
-void positionSortButtonNexuizServerList(entity me, entity btn, float theOrigin, float theSize, string theTitle, void(entity, entity) theFunc)
-{
-       vector originInLBSpace, sizeInLBSpace;
-       originInLBSpace = eY * (-me.itemHeight);
-       sizeInLBSpace = eY * me.itemHeight + eX * (1 - me.controlWidth);
-
-       vector originInDialogSpace, sizeInDialogSpace;
-       originInDialogSpace = boxToGlobal(originInLBSpace, me.Container_origin, me.Container_size);
-       sizeInDialogSpace = boxToGlobalSize(sizeInLBSpace, me.Container_size);
-
-       btn.Container_origin_x = originInDialogSpace_x + sizeInDialogSpace_x * theOrigin;
-       btn.Container_size_x   =                         sizeInDialogSpace_x * theSize;
-       btn.setText(btn, theTitle);
-       btn.onClick = theFunc;
-       btn.onClickEntity = me;
-       btn.resized = 1;
-}
-void resizeNotifyNexuizServerList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
-       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
-       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-
-       me.columnPingOrigin = 0;
-       me.columnPingSize = me.realFontSize_x * 4;
-       me.columnMapSize = me.realFontSize_x * 12;
-       me.columnTypeSize = me.realFontSize_x * 4;
-       me.columnPlayersSize = me.realFontSize_x * 6;
-       me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnTypeSize - 4 * me.realFontSize_x;
-       me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
-       me.columnMapOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
-       me.columnTypeOrigin = me.columnMapOrigin + me.columnMapSize + me.realFontSize_x;
-       me.columnPlayersOrigin = me.columnTypeOrigin + me.columnTypeSize + me.realFontSize_x;
-
-       me.positionSortButton(me, me.sortButton1, me.columnPingOrigin, me.columnPingSize, "Ping", ServerList_PingSort_Click);
-       me.positionSortButton(me, me.sortButton2, me.columnNameOrigin, me.columnNameSize, "Host name", ServerList_NameSort_Click);
-       me.positionSortButton(me, me.sortButton3, me.columnMapOrigin, me.columnMapSize, "Map", ServerList_MapSort_Click);
-       me.positionSortButton(me, me.sortButton4, me.columnTypeOrigin, me.columnTypeSize, "Type", ServerList_TypeSort_Click);
-       me.positionSortButton(me, me.sortButton5, me.columnPlayersOrigin, me.columnPlayersSize, "Players", ServerList_PlayerSort_Click);
-
-       float f;
-       f = me.currentSortField;
-       if(f >= 0)
-       {
-               me.currentSortField = -1;
-               me.setSortOrder(me, f, me.currentSortOrder); // force resetting the sort order
-       }
-}
-void ServerList_Connect_Click(entity btn, entity me)
-{
-       if(me.ipAddressBox.text == "")
-               localcmd("connect ", me.selectedServer, "\n");
-       else
-               localcmd("connect ", me.ipAddressBox.text, "\n");
-}
-void ServerList_Favorite_Click(entity btn, entity me)
-{
-       string ipstr;
-       ipstr = netaddress_resolve(me.ipAddressBox.text, 26000);
-       if(ipstr != "")
-       {
-               ToggleFavorite(me.ipAddressBox.text);
-               me.ipAddressBoxFocused = -1;
-       }
-}
-void ServerList_Info_Click(entity btn, entity me)
-{
-       main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
-       DialogOpenButton_Click(me, main.serverInfoDialog);
-}
-void clickListBoxItemNexuizServerList(entity me, float i, vector where)
-{
-       if(i == me.lastClickedServer)
-               if(time < me.lastClickedTime + 0.3)
-               {
-                       // DOUBLE CLICK!
-                       ServerList_Connect_Click(NULL, me);
-               }
-       me.lastClickedServer = i;
-       me.lastClickedTime = time;
-}
-void drawListBoxItemNexuizServerList(entity me, float i, vector absSize, float isSelected)
-{
-       // layout: Ping, Server name, Map name, NP, TP, MP
-       string s;
-       float p;
-       vector theColor;
-       float theAlpha;
-
-       if(isSelected)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-
-       if(gethostcachenumber(SLIST_FIELD_NUMPLAYERS, i) >= gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i))
-               theAlpha = SKINALPHA_SERVERLIST_FULL;
-       else if not(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i))
-               theAlpha = SKINALPHA_SERVERLIST_EMPTY;
-       else
-               theAlpha = 1;
-
-       p = gethostcachenumber(SLIST_FIELD_PING, i);
-#define PING_LOW 75
-#define PING_MED 200
-#define PING_HIGH 500
-       if(p < PING_LOW)
-               theColor = SKINCOLOR_SERVERLIST_LOWPING + (SKINCOLOR_SERVERLIST_MEDPING - SKINCOLOR_SERVERLIST_LOWPING) * (p / PING_LOW);
-       else if(p < PING_MED)
-               theColor = SKINCOLOR_SERVERLIST_MEDPING + (SKINCOLOR_SERVERLIST_HIGHPING - SKINCOLOR_SERVERLIST_MEDPING) * ((p - PING_LOW) / (PING_MED - PING_LOW));
-       else if(p < PING_HIGH)
-       {
-               theColor = SKINCOLOR_SERVERLIST_HIGHPING;
-               theAlpha *= 1 + (SKINALPHA_SERVERLIST_HIGHPING - 1) * ((p - PING_MED) / (PING_HIGH - PING_MED));
-       }
-       else
-       {
-               theColor = eX;
-               theAlpha *= SKINALPHA_SERVERLIST_HIGHPING;
-       }
-
-       if(gethostcachenumber(SLIST_FIELD_ISFAVORITE, i))
-       {
-               theColor = theColor * (1 - SKINALPHA_SERVERLIST_FAVORITE) + SKINCOLOR_SERVERLIST_FAVORITE * SKINALPHA_SERVERLIST_FAVORITE;
-               theAlpha = theAlpha * (1 - SKINALPHA_SERVERLIST_FAVORITE) + SKINALPHA_SERVERLIST_FAVORITE;
-       }
-
-       s = ftos(p);
-       draw_Text(me.realUpperMargin * eY + (me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
-       s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_NAME, i), me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
-       s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_MAP, i), me.columnMapSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + (me.columnMapOrigin + (me.columnMapSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
-       s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
-       p = strstrofs(s, ":", 0);
-       if(p >= 0)
-               s = substring(s, 0, p);
-       else
-               s = "";
-       s = draw_TextShortenToWidth(s, me.columnMapSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + (me.columnTypeOrigin + (me.columnTypeSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
-       s = strcat(ftos(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i)), "/", ftos(gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i)));
-       draw_Text(me.realUpperMargin * eY + (me.columnPlayersOrigin + (me.columnPlayersSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
-}
-
-float keyDownNexuizServerList(entity me, float scan, float ascii, float shift)
-{
-       float i;
-       vector org, sz;
-
-       org = boxToGlobal(eY * (me.selectedItem * me.itemHeight - me.scrollPos), me.origin, me.size);
-       sz = boxToGlobalSize(eY * me.itemHeight + eX * (1 - me.controlWidth), me.size);
-
-       if(scan == K_ENTER)
-       {
-               ServerList_Connect_Click(NULL, me);
-               return 1;
-       }
-       else if(scan == K_MOUSE2 || scan == K_SPACE)
-       {
-               main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
-               DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
-       }
-       else if(scan == K_INS || scan == K_MOUSE3)
-       {
-               i = me.selectedItem;
-               if(i < me.nItems)
-               {
-                       ToggleFavorite(me.selectedServer);
-                       me.ipAddressBoxFocused = -1;
-               }
-       }
-       else if(keyDownListBox(me, scan, ascii, shift))
-               return 1;
-       else if(!me.controlledTextbox)
-               return 0;
-       else
-               return me.controlledTextbox.keyDown(me.controlledTextbox, scan, ascii, shift);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/skinlist.c b/qcsrc/menu/nexuiz/skinlist.c
deleted file mode 100644 (file)
index 0a3c420..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizSkinList) EXTENDS(NexuizListBox)
-       METHOD(NexuizSkinList, configureNexuizSkinList, void(entity))
-       ATTRIB(NexuizSkinList, rowsPerItem, float, 4)
-       METHOD(NexuizSkinList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizSkinList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizSkinList, getSkins, void(entity))
-       METHOD(NexuizSkinList, setSkin, void(entity))
-       METHOD(NexuizSkinList, loadCvars, void(entity))
-       METHOD(NexuizSkinList, saveCvars, void(entity))
-       METHOD(NexuizSkinList, skinParameter, string(entity, float, float))
-       METHOD(NexuizSkinList, clickListBoxItem, void(entity, float, vector))
-       METHOD(NexuizSkinList, keyDown, float(entity, float, float, float))
-       METHOD(NexuizSkinList, destroy, void(entity))
-
-       ATTRIB(NexuizSkinList, skinlist, float, -1)
-       ATTRIB(NexuizSkinList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizSkinList, columnPreviewOrigin, float, 0)
-       ATTRIB(NexuizSkinList, columnPreviewSize, float, 0)
-       ATTRIB(NexuizSkinList, columnNameOrigin, float, 0)
-       ATTRIB(NexuizSkinList, columnNameSize, float, 0)
-       ATTRIB(NexuizSkinList, realUpperMargin1, float, 0)
-       ATTRIB(NexuizSkinList, realUpperMargin2, float, 0)
-       ATTRIB(NexuizSkinList, origin, vector, '0 0 0')
-       ATTRIB(NexuizSkinList, itemAbsSize, vector, '0 0 0')
-
-       ATTRIB(NexuizSkinList, lastClickedSkin, float, -1)
-       ATTRIB(NexuizSkinList, lastClickedTime, float, 0)
-
-       ATTRIB(NexuizSkinList, name, string, "skinselector")
-ENDCLASS(NexuizSkinList)
-
-entity makeNexuizSkinList();
-void SetSkin_Click(entity btn, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-
-#define SKINPARM_NAME 0
-#define SKINPARM_TITLE 1
-#define SKINPARM_AUTHOR 2
-#define SKINPARM_PREVIEW 3
-#define SKINPARM_COUNT 4
-
-entity makeNexuizSkinList()
-{
-       entity me;
-       me = spawnNexuizSkinList();
-       me.configureNexuizSkinList(me);
-       return me;
-}
-
-void configureNexuizSkinListNexuizSkinList(entity me)
-{
-       me.configureNexuizListBox(me);
-       me.getSkins(me);
-       me.loadCvars(me);
-}
-
-void loadCvarsNexuizSkinList(entity me)
-{
-       string s;
-       float i, n;
-       s = cvar_string("menu_skin");
-       n = me.nItems;
-       for(i = 0; i < n; ++i)
-       {
-               if(me.skinParameter(me, i, SKINPARM_NAME) == s)
-               {
-                       me.selectedItem = i;
-                       break;
-               }
-       }
-}
-
-void saveCvarsNexuizSkinList(entity me)
-{
-       cvar_set("menu_skin", me.skinParameter(me, me.selectedItem, SKINPARM_NAME));
-}
-
-string skinParameterNexuizSkinList(entity me, float i, float key)
-{
-       return bufstr_get(me.skinlist, i * SKINPARM_COUNT + key);
-}
-
-void getSkinsNexuizSkinList(entity me)
-{
-       float glob, buf, i, n, fh;
-       string s;
-
-       buf = buf_create();
-       glob = search_begin("gfx/menu/*/skinvalues.txt", TRUE, TRUE);
-       if(glob < 0)
-       {
-               me.skinlist = buf;
-               me.nItems = 0;
-               return;
-       }
-
-       n = search_getsize(glob);
-       for(i = 0; i < n; ++i)
-       {
-               s = search_getfilename(glob, i);
-               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part
-               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, "<TITLE>");
-               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, "<AUTHOR>");
-               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));
-               fh = fopen(s, FILE_READ);
-               if(fh < 0)
-               {
-                       print("Warning: can't open skinvalues.txt file\n");
-                       continue;
-               }
-               while((s = fgets(fh)))
-               {
-                       // these two are handled by skinlist.qc
-                       if(substring(s, 0, 6) == "title ")
-                               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, substring(s, 6, strlen(s) - 6));
-                       else if(substring(s, 0, 7) == "author ")
-                               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, substring(s, 7, strlen(s) - 7));
-               }
-               fclose(fh);
-       }
-
-       search_end(glob);
-
-       me.skinlist = buf;
-       me.nItems = n;
-}
-
-void destroyNexuizSkinList(entity me)
-{
-       buf_del(me.skinlist);
-}
-
-void resizeNotifyNexuizSkinList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       me.itemAbsSize = '0 0 0';
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
-       me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize_y);
-       me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize_y;
-
-       me.columnPreviewOrigin = 0;
-       me.columnPreviewSize = me.itemAbsSize_y / me.itemAbsSize_x * 4 / 3;
-       me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize_x;
-       me.columnNameSize = 1 - me.columnPreviewSize - 2 * me.realFontSize_x;
-}
-
-void drawListBoxItemNexuizSkinList(entity me, float i, vector absSize, float isSelected)
-{
-       string s;
-       
-       if(isSelected)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-               
-       s = me.skinParameter(me, i, SKINPARM_PREVIEW);
-       draw_Picture(me.columnPreviewOrigin * eX, s, me.columnPreviewSize * eX + eY, '1 1 1', 1);
-       
-       s = me.skinParameter(me, i, SKINPARM_NAME);
-       s = strcat(s, ": ", me.skinParameter(me, i, SKINPARM_TITLE));
-       s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_SKINLIST_TITLE, SKINALPHA_TEXT, 0);
-
-       s = me.skinParameter(me, i, SKINPARM_AUTHOR);
-       s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_SKINLIST_AUTHOR, SKINALPHA_TEXT, 0);
-}
-
-void setSkinNexuizSkinList(entity me)
-{
-       me.saveCvars(me);
-       localcmd("\nmenu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd skinselect\"\n");
-}
-
-void SetSkin_Click(entity btn, entity me)
-{
-       me.setSkin(me);
-}
-
-void clickListBoxItemNexuizSkinList(entity me, float i, vector where)
-{
-       if(i == me.lastClickedSkin)
-               if(time < me.lastClickedTime + 0.3)
-               {
-                       // DOUBLE CLICK!
-                       me.setSelected(me, i);
-                       me.setSkin(me);
-               }
-       me.lastClickedSkin = i;
-       me.lastClickedTime = time;
-}
-
-float keyDownNexuizSkinList(entity me, float scan, float ascii, float shift)
-{
-       if(scan == K_ENTER) {
-               me.setSkin(me);
-               return 1;
-       }
-       else
-               return keyDownListBox(me, scan, ascii, shift);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/slider.c b/qcsrc/menu/nexuiz/slider.c
deleted file mode 100644 (file)
index 3b9a575..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizSlider) EXTENDS(Slider)
-       METHOD(NexuizSlider, configureNexuizSlider, void(entity, float, float, float, string))
-       METHOD(NexuizSlider, setValue, void(entity, float))
-       ATTRIB(NexuizSlider, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT)
-       ATTRIB(NexuizSlider, image, string, SKINGFX_SLIDER)
-       ATTRIB(NexuizSlider, tolerance, vector, SKINTOLERANCE_SLIDER)
-       ATTRIB(NexuizSlider, align, float, 0.5)
-       ATTRIB(NexuizSlider, color, vector, SKINCOLOR_SLIDER_N)
-       ATTRIB(NexuizSlider, colorC, vector, SKINCOLOR_SLIDER_C)
-       ATTRIB(NexuizSlider, colorF, vector, SKINCOLOR_SLIDER_F)
-       ATTRIB(NexuizSlider, colorD, vector, SKINCOLOR_SLIDER_D)
-       ATTRIB(NexuizSlider, color2, vector, SKINCOLOR_SLIDER_S)
-
-       ATTRIB(NexuizSlider, cvarName, string, string_null)
-       METHOD(NexuizSlider, loadCvars, void(entity))
-       METHOD(NexuizSlider, saveCvars, void(entity))
-
-       ATTRIB(NexuizSlider, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizSlider, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizSlider)
-entity makeNexuizSlider(float, float, float, string);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
-{
-       entity me;
-       me = spawnNexuizSlider();
-       me.configureNexuizSlider(me, theValueMin, theValueMax, theValueStep, theCvar);
-       return me;
-}
-void configureNexuizSliderNexuizSlider(entity me, float theValueMin, float theValueMax, float theValueStep, string theCvar)
-{
-       float v, vk, vp;
-       v = theValueMin;
-       vk = theValueStep;
-       vp = theValueStep * 10;
-       while(fabs(vp) < fabs(theValueMax - theValueMin) / 40)
-               vp *= 10;
-       me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image);
-       me.configureSliderValues(me, theValueMin, v, theValueMax, theValueStep, vk, vp);
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.loadCvars(me);
-               if(tooltipdb >= 0)
-                       me.tooltip = getZonedTooltipForIdentifier(theCvar);
-       }
-}
-void setValueNexuizSlider(entity me, float val)
-{
-       if(val != me.value)
-       {
-               me.value = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizSlider(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       me.value = cvar(me.cvarName);
-}
-void saveCvarsNexuizSlider(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       cvar_set(me.cvarName, ftos(me.value));
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/slider_decibels.c b/qcsrc/menu/nexuiz/slider_decibels.c
deleted file mode 100644 (file)
index 18c1f71..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizDecibelsSlider) EXTENDS(NexuizSlider)
-       METHOD(NexuizDecibelsSlider, loadCvars, void(entity))
-       METHOD(NexuizDecibelsSlider, saveCvars, void(entity))
-       METHOD(NexuizDecibelsSlider, valueToText, string(entity, float))
-ENDCLASS(NexuizDecibelsSlider)
-entity makeNexuizDecibelsSlider(float, float, float, string);
-#endif
-
-#ifdef IMPLEMENTATION
-
-entity makeNexuizDecibelsSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
-{
-       entity me;
-       me = spawnNexuizDecibelsSlider();
-       me.configureNexuizSlider(me, theValueMin, theValueMax, theValueStep, theCvar);
-       return me;
-}
-void loadCvarsNexuizDecibelsSlider(entity me)
-{
-       float v;
-
-       if not(me.cvarName)
-               return;
-
-       v = cvar(me.cvarName);
-       if(v >= 0.98)
-               me.value = 0;
-       else if(v < 0.0005)
-               me.value = -1000000;
-       else
-               me.value = 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName)) * 10);
-}
-void saveCvarsNexuizDecibelsSlider(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       if(me.value >= -0.1)
-               cvar_set(me.cvarName, "1");
-       if(me.value < -33)
-               cvar_set(me.cvarName, "0");
-       else
-               cvar_set(me.cvarName, ftos(pow(10, me.value / 10)));
-}
-
-string valueToTextNexuizDecibelsSlider(entity me, float v)
-{
-       if(v < -33)
-               return "OFF";
-       else if(v >= -0.1)
-               return "MAX";
-       return strcat(valueToTextSlider(me, v), " dB");
-}
-
-#endif
diff --git a/qcsrc/menu/nexuiz/slider_resolution.c b/qcsrc/menu/nexuiz/slider_resolution.c
deleted file mode 100644 (file)
index 9c53e8a..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizResolutionSlider) EXTENDS(NexuizTextSlider)
-       METHOD(NexuizResolutionSlider, configureNexuizResolutionSlider, void(entity))
-       METHOD(NexuizResolutionSlider, addResolution, void(entity, float, float, float))
-       METHOD(NexuizResolutionSlider, loadCvars, void(entity))
-       METHOD(NexuizResolutionSlider, saveCvars, void(entity))
-ENDCLASS(NexuizResolutionSlider)
-entity makeNexuizResolutionSlider();
-void updateConwidths();
-#endif
-
-#ifdef IMPLEMENTATION
-void updateConwidths()
-{
-       vector r, c;
-       float minfactor, maxfactor;
-       float sz, f;
-       r_x = cvar("menu_vid_width");
-       r_y = cvar("menu_vid_height");
-       r_z = cvar("menu_vid_pixelheight");
-       sz = cvar("menu_vid_scale");
-
-       // calculate the base resolution
-       c_z = 0;
-       c_x = 800;
-       c_y = c_x * r_y * r_z / r_x;
-       if(c_y < 600)
-       {
-               c_y = 600;
-               c_x = c_y * r_x / (r_y * r_z);
-       }
-
-       f = min(r_x / c_x, r_y / c_y);
-       if(f < 1)
-               c = c * f; // ensures that c_x <= r_x and c_y <= r_y
-
-       minfactor = min(1, 640 / c_x);             // can be > 1 only if c_x is <640
-       maxfactor = max3(1, r_x / c_x, r_y / c_y); // can be < 1 only if r_x < c_x and r_y < c_y
-       dprint("min factor: ", ftos(minfactor), "\n");
-       dprint("max factor: ", ftos(maxfactor), "\n");
-
-       if(sz < 0)
-               f = 1 - (maxfactor - 1) * sz;
-       else if(sz > 0)
-               f = 1 + (minfactor - 1) * sz;
-       else
-               f = 1;
-       c = c * f; // fteqcc fail
-
-       cvar_set("vid_width", ftos(rint(r_x)));
-       cvar_set("vid_height", ftos(rint(r_y)));
-       cvar_set("vid_pixelheight", ftos(rint(r_z)));
-       cvar_set("vid_conwidth", ftos(rint(c_x)));
-       cvar_set("vid_conheight", ftos(rint(c_y)));
-}
-entity makeNexuizResolutionSlider()
-{
-       entity me;
-       me = spawnNexuizResolutionSlider();
-       me.configureNexuizResolutionSlider(me);
-       return me;
-}
-void addResolutionNexuizResolutionSlider(entity me, float w, float h, float pixelheight)
-{
-       me.addValue(me, strzone(strcat(ftos(w), "x", ftos(h))), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
-       // FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
-}
-void configureNexuizResolutionSliderNexuizResolutionSlider(entity me)
-{
-       float i;
-       vector r0, r;
-
-       me.configureNexuizTextSlider(me, "menu_vid_width");
-
-       r0 = '0 0 0';
-       for(i = 0;; ++i)
-       {
-               r = getresolution(i);
-               if(r_x == 0 && r_y == 0)
-                       break;
-               if(r_z == 0)
-                       r_z = 1; // compat
-               if(r == r0)
-                       continue;
-               r0 = r;
-               if(r_x < 640 || r_y < 400)
-                       continue;
-               me.addResolution(me, r_x, r_y, r_z);
-       }
-
-       me.configureNexuizTextSliderValues(me);
-}
-void loadCvarsNexuizResolutionSlider(entity me)
-{
-       me.setValueFromIdentifier(me, strcat(cvar_string("menu_vid_width"), " ", cvar_string("menu_vid_height"), " ", cvar_string("menu_vid_pixelheight")));
-}
-void saveCvarsNexuizResolutionSlider(entity me)
-{
-       if(me.value >= 0 || me.value < me.nValues)
-       {
-               tokenize_console(me.getIdentifier(me));
-               cvar_set("menu_vid_width", argv(0));
-               cvar_set("menu_vid_height", argv(1));
-               cvar_set("menu_vid_pixelheight", argv(2));
-       }
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/tab.c b/qcsrc/menu/nexuiz/tab.c
deleted file mode 100644 (file)
index 4ec539d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizTab) EXTENDS(Tab)
-       // still to be customized by user
-       /*
-       ATTRIB(NexuizTab, intendedWidth, float, 0)
-       ATTRIB(NexuizTab, rows, float, 3)
-       ATTRIB(NexuizTab, columns, float, 2)
-       */
-       METHOD(NexuizTab, showNotify, void(entity))
-
-       ATTRIB(NexuizTab, marginTop, float, 0) // pixels
-       ATTRIB(NexuizTab, marginBottom, float, 0) // pixels
-       ATTRIB(NexuizTab, marginLeft, float, 0) // pixels
-       ATTRIB(NexuizTab, marginRight, float, 0) // pixels
-       ATTRIB(NexuizTab, columnSpacing, float, SKINMARGIN_COLUMNS) // pixels
-       ATTRIB(NexuizTab, rowSpacing, float, SKINMARGIN_ROWS) // pixels
-       ATTRIB(NexuizTab, rowHeight, float, SKINFONTSIZE_NORMAL * SKINHEIGHT_NORMAL) // pixels
-       ATTRIB(NexuizTab, titleHeight, float, SKINFONTSIZE_TITLE * SKINHEIGHT_TITLE) // pixels
-
-       ATTRIB(NexuizTab, backgroundImage, string, string_null)
-ENDCLASS(NexuizTab)
-#endif
-
-#ifdef IMPLEMENTATION
-void showNotifyNexuizTab(entity me)
-{
-       loadAllCvars(me);
-       showNotifyContainer(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/tabcontroller.c b/qcsrc/menu/nexuiz/tabcontroller.c
deleted file mode 100644 (file)
index d33a7c4..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizTabController) EXTENDS(ModalController)
-       METHOD(NexuizTabController, configureNexuizTabController, void(entity, float))
-       METHOD(NexuizTabController, makeTabButton, entity(entity, string, entity))
-       ATTRIB(NexuizTabController, rows, float, 0)
-       ATTRIB(NexuizTabController, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizTabController, image, string, SKINGFX_BUTTON)
-ENDCLASS(NexuizTabController)
-entity makeNexuizTabController(float theRows);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizTabController(float theRows)
-{
-       entity me;
-       me = spawnNexuizTabController();
-       me.configureNexuizTabController(me, theRows);
-       return me;
-}
-void configureNexuizTabControllerNexuizTabController(entity me, float theRows)
-{
-       me.rows = theRows;
-}
-entity makeTabButtonNexuizTabController(entity me, string theTitle, entity tab)
-{
-       entity b;
-       if(me.rows != tab.rows)
-               error("Tab dialog height mismatch!");
-       b = makeNexuizButton(theTitle, '0 0 0');
-               me.addTab(me, tab, b);
-       // TODO make this real tab buttons (with color parameters, and different gfx)
-       return b;
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/textlabel.c b/qcsrc/menu/nexuiz/textlabel.c
deleted file mode 100644 (file)
index 1624473..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizTextLabel) EXTENDS(Label)
-       METHOD(NexuizTextLabel, configureNexuizTextLabel, void(entity, float, string))
-       METHOD(NexuizTextLabel, draw, void(entity))
-       ATTRIB(NexuizTextLabel, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizTextLabel, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizTextLabel, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizTextLabel)
-entity makeNexuizTextLabel(float theAlign, string theText);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizTextLabel(float theAlign, string theText)
-{
-       entity me;
-       me = spawnNexuizTextLabel();
-       me.configureNexuizTextLabel(me, theAlign, theText);
-       return me;
-}
-void configureNexuizTextLabelNexuizTextLabel(entity me, float theAlign, string theText)
-{
-       me.configureLabel(me, theText, me.fontSize, theAlign);
-}
-void drawNexuizTextLabel(entity me)
-{
-       drawLabel(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/textslider.c b/qcsrc/menu/nexuiz/textslider.c
deleted file mode 100644 (file)
index d054067..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizTextSlider) EXTENDS(TextSlider)
-       METHOD(NexuizTextSlider, configureNexuizTextSlider, void(entity, string))
-       METHOD(NexuizTextSlider, setValue, void(entity, float))
-       METHOD(NexuizTextSlider, configureNexuizTextSliderValues, void(entity))
-       ATTRIB(NexuizTextSlider, fontSize, float, SKINFONTSIZE_NORMAL)
-       ATTRIB(NexuizTextSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT)
-       ATTRIB(NexuizTextSlider, image, string, SKINGFX_SLIDER)
-       ATTRIB(NexuizSlider, tolerance, vector, SKINTOLERANCE_SLIDER)
-       ATTRIB(NexuizTextSlider, align, float, 0.5)
-       ATTRIB(NexuizSlider, color, vector, SKINCOLOR_SLIDER_N)
-       ATTRIB(NexuizSlider, colorC, vector, SKINCOLOR_SLIDER_C)
-       ATTRIB(NexuizSlider, colorF, vector, SKINCOLOR_SLIDER_F)
-       ATTRIB(NexuizSlider, colorD, vector, SKINCOLOR_SLIDER_D)
-       ATTRIB(NexuizSlider, color2, vector, SKINCOLOR_SLIDER_S)
-
-       ATTRIB(NexuizTextSlider, cvarName, string, string_null)
-       METHOD(NexuizTextSlider, loadCvars, void(entity))
-       METHOD(NexuizTextSlider, saveCvars, void(entity))
-
-       ATTRIB(NexuizTextSlider, alpha, float, SKINALPHA_TEXT)
-       ATTRIB(NexuizTextSlider, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(NexuizTextSlider)
-entity makeNexuizTextSlider(string); // note: you still need to call addValue and configureNexuizTextSliderValues!
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizTextSlider(string theCvar)
-{
-       entity me;
-       me = spawnNexuizTextSlider();
-       me.configureNexuizTextSlider(me, theCvar);
-       return me;
-}
-void configureNexuizTextSliderNexuizTextSlider(entity me, string theCvar)
-{
-       me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image);
-       if(theCvar)
-       {
-               me.cvarName = theCvar;
-               me.tooltip = getZonedTooltipForIdentifier(theCvar);
-               // don't load it yet
-       }
-}
-void setValueNexuizTextSlider(entity me, float val)
-{
-       if(val != me.value)
-       {
-               me.value = val;
-               me.saveCvars(me);
-       }
-}
-void loadCvarsNexuizTextSlider(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       var float n = tokenize_console(me.cvarName);
-       var string s = cvar_string(argv(0));
-       float i;
-       for(i = 1; i < n; ++i)
-               s = strcat(s, " ", cvar_string(argv(i)));
-       me.setValueFromIdentifier(me, s);
-}
-void saveCvarsNexuizTextSlider(entity me)
-{
-       if not(me.cvarName)
-               return;
-
-       if(me.value >= 0 && me.value < me.nValues)
-       {
-               var float n = tokenize_console(me.cvarName);
-               if(n == 1)
-               {
-                       // this is a special case to allow spaces in the identifiers
-                       cvar_set(argv(0), me.getIdentifier(me));
-               }
-               else
-               {
-                       float i;
-                       var float m = tokenize_console(strcat(me.cvarName, " ", me.getIdentifier(me)));
-                       if(m == n + 1)
-                       {
-                               for(i = 0; i < n; ++i)
-                                       cvar_set(argv(i), argv(n));
-                       }
-                       else if(m == n * 2)
-                       {
-                               for(i = 0; i < n; ++i)
-                                       cvar_set(argv(i), argv(i + n));
-                       }
-                       else
-                               error("NexuizTextSlider: invalid identifier ", me.getIdentifier(me), " does not match cvar list ", me.cvarName);
-               }
-       }
-}
-void configureNexuizTextSliderValuesNexuizTextSlider(entity me)
-{
-       me.configureTextSliderValues(me, string_null);
-       me.loadCvars(me);
-}
-#endif
diff --git a/qcsrc/menu/nexuiz/util.qc b/qcsrc/menu/nexuiz/util.qc
deleted file mode 100644 (file)
index 22d23fd..0000000
+++ /dev/null
@@ -1,385 +0,0 @@
-float tooltipdb;
-void loadTooltips()
-{
-       tooltipdb = db_load("tooltips.db");
-}
-void unloadTooltips()
-{
-       db_close(tooltipdb);
-       tooltipdb = -1;
-}
-string getZonedTooltipForIdentifier(string s)
-{
-       string t;
-       if(s == "")
-               return string_null;
-       t = db_get(tooltipdb, s);
-       if(t == "-")
-               return string_null;
-       if(t != "")
-               return strzone(t);
-       t = cvar_description(s);
-       if(t != "" && t != "custom cvar")
-               return strzone(t);
-       dprint("WARNING: no tooltip set for ", s, "\n");
-       return string_null;
-}
-
-void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass)
-{
-       depthfirst(root, parent, firstChild, nextSibling, funcPre, funcPost, pass);
-}
-
-.string cvarName;
-void SUB_Null_ee(entity e1, entity e2)
-{
-}
-void saveCvarsOf(entity ignore, entity e)
-{
-       if(e.saveCvars)
-               e.saveCvars(e);
-}
-void loadCvarsOf(entity ignore, entity e)
-{
-       if(e.loadCvars)
-               e.loadCvars(e);
-}
-void saveAllCvars(entity root)
-{
-       forAllDescendants(root, saveCvarsOf, SUB_Null_ee, NULL);
-}
-void loadAllCvars(entity root)
-{
-       forAllDescendants(root, loadCvarsOf, SUB_Null_ee, NULL);
-}
-
-.string cvarNames_Multi;
-.void(entity me) saveCvars_Multi;
-void saveCvarsMulti(entity me)
-{
-       float n, i;
-       string s;
-
-       me.saveCvars_Multi(me);
-       s = cvar_string(me.cvarName);
-
-       n = tokenize_console(me.cvarNames_Multi);
-       for(i = 0; i < n; ++i)
-               cvar_set(argv(i), s);
-}
-void makeMulti(entity e, string otherCvars)
-{
-       e.cvarNames_Multi = otherCvars;
-       e.saveCvars_Multi = e.saveCvars;
-       e.saveCvars = saveCvarsMulti;
-}
-
-.void(entity me) saveCvars_Callback;
-.entity saveCvars_Callback_ent;
-.void(entity me, entity cb) saveCvars_Callback_func;
-void saveCvarsCallback(entity me)
-{
-       me.saveCvars_Callback(me);
-       me.saveCvars_Callback_func(me.saveCvars_Callback_ent, me);
-}
-void makeCallback(entity e, entity cbent, void(entity, entity) cbfunc)
-{
-       e.saveCvars_Callback = e.saveCvars;
-       e.saveCvars = saveCvarsCallback;
-       e.saveCvars_Callback_ent = cbent;
-       e.saveCvars_Callback_func = cbfunc;
-}
-
-.void(entity) draw_setDependent;
-.string cvar_setDependent;
-.float cvarMin_setDependent;
-.float cvarMax_setDependent;
-.string cvar2_setDependent;
-.float cvar2Min_setDependent;
-.float cvar2Max_setDependent;
-.string cvar3_setDependent;
-.float cvar3Min_setDependent;
-.float cvar3Max_setDependent;
-.float op_setDependent;
-.string cvarString_setDependent;
-.string cvarValue_setDependent;
-.float(entity) func_setDependent;
-void setDependent_Check(entity e)
-{
-       float f;
-       string s;
-       if(e.func_setDependent)
-       {
-               e.disabled = !(e.func_setDependent(e));
-       }
-       else if(e.cvarString_setDependent)
-       {
-               s = cvar_string(e.cvarString_setDependent);
-               e.disabled = (cvar_string(e.cvarString_setDependent) == e.cvarValue_setDependent);
-       }
-       else
-       {
-               if(e.cvar_setDependent)
-               {
-                       f = cvar(e.cvar_setDependent);
-                       if(e.cvarMin_setDependent <= e.cvarMax_setDependent)
-                               e.disabled = ((f < e.cvarMin_setDependent) || (f > e.cvarMax_setDependent));
-                       else
-                               e.disabled = ((f >= e.cvarMax_setDependent) && (f <= e.cvarMin_setDependent));
-               }
-               if(e.cvar2_setDependent)
-               {
-                       f = cvar(e.cvar2_setDependent);
-                       if(e.cvar2Min_setDependent <= e.cvar2Max_setDependent)
-                               e.disabled = (e.disabled + ((f < e.cvar2Min_setDependent) || (f > e.cvar2Max_setDependent)) > e.op_setDependent);
-                       else
-                               e.disabled = (e.disabled + ((f >= e.cvar2Max_setDependent) && (f <= e.cvar2Min_setDependent)) > e.op_setDependent);
-               }
-               if(e.cvar3_setDependent)
-               {
-                       f = cvar(e.cvar3_setDependent);
-                       if(e.cvar3Min_setDependent <= e.cvar3Max_setDependent)
-                               e.disabled = (e.disabled + ((f < e.cvar3Min_setDependent) || (f > e.cvar3Max_setDependent)) > e.op_setDependent);
-                       else
-                               e.disabled = (e.disabled + ((f >= e.cvar3Max_setDependent) && (f <= e.cvar3Min_setDependent)) > e.op_setDependent);
-               }
-       }
-}
-void setDependent_Draw(entity e)
-{
-       setDependent_Check(e);
-       e.draw_setDependent(e);
-}
-void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
-{
-       e.draw_setDependent = e.draw;
-       e.cvar_setDependent = theCvarName;
-       e.cvarMin_setDependent = theCvarMin;
-       e.cvarMax_setDependent = theCvarMax;
-       e.cvar2_setDependent = string_null;
-       e.cvar3_setDependent = string_null;
-       e.func_setDependent = func_null;
-       e.draw = setDependent_Draw;
-       setDependent_Check(e);
-}
-void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue)
-{
-       e.draw_setDependent = e.draw;
-       e.cvarString_setDependent = theCvarName;
-       e.cvarValue_setDependent = theCvarValue;
-       e.cvar_setDependent = string_null;
-       e.cvar2_setDependent = string_null;
-       e.cvar3_setDependent = string_null;
-       e.func_setDependent = func_null;
-       e.draw = setDependent_Draw;
-       setDependent_Check(e);
-}
-void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max)
-{
-       e.draw_setDependent = e.draw;
-       e.cvar_setDependent = theCvarName;
-       e.cvarMin_setDependent = theCvarMin;
-       e.cvarMax_setDependent = theCvarMax;
-       e.cvar2_setDependent = theCvar2Name;
-       e.cvar2Min_setDependent = theCvar2Min;
-       e.cvar2Max_setDependent = theCvar2Max;
-       e.cvar3_setDependent = string_null;
-       e.op_setDependent = 0;
-       e.func_setDependent = func_null;
-       e.draw = setDependent_Draw;
-       setDependent_Check(e);
-}
-void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max)
-{
-       e.draw_setDependent = e.draw;
-       e.cvar_setDependent = theCvarName;
-       e.cvarMin_setDependent = theCvarMin;
-       e.cvarMax_setDependent = theCvarMax;
-       e.cvar2_setDependent = theCvar2Name;
-       e.cvar2Min_setDependent = theCvar2Min;
-       e.cvar2Max_setDependent = theCvar2Max;
-       e.cvar3_setDependent = string_null;
-       e.op_setDependent = 1;
-       e.func_setDependent = func_null;
-       e.draw = setDependent_Draw;
-       setDependent_Check(e);
-}
-void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max, string theCvar3Name, float theCvar3Min, float theCvar3Max)
-{
-       e.draw_setDependent = e.draw;
-       e.cvar_setDependent = theCvarName;
-       e.cvarMin_setDependent = theCvarMin;
-       e.cvarMax_setDependent = theCvarMax;
-       e.cvar2_setDependent = theCvar2Name;
-       e.cvar2Min_setDependent = theCvar2Min;
-       e.cvar2Max_setDependent = theCvar2Max;
-       e.cvar3_setDependent = theCvar3Name;
-       e.cvar3Min_setDependent = theCvar3Min;
-       e.cvar3Max_setDependent = theCvar3Max;
-       e.op_setDependent = 0;
-       e.func_setDependent = func_null;
-       e.draw = setDependent_Draw;
-       setDependent_Check(e);
-}
-void setDependentWeird(entity e, float(entity) func)
-{
-       e.draw_setDependent = e.draw;
-       e.func_setDependent = func;
-       e.draw = setDependent_Draw;
-       setDependent_Check(e);
-}
-
-// EXTRESPONSE SYSTEM ////////////////////////////////////////////////////////
-
-float _Nex_ExtResponseSystem_RequestsSent;
-float _Nex_ExtResponseSystem_VersionHandled;
-string _Nex_ExtResponseSystem_UpdateTo;
-float _Nex_ExtResponseSystem_RetryTime;
-float _Nex_ExtResponseSystem_RetryTime_LastDelay;
-
-void() Item_Nex_ExtResponseSystem_SendQuery =
-{
-       dprint("Sending extended response requests...\n");
-       localcmd(strcat("packet 64.22.107.122:27950 \"getExtResponse checkUpdates nexuiz ", cvar_string("g_nexuizversion"), "\"\n"));
-       _Nex_ExtResponseSystem_RequestsSent = TRUE;
-       _Nex_ExtResponseSystem_RetryTime_LastDelay = _Nex_ExtResponseSystem_RetryTime_LastDelay * 2 + 1;
-       _Nex_ExtResponseSystem_RetryTime = time + _Nex_ExtResponseSystem_RetryTime_LastDelay;
-}
-
-void(float argc) Item_Nex_ExtResponseSystem_Parse =
-{
-       dprint("Received extended response packet from ", argv(0), "\n");
-       if(!_Nex_ExtResponseSystem_RequestsSent)
-       {
-               dprint("  But I haven't sent a request yet! Ignoring.\n");
-               return;
-       }
-       if(argv(1) == "noUpdateAvailable")
-       {
-               if(_Nex_ExtResponseSystem_VersionHandled)
-               {
-                       dprint("  duplicated update notice, ignored\n");
-                       return;
-               }
-               _Nex_ExtResponseSystem_VersionHandled = 1;
-       }
-       else if(argv(1) == "updateAvailable")
-       {
-               if(_Nex_ExtResponseSystem_VersionHandled)
-               {
-                       dprint("  duplicated update notice, ignored\n");
-                       return;
-               }
-               _Nex_ExtResponseSystem_VersionHandled = 1;
-               _Nex_ExtResponseSystem_UpdateTo = strzone(argv(2)); // note: only one packet can be handled, so this can't be a leak
-       }
-       else
-               dprint("  UNKNOWN RESPONSE TYPE: ", argv(1), "\n");
-}
-
-void() Item_Nex_ExtResponseSystem_CheckForResponse =
-{
-       local string s;
-       local float argc;
-       while(strlen((s = getextresponse())))
-       {
-               argc = tokenize_console(s);
-               Item_Nex_ExtResponseSystem_Parse(argc);
-       }
-}
-
-// END OF EXTRESPONSE SYSTEM /////////////////////////////////////////////////
-
-float preMenuInit()
-{
-       vector sz;
-       vector boxA, boxB;
-
-       MapInfo_Cache_Create();
-       MapInfo_Enumerate();
-       if(!MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
-       {
-               draw_reset_cropped();
-
-               sz = eX * 0.025 + eY * 0.025 * (draw_scale_x / draw_scale_y);
-               draw_CenterText('0.5 0.5 0' - 1.25 * sz_y * eY, "Autogenerating mapinfo for newly added maps...", sz, '1 1 1', 1, 0);
-
-               boxA = '0.05 0.5 0' + 0.25 * sz_y * eY;
-               boxB = '0.95 0.5 0' + 1.25 * sz_y * eY;
-               draw_Fill(boxA, boxB - boxA, '1 1 1', 1);
-               
-               boxA += sz * 0.1;
-               boxB -= sz * 0.1;
-               draw_Fill(boxA, boxB - boxA, '0.1 0.1 0.1', 1);
-
-               boxB_x = boxA_x * (1 - MapInfo_progress) + boxB_x * MapInfo_progress;
-               draw_Fill(boxA, boxB - boxA, '0 0 1', 1);
-
-               return FALSE;
-       }
-       return TRUE;
-}
-
-string campaign_name_previous;
-float campaign_won_previous;
-void postMenuDraw()
-{
-}
-void preMenuDraw()
-{
-       vector fs, sz, line, mid;
-
-       if(cvar("menu_updatecheck"))
-       {
-               Item_Nex_ExtResponseSystem_CheckForResponse();
-               if(!_Nex_ExtResponseSystem_VersionHandled)
-                       if(time > _Nex_ExtResponseSystem_RetryTime)
-                               Item_Nex_ExtResponseSystem_SendQuery();
-       }
-
-       if(_Nex_ExtResponseSystem_UpdateTo != "")
-       {
-               fs = ((1/draw_scale_x) * eX + (1/draw_scale_y) * eY) * 12;
-               line = eY * fs_y;
-               sz_x = draw_TextWidth("  http://www.nexuiz.com/  ", 0, fs);
-               sz_y = 3 * fs_y;
-
-               draw_alpha = sin(time * 0.112 - 0.3) * 0.7;
-               mid = eX * (0.5 + 0.5 * (1 - sz_x) * cos(time * 0.071))
-                   + eY * (0.5 + 0.5 * (1 - sz_y) * sin(time * 0.071));
-
-               draw_Fill(mid - 0.5 * sz, sz, '1 1 0', 1);
-               draw_CenterText(mid - 1 * line, strcat("Update to ", _Nex_ExtResponseSystem_UpdateTo, " now!"), fs, '1 0 0', 1, 0);
-               draw_CenterText(mid - 0 * line, "http://www.nexuiz.com/", fs, '0 0 1', 1, 0);
-       }
-       if not(campaign_name_previous)
-               campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
-       if(campaign_name == campaign_name_previous)
-       {
-               if(cvar(strcat("g_campaign", campaign_name, "_won")))
-               {
-                       if(!campaign_won_previous)
-                       {
-                               m_display();
-                               DialogOpenButton_Click_withCoords(NULL, main.winnerDialog, '0 0 0', eX * conwidth + eY * conheight);
-                       }
-                       campaign_won_previous = 1;
-               }
-               else
-                       campaign_won_previous = 0;
-       }
-       else
-       {
-               strunzone(campaign_name_previous);
-               campaign_name_previous = strzone(campaign_name);
-               campaign_won_previous = cvar(strcat("g_campaign", campaign_name, "_won"));
-       }
-}
-
-string resolvemod(string m)
-{
-       if(m == "=")
-               return getcurrentmod();
-       else
-               return m;
-}
diff --git a/qcsrc/menu/nexuiz/util.qh b/qcsrc/menu/nexuiz/util.qh
deleted file mode 100644 (file)
index 55d9941..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
-void saveAllCvars(entity root);
-void loadAllCvars(entity root);
-
-void makeMulti(entity me, string otherCvars);
-void makeCallback(entity me, entity cbent, void(entity, entity) cbfunc);
-
-void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax);
-void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
-void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
-void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max, string theCvar3Name, float theCvar3Min, float theCvar3Max);
-void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue);
-void setDependentWeird(entity e, float(entity) func);
-
-float tooltipdb;
-void loadTooltips();
-void unloadTooltips();
-string getZonedTooltipForIdentifier(string s);
-
-string resolvemod(string m);
diff --git a/qcsrc/menu/nexuiz/weaponslist.c b/qcsrc/menu/nexuiz/weaponslist.c
deleted file mode 100644 (file)
index dd58dc6..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#ifdef INTERFACE
-CLASS(NexuizWeaponsList) EXTENDS(NexuizListBox)
-       METHOD(NexuizWeaponsList, configureNexuizWeaponsList, void(entity))
-       METHOD(NexuizWeaponsList, toString, string(entity))
-       ATTRIB(NexuizWeaponsList, rowsPerItem, float, 1)
-       METHOD(NexuizWeaponsList, draw, void(entity))
-       METHOD(NexuizWeaponsList, drawListBoxItem, void(entity, float, vector, float))
-       METHOD(NexuizWeaponsList, resizeNotify, void(entity, vector, vector, vector, vector))
-       METHOD(NexuizWeaponsList, keyDown, float(entity, float, float, float))
-       ATTRIB(NexuizWeaponsList, realFontSize, vector, '0 0 0')
-       ATTRIB(NexuizWeaponsList, realUpperMargin, float, 0)
-       METHOD(NexuizWeaponsList, mouseDrag, float(entity, vector))
-       ATTRIB(NexuizWeaponsList, scrollbarWidth, float, 0)
-ENDCLASS(NexuizWeaponsList)
-entity makeNexuizWeaponsList();
-void WeaponsList_MoveUp_Click(entity btn, entity me);
-void WeaponsList_MoveDown_Click(entity box, entity me);
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeNexuizWeaponsList()
-{
-       entity me;
-       me = spawnNexuizWeaponsList();
-       me.configureNexuizWeaponsList(me);
-       return me;
-}
-void configureNexuizWeaponsListNexuizWeaponsList(entity me)
-{
-       me.configureNexuizListBox(me);
-}
-void drawNexuizWeaponsList(entity me)
-{
-       // read in cvar?
-       string s, t;
-       s = W_NumberWeaponOrder(cvar_string("cl_weaponpriority"));
-       t = W_FixWeaponOrder(s, 1);
-       if(t != s)
-       {
-               print("AUTOFIXED\n");
-               cvar_set("cl_weaponpriority", W_NameWeaponOrder(t));
-       }
-       me.nItems = tokenize_console(t);
-       drawListBox(me);
-}
-void WeaponsList_MoveUp_Click(entity box, entity me)
-{
-       if(me.selectedItem > 0)
-       {
-               cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem - 1, me.selectedItem));
-               me.selectedItem -= 1;
-       }
-}
-void WeaponsList_MoveDown_Click(entity box, entity me)
-{
-       if(me.selectedItem < me.nItems - 1)
-       {
-               cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, me.selectedItem + 1));
-               me.selectedItem += 1;
-       }
-}
-void resizeNotifyNexuizWeaponsList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
-       resizeNotifyNexuizListBox(me, relOrigin, relSize, absOrigin, absSize);
-
-       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
-       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
-       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
-}
-float mouseDragNexuizWeaponsList(entity me, vector pos)
-{
-       float f, i;
-       i = me.selectedItem;
-       f = mouseDragListBox(me, pos);
-       if(me.selectedItem != i)
-               cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i));
-       return f;
-}
-string toStringNexuizWeaponsList(entity me)
-{
-       float n, i;
-       string s;
-       entity e;
-       n = tokenize_console(W_NumberWeaponOrder(cvar_string("cl_weaponpriority")));
-       s = "";
-       for(i = 0; i < n; ++i)
-       {
-               e = get_weaponinfo(stof(argv(i)));
-               s = strcat(s, e.message, ", ");
-       }
-       return substring(s, 0, strlen(s) - 2);
-}
-void drawListBoxItemNexuizWeaponsList(entity me, float i, vector absSize, float isSelected)
-{
-       entity e;
-       if(isSelected)
-               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-       e = get_weaponinfo(stof(argv(i)));
-       draw_Text(me.realUpperMargin * eY, e.message, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
-}
-
-float keyDownNexuizWeaponsList(entity me, float scan, float ascii, float shift)
-{
-       if(ascii == 43) // +
-       {
-               WeaponsList_MoveUp_Click(NULL, me);
-               return 1;
-       }
-       else if(scan == 45) // -
-       {
-               WeaponsList_MoveDown_Click(NULL, me);
-               return 1;
-       }
-       else if(keyDownListBox(me, scan, ascii, shift))
-               return 1;
-       return 0;
-}
-#endif
index 4c4eaf50c1232a569725cd2c314d8d2cf1f609b6..254a9238bb490b7efb60c4d1c43d131c41ea03e2 100644 (file)
@@ -18,7 +18,7 @@ gamecommand.qh
 menu.qh
 draw.qh
 skin.qh
 menu.qh
 draw.qh
 skin.qh
-nexuiz/util.qh
+xonotic/util.qh
 
 oo/classdefs.h
        classes.c
 
 oo/classdefs.h
        classes.c
@@ -33,7 +33,7 @@ oo/implementation.h
 gamecommand.qc
 menu.qc
 draw.qc
 gamecommand.qc
 menu.qc
 draw.qc
-nexuiz/util.qc
+xonotic/util.qc
 
 ../common/campaign_file.qc
 ../common/campaign_setup.qc
 
 ../common/campaign_file.qc
 ../common/campaign_setup.qc
diff --git a/qcsrc/menu/xonotic/bigbutton.c b/qcsrc/menu/xonotic/bigbutton.c
new file mode 100644 (file)
index 0000000..8a2a117
--- /dev/null
@@ -0,0 +1,23 @@
+#ifdef INTERFACE
+CLASS(XonoticBigButton) EXTENDS(XonoticButton)
+       METHOD(XonoticBigButton, configureXonoticBigButton, void(entity, string, vector))
+       ATTRIB(XonoticBigButton, image, string, SKINGFX_BUTTON_BIG)
+       ATTRIB(XonoticBigButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
+ENDCLASS(XonoticButton)
+entity makeXonoticButton(string theText, vector theColor);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticBigButton(string theText, vector theColor)
+{
+       entity me;
+       me = spawnXonoticBigButton();
+       me.configureXonoticBigButton(me, theText, theColor);
+       return me;
+}
+
+void configureXonoticBigButtonXonoticBigButton(entity me, string theText, vector theColor)
+{
+       me.configureXonoticButton(me, theText, theColor);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/bigcommandbutton.c b/qcsrc/menu/xonotic/bigcommandbutton.c
new file mode 100644 (file)
index 0000000..a667f0e
--- /dev/null
@@ -0,0 +1,23 @@
+#ifdef INTERFACE
+CLASS(XonoticBigCommandButton) EXTENDS(XonoticCommandButton)
+       METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float))
+       ATTRIB(XonoticBigCommandButton, image, string, SKINGFX_BUTTON_BIG)
+       ATTRIB(XonoticBigCommandButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
+ENDCLASS(XonoticCommandButton)
+entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float theFlags)
+{
+       entity me;
+       me = spawnXonoticBigCommandButton();
+       me.configureXonoticBigCommandButton(me, theText, theColor, theCommand, theFlags);
+       return me;
+}
+
+void configureXonoticBigCommandButtonXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
+{
+       me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/button.c b/qcsrc/menu/xonotic/button.c
new file mode 100644 (file)
index 0000000..2112c2c
--- /dev/null
@@ -0,0 +1,41 @@
+#ifdef INTERFACE
+CLASS(XonoticButton) EXTENDS(Button)
+       METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector))
+       ATTRIB(XonoticButton, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticButton, image, string, SKINGFX_BUTTON)
+       ATTRIB(XonoticButton, grayImage, string, SKINGFX_BUTTON_GRAY)
+       ATTRIB(XonoticButton, color, vector, SKINCOLOR_BUTTON_N)
+       ATTRIB(XonoticButton, colorC, vector, SKINCOLOR_BUTTON_C)
+       ATTRIB(XonoticButton, colorF, vector, SKINCOLOR_BUTTON_F)
+       ATTRIB(XonoticButton, colorD, vector, SKINCOLOR_BUTTON_D)
+       ATTRIB(XonoticButton, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticButton, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticButton)
+entity makeXonoticButton(string theText, vector theColor);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticButton(string theText, vector theColor)
+{
+       entity me;
+       me = spawnXonoticButton();
+       me.configureXonoticButton(me, theText, theColor);
+       return me;
+}
+
+void configureXonoticButtonXonoticButton(entity me, string theText, vector theColor)
+{
+       if(theColor == '0 0 0')
+       {
+               me.configureButton(me, theText, me.fontSize, me.image);
+       }
+       else
+       {
+               me.configureButton(me, theText, me.fontSize, me.grayImage);
+               me.color = theColor;
+               me.colorC = theColor;
+               me.colorF = theColor;
+       }
+       me.tooltip = getZonedTooltipForIdentifier(strcat(currentDialog.classname, "/", me.text));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/campaign.c b/qcsrc/menu/xonotic/campaign.c
new file mode 100644 (file)
index 0000000..1550d3f
--- /dev/null
@@ -0,0 +1,324 @@
+#ifdef INTERFACE
+CLASS(XonoticCampaignList) EXTENDS(XonoticListBox)
+       METHOD(XonoticCampaignList, configureXonoticCampaignList, void(entity))
+       ATTRIB(XonoticCampaignList, rowsPerItem, float, 10)
+       METHOD(XonoticCampaignList, draw, void(entity))
+       METHOD(XonoticCampaignList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticCampaignList, clickListBoxItem, void(entity, float, vector))
+       METHOD(XonoticCampaignList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticCampaignList, setSelected, void(entity, float))
+       METHOD(XonoticCampaignList, keyDown, float(entity, float, float, float))
+       METHOD(XonoticCampaignList, campaignGo, void(entity, float))
+       METHOD(XonoticCampaignList, destroy, void(entity))
+
+       ATTRIB(XonoticCampaignList, campaignGlob, float, 0)
+       ATTRIB(XonoticCampaignList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticCampaignList, columnPreviewOrigin, float, 0)
+       ATTRIB(XonoticCampaignList, columnPreviewSize, float, 0)
+       ATTRIB(XonoticCampaignList, columnNameOrigin, float, 0)
+       ATTRIB(XonoticCampaignList, columnNameSize, float, 0)
+       ATTRIB(XonoticCampaignList, columnCheckMarkOrigin, float, 0)
+       ATTRIB(XonoticCampaignList, columnCheckMarkSize, float, 0)
+       ATTRIB(XonoticCampaignList, checkMarkOrigin, vector, '0 0 0')
+       ATTRIB(XonoticCampaignList, checkMarkSize, vector, '0 0 0')
+       ATTRIB(XonoticCampaignList, realUpperMargin1, float, 0)
+       ATTRIB(XonoticCampaignList, realUpperMargin2, float, 0)
+
+       ATTRIB(XonoticCampaignList, lastClickedMap, float, -1)
+       ATTRIB(XonoticCampaignList, lastClickedTime, float, 0)
+
+       ATTRIB(XonoticCampaignList, origin, vector, '0 0 0')
+       ATTRIB(XonoticCampaignList, itemAbsSize, vector, '0 0 0')
+       ATTRIB(XonoticCampaignList, emptyLineHeight, float, 0.5)
+
+       ATTRIB(XonoticCampaignList, campaignIndex, float, 0)
+       ATTRIB(XonoticCampaignList, cvarName, string, string_null)
+       METHOD(XonoticCampaignList, loadCvars, void(entity))
+       METHOD(XonoticCampaignList, saveCvars, void(entity))
+
+       ATTRIB(XonoticCampaignList, buttonNext, entity, NULL)
+       ATTRIB(XonoticCampaignList, buttonPrev, entity, NULL)
+       ATTRIB(XonoticCampaignList, labelTitle, entity, NULL)
+ENDCLASS(XonoticCampaignList)
+entity makeXonoticCampaignList();
+void CampaignList_LoadMap(entity btn, entity me);
+void MultiCampaign_Next(entity btn, entity me);
+void MultiCampaign_Prev(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+string campaign_longdesc_wrapped[CAMPAIGN_MAX_ENTRIES];
+
+void rewrapCampaign(float w, float l0, float emptyheight, vector theFontSize)
+{
+       float i, j;
+       float n, l;
+       string r, s;
+       for(i = 0; i < campaign_entries; ++i)
+       {
+               l = l0;
+               if(campaign_longdesc_wrapped[i])
+                       strunzone(campaign_longdesc_wrapped[i]);
+               n = tokenizebyseparator(campaign_longdesc[i], "\n");
+               r = "";
+               for(j = 0; j < n; ++j)
+               {
+                       s = argv(j);
+                       if(s == "")
+                       {
+                               l -= emptyheight;
+                               r = strcat(r, "\n");
+                               continue;
+                       }
+
+                       getWrappedLine_remaining = s;
+                       while(getWrappedLine_remaining)
+                       {
+                               s = getWrappedLine(w, theFontSize, draw_TextWidth_WithoutColors);
+                               if(--l < 0) goto toolong;
+                               r = strcat(r, s, "\n");
+                       }
+               }
+               goto nottoolong;
+:toolong
+               while(substring(r, strlen(r) - 1, 1) == "\n")
+                       r = substring(r, 0, strlen(r) - 1);
+               r = strcat(r, "...\n");
+:nottoolong
+               campaign_longdesc_wrapped[i] = strzone(substring(r, 0, strlen(r) - 1));
+       }
+}
+
+entity makeXonoticCampaignList()
+{
+       entity me;
+       me = spawnXonoticCampaignList();
+       me.configureXonoticCampaignList(me);
+       return me;
+}
+void configureXonoticCampaignListXonoticCampaignList(entity me)
+{
+       me.configureXonoticListBox(me);
+       me.campaignGlob = search_begin("maps/campaign*.txt", TRUE, TRUE);
+       me.loadCvars(me);
+       me.campaignGo(me, 0); // takes care of enabling/disabling buttons too
+}
+
+void destroyXonoticCampaignList(entity me)
+{
+       if(me.campaignGlob >= 0)
+               search_end(me.campaignGlob);
+}
+
+void loadCvarsXonoticCampaignList(entity me)
+{
+       // read campaign cvars
+       if(campaign_name)
+               strunzone(campaign_name);
+       if(me.cvarName)
+               strunzone(me.cvarName);
+       campaign_name = strzone(cvar_string("g_campaign_name"));
+       me.cvarName = strzone(strcat("g_campaign", campaign_name, "_index"));
+       registercvar(me.cvarName, "", 0); // saved by server QC anyway
+       CampaignFile_Unload();
+       CampaignFile_Load(0, CAMPAIGN_MAX_ENTRIES);
+       me.campaignIndex = bound(0, cvar(me.cvarName), campaign_entries);
+       cvar_set(me.cvarName, ftos(me.campaignIndex));
+       if(me.columnNameSize)
+               rewrapCampaign(me.columnNameSize, me.rowsPerItem - 3, me.emptyLineHeight, me.realFontSize);
+       me.nItems = min(me.campaignIndex + 2, campaign_entries);
+       me.selectedItem = min(me.campaignIndex, me.nItems - 1);
+       me.scrollPos = me.nItems * me.itemHeight - 1;
+       if(me.labelTitle)
+               me.labelTitle.setText(me.labelTitle, campaign_title);
+}
+
+void saveCvarsXonoticCampaignList(entity me)
+{
+       // write campaign cvars
+       // no reason to do this!
+       // cvar_set("g_campaign_name", campaign_name);
+       // cvar_set(me.cvarName, ftos(me.campaignIndex)); // NOTE: only server QC does that!
+}
+
+void campaignGoXonoticCampaignList(entity me, float step)
+{
+       float canNext, canPrev;
+       string s;
+       float i, j, n;
+
+       canNext = canPrev = 0;
+
+       if(me.campaignGlob >= 0)
+       {
+               n = search_getsize(me.campaignGlob);
+               if(n > 0)
+               {
+                       j = -1;
+                       s = strcat("maps/campaign", campaign_name, ".txt");
+                       for(i = 0; i < n; ++i)
+                       {
+                               if(search_getfilename(me.campaignGlob, i) == s)
+                                       j = i;
+                       }
+                       if(j < 0)
+                       {
+                               s = strcat("maps/campaign", cvar_defstring("g_campaign_name"), ".txt");
+                               for(i = 0; i < n; ++i)
+                               {
+                                       if(search_getfilename(me.campaignGlob, i) == s)
+                                               j = i;
+                               }
+                       }
+                       if(j < 0)
+                       {
+                               if(step >= 0)
+                                       j = 0;
+                               else
+                                       j = n - 1;
+                       }
+                       else
+                               j = mod(j + step, n);
+                       s = search_getfilename(me.campaignGlob, j);
+                       s = substring(s, 13, strlen(s) - 17);
+                       cvar_set("g_campaign_name", s);
+                       me.loadCvars(me);
+                       canNext = (j != n - 1);
+                       canPrev = (j != 0);
+               }
+       }
+
+       if(me.buttonNext)
+               me.buttonNext.disabled = !canNext;
+       if(me.buttonPrev)
+               me.buttonPrev.disabled = !canPrev;
+}
+
+void MultiCampaign_Next(entity btn, entity me)
+{
+       me.campaignGo(me, +1);
+}
+void MultiCampaign_Prev(entity btn, entity me)
+{
+       me.campaignGo(me, -1);
+}
+
+void drawXonoticCampaignList(entity me)
+{
+       if(cvar(me.cvarName) != me.campaignIndex || cvar_string("g_campaign_name") != campaign_name)
+               me.loadCvars(me);
+       drawListBox(me);
+}
+
+void resizeNotifyXonoticCampaignList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       me.itemAbsSize = '0 0 0';
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
+       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
+       me.realUpperMargin1 = 0.5 * me.realFontSize_y;
+       me.realUpperMargin2 = me.realUpperMargin1 + 2 * me.realFontSize_y;
+
+       me.checkMarkSize = (eX * (me.itemAbsSize_y / me.itemAbsSize_x) + eY) * 0.5;
+
+       me.columnPreviewOrigin = 0;
+       me.columnPreviewSize = me.itemAbsSize_y / me.itemAbsSize_x * 4 / 3;
+       me.columnCheckMarkSize = me.checkMarkSize_x;
+       me.columnNameSize = 1 - me.columnPreviewSize - me.columnCheckMarkSize - 4 * me.realFontSize_x;
+       me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize_x;
+       me.columnCheckMarkOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x * 2;
+
+       me.checkMarkOrigin = eY + eX * (me.columnCheckMarkOrigin + me.columnCheckMarkSize) - me.checkMarkSize;
+
+       rewrapCampaign(me.columnNameSize, me.rowsPerItem - 3, me.emptyLineHeight, me.realFontSize);
+}
+void clickListBoxItemXonoticCampaignList(entity me, float i, vector where)
+{
+       if(i == me.lastClickedMap)
+               if(time < me.lastClickedTime + 0.3)
+               {
+                       // DOUBLE CLICK!
+                       // start game
+                       CampaignList_LoadMap(me, me);
+                       return;
+               }
+       me.lastClickedMap = i;
+       me.lastClickedTime = time;
+}
+void drawListBoxItemXonoticCampaignList(entity me, float i, vector absSize, float isSelected)
+{
+       string s;
+       float p;
+       vector theColor;
+       float theAlpha;
+       float j, n;
+       vector o;
+
+       if(i < me.campaignIndex)
+       {
+               theAlpha = SKINALPHA_CAMPAIGN_SELECTABLE;
+               theColor = SKINCOLOR_CAMPAIGN_SELECTABLE;
+       }
+       else if(i == me.campaignIndex)
+       {
+               theAlpha = SKINALPHA_CAMPAIGN_CURRENT;
+               theColor = SKINCOLOR_CAMPAIGN_CURRENT;
+       }
+       else
+       {
+               theAlpha = SKINALPHA_CAMPAIGN_FUTURE;
+               theColor = SKINCOLOR_CAMPAIGN_FUTURE;
+       }
+
+       if(isSelected)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+
+       s = ftos(p);
+       draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+       if(i < me.campaignIndex)
+               draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
+       if(i <= me.campaignIndex)
+               s = campaign_shortdesc[i]; // fteqcc sucks
+       else
+               s = "???";
+       s = draw_TextShortenToWidth(strcat("Level ", ftos(i + 1), ": ", s), me.columnNameSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+
+       if(i <= me.campaignIndex)
+       {
+               s = campaign_longdesc_wrapped[i];
+               n = tokenizebyseparator(s, "\n");
+               o = me.realUpperMargin2 * eY + me.columnNameOrigin * eX;
+               for(j = 0; j < n; ++j)
+                       if(argv(j) != "")
+                       {
+                               draw_Text(o, argv(j), me.realFontSize, theColor, theAlpha * SKINALPHA_CAMPAIGN_DESCRIPTION, 0);
+                               o_y += me.realFontSize_y;
+                       }
+                       else
+                               o_y += me.realFontSize_y * me.emptyLineHeight;
+       }
+}
+void CampaignList_LoadMap(entity btn, entity me)
+{
+       if(me.selectedItem >= me.nItems || me.selectedItem < 0)
+               return;
+       CampaignSetup(me.selectedItem);
+}
+
+void setSelectedXonoticCampaignList(entity me, float i)
+{
+       // prevent too late items from being played
+       setSelectedListBox(me, min(i, me.campaignIndex));
+}
+
+float keyDownXonoticCampaignList(entity me, float scan, float ascii, float shift)
+{
+       if(scan == K_ENTER || scan == K_SPACE)
+               CampaignList_LoadMap(me, me);
+       else
+               return keyDownListBox(me, scan, ascii, shift);
+       return 1;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/charmap.c b/qcsrc/menu/xonotic/charmap.c
new file mode 100644 (file)
index 0000000..5547403
--- /dev/null
@@ -0,0 +1,144 @@
+#ifdef INTERFACE
+CLASS(XonoticCharmap) EXTENDS(Image)
+       METHOD(XonoticCharmap, configureXonoticCharmap, void(entity, entity))
+       METHOD(XonoticCharmap, mousePress, float(entity, vector))
+       METHOD(XonoticCharmap, mouseRelease, float(entity, vector))
+       METHOD(XonoticCharmap, mouseMove, float(entity, vector))
+       METHOD(XonoticCharmap, mouseDrag, float(entity, vector))
+       METHOD(XonoticCharmap, keyDown, float(entity, float, float, float))
+       METHOD(XonoticCharmap, focusLeave, void(entity))
+       METHOD(XonoticCharmap, draw, void(entity))
+       ATTRIB(XonoticCharmap, controlledTextbox, entity, NULL)
+       ATTRIB(XonoticCharmap, image, string, SKINGFX_CHARMAP)
+       ATTRIB(XonoticCharmap, image2, string, SKINGFX_CHARMAP_SELECTED)
+       ATTRIB(XonoticCharmap, focusable, float, 1)
+       ATTRIB(XonoticCharmap, previouslySelectedCharacterCell, float, -1)
+       ATTRIB(XonoticCharmap, selectedCharacterCell, float, 0)
+       ATTRIB(XonoticCharmap, mouseSelectedCharacterCell, float, -1)
+ENDCLASS(XonoticCharmap)
+entity makeXonoticCharmap(entity theTextbox);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticCharmap(entity theTextbox)
+{
+       entity me;
+       me = spawnXonoticCharmap();
+       me.configureXonoticCharmap(me, theTextbox);
+       return me;
+}
+
+string CharMap_CellToChar(float c)
+{
+       if (cvar("utf8_enable")) {
+               if(c == 13)
+                       return chr(0xE000 + 127);
+               else if(c < 32)
+                       return chr(0xE000 + c);
+               else
+                       return chr(0xE000 + c + 96);
+       } else {
+               if(c == 13)
+                       return chr(127);
+               else if(c < 32)
+                       return chr(c);
+               else
+                       return chr(c + 96);
+       }
+}
+
+void configureXonoticCharmapXonoticCharmap(entity me, entity theTextbox)
+{
+       me.controlledTextbox = theTextbox;
+       me.configureImage(me, me.image);
+}
+
+float mouseMoveXonoticCharmap(entity me, vector coords)
+{
+       float x, y, c;
+       x = floor(coords_x * 16);
+       y = floor(coords_y * 10);
+       if(x < 0 || y < 0 || x >= 16 || y >= 10)
+       {
+               me.mouseSelectedCharacterCell = -1;
+               return 0;
+       }
+       c = y * 16 + x;
+       if(c != me.mouseSelectedCharacterCell)
+               me.mouseSelectedCharacterCell = me.selectedCharacterCell = c;
+       return 1;
+}
+float mouseDragXonoticCharmap(entity me, vector coords)
+{
+       return me.mouseMove(me, coords);
+}
+float mousePressXonoticCharmap(entity me, vector coords)
+{
+       me.mouseMove(me, coords);
+       if(me.mouseSelectedCharacterCell >= 0)
+       {
+               me.pressed = 1;
+               me.previouslySelectedCharacterCell = me.selectedCharacterCell;
+       }
+       return 1;
+}
+float mouseReleaseXonoticCharmap(entity me, vector coords)
+{
+       if(!me.pressed)
+               return 0;
+       me.mouseMove(me, coords);
+       if(me.selectedCharacterCell == me.previouslySelectedCharacterCell)
+               me.controlledTextbox.enterText(me.controlledTextbox, CharMap_CellToChar(me.selectedCharacterCell));
+       me.pressed = 0;
+       return 1;
+}
+float keyDownXonoticCharmap(entity me, float key, float ascii, float shift)
+{
+       switch(key)
+       {
+               case K_LEFTARROW:
+                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 159, 160);
+                       return 1;
+               case K_RIGHTARROW:
+                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 1, 160);
+                       return 1;
+               case K_UPARROW:
+                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 144, 160);
+                       return 1;
+               case K_DOWNARROW:
+                       me.selectedCharacterCell = mod(me.selectedCharacterCell + 16, 160);
+                       return 1;
+               case K_HOME:
+                       me.selectedCharacterCell = 0;
+                       return 1;
+               case K_END:
+                       me.selectedCharacterCell = 159;
+                       return 1;
+               case K_SPACE:
+               case K_ENTER:
+               case K_INS:
+                       me.controlledTextbox.enterText(me.controlledTextbox, CharMap_CellToChar(me.selectedCharacterCell));
+                       return 1;
+               default:
+                       return me.controlledTextbox.keyDown(me.controlledTextbox, key, ascii, shift);
+       }
+}
+void focusLeaveXonoticCharmap(entity me)
+{
+       me.controlledTextbox.saveCvars(me.controlledTextbox);
+}
+void drawXonoticCharmap(entity me)
+{
+       if(me.focused)
+       {
+               if(!me.pressed || (me.selectedCharacterCell == me.previouslySelectedCharacterCell))
+               {
+                       vector c;
+                       c = eX * (mod(me.selectedCharacterCell, 16) / 16.0);
+                       c += eY * (floor(me.selectedCharacterCell / 16.0) / 10.0);
+                       draw_Picture(c, me.image2, '0.0625 0.1 0', '1 1 1', 1);
+               }
+       }
+       drawImage(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/checkbox.c b/qcsrc/menu/xonotic/checkbox.c
new file mode 100644 (file)
index 0000000..ad8216a
--- /dev/null
@@ -0,0 +1,101 @@
+#ifdef INTERFACE
+CLASS(XonoticCheckBox) EXTENDS(CheckBox)
+       METHOD(XonoticCheckBox, configureXonoticCheckBox, void(entity, float, float, string, string))
+       METHOD(XonoticCheckBox, setChecked, void(entity, float))
+       ATTRIB(XonoticCheckBox, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticCheckBox, image, string, SKINGFX_CHECKBOX)
+       ATTRIB(XonoticCheckBox, yesValue, float, 1)
+       ATTRIB(XonoticCheckBox, noValue, float, 0)
+
+       ATTRIB(XonoticCheckBox, color, vector, SKINCOLOR_CHECKBOX_N)
+       ATTRIB(XonoticCheckBox, colorC, vector, SKINCOLOR_CHECKBOX_C)
+       ATTRIB(XonoticCheckBox, colorF, vector, SKINCOLOR_CHECKBOX_F)
+       ATTRIB(XonoticCheckBox, colorD, vector, SKINCOLOR_CHECKBOX_D)
+
+       ATTRIB(XonoticCheckBox, cvarName, string, string_null)
+       METHOD(XonoticCheckBox, loadCvars, void(entity))
+       METHOD(XonoticCheckBox, saveCvars, void(entity))
+
+       ATTRIB(XonoticCheckBox, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticCheckBox, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticCheckBox)
+entity makeXonoticCheckBox(float, string, string);
+entity makeXonoticCheckBoxEx(float, float, string, string);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
+{
+       float y, n;
+       if(isInverted > 1)
+       {
+               n = isInverted - 1;
+               y = -n;
+       }
+       else if(isInverted < -1)
+       {
+               n = isInverted + 1;
+               y = -n;
+       }
+       else if(isInverted == 1)
+       {
+               n = 1;
+               y = 0;
+       }
+       else
+       {
+               n = 0;
+               y = 1;
+       }
+       return makeXonoticCheckBoxEx(y, n, theCvar, theText);
+}
+entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText)
+{
+       entity me;
+       me = spawnXonoticCheckBox();
+       me.configureXonoticCheckBox(me, theYesValue, theNoValue, theCvar, theText);
+       return me;
+}
+void configureXonoticCheckBoxXonoticCheckBox(entity me, float theYesValue, float theNoValue, string theCvar, string theText)
+{
+       me.yesValue = theYesValue;
+       me.noValue = theNoValue;
+       me.checked = 0;
+       if(theCvar)
+       {
+               me.cvarName = theCvar;
+               me.tooltip = getZonedTooltipForIdentifier(theCvar);
+               me.loadCvars(me);
+       }
+       me.configureCheckBox(me, theText, me.fontSize, me.image);
+}
+void setCheckedXonoticCheckBox(entity me, float val)
+{
+       if(val != me.checked)
+       {
+               me.checked = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticCheckBox(entity me)
+{
+       float m, d;
+
+       if not(me.cvarName)
+               return;
+
+       m = (me.yesValue + me.noValue) * 0.5;
+       d = (cvar(me.cvarName) - m) / (me.yesValue - m);
+       me.checked = (d > 0);
+}
+void saveCvarsXonoticCheckBox(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       if(me.checked)
+               cvar_set(me.cvarName, ftos(me.yesValue));
+       else
+               cvar_set(me.cvarName, ftos(me.noValue));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/checkbox_slider_invalid.c b/qcsrc/menu/xonotic/checkbox_slider_invalid.c
new file mode 100644 (file)
index 0000000..ea05c3f
--- /dev/null
@@ -0,0 +1,64 @@
+#ifdef INTERFACE
+CLASS(XonoticSliderCheckBox) EXTENDS(CheckBox)
+       METHOD(XonoticSliderCheckBox, configureXonoticSliderCheckBox, void(entity, float, float, entity, string))
+       METHOD(XonoticSliderCheckBox, setChecked, void(entity, float))
+       METHOD(XonoticSliderCheckBox, draw, void(entity))
+       ATTRIB(XonoticSliderCheckBox, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticSliderCheckBox, image, string, SKINGFX_CHECKBOX)
+
+       ATTRIB(XonoticSliderCheckBox, color, vector, SKINCOLOR_CHECKBOX_N)
+       ATTRIB(XonoticSliderCheckBox, colorC, vector, SKINCOLOR_CHECKBOX_C)
+       ATTRIB(XonoticSliderCheckBox, colorF, vector, SKINCOLOR_CHECKBOX_F)
+       ATTRIB(XonoticSliderCheckBox, colorD, vector, SKINCOLOR_CHECKBOX_D)
+
+       ATTRIB(XonoticSliderCheckBox, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticSliderCheckBox, disabledAlpha, float, SKINALPHA_DISABLED)
+
+       ATTRIB(XonoticSliderCheckBox, controlledSlider, entity, NULL)
+       ATTRIB(XonoticSliderCheckBox, offValue, float, -1)
+       ATTRIB(XonoticSliderCheckBox, inverted, float, 0)
+       ATTRIB(XonoticSliderCheckBox, savedValue, float, -1)
+ENDCLASS(XonoticSliderCheckBox)
+entity makeXonoticSliderCheckBox(float, float, entity, string);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity theControlledSlider, string theText)
+{
+       entity me;
+       me = spawnXonoticSliderCheckBox();
+       me.configureXonoticSliderCheckBox(me, theOffValue, isInverted, theControlledSlider, theText);
+       return me;
+}
+void configureXonoticSliderCheckBoxXonoticSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText)
+{
+       me.offValue = theOffValue;
+       me.inverted = isInverted;
+       me.checked = (theControlledSlider.value == theOffValue);
+       if(theControlledSlider.value == median(theControlledSlider.valueMin, theControlledSlider.value, theControlledSlider.valueMax))
+               me.savedValue = theControlledSlider.value;
+       else
+               me.savedValue = theControlledSlider.valueMin; 
+       me.controlledSlider = theControlledSlider;
+       me.configureCheckBox(me, theText, me.fontSize, me.image);
+       me.tooltip = theControlledSlider.tooltip;
+}
+void drawXonoticSliderCheckBox(entity me)
+{
+       me.checked = ((me.controlledSlider.value == me.offValue) != me.inverted);
+       if(me.controlledSlider.value == median(me.controlledSlider.valueMin, me.controlledSlider.value, me.controlledSlider.valueMax))
+               me.savedValue = me.controlledSlider.value;
+       drawCheckBox(me);
+}
+void setCheckedXonoticSliderCheckBox(entity me, float val)
+{
+       if(me.checked == val)
+               return;
+       me.checked = val;
+       if(val == me.inverted)
+               me.controlledSlider.setValue(me.controlledSlider, median(me.controlledSlider.valueMin, me.savedValue, me.controlledSlider.valueMax));
+       else
+               me.controlledSlider.setValue(me.controlledSlider, me.offValue);
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/colorbutton.c b/qcsrc/menu/xonotic/colorbutton.c
new file mode 100644 (file)
index 0000000..84281b6
--- /dev/null
@@ -0,0 +1,76 @@
+#ifdef INTERFACE
+CLASS(XonoticColorButton) EXTENDS(RadioButton)
+       METHOD(XonoticColorButton, configureXonoticColorButton, void(entity, float, float, float))
+       METHOD(XonoticColorButton, setChecked, void(entity, float))
+       METHOD(XonoticColorButton, draw, void(entity))
+       ATTRIB(XonoticColorButton, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticColorButton, image, string, SKINGFX_COLORBUTTON)
+       ATTRIB(XonoticColorButton, image2, string, SKINGFX_COLORBUTTON_COLOR)
+
+       ATTRIB(XonoticColorButton, useDownAsChecked, float, 1)
+
+       ATTRIB(XonoticColorButton, cvarPart, float, 0)
+       ATTRIB(XonoticColorButton, cvarName, string, string_null)
+       ATTRIB(XonoticColorButton, cvarValueFloat, float, 0)
+       METHOD(XonoticColorButton, loadCvars, void(entity))
+       METHOD(XonoticColorButton, saveCvars, void(entity))
+ENDCLASS(XonoticColorButton)
+entity makeXonoticColorButton(float, float, float);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticColorButton(float theGroup, float theColor, float theValue)
+{
+       entity me;
+       me = spawnXonoticColorButton();
+       me.configureXonoticColorButton(me, theGroup, theColor, theValue);
+       return me;
+}
+void configureXonoticColorButtonXonoticColorButton(entity me, float theGroup, float theColor, float theValue)
+{
+       me.cvarName = "_cl_color";
+       me.cvarValueFloat = theValue;
+       me.cvarPart = theColor;
+       me.loadCvars(me);
+       me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
+       me.srcMulti = 1;
+       me.src2 = me.image2;
+}
+void setCheckedXonoticColorButton(entity me, float val)
+{
+       if(val != me.checked)
+       {
+               me.checked = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticColorButton(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       if(me.cvarPart == 1)
+               me.checked = (cvar(me.cvarName) & 240) == me.cvarValueFloat * 16;
+       else
+               me.checked = (cvar(me.cvarName) & 15) == me.cvarValueFloat;
+}
+void saveCvarsXonoticColorButton(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       if(me.checked)
+       {
+               if(me.cvarPart == 1)
+                       cvar_set(me.cvarName, ftos(cvar(me.cvarName) & 15 + me.cvarValueFloat * 16));
+               else
+                       cvar_set(me.cvarName, ftos(cvar(me.cvarName) & 240 + me.cvarValueFloat));
+       }
+       // TODO on an apply button, read _cl_color and execute the color command for it
+}
+void drawXonoticColorButton(entity me)
+{
+       me.color2 = colormapPaletteColor(me.cvarValueFloat, me.cvarPart);
+       drawCheckBox(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/colorpicker.c b/qcsrc/menu/xonotic/colorpicker.c
new file mode 100644 (file)
index 0000000..a8403ae
--- /dev/null
@@ -0,0 +1,134 @@
+#ifdef INTERFACE
+CLASS(XonoticColorpicker) EXTENDS(Image)
+       METHOD(XonoticColorpicker, configureXonoticColorpicker, void(entity, entity))
+       METHOD(XonoticColorpicker, mousePress, float(entity, vector))
+       METHOD(XonoticColorpicker, mouseRelease, float(entity, vector))
+       METHOD(XonoticColorpicker, mouseDrag, float(entity, vector))
+       ATTRIB(XonoticColorpicker, controlledTextbox, entity, NULL)
+       ATTRIB(XonoticColorpicker, image, string, SKINGFX_COLORPICKER)
+       ATTRIB(XonoticColorpicker, imagemargin, vector, SKINMARGIN_COLORPICKER)
+       ATTRIB(XonoticColorpicker, focusable, float, 1)
+       METHOD(XonoticColorpicker, focusLeave, void(entity))
+       METHOD(XonoticColorpicker, keyDown, float(entity, float, float, float))
+       METHOD(XonoticColorpicker, draw, void(entity))
+ENDCLASS(XonoticColorpicker)
+entity makeXonoticColorpicker(entity theTextbox);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticColorpicker(entity theTextbox)
+{
+       entity me;
+       me = spawnXonoticColorpicker();
+       me.configureXonoticColorpicker(me, theTextbox);
+       return me;
+}
+
+void configureXonoticColorpickerXonoticColorpicker(entity me, entity theTextbox)
+{
+       me.controlledTextbox = theTextbox;
+       me.configureImage(me, me.image);
+}
+
+float mousePressXonoticColorpicker(entity me, vector coords)
+{
+       me.mouseDrag(me, coords);
+       return 1;
+}
+
+// must match hslimage.c
+vector hslimage_color(vector v, vector margin)
+{
+    v_x = (v_x - margin_x) / (1 - 2 * margin_x);
+    v_y = (v_y - margin_y) / (1 - 2 * margin_y);
+    if(v_x < 0) v_x = 0;
+    if(v_y < 0) v_y = 0;
+    if(v_x > 1) v_x = 1;
+    if(v_y > 1) v_y = 1;
+    if(v_y > 0.875) // grey bar
+        return hsl_to_rgb(eZ * v_x);
+    else
+        return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ);
+}
+
+float mouseDragXonoticColorpicker(entity me, vector coords)
+{
+       float i;
+       for(;;)
+       {
+               i = me.controlledTextbox.cursorPos;
+               if(i >= 2)
+               {
+                       if(substring(me.controlledTextbox.text, i-2, 1) == "^")
+                               if(strstrofs("0123456789", substring(me.controlledTextbox.text, i-1, 1), 0) >= 0)
+                               {
+                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                       continue;
+                               }
+               }
+
+               if(i >= 5)
+               {
+                       if(substring(me.controlledTextbox.text, i-5, 2) == "^x")
+                               if(strstrofs("0123456789abcdefABCDEF", substring(me.controlledTextbox.text, i-3, 1), 0) >= 0)
+                                       if(strstrofs("0123456789abcdefABCDEF", substring(me.controlledTextbox.text, i-2, 1), 0) >= 0)
+                                               if(strstrofs("0123456789abcdefABCDEF", substring(me.controlledTextbox.text, i-1, 1), 0) >= 0)
+                                               {
+                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                                       me.controlledTextbox.keyDown(me.controlledTextbox, K_BACKSPACE, 8, 0);
+                                                       continue;
+                                               }
+               }
+               break;
+       }
+
+       vector margin;
+       margin = me.imagemargin;
+       if(coords_x >= margin_x)
+       if(coords_y >= margin_y)
+       if(coords_x <= 1 - margin_x)
+       if(coords_y <= 1 - margin_y)
+               me.controlledTextbox.enterText(me.controlledTextbox, rgb_to_hexcolor(hslimage_color(coords, margin)));
+
+       return 1;
+}
+
+float mouseReleaseXonoticColorpicker(entity me, vector coords)
+{
+       me.mouseDrag(me, coords);
+       return 1;
+}
+
+void focusLeaveXonoticColorpicker(entity me)
+{
+       me.controlledTextbox.saveCvars(me.controlledTextbox);
+}
+float keyDownXonoticColorpicker(entity me, float key, float ascii, float shift)
+{
+       return me.controlledTextbox.keyDown(me.controlledTextbox, key, ascii, shift);
+}
+void drawXonoticColorpicker(entity me)
+{
+       drawImage(me);
+
+       float B, C, aC;
+       C = cvar("r_textcontrast");
+       B = cvar("r_textbrightness");
+
+       // for this to work, C/(1-B) must be in 0..1
+       // B must be < 1
+       // C must be < 1-B
+       
+       B = bound(0, B, 1);
+       C = bound(0, C, 1-B);
+
+       aC = 1 - C / (1 - B);
+
+       draw_Picture(me.imgOrigin, strcat(me.src, "_m"), me.imgSize, '0 0 0', aC);
+       draw_Picture(me.imgOrigin, strcat(me.src, "_m"), me.imgSize, me.color, B);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/commandbutton.c b/qcsrc/menu/xonotic/commandbutton.c
new file mode 100644 (file)
index 0000000..b54805c
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef COMMANDBUTTON_CLOSE
+# define COMMANDBUTTON_CLOSE 1
+# define COMMANDBUTTON_APPLY 2
+//# define COMMANDBUTTON_REVERT 4
+#endif
+
+#ifdef INTERFACE
+CLASS(XonoticCommandButton) EXTENDS(XonoticButton)
+       METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float))
+       ATTRIB(XonoticCommandButton, onClickCommand, string, string_null)
+       ATTRIB(XonoticCommandButton, flags, float, 0)
+ENDCLASS(XonoticCommandButton)
+entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags)
+{
+       entity me;
+       me = spawnXonoticCommandButton();
+       me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags);
+       return me;
+}
+
+void XonoticCommandButton_Click(entity me, entity other)
+{
+       //if(me.flags & COMMANDBUTTON_APPLY)
+       //      saveAllCvars(me.parent);
+       cmd("\n", me.onClickCommand, "\n");
+       //if(me.flags & COMMANDBUTTON_REVERT)
+       //      loadAllCvars(me.parent);
+       if(me.flags & COMMANDBUTTON_CLOSE)
+               m_goto(string_null);
+}
+
+void configureXonoticCommandButtonXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
+{
+       me.configureXonoticButton(me, theText, theColor);
+       me.onClickCommand = theCommand;
+       me.flags = theFlags;
+       me.onClick = XonoticCommandButton_Click;
+       me.onClickEntity = me;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/credits.c b/qcsrc/menu/xonotic/credits.c
new file mode 100644 (file)
index 0000000..9beb213
--- /dev/null
@@ -0,0 +1,113 @@
+#ifdef INTERFACE
+CLASS(XonoticCreditsList) EXTENDS(XonoticListBox)
+       METHOD(XonoticCreditsList, configureXonoticCreditsList, void(entity))
+       ATTRIB(XonoticCreditsList, rowsPerItem, float, 1)
+       METHOD(XonoticCreditsList, draw, void(entity))
+       METHOD(XonoticCreditsList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticCreditsList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticCreditsList, keyDown, float(entity, float, float, float))
+       METHOD(XonoticCreditsList, destroy, void(entity))
+
+       ATTRIB(XonoticCreditsList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticCreditsList, realUpperMargin, float, 0)
+       ATTRIB(XonoticCreditsList, bufferIndex, float, 0)
+       ATTRIB(XonoticCreditsList, scrolling, float, 0)
+
+       ATTRIB(XonoticListBox, alphaBG, float, 0)
+ENDCLASS(XonoticCreditsList)
+entity makeXonoticCreditsList();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticCreditsList()
+{
+       entity me;
+       me = spawnXonoticCreditsList();
+       me.configureXonoticCreditsList(me);
+       return me;
+}
+void configureXonoticCreditsListXonoticCreditsList(entity me)
+{
+       me.configureXonoticListBox(me);
+       // load the file
+       me.bufferIndex = buf_load("xonotic-credits.txt");
+       me.nItems = buf_getsize(me.bufferIndex);
+}
+void destroyXonoticCreditsList(entity me)
+{
+       buf_del(me.bufferIndex);
+}
+void drawXonoticCreditsList(entity me)
+{
+       float i;
+       if(me.scrolling)
+       {
+               me.scrollPos = bound(0, (time - me.scrolling) * me.itemHeight, me.nItems * me.itemHeight - 1);
+               i = min(me.selectedItem, floor((me.scrollPos + 1) / me.itemHeight - 1));
+               i = max(i, ceil(me.scrollPos / me.itemHeight));
+               me.setSelected(me, i);
+       }
+       drawListBox(me);
+}
+void resizeNotifyXonoticCreditsList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
+       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
+       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+}
+void drawListBoxItemXonoticCreditsList(entity me, float i, vector absSize, float isSelected)
+{
+       // layout: Ping, Credits name, Map name, NP, TP, MP
+       string s;
+       float theAlpha;
+       vector theColor;
+
+       s = bufstr_get(me.bufferIndex, i);
+
+       if(substring(s, 0, 2) == "**")
+       {
+               s = substring(s, 2, strlen(s) - 2);
+               theColor = SKINCOLOR_CREDITS_TITLE;
+               theAlpha = SKINALPHA_CREDITS_TITLE;
+       }
+       else if(substring(s, 0, 1) == "*")
+       {
+               s = substring(s, 1, strlen(s) - 1);
+               theColor = SKINCOLOR_CREDITS_FUNCTION;
+               theAlpha = SKINALPHA_CREDITS_FUNCTION;
+       }
+       else
+       {
+               theColor = SKINCOLOR_CREDITS_PERSON;
+               theAlpha = SKINALPHA_CREDITS_PERSON;
+       }
+
+       draw_CenterText(me.realUpperMargin * eY + 0.5 * eX, s, me.realFontSize, theColor, theAlpha, 0);
+}
+
+float keyDownXonoticCreditsList(entity me, float scan, float ascii, float shift)
+{
+       float i;
+       me.dragScrollTimer = time;
+       me.scrolling = 0;
+
+       if(scan == K_PGUP)
+               me.scrollPos = max(me.scrollPos - 0.5, 0);
+       else if(scan == K_PGDN)
+               me.scrollPos = min(me.scrollPos + 0.5, me.nItems * me.itemHeight - 1);
+       else if(scan == K_UPARROW)
+               me.scrollPos = max(me.scrollPos - me.itemHeight, 0);
+       else if(scan == K_DOWNARROW)
+               me.scrollPos = min(me.scrollPos + me.itemHeight, me.nItems * me.itemHeight - 1);
+       else
+               return keyDownListBox(me, scan, ascii, shift);
+
+       i = min(me.selectedItem, floor((me.scrollPos + 1) / me.itemHeight - 1));
+       i = max(i, ceil(me.scrollPos / me.itemHeight));
+       me.setSelected(me, i);
+
+       return 1;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/crosshairbutton.c b/qcsrc/menu/xonotic/crosshairbutton.c
new file mode 100644 (file)
index 0000000..209677f
--- /dev/null
@@ -0,0 +1,87 @@
+#ifdef INTERFACE
+CLASS(XonoticCrosshairButton) EXTENDS(RadioButton)
+       METHOD(XonoticCrosshairButton, configureXonoticCrosshairButton, void(entity, float, float))
+       METHOD(XonoticCrosshairButton, setChecked, void(entity, float))
+       METHOD(XonoticCrosshairButton, draw, void(entity))
+       ATTRIB(XonoticCrosshairButton, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticCrosshairButton, image, string, SKINGFX_CROSSHAIRBUTTON)
+
+       ATTRIB(XonoticCrosshairButton, useDownAsChecked, float, 1)
+       ATTRIB(XonoticCrosshairButton, src3, string, string_null)
+
+       ATTRIB(XonoticCrosshairButton, cvarName, string, string_null)
+       ATTRIB(XonoticCrosshairButton, cvarValueFloat, float, 0)
+       METHOD(XonoticCrosshairButton, loadCvars, void(entity))
+       METHOD(XonoticCrosshairButton, saveCvars, void(entity))
+ENDCLASS(XonoticCrosshairButton)
+entity makeXonoticCrosshairButton(float, float);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticCrosshairButton(float theGroup, float theCrosshair)
+{
+       entity me;
+       me = spawnXonoticCrosshairButton();
+       me.configureXonoticCrosshairButton(me, theGroup, theCrosshair);
+       return me;
+}
+void configureXonoticCrosshairButtonXonoticCrosshairButton(entity me, float theGroup, float theCrosshair)
+{
+       me.cvarName = "crosshair";
+       me.cvarValueFloat = theCrosshair;
+       me.loadCvars(me);
+       me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
+       me.srcMulti = 1;
+       me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
+}
+void setCheckedXonoticCrosshairButton(entity me, float val)
+{
+       if(val != me.checked)
+       {
+               me.checked = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticCrosshairButton(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       me.checked = (cvar(me.cvarName) == me.cvarValueFloat);
+}
+void saveCvarsXonoticCrosshairButton(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       if(me.checked)
+               cvar_set(me.cvarName, ftos(me.cvarValueFloat));
+       // TODO on an apply button, read _cl_color and execute the color command for it
+}
+void drawXonoticCrosshairButton(entity me)
+{
+       vector sz, rgb;
+       float a;
+
+       rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");
+       a = cvar("crosshair_color_alpha");
+
+       if(!me.checked && !me.focused)
+       {
+               a *= me.disabledAlpha;
+               rgb = '1 1 1';
+       }
+
+       drawCheckBox(me);
+
+       sz = draw_PictureSize(me.src3);
+       sz = globalToBoxSize(sz, draw_scale);
+       sz = sz * cvar("crosshair_size");
+       if(sz_x > 0.95)
+               sz = sz * (0.95 / sz_x);
+       if(sz_y > 0.95)
+               sz = sz * (0.95 / sz_y);
+
+       draw_Picture('0.5 0.5 0' - 0.5 * sz, me.src3, sz, rgb, a);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/cvarlist.c b/qcsrc/menu/xonotic/cvarlist.c
new file mode 100644 (file)
index 0000000..cf3cd94
--- /dev/null
@@ -0,0 +1,178 @@
+#ifdef INTERFACE
+CLASS(XonoticCvarList) EXTENDS(XonoticListBox)
+       METHOD(XonoticCvarList, configureXonoticCvarList, void(entity))
+       ATTRIB(XonoticCvarList, rowsPerItem, float, 1)
+       METHOD(XonoticCvarList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticCvarList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticCvarList, keyDown, float(entity, float, float, float))
+
+       METHOD(XonoticCvarList, destroy, void(entity))
+
+       ATTRIB(XonoticCvarList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticCvarList, realUpperMargin, float, 0)
+       ATTRIB(XonoticCvarList, columnNameOrigin, float, 0)
+       ATTRIB(XonoticCvarList, columnNameSize, float, 0)
+       ATTRIB(XonoticCvarList, columnValueOrigin, float, 0)
+       ATTRIB(XonoticCvarList, columnValueSize, float, 0)
+
+       METHOD(XonoticCvarList, setSelected, void(entity, float))
+       ATTRIB(XonoticCvarList, controlledTextbox, entity, NULL)
+       ATTRIB(XonoticCvarList, cvarNameBox, entity, NULL)
+       ATTRIB(XonoticCvarList, cvarDescriptionBox, entity, NULL)
+       ATTRIB(XonoticCvarList, cvarTypeBox, entity, NULL)
+       ATTRIB(XonoticCvarList, cvarValueBox, entity, NULL)
+       ATTRIB(XonoticCvarList, cvarDefaultBox, entity, NULL)
+
+       ATTRIB(XonoticCvarList, handle, float, -1)
+       ATTRIB(XonoticCvarList, cvarName, string, string_null)
+       ATTRIB(XonoticCvarList, cvarDescription, string, string_null)
+       ATTRIB(XonoticCvarList, cvarType, string, string_null)
+       ATTRIB(XonoticCvarList, cvarDefault, string, string_null)
+ENDCLASS(XonoticCvarList)
+entity makeXonoticCvarList();
+void CvarList_Filter_Change(entity box, entity me);
+void CvarList_Value_Change(entity box, entity me);
+void CvarList_Revert_Click(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticCvarList()
+{
+       entity me;
+       me = spawnXonoticCvarList();
+       me.configureXonoticCvarList(me);
+       return me;
+}
+void configureXonoticCvarListXonoticCvarList(entity me)
+{
+       me.configureXonoticListBox(me);
+
+       me.handle = buf_create();
+       buf_cvarlist(me.handle, "", "_");
+       me.nItems = buf_getsize(me.handle);
+}
+void destroyXonoticCvarList(entity me)
+{
+       buf_del(me.handle);
+}
+void setSelectedXonoticCvarList(entity me, float i)
+{
+       string s;
+
+       setSelectedListBox(me, i);
+       if(me.nItems == 0)
+               return;
+       
+       if(me.cvarName)
+               strunzone(me.cvarName);
+       if(me.cvarDescription)
+               strunzone(me.cvarDescription);
+       if(me.cvarType)
+               strunzone(me.cvarType);
+       if(me.cvarDefault)
+               strunzone(me.cvarDefault);
+       me.cvarName = strzone(bufstr_get(me.handle, me.selectedItem));
+       me.cvarDescription = strzone(cvar_description(me.cvarName));
+       me.cvarDefault = strzone(cvar_defstring(me.cvarName));
+
+       float t;
+       t = cvar_type(me.cvarName);
+       me.cvarType = "";
+       if(t & CVAR_TYPEFLAG_SAVED)
+               me.cvarType = strcat(me.cvarType, ", will be saved to config.cfg");
+       else
+               me.cvarType = strcat(me.cvarType, ", will not be saved");
+       if(t & CVAR_TYPEFLAG_PRIVATE)
+               me.cvarType = strcat(me.cvarType, ", private");
+       if(t & CVAR_TYPEFLAG_ENGINE)
+               me.cvarType = strcat(me.cvarType, ", engine setting");
+       if(t & CVAR_TYPEFLAG_READONLY)
+               me.cvarType = strcat(me.cvarType, ", read only");
+       me.cvarType = strzone(substring(me.cvarType, 2, strlen(me.cvarType) - 2));
+
+       me.cvarNameBox.setText(me.cvarNameBox, me.cvarName);
+       me.cvarDescriptionBox.setText(me.cvarDescriptionBox, me.cvarDescription);
+       me.cvarTypeBox.setText(me.cvarTypeBox, me.cvarType);
+       me.cvarDefaultBox.setText(me.cvarDefaultBox, me.cvarDefault);
+
+       // this one can handle tempstrings
+       s = cvar_string(me.cvarName);
+       me.cvarValueBox.setText(me.cvarValueBox, s);
+       me.cvarValueBox.cursorPos = strlen(s);
+}
+void CvarList_Filter_Change(entity box, entity me)
+{
+       buf_cvarlist(me.handle, box.text, "_");
+       me.nItems = buf_getsize(me.handle);
+
+       me.setSelected(me, 0);
+}
+void resizeNotifyXonoticCvarList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
+       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
+       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+
+       me.columnNameOrigin = 0;
+       me.columnValueSize = me.realFontSize_x * 20;
+       me.columnNameSize = 1 - me.columnValueSize - me.realFontSize_x;
+       me.columnValueOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
+
+       me.setSelected(me, me.selectedItem);
+}
+void drawListBoxItemXonoticCvarList(entity me, float i, vector absSize, float isSelected)
+{
+       string k, v, d;
+       float t;
+
+       vector theColor;
+       float theAlpha;
+
+       string s;
+
+       if(isSelected)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+       
+       k = bufstr_get(me.handle, i);
+
+       v = cvar_string(k);
+       d = cvar_defstring(k);
+       t = cvar_type(k);
+       if(t & CVAR_TYPEFLAG_SAVED)
+               theAlpha = SKINALPHA_CVARLIST_SAVED;
+       else
+               theAlpha = SKINALPHA_CVARLIST_TEMPORARY;
+       if(v == d)
+               theColor = SKINCOLOR_CVARLIST_UNCHANGED;
+       else
+               theColor = SKINCOLOR_CVARLIST_CHANGED;
+
+       s = draw_TextShortenToWidth(k, me.columnNameSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       s = draw_TextShortenToWidth(v, me.columnValueSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin * eY + me.columnValueOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
+}
+
+float keyDownXonoticCvarList(entity me, float scan, float ascii, float shift)
+{
+       if(keyDownListBox(me, scan, ascii, shift))
+               return 1;
+       else if(!me.controlledTextbox)
+               return 0;
+       else
+               return me.controlledTextbox.keyDown(me.controlledTextbox, scan, ascii, shift);
+}
+
+void CvarList_Value_Change(entity box, entity me)
+{
+       cvar_set(me.cvarNameBox.text, box.text);
+}
+
+void CvarList_Revert_Click(entity btn, entity me)
+{
+       me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
+       me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/demolist.c b/qcsrc/menu/xonotic/demolist.c
new file mode 100644 (file)
index 0000000..7a2d338
--- /dev/null
@@ -0,0 +1,166 @@
+#ifdef INTERFACE
+CLASS(XonoticDemoList) EXTENDS(XonoticListBox)
+    METHOD(XonoticDemoList, configureXonoticDemoList, void(entity))
+    ATTRIB(XonoticDemoList, rowsPerItem, float, 1)
+    METHOD(XonoticDemoList, resizeNotify, void(entity, vector, vector, vector, vector))
+    METHOD(XonoticDemoList, drawListBoxItem, void(entity, float, vector, float))
+    METHOD(XonoticDemoList, getDemos, void(entity))
+    METHOD(XonoticDemoList, startDemo, void(entity))    
+    METHOD(XonoticDemoList, demoName, string(entity, float))
+    METHOD(XonoticDemoList, clickListBoxItem, void(entity, float, vector))
+    METHOD(XonoticDemoList, keyDown, float(entity, float, float, float))
+    METHOD(XonoticDemoList, destroy, void(entity))
+    METHOD(XonoticDemoList, showNotify, void(entity))
+    ATTRIB(XonoticDemoList, listDemo, float, -1)
+    ATTRIB(XonoticDemoList, realFontSize, vector, '0 0 0')
+    ATTRIB(XonoticDemoList, columnNameOrigin, float, 0)
+    ATTRIB(XonoticDemoList, columnNameSize, float, 0)
+    ATTRIB(XonoticDemoList, realUpperMargin, float, 0)
+    ATTRIB(XonoticDemoList, origin, vector, '0 0 0')
+    ATTRIB(XonoticDemoList, itemAbsSize, vector, '0 0 0')
+    ATTRIB(XonoticDemoList, lastClickedDemo, float, -1)
+    ATTRIB(XonoticDemoList, lastClickedTime, float, 0)
+    ATTRIB(XonoticDemoList, filterString, string, string_null)    
+ENDCLASS(XonoticDemoList)
+
+entity makeXonoticDemoList();
+void StartDemo_Click(entity btn, entity me);
+void TimeDemo_Click(entity btn, entity me);
+void DemoList_Filter_Change(entity box, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+
+entity makeXonoticDemoList()
+{
+    entity me;
+    me = spawnXonoticDemoList();
+    me.configureXonoticDemoList(me);
+    return me;
+}
+
+void configureXonoticDemoListXonoticDemoList(entity me)
+{
+    me.configureXonoticListBox(me);
+    me.getDemos(me);    
+}
+
+string demoNameXonoticDemoList(entity me, float i )
+{
+    string s;
+    s = search_getfilename(me.listDemo, i);
+    s = substring(s, 6, strlen(s) - 6 - 4);  // demos/, .dem
+    return s;
+}
+
+
+void getDemosXonoticDemoList(entity me)
+{
+    string s;
+    
+    if(me.filterString)
+       //subdirectory in filterString allowed    
+       s=strcat("demos/*", me.filterString, "*.dem");          
+    else
+       s="demos/*.dem";
+       
+    //dprint("Search demos with the pattern ", s, "\n");    
+       if(me.listDemo >= 0)
+               search_end(me.listDemo);
+    me.listDemo = search_begin(s, FALSE, TRUE);
+    if(me.listDemo < 0)
+       me.nItems=0;
+    else
+       me.nItems=search_getsize(me.listDemo);                          
+}
+
+void destroyXonoticDemoList(entity me)
+{
+    search_end(me.listDemo);
+}
+
+void resizeNotifyXonoticDemoList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+    me.itemAbsSize = '0 0 0';
+    resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+    me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
+    me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
+    me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+
+    me.columnNameOrigin = me.realFontSize_x;
+    me.columnNameSize = 1 - 2 * me.realFontSize_x;
+}
+
+void drawListBoxItemXonoticDemoList(entity me, float i, vector absSize, float isSelected)
+{
+    string s;
+    if(isSelected)
+       draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+               
+    s = me.demoName(me,i);
+    s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
+    draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);              
+}
+
+void showNotifyXonoticDemoList(entity me)
+{
+    me.getDemos(me);
+}
+
+void DemoList_Filter_Change(entity box, entity me)
+{      
+    if(me.filterString)
+       strunzone(me.filterString);
+    
+    if(box.text != "")
+       me.filterString = strzone(box.text);
+    else
+       me.filterString = string_null;
+               
+    me.getDemos(me);
+}
+
+void startDemoXonoticDemoList(entity me)
+{
+    string s;
+    s = me.demoName(me,me.selectedItem);
+    localcmd("playdemo demos/", s, ".dem\nwait\ntogglemenu\n");        
+}
+
+void StartDemo_Click(entity btn, entity me)
+{
+    me.startDemo(me);
+}
+
+void TimeDemo_Click(entity btn, entity me)
+{
+    string s;
+    s = me.demoName(me,me.selectedItem);
+    localcmd("timedemo demos/", s, ".dem\nwait\ntogglemenu\n");        
+}
+
+void clickListBoxItemXonoticDemoList(entity me, float i, vector where)
+{
+    if(i == me.lastClickedDemo)
+        if(time < me.lastClickedTime + 0.3)
+        {
+            // DOUBLE CLICK!
+            me.setSelected(me, i);
+            me.startDemo(me);
+        }
+    me.lastClickedDemo = i;
+    me.lastClickedTime = time;
+}
+
+float keyDownXonoticDemoList(entity me, float scan, float ascii, float shift)
+{
+    if(scan == K_ENTER) {
+        me.startDemo(me);
+        return 1;
+    }
+    else
+        return keyDownListBox(me, scan, ascii, shift);
+}
+#endif
+
diff --git a/qcsrc/menu/xonotic/dialog.c b/qcsrc/menu/xonotic/dialog.c
new file mode 100644 (file)
index 0000000..badfbaf
--- /dev/null
@@ -0,0 +1,42 @@
+#ifdef INTERFACE
+CLASS(XonoticDialog) EXTENDS(Dialog)
+       // still to be customized by user
+       /*
+       ATTRIB(XonoticDialog, closable, float, 1)
+       ATTRIB(XonoticDialog, title, string, "Form1") // ;)
+       ATTRIB(XonoticDialog, color, vector, '1 0.5 1')
+       ATTRIB(XonoticDialog, intendedWidth, float, 0)
+       ATTRIB(XonoticDialog, rows, float, 3)
+       ATTRIB(XonoticDialog, columns, float, 2)
+       */
+       ATTRIB(XonoticDialog, marginTop, float, SKINMARGIN_TOP) // pixels
+       ATTRIB(XonoticDialog, marginBottom, float, SKINMARGIN_BOTTOM) // pixels
+       ATTRIB(XonoticDialog, marginLeft, float, SKINMARGIN_LEFT) // pixels
+       ATTRIB(XonoticDialog, marginRight, float, SKINMARGIN_RIGHT) // pixels
+       ATTRIB(XonoticDialog, columnSpacing, float, SKINMARGIN_COLUMNS) // pixels
+       ATTRIB(XonoticDialog, rowSpacing, float, SKINMARGIN_ROWS) // pixels
+       ATTRIB(XonoticDialog, rowHeight, float, SKINFONTSIZE_NORMAL * SKINHEIGHT_NORMAL) // pixels
+       ATTRIB(XonoticDialog, titleHeight, float, SKINFONTSIZE_TITLE * SKINHEIGHT_TITLE) // pixels
+       ATTRIB(XonoticDialog, titleFontSize, float, SKINFONTSIZE_TITLE) // pixels
+
+       ATTRIB(XonoticDialog, backgroundImage, string, SKINGFX_DIALOGBORDER)
+       ATTRIB(XonoticDialog, borderLines, float, SKINHEIGHT_DIALOGBORDER)
+       ATTRIB(XonoticDialog, closeButtonImage, string, SKINGFX_CLOSEBUTTON)
+       ATTRIB(XonoticDialog, zoomedOutTitleBarPosition, float, SKINHEIGHT_ZOOMEDTITLE * 0.5 - 0.5)
+       ATTRIB(XonoticDialog, zoomedOutTitleBar, float, SKINHEIGHT_ZOOMEDTITLE != 0)
+
+       ATTRIB(XonoticDialog, alpha, float, SKINALPHA_TEXT)
+
+       METHOD(XonoticDialog, configureDialog, void(entity))
+ENDCLASS(XonoticDialog)
+entity currentDialog;
+#endif
+
+#ifdef IMPLEMENTATION
+void configureDialogXonoticDialog(entity me)
+{
+       currentDialog = me;
+       configureDialogDialog(me);
+       me.tooltip = getZonedTooltipForIdentifier(me.classname);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_credits.c b/qcsrc/menu/xonotic/dialog_credits.c
new file mode 100644 (file)
index 0000000..bcd3545
--- /dev/null
@@ -0,0 +1,29 @@
+#ifdef INTERFACE
+CLASS(XonoticCreditsDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticCreditsDialog, fill, void(entity))
+       METHOD(XonoticCreditsDialog, focusEnter, void(entity))
+       ATTRIB(XonoticCreditsDialog, title, string, "Credits")
+       ATTRIB(XonoticCreditsDialog, color, vector, SKINCOLOR_DIALOG_CREDITS)
+       ATTRIB(XonoticCreditsDialog, intendedWidth, float, SKINWIDTH_CREDITS)
+       ATTRIB(XonoticCreditsDialog, rows, float, SKINROWS_CREDITS)
+       ATTRIB(XonoticCreditsDialog, columns, float, 2)
+       ATTRIB(XonoticCreditsDialog, creditsList, entity, NULL)
+ENDCLASS(XonoticCreditsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void fillXonoticCreditsDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, me.rows - 1, me.columns, me.creditsList = makeXonoticCreditsList());
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+void focusEnterXonoticCreditsDialog(entity me)
+{
+       me.creditsList.scrolling = time + 1;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer.c b/qcsrc/menu/xonotic/dialog_multiplayer.c
new file mode 100644 (file)
index 0000000..6bbe66d
--- /dev/null
@@ -0,0 +1,31 @@
+#ifdef INTERFACE
+CLASS(XonoticMultiplayerDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticMultiplayerDialog, fill, void(entity))
+       ATTRIB(XonoticMultiplayerDialog, title, string, "Multiplayer")
+       ATTRIB(XonoticMultiplayerDialog, color, vector, SKINCOLOR_DIALOG_MULTIPLAYER)
+       ATTRIB(XonoticMultiplayerDialog, intendedWidth, float, 0.96)
+       ATTRIB(XonoticMultiplayerDialog, rows, float, 24)
+       ATTRIB(XonoticMultiplayerDialog, columns, float, 6)
+ENDCLASS(XonoticMultiplayerDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void fillXonoticMultiplayerDialog(entity me)
+{
+       entity mc, e;
+       mc = makeXonoticTabController(me.rows - 2);
+       me.TR(me);
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Servers",  makeXonoticServerListTab()));
+                       setDependentStringNotEqual(e, "_cl_name", "Player");
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Create",  makeXonoticServerCreateTab()));
+                       setDependentStringNotEqual(e, "_cl_name", "Player");
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Demos",   makeXonoticDemoBrowserTab()));
+               me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Player Setup",  makeXonoticPlayerSettingsTab()));
+                       if(cvar_string("_cl_name") == "Player")
+                               e.onClick(e, e.onClickEntity); // lol animation
+
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, me.rows - 2, me.columns, mc);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.c b/qcsrc/menu/xonotic/dialog_multiplayer_create.c
new file mode 100644 (file)
index 0000000..7f51e15
--- /dev/null
@@ -0,0 +1,225 @@
+#ifdef INTERFACE
+CLASS(XonoticServerCreateTab) EXTENDS(XonoticTab)
+       METHOD(XonoticServerCreateTab, fill, void(entity))
+       METHOD(XonoticServerCreateTab, gameTypeChangeNotify, void(entity))
+       ATTRIB(XonoticServerCreateTab, title, string, "Create")
+       ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticServerCreateTab, rows, float, 22)
+       ATTRIB(XonoticServerCreateTab, columns, float, 6.5)
+
+       ATTRIB(XonoticServerCreateTab, mapListBox, entity, NULL)
+       ATTRIB(XonoticServerCreateTab, sliderFraglimit, entity, NULL)
+       ATTRIB(XonoticServerCreateTab, sliderTimelimit, entity, NULL)
+       ATTRIB(XonoticServerCreateTab, checkboxFraglimit, entity, NULL)
+       ATTRIB(XonoticServerCreateTab, checkboxFraglimitMapinfo, entity, NULL)
+ENDCLASS(XonoticServerCreateTab)
+entity makeXonoticServerCreateTab();
+#endif
+
+#ifdef IMPLEMENTATION
+
+entity makeXonoticServerCreateTab()
+{
+       entity me;
+       me = spawnXonoticServerCreateTab();
+       me.configureDialog(me);
+       return me;
+}
+
+void fillXonoticServerCreateTab(entity me)
+{
+       entity e, e0;
+       float n;
+
+       me.TR(me);
+               n = 6;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_dm", "DM"));
+                       e0 = e;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_lms", "LMS"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_arena", "Arena"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_runematch", "Runematch"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_race", "Race"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_cts", "Race CTS"));
+                       if(e.checked) e0 = NULL;
+       me.TR(me);
+               n = 8;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_tdm", "TDM"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_ctf", "CTF"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_ca", "CA"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_domination", "Domination"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_keyhunt", "Key Hunt"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_assault", "Assault"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_onslaught", "Onslaught"));
+                       if(e.checked) e0 = NULL;
+               me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_nexball", "Nexball"));
+                       if(e.checked) e0 = NULL;
+               if(e0)
+               {
+                       //print("NO CHECK\n");
+                       e0.setChecked(e0, 1);
+               }
+       me.TR(me);
+       me.TR(me);
+               me.mapListBox = makeXonoticMapList();
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Map list:"));
+                       makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
+       me.TR(me);
+               me.TD(me, me.rows - 7, 3, me.mapListBox);
+       me.gotoRC(me, me.rows - 3, 0);
+               me.TDempty(me, 0.5);
+               me.TD(me, 1, 1, e = makeXonoticButton("All", '0 0 0'));
+                       e.onClick = MapList_All;
+                       e.onClickEntity = me.mapListBox;
+               me.TD(me, 1, 1, e = makeXonoticButton("None", '0 0 0'));
+                       e.onClick = MapList_None;
+                       e.onClickEntity = me.mapListBox;
+               me.TDempty(me, 0.5);
+
+       me.gotoRC(me, 3, 3.5); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Match settings:"));
+       me.TR(me);
+               me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 0.5, "timelimit_override");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, "Time limit:"));
+               me.TD(me, 1, 2, me.sliderTimelimit);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, "Use map specified default"));
+       me.TR(me);
+               me.sliderFraglimit = makeXonoticSlider(1.0, 2000.0, 5, "fraglimit_override");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, "Point limit:"));
+                       me.checkboxFraglimit = e;
+               me.TD(me, 1, 2, me.sliderFraglimit);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, "Use map specified default"));
+                       me.checkboxFraglimitMapinfo = e;
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Player slots:"));
+               me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Number of bots:"));
+               me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Bot skill:"));
+                       setDependent(e, "bot_number", 0, -1);
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("skill"));
+                       e.addValue(e, "Botlike", "0");
+                       e.addValue(e, "Beginner", "1");
+                       e.addValue(e, "You will win", "2");
+                       e.addValue(e, "You can win", "3");
+                       e.addValue(e, "You might win", "4");
+                       e.addValue(e, "Advanced", "5");
+                       e.addValue(e, "Expert", "6");
+                       e.addValue(e, "Pro", "7");
+                       e.addValue(e, "Assassin", "8");
+                       e.addValue(e, "Unhuman", "9");
+                       e.addValue(e, "Godlike", "10");
+                       e.configureXonoticTextSliderValues(e);
+                       setDependent(e, "bot_number", 0, -1);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Bot names:"));
+               me.TD(me, 1, 0.7, e = makeXonoticInputBox(1, "bot_prefix"));
+                       setDependent(e, "bot_number", 0, -1);
+               me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0.5, "Shadow"));
+                       setDependent(e, "bot_number", 0, -1);
+               me.TD(me, 1, 0.7, e = makeXonoticInputBox(1, "bot_suffix"));
+                       setDependent(e, "bot_number", 0, -1);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Map voting:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
+                       e.addValue(e, "No voting", "0");
+                       e.addValue(e, "2 choices", "2");
+                       e.addValue(e, "3 choices", "3");
+                       e.addValue(e, "4 choices", "4");
+                       e.addValue(e, "5 choices", "5");
+                       e.addValue(e, "6 choices", "6");
+                       e.addValue(e, "7 choices", "7");
+                       e.addValue(e, "8 choices", "8");
+                       e.addValue(e, "9 choices", "9");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
+       me.TR(me);
+       me.TR(me);
+               me.TDempty(me, 0.5);
+               me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0'));
+                       e.onClick = DialogOpenButton_Click;
+                       e.onClickEntity = main.advancedDialog;
+                       main.advancedDialog.refilterEntity = me.mapListBox;
+               me.TR(me);
+               me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticButton("Mutators...", '0 0 0'));
+                       e.onClick = DialogOpenButton_Click;
+                       e.onClickEntity = main.mutatorsDialog;
+                       main.mutatorsDialog.refilterEntity = me.mapListBox;
+               me.TD(me, 1, 2, e0 = makeXonoticTextLabel(0, string_null));
+                       e0.textEntity = main.mutatorsDialog;
+                       e0.allowCut = 1;
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, 2, e = makeXonoticModButton("Multiplayer_Create"));
+               me.TD(me, 1, me.columns - 2, e = makeXonoticButton("Start Multiplayer!", '0 0 0'));
+                       e.onClick = MapList_LoadMap;
+                       e.onClickEntity = me.mapListBox;
+                       me.mapListBox.startButton = e;
+
+       me.gameTypeChangeNotify(me);
+}
+
+void GameType_ConfigureSliders(entity e, entity l, entity l2, string pLabel, float pMin, float pMax, float pStep, string pCvar)
+{
+       if(pCvar == "")
+       {
+               e.configureXonoticSlider(e, pMin, pMax, pStep, string_null);
+               l.setText(l, pLabel);
+               e.disabled = l.disabled = l2.disabled = TRUE;
+       }
+       else
+       {
+               e.configureXonoticSlider(e, pMin, pMax, pStep, pCvar);
+               l.setText(l, pLabel);
+               e.disabled = l.disabled = l2.disabled = FALSE;
+       }
+}
+
+void gameTypeChangeNotifyXonoticServerCreateTab(entity me)
+{
+       // tell the map list to update
+       float gt;
+       entity e, l, l2;
+       gt = MapInfo_CurrentGametype();
+       e = me.sliderFraglimit;
+       l = me.checkboxFraglimit;
+       l2 = me.checkboxFraglimitMapinfo;
+       switch(gt)
+       {
+               case MAPINFO_TYPE_CTF:        GameType_ConfigureSliders(e, l, l2, "Capture limit:",   1,   20, 1, "capturelimit_override");     break;
+               case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "g_domination_point_limit"); break;
+               case MAPINFO_TYPE_KEYHUNT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",   200, 1500, 50, "g_keyhunt_point_limit");    break;
+               case MAPINFO_TYPE_RUNEMATCH:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "g_runematch_point_limit");  break;
+               case MAPINFO_TYPE_LMS:        GameType_ConfigureSliders(e, l, l2, "Lives:",           3,   50,  1, "g_lms_lives_override");     break;
+               case MAPINFO_TYPE_RACE:       GameType_ConfigureSliders(e, l, l2, "Laps:",            1,   25,  1, "g_race_laps_limit");        break;
+               case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, l2, "Goals:",           1,   50,  1, "g_nexball_goallimit");      break;
+               case MAPINFO_TYPE_ASSAULT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
+               case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
+               case MAPINFO_TYPE_CTS:        GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
+               default:                      GameType_ConfigureSliders(e, l, l2, "Frag limit:",      5,  100,  5, "fraglimit_override");       break;
+       }
+       me.mapListBox.refilter(me.mapListBox);
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c
new file mode 100644 (file)
index 0000000..160f15d
--- /dev/null
@@ -0,0 +1,78 @@
+#ifdef INTERFACE
+CLASS(XonoticAdvancedDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticAdvancedDialog, fill, void(entity))
+       METHOD(XonoticAdvancedDialog, showNotify, void(entity))
+       METHOD(XonoticAdvancedDialog, close, void(entity))
+       ATTRIB(XonoticAdvancedDialog, title, string, "Advanced server settings")
+       ATTRIB(XonoticAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
+       ATTRIB(XonoticAdvancedDialog, intendedWidth, float, 0.5)
+       ATTRIB(XonoticAdvancedDialog, rows, float, 14)
+       ATTRIB(XonoticAdvancedDialog, columns, float, 3)
+       ATTRIB(XonoticAdvancedDialog, refilterEntity, entity, NULL)
+ENDCLASS(XonoticAdvancedDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticAdvancedDialog(entity me)
+{
+       loadAllCvars(me);
+}
+
+void fillXonoticAdvancedDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, "Game settings:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticCheckBox(0, "sv_spectate", "Allow spectating"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Spawn shield:"));
+               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Start delay:"));
+               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 30, 0.5, "g_start_delay"));
+       me.TR(me);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Game speed:"));
+               me.TD(me, 1, 1.7, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticCheckBoxEx(2, 0, "g_antilag", "AntiLag"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, "Teamplay settings:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire scale:"));
+               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire penalty:"));
+               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Teams:"));
+               me.TD(me, 1, 1.7, e = makeXonoticTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
+                       e.addValue(e, "Default", "0");
+                       e.addValue(e, "2 teams", "2");
+                       e.addValue(e, "3 teams", "3");
+                       e.addValue(e, "4 teams", "4");
+                       e.configureXonoticTextSliderValues(e);
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+
+void closeXonoticAdvancedDialog(entity me)
+{
+       if(me.refilterEntity)
+               me.refilterEntity.refilter(me.refilterEntity);
+       closeDialog(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c
new file mode 100644 (file)
index 0000000..e4056ba
--- /dev/null
@@ -0,0 +1,168 @@
+#ifdef INTERFACE
+CLASS(XonoticMapInfoDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticMapInfoDialog, fill, void(entity))
+       METHOD(XonoticMapInfoDialog, loadMapInfo, void(entity, float, entity))
+       ATTRIB(XonoticMapInfoDialog, title, string, "Map Information")
+       ATTRIB(XonoticMapInfoDialog, color, vector, SKINCOLOR_DIALOG_MAPINFO)
+       ATTRIB(XonoticMapInfoDialog, intendedWidth, float, 0.85)
+       ATTRIB(XonoticMapInfoDialog, rows, float, 9)
+       ATTRIB(XonoticMapInfoDialog, columns, float, 10)
+
+       ATTRIB(XonoticMapInfoDialog, previewImage, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, titleLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, authorLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, descriptionLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, featuresLabel, entity, NULL)
+
+       ATTRIB(XonoticMapInfoDialog, typeDeathmatchLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeTDMLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeLMSLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeArenaLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeRuneLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeDominationLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeKeyHuntLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeCTFLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeCALabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeAssaultLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeOnslaughtLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeRaceLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeCTSLabel, entity, NULL)
+       ATTRIB(XonoticMapInfoDialog, typeNexballLabel, entity, NULL)
+
+       ATTRIB(XonoticMapInfoDialog, currentMapIndex, float, 0)
+       ATTRIB(XonoticMapInfoDialog, currentMapBSPName, string, string_null)
+       ATTRIB(XonoticMapInfoDialog, currentMapTitle, string, string_null)
+       ATTRIB(XonoticMapInfoDialog, currentMapAuthor, string, string_null)
+       ATTRIB(XonoticMapInfoDialog, currentMapDescription, string, string_null)
+       ATTRIB(XonoticMapInfoDialog, currentMapPreviewImage, string, string_null)
+       ATTRIB(XonoticMapInfoDialog, currentMapFeaturesText, string, string_null)
+ENDCLASS(XonoticMapInfoDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void loadMapInfoXonoticMapInfoDialog(entity me, float i, entity mlb)
+{
+       me.currentMapIndex = i;
+       me.startButton.onClickEntity = mlb;
+       MapInfo_Get_ByID(i);
+
+       if(me.currentMapBSPName)
+       {
+               strunzone(me.currentMapBSPName);
+               strunzone(me.currentMapTitle);
+               strunzone(me.currentMapAuthor);
+               strunzone(me.currentMapDescription);
+               strunzone(me.currentMapPreviewImage);
+               strunzone(me.currentMapFeaturesText);
+       }
+       me.currentMapBSPName = strzone(MapInfo_Map_bspname);
+       me.currentMapTitle = strzone(MapInfo_Map_title);
+       me.currentMapAuthor = strzone(MapInfo_Map_author);
+       me.currentMapDescription = strzone(MapInfo_Map_description);
+       me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? "Full item placement" : "MinstaGib only");
+       me.currentMapPreviewImage = strzone(strcat("/maps/", MapInfo_Map_bspname));
+
+       me.frame.setText(me.frame, me.currentMapBSPName);
+       me.titleLabel.setText(me.titleLabel, me.currentMapTitle);
+       me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);
+       me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);
+       me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
+       me.previewImage.src = me.currentMapPreviewImage;
+
+       me.typeDeathmatchLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH);
+       me.typeTDMLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH);
+       me.typeLMSLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_LMS);
+       me.typeArenaLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ARENA);
+       me.typeDominationLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DOMINATION);
+       me.typeRuneLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RUNEMATCH);
+       me.typeKeyHuntLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEYHUNT);
+       me.typeCTFLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTF);
+       me.typeCALabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CA);
+       me.typeAssaultLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ASSAULT);
+       me.typeOnslaughtLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ONSLAUGHT);
+       me.typeRaceLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE);
+       me.typeCTSLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTS);
+       me.typeNexballLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_NEXBALL);
+
+       MapInfo_ClearTemps();
+}
+void fillXonoticMapInfoDialog(entity me)
+{
+       entity e;
+       float w, wgt;
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, me.rows - 2, 3, e = makeXonoticImage(string_null, 4.0/3.0));
+               me.previewImage = e;
+       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+       w = me.columns - me.currentColumn;
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Title:"));
+               me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
+                       e.colorL = SKINCOLOR_MAPLIST_TITLE;
+                       e.allowCut = 1;
+                       me.titleLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Author:"));
+               me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
+                       e.colorL = SKINCOLOR_MAPLIST_AUTHOR;
+                       e.allowCut = 1;
+                       me.authorLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Features:"));
+               me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.featuresLabel = e;
+       me.TR(me);
+               me.TD(me, 1, w, e = makeXonoticTextLabel(0, "Game types:"));
+       me.TR(me); wgt = (w-0.2)/5;
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "DM"));
+                       me.typeDeathmatchLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "TDM"));
+                       me.typeTDMLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "LMS"));
+                       me.typeLMSLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Arena"));
+                       me.typeArenaLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Rune"));
+                       me.typeRuneLabel = e;
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Domination"));
+                       me.typeDominationLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Key Hunt"));
+                       me.typeKeyHuntLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTF"));
+                       me.typeCTFLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CA"));
+                       me.typeCALabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Assault"));
+                       me.typeAssaultLabel = e;
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Onslaught"));
+                       me.typeOnslaughtLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Race"));
+                       me.typeRaceLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTS"));
+                       me.typeCTSLabel = e;
+               me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Nexball"));
+                       me.typeNexballLabel = e;
+
+       me.gotoRC(me, me.rows - 2, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, ""));
+                       e.allowCut = 1;
+                       me.descriptionLabel = e;
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TDempty(me, 0.5);
+
+               me.TD(me, 1, me.columns - 5.5, e = makeXonoticButton("Close", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+               me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton("Play", '0 0 0'));
+                       me.startButton.onClick = MapList_LoadMap;
+                       me.startButton.onClickEntity = NULL; // filled later
+               me.TDempty(me, 0.5);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
new file mode 100644 (file)
index 0000000..1a411d0
--- /dev/null
@@ -0,0 +1,280 @@
+#ifdef INTERFACE
+CLASS(XonoticMutatorsDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticMutatorsDialog, toString, string(entity))
+       METHOD(XonoticMutatorsDialog, fill, void(entity))
+       METHOD(XonoticMutatorsDialog, showNotify, void(entity))
+       METHOD(XonoticMutatorsDialog, close, void(entity))
+       ATTRIB(XonoticMutatorsDialog, title, string, "Mutators")
+       ATTRIB(XonoticMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
+       ATTRIB(XonoticMutatorsDialog, intendedWidth, float, 0.9)
+       ATTRIB(XonoticMutatorsDialog, rows, float, 18)
+       ATTRIB(XonoticMutatorsDialog, columns, float, 6)
+       ATTRIB(XonoticMutatorsDialog, refilterEntity, entity, NULL)
+ENDCLASS(XonoticMutatorsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticMutatorsDialog(entity me)
+{
+       loadAllCvars(me);
+}
+
+string weaponarenastring;
+string weaponarenastring_cvar;
+string WeaponArenaString()
+{
+       string s;
+       float n, i, j;
+       entity e;
+       s = cvar_string("g_weaponarena");
+       if(s == "0")
+               return "";
+       if(s == "all")
+               return "All Weapons Arena";
+       if(s == "most")
+               return "Most Weapons Arena";
+       if(s == weaponarenastring_cvar)
+               return weaponarenastring;
+       if(weaponarenastring)
+               strunzone(weaponarenastring);
+       if(weaponarenastring_cvar)
+               strunzone(weaponarenastring_cvar);
+
+       weaponarenastring_cvar = strzone(s);
+
+       n = tokenize_console(s);
+       s = "";
+       for(i = 0; i < n; ++i)
+       {
+               for(j = WEP_FIRST; j <= WEP_LAST; ++j)
+               {
+                       e = get_weaponinfo(j);
+                       if(argv(i) == e.netname)
+                               s = strcat(s, " & ", e.message);
+               }
+       }
+       s = strcat(substring(s, 3, strlen(s) - 3), " Arena");
+       
+       weaponarenastring = strzone(s);
+
+       return weaponarenastring;
+}
+
+string toStringXonoticMutatorsDialog(entity me)
+{
+       string s;
+       s = "";
+       if(cvar("g_minstagib"))
+               s = strcat(s, ", MinstaGib");
+       if(cvar("g_nixnex"))
+               s = strcat(s, ", NixNex");
+       if(cvar_string("g_weaponarena") != "0")
+               s = strcat(s, ", ", WeaponArenaString());
+       if(cvar("g_start_weapon_laser") == 0)
+               s = strcat(s, ", No start weapons");
+       if(cvar("sv_gravity") < 800)
+               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"))
+               s = strcat(s, ", LG missiles");
+       if(cvar("g_midair"))
+               s = strcat(s, ", Midair");
+       if(cvar("g_vampire"))
+               s = strcat(s, ", Vampire");
+       if(cvar("g_pinata"))
+               s = strcat(s, ", Pinata");
+       if(cvar("g_weapon_stay"))
+               s = strcat(s, ", Weapons stay");
+       if(cvar("g_bloodloss") > 0)
+               s = strcat(s, ", Bloodloss");
+       if(cvar("g_jetpack"))
+               s = strcat(s, ", Jet pack");
+       if(s == "")
+               return "None";
+       else
+               return substring(s, 2, strlen(s) - 2);
+}
+
+
+
+// WARNING: dirty hack. TODO clean this up by putting this behaviour in extra classes.
+void loadCvarsLaserWeaponArenaWeaponButton(entity me)
+{
+       tokenize_console(cvar_string("g_weaponarena"));
+       me.checked = (argv(0) == me.cvarValue);
+}
+
+void saveCvarsLaserWeaponArenaWeaponButton(entity me)
+{
+       string suffix;
+
+       suffix = "";
+       if(me.cvarValue != "laser" && me.cvarValue != "most")
+               if(cvar("menu_weaponarena_with_laser"))
+                       suffix = " laser";
+       if(me.checked)
+               cvar_set("g_weaponarena", strcat(me.cvarValue, suffix));
+       else
+               cvar_set("g_weaponarena", me.cvarOffValue);
+}
+
+.void(entity) draw_weaponarena;
+.void(entity) saveCvars_weaponarena;
+void saveCvarsLaserWeaponArenaLaserButton(entity me)
+{
+       // run the old function
+       me.saveCvars_weaponarena(me);
+
+       me.disabled = ((cvar_string("g_weaponarena") == "0") || (cvar_string("g_weaponarena") == "laser") || (cvar_string("g_weaponarena") == "most"));
+
+       if not(me.disabled)
+       {
+               // check for the laser suffix
+               string s;
+               s = cvar_string("g_weaponarena");
+               if(me.checked && substring(s, strlen(s) - 6, 6) != " laser")
+                       s = strcat(s, " laser");
+               else if(!me.checked && substring(s, strlen(s) - 6, 6) == " laser")
+                       s = substring(s, 0, strlen(s) - 6);
+               cvar_set("g_weaponarena", s);
+       }
+}
+
+void preDrawLaserWeaponArenaLaserButton(entity me)
+{
+       me.disabled = ((cvar_string("g_weaponarena") == "0") || (cvar_string("g_weaponarena") == "laser") || (cvar_string("g_weaponarena") == "most"));
+       // run the old function
+       me.draw_weaponarena(me);
+}
+// WARNING: end of dirty hack. Do not try this at home.
+
+
+
+void fillXonoticMutatorsDialog(entity me)
+{
+       entity e, s, w;
+       float i, j;
+       string str, hstr;
+       me.TR(me);
+               me.TD(me, 1, 2, makeXonoticTextLabel(0, "Gameplay mutators:"));
+       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"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_vampire", "Vampire"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticSlider(10, 50, 1, "g_bloodloss");
+               me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(0, 1, s, "Blood loss"));
+       me.TR(me);
+               me.TDempty(me, 0.4);
+               me.TD(me, 1, 1.8, s);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticSlider(80, 400, 8, "sv_gravity");
+                       s.valueDigits = 0;
+                       s.valueDisplayMultiplier = 0.125; // show gravity in percent
+               me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(800, 1, s, "Low gravity"));
+                       e.savedValue = 200; // good on silvercity
+       me.TR(me);
+               me.TDempty(me, 0.4);
+               me.TD(me, 1, 1.8, s);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 2, makeXonoticTextLabel(0, "Weapon & item mutators:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_grappling_hook", "Grappling hook"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", "Jet pack"));
+       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_pinata", "Pinata"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", "Weapons stay"));
+       me.TR(me);
+
+       me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 4, makeXonoticTextLabel(0, "Weapon arenas:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, "Regular (no arena)"));
+       for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
+       {
+               w = get_weaponinfo(i);
+               if(w.spawnflags & WEP_FLAG_HIDDEN)
+                       continue;
+               if(j & 1 == 0)
+                       me.TR(me);
+               str = w.netname;
+               hstr = w.message;
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", strzone(str), strzone(hstr)));
+                       e.cvarOffValue = "0";
+                       // custom load/save logic that ignores a " laser" suffix, or adds it 
+                       e.loadCvars = loadCvarsLaserWeaponArenaWeaponButton;
+                       e.saveCvars = saveCvarsLaserWeaponArenaWeaponButton;
+                       e.loadCvars(e);
+               ++j;
+       }
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "menu_weaponarena_with_laser", "with laser"));
+                       // hook the draw function to gray it out
+                       e.draw_weaponarena = e.draw;
+                       e.draw = preDrawLaserWeaponArenaLaserButton;
+                       // hook the save function to notify about the cvar
+                       e.saveCvars_weaponarena = e.saveCvars;
+                       e.saveCvars = saveCvarsLaserWeaponArenaLaserButton;
+       me.TR(me);
+               me.TD(me, 1, 4, makeXonoticTextLabel(0, "Special arenas:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_minstagib", string_null, "MinstaGib"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_nixnex", string_null, "NixNex"));
+       me.TR(me);
+               me.TDempty(me, 0.4);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "g_nixnex_with_laser", "with laser"));
+                       setDependent(e, "g_nixnex", 1, 1);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "most", "Most weapons"));
+                       e.cvarOffValue = "0";
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", "No start weapons"));
+                       e.cvarOffValue = "-1";
+                       makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_campingrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba");
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+
+void closeXonoticMutatorsDialog(entity me)
+{
+       if(me.refilterEntity)
+               me.refilterEntity.refilter(me.refilterEntity);
+       closeDialog(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_demo.c b/qcsrc/menu/xonotic/dialog_multiplayer_demo.c
new file mode 100644 (file)
index 0000000..20d8c9d
--- /dev/null
@@ -0,0 +1,50 @@
+#ifdef INTERFACE
+CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
+       METHOD(XonoticDemoBrowserTab, fill, void(entity))
+       ATTRIB(XonoticDemoBrowserTab, title, string, "Demo")
+       ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticDemoBrowserTab, rows, float, 22)
+       ATTRIB(XonoticDemoBrowserTab, columns, float, 6.5)
+       ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBroswer")      
+ENDCLASS(XonoticDemoBrowserTab)
+entity makeXonoticDemoBrowserTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticDemoBrowserTab()
+{
+       entity me;
+       me = spawnXonoticDemoBrowserTab();
+       me.configureDialog(me);
+       return me;
+}
+void fillXonoticDemoBrowserTab(entity me)
+{
+       entity e;
+       entity btn;
+       entity dlist;
+
+       me.TR(me);
+               me.TD(me, 1, me.columns, e = makeXonoticCheckBox(0, "cl_autodemo", "Record demos while playing"));
+       me.TR(me);
+       dlist = makeXonoticDemoList();
+       me.TR(me);
+               me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:"));
+               me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
+                       btn.onClick = InputBox_Clear_Click;
+               me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
+                       e.onChange = DemoList_Filter_Change;
+                       e.onChangeEntity = dlist;
+                       btn.onClickEntity = e;
+                       dlist.controlledTextbox = e;
+       me.TR(me);
+               me.TD(me, me.rows - 4, me.columns, dlist);
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Timedemo", '0 0 0'));
+                       e.onClick = TimeDemo_Click;
+                       e.onClickEntity = dlist;
+               me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Play", '0 0 0'));
+                       e.onClick = StartDemo_Click;
+                       e.onClickEntity = dlist;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.c b/qcsrc/menu/xonotic/dialog_multiplayer_join.c
new file mode 100644 (file)
index 0000000..d1c8916
--- /dev/null
@@ -0,0 +1,76 @@
+#ifdef INTERFACE
+CLASS(XonoticServerListTab) EXTENDS(XonoticTab)
+       METHOD(XonoticServerListTab, fill, void(entity))
+       ATTRIB(XonoticServerListTab, title, string, "Join")
+       ATTRIB(XonoticServerListTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticServerListTab, rows, float, 22)
+       ATTRIB(XonoticServerListTab, columns, float, 6.5)
+ENDCLASS(XonoticServerListTab)
+entity makeXonoticServerListTab();
+#endif
+
+#ifdef IMPLEMENTATION
+
+entity makeXonoticServerListTab()
+{
+       entity me;
+       me = spawnXonoticServerListTab();
+       me.configureDialog(me);
+       return me;
+}
+void fillXonoticServerListTab(entity me)
+{
+       entity e, slist, btn;
+
+       slist  = makeXonoticServerList();
+
+       me.TR(me);
+               me.TD(me, 1, 0.4, e = makeXonoticTextLabel(0, "Filter:"));
+               me.TD(me, 1, 0.6, btn = makeXonoticButton("Clear", '0 0 0'));
+                       btn.onClick = InputBox_Clear_Click;
+               me.TD(me, 1, me.columns - 0.6 * 4 - 0.4, e = makeXonoticInputBox(0, string_null));
+                       e.onChange = ServerList_Filter_Change;
+                       e.onChangeEntity = slist;
+                       btn.onClickEntity = e;
+                       slist.controlledTextbox = e;
+               me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", "Empty"));
+                       slist.filterShowEmpty = e.checked;
+                       e.onClickEntity = slist;
+                       e.onClick = ServerList_ShowEmpty_Click;
+               me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", "Full"));
+                       slist.filterShowFull = e.checked;
+                       e.onClickEntity = slist;
+                       e.onClick = ServerList_ShowFull_Click;
+               me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "net_slist_pause", "Pause"));
+
+       me.TR(me);
+               me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0'));
+               me.TD(me, 1, 1, slist.sortButton2 = makeXonoticButton(string_null, '0 0 0'));
+               me.TD(me, 1, 1, slist.sortButton3 = makeXonoticButton(string_null, '0 0 0'));
+               me.TD(me, 1, 1, slist.sortButton4 = makeXonoticButton(string_null, '0 0 0'));
+               me.TD(me, 1, 1, slist.sortButton5 = makeXonoticButton(string_null, '0 0 0'));
+       me.TR(me);
+               me.TD(me, me.rows - 4, me.columns, slist);
+
+       me.gotoRC(me, me.rows - 2, 0);
+               me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, "Address:"));
+               me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
+                       e.onEnter = ServerList_Connect_Click;
+                       e.onEnterEntity = slist;
+                       slist.ipAddressBox = e;
+               me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
+                       e.onClick = ServerList_Favorite_Click;
+                       e.onClickEntity = slist;
+                       slist.favoriteButton = e;
+               me.TD(me, 1, 1.5, e = makeXonoticButton("Info", '0 0 0'));
+                       e.onClick = ServerList_Info_Click;
+                       e.onClickEntity = slist;
+                       slist.infoButton = e;
+       me.TR(me);
+               me.TD(me, 1, 2, e = makeXonoticModButton("Multiplayer_Join"));
+               me.TD(me, 1, me.columns - 2, e = makeXonoticButton("Join!", '0 0 0'));
+                       e.onClick = ServerList_Connect_Click;
+                       e.onClickEntity = slist;
+                       slist.connectButton = e;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c
new file mode 100644 (file)
index 0000000..0eb42c1
--- /dev/null
@@ -0,0 +1,184 @@
+#ifdef INTERFACE
+CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticServerInfoDialog, fill, void(entity))
+       METHOD(XonoticServerInfoDialog, loadServerInfo, void(entity, float))
+       ATTRIB(XonoticServerInfoDialog, title, string, "Server Information")
+       ATTRIB(XonoticServerInfoDialog, color, vector, SKINCOLOR_DIALOG_SERVERINFO)
+       ATTRIB(XonoticServerInfoDialog, intendedWidth, float, 0.68)
+       ATTRIB(XonoticServerInfoDialog, rows, float, 11)
+       ATTRIB(XonoticServerInfoDialog, columns, float, 12)
+
+       ATTRIB(XonoticServerInfoDialog, currentServerName, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerCName, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerType, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerMap, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerPlayers, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerNumPlayers, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerNumBots, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerMod, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerVersion, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerPing, string, string_null)
+
+       ATTRIB(XonoticServerInfoDialog, nameLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, cnameLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, typeLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, mapLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, rawPlayerList, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, numPlayersLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, numBotsLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, modLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, versionLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, pingLabel, entity, NULL)
+ENDCLASS(XonoticServerInfoDialog)
+
+float SLIST_FIELD_NAME;
+float SLIST_FIELD_CNAME;
+float SLIST_FIELD_QCSTATUS;
+float SLIST_FIELD_MAP;
+float SLIST_FIELD_PLAYERS;
+float SLIST_FIELD_NUMHUMANS;
+float SLIST_FIELD_MAXPLAYERS;
+float SLIST_FIELD_NUMBOTS;
+float SLIST_FIELD_MOD;
+float SLIST_FIELD_PING;
+void Join_Click(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+void loadServerInfoXonoticServerInfoDialog(entity me, float i)
+{
+       float m;
+       string s, typestr, versionstr, numh, maxp;
+
+       SLIST_FIELD_NAME = gethostcacheindexforkey("name");
+       me.currentServerName = strzone(gethostcachestring(SLIST_FIELD_NAME, i));
+       me.nameLabel.setText(me.nameLabel, me.currentServerName);
+
+       SLIST_FIELD_CNAME = gethostcacheindexforkey("cname");
+       me.currentServerCName = strzone(gethostcachestring(SLIST_FIELD_CNAME, i));
+       me.cnameLabel.setText(me.cnameLabel, me.currentServerCName);
+
+       SLIST_FIELD_QCSTATUS = gethostcacheindexforkey("qcstatus");
+       s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
+       m = tokenizebyseparator(s, ":");
+       if(m > 1)
+       {
+               typestr = argv (0);
+               versionstr = argv(1);
+       }
+       else
+       {
+               typestr = "N/A";
+               versionstr = "N/A";
+       }
+       me.currentServerType = strzone(typestr);
+       me.typeLabel.setText(me.typeLabel, me.currentServerType);
+
+
+       SLIST_FIELD_MAP = gethostcacheindexforkey("map");
+       me.currentServerMap = strzone(gethostcachestring(SLIST_FIELD_MAP, i));
+       me.mapLabel.setText(me.mapLabel, me.currentServerMap);
+
+       SLIST_FIELD_PLAYERS = gethostcacheindexforkey("players");
+       me.currentServerPlayers = strzone(gethostcachestring(SLIST_FIELD_PLAYERS, i));
+       me.rawPlayerList.setPlayerList(me.rawPlayerList, me.currentServerPlayers);
+
+       SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey("numhumans");
+       numh = ftos(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i));
+       SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey("maxplayers");
+       maxp = ftos(gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i));
+       me.currentServerNumPlayers = strzone(strcat(numh,"/",maxp));
+       me.numPlayersLabel.setText(me.numPlayersLabel, me.currentServerNumPlayers);
+
+       SLIST_FIELD_NUMBOTS = gethostcacheindexforkey("numbots");
+       s = ftos(gethostcachenumber(SLIST_FIELD_NUMBOTS, i));
+       me.currentServerNumBots = strzone(s);
+       me.numBotsLabel.setText(me.numBotsLabel, me.currentServerNumBots);
+
+       SLIST_FIELD_MOD = gethostcacheindexforkey("mod");
+       me.currentServerMod = strzone(gethostcachestring(SLIST_FIELD_MOD, i));
+       me.modLabel.setText(me.modLabel, me.currentServerMod);
+
+       me.currentServerVersion = strzone(versionstr);
+       me.versionLabel.setText(me.versionLabel, me.currentServerVersion);
+
+       SLIST_FIELD_PING = gethostcacheindexforkey("ping");
+       s = ftos(gethostcachenumber(SLIST_FIELD_PING, i));
+       me.currentServerPing = strzone(s);
+       me.pingLabel.setText(me.pingLabel, me.currentServerPing);
+}
+
+void fillXonoticServerInfoDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, ""));
+                       e.colorL = SKINCOLOR_SERVERINFO_NAME;
+                       e.allowCut = 1;
+                       me.nameLabel = e;
+       me.TR(me);
+               me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, ""));
+                       e.colorL = SKINCOLOR_SERVERINFO_IP;
+                       e.allowCut = 1;
+                       me.cnameLabel = e;
+
+       me.TR(me);
+               me.TD(me, 1, 5.5, e = makeXonoticTextLabel(0, "Players:"));
+       me.TR(me);
+               me.TD(me, me.rows - 4, 6, e = makeXonoticPlayerList());
+                       me.rawPlayerList = e;
+
+       me.gotoRC(me, 1, 6.25); me.setFirstColumn(me, me.currentColumn);
+
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Type:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.typeLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Map:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.mapLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Players:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.numPlayersLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Bots:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.numBotsLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Mod:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.modLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Version:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.versionLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Ping:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.pingLabel = e;
+
+       me.gotoRC(me, me.rows - 1, 0);
+
+               me.TD(me, 1, me.columns - 6, e = makeXonoticButton("Close", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+               me.TD(me, 1, me.columns - 6, e = makeXonoticButton("Join!", '0 0 0'));
+                       e.onClick = Join_Click;
+                       e.onClickEntity = me;
+}
+
+void Join_Click(entity btn, entity me)
+{
+       localcmd("connect ", me.currentServerCName, "\n");
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
new file mode 100644 (file)
index 0000000..0bd6e18
--- /dev/null
@@ -0,0 +1,178 @@
+#ifdef INTERFACE
+CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticPlayerSettingsTab, fill, void(entity))
+       METHOD(XonoticPlayerSettingsTab, draw, void(entity))
+       ATTRIB(XonoticPlayerSettingsTab, title, string, "Player Setup")
+       ATTRIB(XonoticPlayerSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticPlayerSettingsTab, rows, float, 22)
+       ATTRIB(XonoticPlayerSettingsTab, columns, float, 6.5)
+       ATTRIB(XonoticPlayerSettingsTab, playerNameLabel, entity, NULL)
+       ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0)
+ENDCLASS(XonoticPlayerSettingsTab)
+entity makeXonoticPlayerSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticPlayerSettingsTab()
+{
+       entity me;
+       me = spawnXonoticPlayerSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+void drawXonoticPlayerSettingsTab(entity me)
+{
+       if(cvar_string("_cl_name") == "Player")
+               me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
+       else
+               me.playerNameLabel.alpha = me.playerNameLabelAlpha;
+       drawContainer(me);
+}
+void fillXonoticPlayerSettingsTab(entity me)
+{
+       entity e, pms, sl, label, e0, box;
+       float i, r, m, n;
+
+       me.TR(me);
+               me.TD(me, 1, 0.5, me.playerNameLabel = makeXonoticTextLabel(0, "Name:"));
+                       me.playerNameLabelAlpha = me.playerNameLabel.alpha;
+               me.TD(me, 1, 2.5, label = makeXonoticTextLabel(0, string_null));
+                       label.allowCut = 1;
+                       label.allowColors = 1;
+                       label.alpha = 1;
+       me.TR(me);
+               me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name"));
+                       box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
+                       box.maxLength = 63;
+                       label.textEntity = box;
+       me.TR(me);
+               me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
+               me.TD(me, 5, 2, e = makeXonoticCharmap(box));
+       me.TR(me);
+       me.TR(me);
+       me.TR(me);
+       me.TR(me);
+       me.TR(me);
+       me.TR(me);
+       me.gotoRC(me, 8, 0.0);
+               pms = makeXonoticPlayerModelSelector();
+               me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, "Model:"));
+               me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0'));
+                       e.onClick = PlayerModelSelector_Prev_Click;
+                       e.onClickEntity = pms;
+               me.TD(me, me.rows - me.currentRow - 1, 1.8, pms);
+               me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0'));
+                       e.onClick = PlayerModelSelector_Next_Click;
+                       e.onClickEntity = pms;
+       me.TR(me);
+               r = me.currentRow;
+               m = me.rows - r - 2;
+               n = 16 - !cvar("developer");
+               m = m / (n - 1);
+               for(i = 0; i < n; ++i)
+               {
+                       me.gotoRC(me, r + i * m, 0.1);
+                       me.TDNoMargin(me, m, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0');
+               }
+               for(i = 0; i < n; ++i)
+               {
+                       me.gotoRC(me, r + i * m, 0.4);
+                       me.TDNoMargin(me, m, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0');
+               }
+
+       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Field of View:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 1, "fov"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Damage kick:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.5, 0.05, "v_kicktime"));
+       me.TR(me);
+               sl = makeXonoticSlider(0.45, 0.75, 0.01, "cl_bobcycle");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "View bobbing:"));
+               me.TD(me, 1, 2, sl);
+       
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom Factor:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
+       me.TR(me);
+               sl = makeXonoticSlider(1, 8, 0.5, "cl_zoomspeed");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1, 1, sl, "Zoom speed:"));
+               me.TD(me, 1, 2, sl);
+       me.TR(me);
+               me.TD(me, 1, 1.5, e = makeXonoticButton("Weapon settings...", '0 0 0'));
+                       e.onClick = DialogOpenButton_Click;
+                       e.onClickEntity = main.weaponsDialog;
+               me.TD(me, 1, 1.5, e0 = makeXonoticTextLabel(0, string_null));
+                       e0.textEntity = main.weaponsDialog;
+                       e0.allowCut = 1;
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon crosshairs"));
+               me.TD(me, 1, 1.3, e = makeXonoticCheckBox(1, "crosshair_color_override", "& crosshair colors"));
+               setDependent(e, "crosshair_per_weapon", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
+               for(i = 1; i <= 10; ++i) {
+                       me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
+                       setDependent(e, "crosshair_per_weapon", 0, 0);
+               }
+       me.TR(me);
+               me.TDempty(me, 1);
+               for(i = 11; i <= 20; ++i) {
+                       me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
+                       setDependent(e, "crosshair_per_weapon", 0, 0);
+               }
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Size:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.40, 2, 0.05, "crosshair_size"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Alpha:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_alpha"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Red:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
+               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Green:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
+               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Blue:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
+               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0",    "None"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1",    "TrueAim"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
+       me.TR(me);
+               me.TDempty(me, 0.4);
+               me.TD(me, 1, 2.2, e = makeXonoticButton("Radar, HUD & Waypoints...", '0 0 0'));
+                       e.onClick = DialogOpenButton_Click;
+                       e.onClickEntity = main.radarDialog;
+               me.TDempty(me, 0.5);
+       me.TR(me);
+       #ifdef ALLOW_FORCEMODELS
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force Models:"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, string_null, string_null, "None"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodels", string_null, "All"));
+       #endif
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", "Disable gore effects"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Gibs:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs"));
+                       e.addValue(e, "None", "1");
+                       e.addValue(e, "Few", "0.75");
+                       e.addValue(e, "Many", "0.5");
+                       e.addValue(e, "Lots", "0");
+                       e.configureXonoticTextSliderValues(e);
+                       setDependent(e, "cl_gentle", 0, 0);
+       me.TR(me);
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromxonotic;sendcvar cl_forceplayermodels", COMMANDBUTTON_APPLY));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c
new file mode 100644 (file)
index 0000000..dd1ebc5
--- /dev/null
@@ -0,0 +1,114 @@
+#ifdef INTERFACE
+CLASS(XonoticRadarDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticRadarDialog, toString, string(entity))
+       METHOD(XonoticRadarDialog, fill, void(entity))
+       METHOD(XonoticRadarDialog, showNotify, void(entity))
+       ATTRIB(XonoticRadarDialog, title, string, "Radar, HUD & Waypoints")
+       ATTRIB(XonoticRadarDialog, color, vector, SKINCOLOR_DIALOG_RADAR)
+       ATTRIB(XonoticRadarDialog, intendedWidth, float, 0.7)
+       ATTRIB(XonoticRadarDialog, rows, float, 19)
+       ATTRIB(XonoticRadarDialog, columns, float, 4)
+ENDCLASS(XonoticRadarDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticRadarDialog(entity me)
+{
+        loadAllCvars(me);
+}
+string toStringXonoticRadarDialog(entity me)
+{
+       return "XXX";
+}
+void fillXonoticRadarDialog(entity me)
+{
+       entity e, sl;
+       me.TR(me);
+               me.TD(me, 1, 4, makeXonoticTextLabel(0, "Radar settings:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Position:"));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_teamradar_position", "0 0", "Top left"));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_teamradar_position", "0.5 0", "Top middle"));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_teamradar_position", "1 0", "Top right"));
+       me.TR(me);
+               me.TDempty(me, 1);
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_teamradar_position", "0 0.5", "Middle left"));
+               me.TDempty(me, 1);
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_teamradar_position", "1 0.5", "Middle right"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Size:"));
+               me.TD(me, 1, 3, e = makeXonoticTextSlider("cl_teamradar_size"));
+                       e.addValue(e, "96x96", "96 96");
+                       e.addValue(e, "128x96", "128 96");
+                       e.addValue(e, "128x128", "128 128");
+                       e.addValue(e, "192x144", "192 144");
+                       e.addValue(e, "192x192", "192 192");
+                       e.addValue(e, "256x192", "256 192");
+                       e.addValue(e, "256x256", "256 256");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               sl = makeXonoticSlider(0.20, 1, 0.01, "cl_teamradar_background_alpha");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1, 1, sl, "Background:"));
+               me.TD(me, 1, 3, sl);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 4, makeXonoticTextLabel(0, "HUD settings:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticCheckBoxEx(100, 110, "viewsize", "Background:"));
+               me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_alpha_bg"));
+                       setDependent(e, "viewsize", 0, 100);
+               me.TR(me);
+                       me.TDempty(me, 0.2);
+                       me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Default red:"));
+                       me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_color_bg_r"));
+                               setDependent(e, "viewsize", 0, 100);
+               me.TR(me);
+                       me.TDempty(me, 0.2);
+                       me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Default green:"));
+                       me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_color_bg_g"));
+                               setDependent(e, "viewsize", 0, 100);
+               me.TR(me);
+                       me.TDempty(me, 0.2);
+                       me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Default blue:"));
+                       me.TD(me, 1, 3, e = makeXonoticSlider(0, 1, 0.01, "sbar_color_bg_b"));
+                               setDependent(e, "viewsize", 0, 100);
+               me.TR(me);
+                       me.TDempty(me, 0.2);
+                       me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Team color:"));
+                       me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "sbar_color_bg_team"));
+                               setDependent(e, "viewsize", 0, 100);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 4, makeXonoticTextLabel(0, "Waypoint settings:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 3.8, e = makeXonoticCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint scale:"));
+                       me.TD(me, 1, 3, e = makeXonoticSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
+                               setDependent(e, "cl_hidewaypoints", 0, 0);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint alpha:"));
+                       me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
+                               setDependent(e, "cl_hidewaypoints", 0, 0);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Show names:"));
+               me.TD(me, 1, 3, e = makeXonoticTextSlider("cl_shownames"));
+                       e.addValue(e, "Never", "0");
+                       e.addValue(e, "Teammates", "1");
+                       e.addValue(e, "All players", "2");
+                       e.configureXonoticTextSliderValues(e);
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c
new file mode 100644 (file)
index 0000000..0b31a82
--- /dev/null
@@ -0,0 +1,59 @@
+#ifdef INTERFACE
+CLASS(XonoticWeaponsDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticWeaponsDialog, toString, string(entity))
+       METHOD(XonoticWeaponsDialog, fill, void(entity))
+       METHOD(XonoticWeaponsDialog, showNotify, void(entity))
+       ATTRIB(XonoticWeaponsDialog, title, string, "Weapon settings")
+       ATTRIB(XonoticWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
+       ATTRIB(XonoticWeaponsDialog, intendedWidth, float, 0.5)
+       ATTRIB(XonoticWeaponsDialog, rows, float, 17)
+       ATTRIB(XonoticWeaponsDialog, columns, float, 4)
+       ATTRIB(XonoticWeaponsDialog, weaponsList, entity, NULL)
+ENDCLASS(XonoticWeaponsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticWeaponsDialog(entity me)
+{
+        loadAllCvars(me);
+}
+string toStringXonoticWeaponsDialog(entity me)
+{
+       return me.weaponsList.toString(me.weaponsList);
+}
+void fillXonoticWeaponsDialog(entity me)
+{
+       entity e;
+
+       me.TR(me);
+               me.TD(me, 1, 4, makeXonoticTextLabel(0, "Weapon priority list:"));
+       me.TR(me);
+               me.TD(me, 9, 4, e = me.weaponsList = makeXonoticWeaponsList());
+       me.gotoRC(me, 10, 0);
+               me.TDempty(me, 1);
+               me.TD(me, 1, 1, e = makeXonoticButton("Up", '0 0 0'));
+                       e.onClick = WeaponsList_MoveUp_Click;
+                       e.onClickEntity = me.weaponsList;
+               me.TD(me, 1, 1, e = makeXonoticButton("Down", '0 0 0'));
+                       e.onClick = WeaponsList_MoveDown_Click;
+                       e.onClickEntity = me.weaponsList;
+       me.gotoRC(me, 11, 0);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", "Draw 1st person weapon model"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_gunalign", "4", "Left align"));
+                       setDependent(e, "r_drawviewmodel", 1, 1);
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_gunalign", "3", "Right align"));
+                       setDependent(e, "r_drawviewmodel", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_flipped", "Flip view horizontally"));
+       me.TR(me);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_news.c b/qcsrc/menu/xonotic/dialog_news.c
new file mode 100644 (file)
index 0000000..67de2d2
--- /dev/null
@@ -0,0 +1,20 @@
+#ifdef INTERFACE
+CLASS(XonoticNewsDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticNewsDialog, fill, void(entity))
+       ATTRIB(XonoticNewsDialog, title, string, "News")
+       ATTRIB(XonoticNewsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
+       ATTRIB(XonoticNewsDialog, intendedWidth, float, 0.96)
+       ATTRIB(XonoticNewsDialog, rows, float, 24)
+       ATTRIB(XonoticNewsDialog, columns, float, 1)
+ENDCLASS(XonoticNewsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void fillXonoticNewsDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, 24, 1, e = spawnGecko());
+               e.configureBrowser( e, "http://alientrap.org/xonotic/index.php?module=news" );
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_quit.c b/qcsrc/menu/xonotic/dialog_quit.c
new file mode 100644 (file)
index 0000000..a58b2e4
--- /dev/null
@@ -0,0 +1,25 @@
+#ifdef INTERFACE
+CLASS(XonoticQuitDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticQuitDialog, fill, void(entity))
+       ATTRIB(XonoticQuitDialog, title, string, "Quit")
+       ATTRIB(XonoticQuitDialog, color, vector, SKINCOLOR_DIALOG_QUIT)
+       ATTRIB(XonoticQuitDialog, intendedWidth, float, 0.5)
+       ATTRIB(XonoticQuitDialog, rows, float, 3)
+       ATTRIB(XonoticQuitDialog, columns, float, 2)
+ENDCLASS(XonoticQuitDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void fillXonoticQuitDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, 1, 2, makeXonoticTextLabel(0.5, "Are you sure you want to quit?"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticCommandButton("Yes", '1 0 0', "quit", 0));
+               me.TD(me, 1, 1, e = makeXonoticButton("No", '0 1 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings.c b/qcsrc/menu/xonotic/dialog_settings.c
new file mode 100644 (file)
index 0000000..f0adf04
--- /dev/null
@@ -0,0 +1,28 @@
+#ifdef INTERFACE
+CLASS(XonoticSettingsDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticSettingsDialog, fill, void(entity))
+       ATTRIB(XonoticSettingsDialog, title, string, "Settings")
+       ATTRIB(XonoticSettingsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
+       ATTRIB(XonoticSettingsDialog, intendedWidth, float, 0.96)
+       ATTRIB(XonoticSettingsDialog, rows, float, 19)
+       ATTRIB(XonoticSettingsDialog, columns, float, 6)
+ENDCLASS(XonoticSettingsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void fillXonoticSettingsDialog(entity me)
+{
+       entity mc;
+       mc = makeXonoticTabController(me.rows - 2);
+       me.TR(me);
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Input",   makeXonoticInputSettingsTab()));
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Video",   makeXonoticVideoSettingsTab()));
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Effects", makeXonoticEffectsSettingsTab()));
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Audio",   makeXonoticAudioSettingsTab()));
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Network", makeXonoticNetworkSettingsTab()));
+               me.TD(me, 1, 1, mc.makeTabButton(mc, "Misc",    makeXonoticMiscSettingsTab()));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, me.rows - 2, me.columns, mc);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_audio.c b/qcsrc/menu/xonotic/dialog_settings_audio.c
new file mode 100644 (file)
index 0000000..1c589ec
--- /dev/null
@@ -0,0 +1,176 @@
+#ifdef INTERFACE
+CLASS(XonoticAudioSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticAudioSettingsTab, fill, void(entity))
+       ATTRIB(XonoticAudioSettingsTab, title, string, "Audio")
+       ATTRIB(XonoticAudioSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticAudioSettingsTab, rows, float, 17)
+       ATTRIB(XonoticAudioSettingsTab, columns, float, 6.5)
+ENDCLASS(XonoticAudioSettingsTab)
+entity makeXonoticAudioSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticAudioSettingsTab()
+{
+       entity me;
+       me = spawnXonoticAudioSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+
+void fillXonoticAudioSettingsTab(entity me)
+{
+       entity e, s, sl;
+
+       me.TR(me);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "bgmvolume");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Music:"));
+               me.TD(me, 1, 2, s);
+       me.TR(me);
+       me.TR(me);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "volume");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Master:"));
+               me.TD(me, 1, 2, s);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_staticvolume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Ambient:"));
+               makeMulti(s, "snd_entchannel2volume");
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_worldchannel0volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Info:"));
+               makeMulti(s, "snd_csqcchannel0volume");
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel3volume");
+               makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Items:"));
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel6volume");
+               makeMulti(s, "snd_csqcchannel6volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Pain:"));
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel7volume");
+               makeMulti(s, "snd_entchannel7volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Player:"));
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel4volume");
+               makeMulti(s, "snd_playerchannel4volume snd_entchannel6volume snd_csqcchannel4volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Shots:"));
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel2volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Voice:"));
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel1volume");
+               makeMulti(s, "snd_playerchannel5volume snd_entchannel1volume snd_entchannel5volume");
+               me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Weapons:"));
+               me.TD(me, 1, 2, s);
+               setDependentStringNotEqual(e, "volume", "0");
+               setDependentStringNotEqual(s, "volume", "0");
+       me.TR(me);
+
+       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Frequency:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
+                       e.addValue(e, "8 kHz", "8000");
+                       e.addValue(e, "11.025 kHz", "11025");
+                       e.addValue(e, "16 kHz", "16000");
+                       e.addValue(e, "22.05 kHz", "22050");
+                       e.addValue(e, "24 kHz", "24000");
+                       e.addValue(e, "32 kHz", "32000");
+                       e.addValue(e, "44.1 kHz", "44100");
+                       e.addValue(e, "48 kHz", "48000");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Channels:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
+                       e.addValue(e, "Mono", "1");
+                       e.addValue(e, "Stereo", "2");
+                       e.addValue(e, "2.1", "3");
+                       e.addValue(e, "3.1", "4");
+                       e.addValue(e, "4.1", "5");
+                       e.addValue(e, "5.1", "6");
+                       e.addValue(e, "6.1", "7");
+                       e.addValue(e, "7.1", "8");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_swapstereo", "Swap Stereo"));
+               setDependent(e, "snd_channels", 1.5, 0.5);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", "Headphone friendly mode"));
+               setDependent(e, "snd_channels", 1.5, 0.5);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Spatial voices:"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", "None"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", "Taunts"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", "All"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Taunt range:"));
+               setDependent(e, "cl_voice_directional", 0.5, -0.5);
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
+                       e.addValue(e, "Very short", "3");
+                       e.addValue(e, "Short", "2");
+                       e.addValue(e, "Normal", "0.5");
+                       e.addValue(e, "Long", "0.25");
+                       e.addValue(e, "Full", "0.015625");
+                       e.configureXonoticTextSliderValues(e);
+               setDependent(e, "cl_voice_directional", 0.5, -0.5);
+       me.TR(me);
+               sl = makeXonoticSlider(0.15, 1, 0.05, "cl_autotaunt");
+                       sl.valueDisplayMultiplier = 100;
+                       sl.valueDigits = 0;
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "Automatic taunts"));
+               if(sl.value != e.savedValue)
+                       e.savedValue = 0.65; // default
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0.1, "Frequency:"));
+               me.TD(me, 1, 2, sl);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Time warning:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_sound_maptime_warning"));
+                       e.addValue(e, "None", "0");
+                       e.addValue(e, "1 minute", "1");
+                       e.addValue(e, "5 minutes", "2");
+                       e.addValue(e, "Both", "3");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", "Hit indicator"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", "Menu sounds"));
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "snd_restart; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.c b/qcsrc/menu/xonotic/dialog_settings_effects.c
new file mode 100644 (file)
index 0000000..bd2c6dd
--- /dev/null
@@ -0,0 +1,179 @@
+#ifdef INTERFACE
+CLASS(XonoticEffectsSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticEffectsSettingsTab, fill, void(entity))
+       ATTRIB(XonoticEffectsSettingsTab, title, string, "Effects")
+       ATTRIB(XonoticEffectsSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticEffectsSettingsTab, rows, float, 17)
+       ATTRIB(XonoticEffectsSettingsTab, columns, float, 6.5)
+ENDCLASS(XonoticEffectsSettingsTab)
+entity makeXonoticEffectsSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticEffectsSettingsTab()
+{
+       entity me;
+       me = spawnXonoticEffectsSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+
+float someShadowCvarIsEnabled(entity box)
+{
+       if(cvar("r_shadow_realtime_dlight"))
+               if(cvar("r_shadow_realtime_dlight_shadows"))
+                       return TRUE;
+       if(cvar("r_shadow_realtime_world"))
+               if(cvar("r_shadow_realtime_world_shadows"))
+                       return TRUE;
+       return FALSE;
+}
+
+void fillXonoticEffectsSettingsTab(entity me)
+{
+       entity e, s;
+       float n;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Quality preset:"));
+               n = 5 + 2 * !!cvar("developer");
+               if(cvar("developer"))
+                       me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("OMG!", '1 0 1', "exec effects-omg.cfg", 0));
+               me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Low", '0 0 0', "exec effects-low.cfg", 0));
+               me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Medium", '0 0 0', "exec effects-med.cfg", 0));
+               me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Normal", '0 0 0', "exec effects-normal.cfg", 0));
+               me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("High", '0 0 0', "exec effects-high.cfg", 0));
+               me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Ultra", '0 0 0', "exec effects-ultra.cfg", 0));
+               if(cvar("developer"))
+                       me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Ultimate", '0 0 0', "exec effects-ultimate.cfg", 0));
+
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Geometry detail:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("r_subdivisions_tolerance"));
+                       e.addValue(e, "Lowest", "16");
+                       e.addValue(e, "Low", "8");
+                       e.addValue(e, "Normal", "4");
+                       e.addValue(e, "Good", "3");
+                       e.addValue(e, "Best", "2");
+                       e.addValue(e, "Insane", "1");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Antialiasing:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_samples"));
+                       e.addValue(e, "Disabled", "1");
+                       e.addValue(e, "2x", "2");
+                       e.addValue(e, "4x", "4");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Texture quality:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_picmip"));
+                       if(cvar("developer"))
+                               e.addValue(e, "Leet", "1337");
+                       e.addValue(e, "Lowest", "4");
+                       e.addValue(e, "Low", "3");
+                       e.addValue(e, "Normal", "2");
+                       e.addValue(e, "Good", "1");
+                       e.addValue(e, "Best", "0");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_picmipworld", "Reduce model texture quality only"));
+                       setDependent(e, "gl_picmip", 0.5, -0.5);
+       me.TR(me);
+       me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Anisotropy:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_texture_anisotropy"));
+                       e.addValue(e, "Disabled", "1");
+                       e.addValue(e, "2x", "2");
+                       e.addValue(e, "4x", "4");
+                       e.addValue(e, "8x", "8");
+                       e.addValue(e, "16x", "16");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Particle quality:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1.0, 0.05, "cl_particles_quality"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Particle dist.:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(500, 2000, 100, "r_drawparticles_drawdistance"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_decals", "Decals"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Distance:"));
+                       setDependent(e, "cl_decals", 1, 1);
+               me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance"));
+                       setDependent(e, "cl_decals", 1, 1);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+           me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Time:"));
+               setDependent(e, "cl_decals", 1, 1);
+           me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_time"));
+               setDependent(e, "cl_decals", 1, 1);
+
+       me.gotoRC(me, 2, 3.5); me.setFirstColumn(me, me.currentColumn);
+       me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", "Use lightmaps"));
+       me.TD(me, 1, 1.9, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", "Deluxe mapping"));
+               setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
+       me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "r_shadow_gloss", "Gloss"));
+               setDependentAND3(e, "vid_gl20", 1, 1, "r_glsl_deluxemapping", 1, 2, "mod_q3bsp_nolightmaps", 0, 0);
+       me.TR(me);
+               me.TD(me, 1, 1.5, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", "Offset mapping"));
+                       setDependent(e, "vid_gl20", 1, 1);
+               me.TD(me, 1, 1.9, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", "Relief mapping"));
+                       setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", "Reflections:"));
+                       setDependent(e, "vid_gl20", 1, 1);
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("r_water_resolutionmultiplier"));
+                       e.addValue(e, "Blurred", "0.25");
+                       e.addValue(e, "Good", "0.5");
+                       e.addValue(e, "Sharp", "1");
+                       e.configureXonoticTextSliderValues(e);
+                       setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
+       me.TR(me);
+               if(cvar("developer"))
+                       me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", "Show surfaces"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticRadioButton(1, string_null, string_null, "No dynamic lighting"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "gl_flashblend", string_null, "Flash blend approximation"));
+       me.TR(me);
+               me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "r_shadow_realtime_dlight", string_null, "Realtime dynamic lighting"));
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_dlight_shadows", "Shadows"));
+                       setDependent(e, "r_shadow_realtime_dlight", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_shadow_realtime_world", "Realtime world lighting"));
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_world_shadows", "Shadows"));
+                       setDependent(e, "r_shadow_realtime_world", 1, 1);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_shadow_usenormalmap", "Use normal maps"));
+                       setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", "Soft shadows"));
+                       setDependentWeird(e, someShadowCvarIsEnabled);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_coronas", "Coronas"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_bloom", "Bloom"));
+                       setDependent(e, "r_hdr", 0, 0);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_hdr", "High Dynamic Range (HDR)"));
+       
+       me.TR(me);
+               s = makeXonoticSlider(0.1, 1, 0.1, "r_motionblur");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, "Motion blur:"));
+               if(s.value != e.savedValue)
+                       e.savedValue = 0.5; // default
+               me.TD(me, 1, 2, s);
+       me.TR(me);
+               s = makeXonoticSlider(0.1, 1, 0.1, "r_damageblur");
+               me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, "Damage blur:"));
+               if(s.value != e.savedValue)
+                       e.savedValue = 0.4; // default
+               me.TD(me, 1, 2, s);
+       
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_input.c b/qcsrc/menu/xonotic/dialog_settings_input.c
new file mode 100644 (file)
index 0000000..bd6ade8
--- /dev/null
@@ -0,0 +1,77 @@
+#ifdef INTERFACE
+CLASS(XonoticInputSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticInputSettingsTab, fill, void(entity))
+       ATTRIB(XonoticInputSettingsTab, title, string, "Input")
+       ATTRIB(XonoticInputSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticInputSettingsTab, rows, float, 17)
+       ATTRIB(XonoticInputSettingsTab, columns, float, 6.5)
+ENDCLASS(XonoticInputSettingsTab)
+entity makeXonoticInputSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticInputSettingsTab()
+{
+       entity me;
+       me = spawnXonoticInputSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+void fillXonoticInputSettingsTab(entity me)
+{
+       entity e;
+       entity kb;
+
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Key bindings:"));
+       me.TR(me);
+               me.TD(me, me.rows - 2, 3, kb = makeXonoticKeyBinder());
+       me.gotoRC(me, me.rows - 1, 0);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticButton("Change key...", '0 0 0'));
+                       e.onClick = KeyBinder_Bind_Change;
+                       e.onClickEntity = kb;
+                       kb.keyGrabButton = e;
+               me.TD(me, 1, 1, e = makeXonoticButton("Edit...", '0 0 0'));
+                       e.onClick = KeyBinder_Bind_Edit;
+                       e.onClickEntity = kb;
+                       kb.userbindEditButton = e;
+                       kb.userbindEditDialog = main.userbindEditDialog;
+                       main.userbindEditDialog.keybindBox = kb;
+               me.TD(me, 1, 1, e = makeXonoticButton("Clear", '0 0 0'));
+                       e.onClick = KeyBinder_Bind_Clear;
+                       e.onClickEntity = kb;
+
+       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Sensitivity:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "UI mouse speed:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 4.0, 0.1, "menu_mouse_speed"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", "Mouse filter"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", "Invert mouse"));
+       me.TR(me);
+               if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
+                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", "Use joystick input"));
+               else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
+                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", "Use joystick input"));
+       me.TR(me);
+               if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
+                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", "Turn off OS mouse acceleration"));
+               else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
+                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", "Turn off OS mouse acceleration"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", "\"enter console\" also closes"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Show binds:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("sbar_showbinds"));
+                       e.addValue(e, "Actions", "0");
+                       e.addValue(e, "Bound keys", "1");
+                       e.addValue(e, "Both", "2");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "cl_showpressedkeys", "Show pressed keys"));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_input_userbind.c b/qcsrc/menu/xonotic/dialog_settings_input_userbind.c
new file mode 100644 (file)
index 0000000..38660b8
--- /dev/null
@@ -0,0 +1,55 @@
+#ifdef INTERFACE
+CLASS(XonoticUserbindEditDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticUserbindEditDialog, loadUserBind, void(entity, string, string, string))
+       METHOD(XonoticUserbindEditDialog, fill, void(entity))
+       ATTRIB(XonoticUserbindEditDialog, title, string, "User defined key bind")
+       ATTRIB(XonoticUserbindEditDialog, color, vector, SKINCOLOR_DIALOG_USERBIND)
+       ATTRIB(XonoticUserbindEditDialog, intendedWidth, float, 0.7)
+       ATTRIB(XonoticUserbindEditDialog, rows, float, 4)
+       ATTRIB(XonoticUserbindEditDialog, columns, float, 3)
+       ATTRIB(XonoticUserbindEditDialog, keybindBox, entity, NULL)
+
+       ATTRIB(XonoticUserbindEditDialog, nameBox, entity, NULL)
+       ATTRIB(XonoticUserbindEditDialog, commandPressBox, entity, NULL)
+       ATTRIB(XonoticUserbindEditDialog, commandReleaseBox, entity, NULL)
+ENDCLASS(XonoticUserbindEditDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticUserbindEditDialog_Save(entity btn, entity me)
+{
+       me.keybindBox.editUserbind(me.keybindBox, me.nameBox.text, me.commandPressBox.text, me.commandReleaseBox.text);
+       Dialog_Close(btn, me);
+}
+
+void loadUserBindXonoticUserbindEditDialog(entity me, string theName, string theCommandPress, string theCommandRelease)
+{
+       me.nameBox.setText(me.nameBox, theName);
+               me.nameBox.keyDown(me.nameBox, K_END, 0, 0);
+       me.commandPressBox.setText(me.commandPressBox, theCommandPress);
+               me.nameBox.keyDown(me.commandPressBox, K_END, 0, 0);
+       me.commandReleaseBox.setText(me.commandReleaseBox, theCommandRelease);
+               me.nameBox.keyDown(me.commandReleaseBox, K_END, 0, 0);
+}
+
+void fillXonoticUserbindEditDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Name:"));
+               me.TD(me, 1, me.columns - 1, me.nameBox = makeXonoticInputBox(0, string_null));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Command when pressed:"));
+               me.TD(me, 1, me.columns - 1, me.commandPressBox = makeXonoticInputBox(0, string_null));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Command when released:"));
+               me.TD(me, 1, me.columns - 1, me.commandReleaseBox = makeXonoticInputBox(0, string_null));
+       me.TR(me);
+               me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Save", '0 0 0'));
+                       e.onClick = XonoticUserbindEditDialog_Save;
+                       e.onClickEntity = me;
+               me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Cancel", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.c b/qcsrc/menu/xonotic/dialog_settings_misc.c
new file mode 100644 (file)
index 0000000..2494d45
--- /dev/null
@@ -0,0 +1,78 @@
+#ifdef INTERFACE
+CLASS(XonoticMiscSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticMiscSettingsTab, fill, void(entity))
+       ATTRIB(XonoticMiscSettingsTab, title, string, "Misc")
+       ATTRIB(XonoticMiscSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticMiscSettingsTab, rows, float, 17)
+       ATTRIB(XonoticMiscSettingsTab, columns, float, 6.5)
+ENDCLASS(XonoticMiscSettingsTab)
+entity makeXonoticMiscSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticMiscSettingsTab()
+{
+       entity me;
+       me = spawnXonoticMiscSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+void fillXonoticMiscSettingsTab(entity me)
+{
+       entity e;
+       entity sk;
+
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Menu skins:"));
+       me.TR(me);
+               me.TD(me, me.rows - 2, 3, sk = makeXonoticSkinList());
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, 3, e = makeXonoticButton("Apply immediately", '0 0 0'));
+                       e.onClick = SetSkin_Click;
+                       e.onClickEntity = sk;
+
+       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", "Show current time"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showdate", "Show current date"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", "Show frames per second"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showspeed", "Speedometer"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "0", "qu/s (hidden)"));
+                       setDependent(e, "cl_showspeed", 1, 1);
+               me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "1", "qu/s"));
+                       setDependent(e, "cl_showspeed", 1, 1);
+               me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "2", "m/s"));
+                       setDependent(e, "cl_showspeed", 1, 1);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "3", "km/h"));
+                       setDependent(e, "cl_showspeed", 1, 1);
+               me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "4", "mph"));
+                       setDependent(e, "cl_showspeed", 1, 1);
+               me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "5", "knots"));
+                       setDependent(e, "cl_showspeed", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showacceleration", "Show accelerometer"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8/2, e = makeXonoticTextLabel(0, "Accelerometer scale:"));
+                       setDependent(e, "cl_showacceleration", 1, 1);
+               me.TD(me, 1, 2.8/2, e = makeXonoticSlider(1, 10, 0.5, "cl_showacceleration_scale"));
+                       setDependent(e, "cl_showacceleration", 1, 1);
+       me.TR(me);
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "host_sleep", "Minimize input latency"));
+       me.TR(me);
+       me.TR(me);
+               me.TDempty(me, 0.5);
+               me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0'));
+                       e.onClick = DialogOpenButton_Click;
+                       e.onClickEntity = main.cvarsDialog;
+               me.TDempty(me, 0.5);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c
new file mode 100644 (file)
index 0000000..c8bc46c
--- /dev/null
@@ -0,0 +1,69 @@
+#ifdef INTERFACE
+CLASS(XonoticCvarsDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticCvarsDialog, toString, string(entity))
+       METHOD(XonoticCvarsDialog, fill, void(entity))
+       METHOD(XonoticCvarsDialog, showNotify, void(entity))
+       ATTRIB(XonoticCvarsDialog, title, string, "Advanced settings")
+       ATTRIB(XonoticCvarsDialog, color, vector, SKINCOLOR_DIALOG_CVARS)
+       ATTRIB(XonoticCvarsDialog, intendedWidth, float, 0.8)
+       ATTRIB(XonoticCvarsDialog, rows, float, 25)
+       ATTRIB(XonoticCvarsDialog, columns, float, 6)
+ENDCLASS(XonoticCvarsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticCvarsDialog(entity me)
+{
+       loadAllCvars(me);
+}
+string toStringXonoticCvarsDialog(entity me)
+{
+       return "XXX";
+}
+void fillXonoticCvarsDialog(entity me)
+{
+       entity e, cvarlist, btn;
+       cvarlist = makeXonoticCvarList();
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Cvar filter:"));
+               me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
+               me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
+                       e.onChange = CvarList_Filter_Change;
+                       e.onChangeEntity = cvarlist;
+                       btn.onClick = InputBox_Clear_Click;
+                       btn.onClickEntity = e;
+                       cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
+       me.TR(me);
+               me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
+       me.gotoRC(me, me.rows - 7, 0);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Setting:"));
+               me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
+                       cvarlist.cvarNameBox = e;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Type:"));
+               me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
+                       cvarlist.cvarTypeBox = e;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Value:"));
+               me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
+                       cvarlist.cvarValueBox = e;
+                       e.onChange = CvarList_Value_Change;
+                       e.onChangeEntity = cvarlist;
+               me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON));
+                       cvarlist.cvarDefaultBox = e;
+                       e.onClick = CvarList_Revert_Click;
+                       e.onClickEntity = cvarlist;
+                       e.allowCut = 1;
+                       e.marginLeft = e.marginRight = 0.5;
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Description:"));
+               me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
+                       cvarlist.cvarDescriptionBox = e;
+                       e.allowWrap = 1;
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_network.c b/qcsrc/menu/xonotic/dialog_settings_network.c
new file mode 100644 (file)
index 0000000..929da47
--- /dev/null
@@ -0,0 +1,60 @@
+#ifdef INTERFACE
+CLASS(XonoticNetworkSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticNetworkSettingsTab, fill, void(entity))
+       ATTRIB(XonoticNetworkSettingsTab, title, string, "Network")
+       ATTRIB(XonoticNetworkSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticNetworkSettingsTab, rows, float, 17)
+       ATTRIB(XonoticNetworkSettingsTab, columns, float, 6.5)
+ENDCLASS(XonoticNetworkSettingsTab)
+entity makeXonoticNetworkSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticNetworkSettingsTab()
+{
+       entity me;
+       me = spawnXonoticNetworkSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+
+void fillXonoticNetworkSettingsTab(entity me)
+{
+       entity e;
+
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", "Client-side movement prediction"));
+       me.TR(me);
+               //me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_nolerp", "Network update smoothing"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "shownetgraph", "Show netgraph"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Network speed:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_rate"));
+                       e.addValue(e, "56k", "4000");
+                       e.addValue(e, "ISDN", "7000");
+                       e.addValue(e, "Slow ADSL", "15000");
+                       e.addValue(e, "Fast ADSL", "20000");
+                       e.addValue(e, "Broadband", "66666");
+                       e.configureXonoticTextSliderValues(e);
+    me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Input packets/s:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 1, "cl_netfps"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "HTTP downloads:"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Downloads:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "cl_curl_maxdownloads"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Speed (kB/s):"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(10, 1500, 10, "cl_curl_maxspeed"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Client UDP port:"));
+               me.TD(me, 1, 0.64, e = makeXonoticInputBox(0, "cl_port"));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_settings_video.c b/qcsrc/menu/xonotic/dialog_settings_video.c
new file mode 100644 (file)
index 0000000..5eb228a
--- /dev/null
@@ -0,0 +1,112 @@
+#ifdef INTERFACE
+CLASS(XonoticVideoSettingsTab) EXTENDS(XonoticTab)
+       METHOD(XonoticVideoSettingsTab, fill, void(entity))
+       ATTRIB(XonoticVideoSettingsTab, title, string, "Video")
+       ATTRIB(XonoticVideoSettingsTab, intendedWidth, float, 0.9)
+       ATTRIB(XonoticVideoSettingsTab, rows, float, 17)
+       ATTRIB(XonoticVideoSettingsTab, columns, float, 6.5)
+       ATTRIB(XonoticVideoSettingsTab, name, string, "videosettings")
+ENDCLASS(XonoticVideoSettingsTab)
+entity makeXonoticVideoSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticVideoSettingsTab()
+{
+       entity me;
+       me = spawnXonoticVideoSettingsTab();
+       me.configureDialog(me);
+       return me;
+}
+void fillXonoticVideoSettingsTab(entity me)
+{
+       entity e;
+
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Resolution:"));
+               me.TD(me, 1, 2, e = makeXonoticResolutionSlider());
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Font/UI size:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_vid_scale"));
+                       e.addValue(e, "Unreadable", "-1");
+                       e.addValue(e, "Tiny", "-0.75");
+                       e.addValue(e, "Little", "-0.5");
+                       e.addValue(e, "Small", "-0.25");
+                       e.addValue(e, "Medium", "0");
+                       e.addValue(e, "Large", "0.25");
+                       e.addValue(e, "Huge", "0.5");
+                       e.addValue(e, "Gigantic", "0.75");
+                       e.addValue(e, "Colossal", "1");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Color depth:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(16, 32, 16, "vid_bitsperpixel"));
+       me.TR(me);
+               me.TD(me, 1, 1.5, e = makeXonoticTextLabel(0, "Texture compression"));
+               me.TD(me, 1, 0.5, e = makeXonoticRadioButton(2, "gl_texturecompression", "0", "None"));
+               me.TD(me, 1, 0.5, e = makeXonoticRadioButton(2, "gl_texturecompression", "1", "Fast"));
+               me.TD(me, 1, 0.5, e = makeXonoticRadioButton(2, "gl_texturecompression", "2", "Good"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", "Full screen"));
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", "Vertical Synchronization"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", "Use OpenGL 2.0 shaders (GLSL)"));
+       me.TR(me);
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_coronas_occlusionquery", "Use Occlusion Queries"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Vertex Buffer Objects (VBOs)"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", "Off"));
+               me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "3", "Vertices, some Tris (compatible)"));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "2", "Vertices"));
+               me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "1", "Vertices and Triangles"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Depth first:"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("r_depthfirst"));
+                       e.addValue(e, "Disabled", "0");
+                       e.addValue(e, "World", "1");
+                       e.addValue(e, "All", "2");
+                       e.configureXonoticTextSliderValues(e);
+       me.TR(me);
+               if(cvar_type("apple_multithreadedgl") & CVAR_TYPEFLAG_ENGINE)
+                       me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "apple_multithreadedgl", "Disable multithreaded OpenGL"));
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "gl_finish", "Wait for GPU to finish each frame"));
+
+       me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Brightness:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.0, 0.5, 0.02, "v_brightness"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Contrast:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 3.0, 0.05, "v_contrast"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Gamma:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "v_gamma"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Contrast boost:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 5.0, 0.1, "v_contrastboost"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Saturation:"));
+                       setDependent(e, "vid_gl20", 1, 1);
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_glsl_saturation"));
+                       setDependent(e, "vid_gl20", 1, 1);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_glslgamma", "Use GLSL to handle color control"));
+                       setDependent(e, "vid_gl20", 1, 1);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Ambient:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0, 20.0, 1.0, "r_ambient"));
+       me.TR(me);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Intensity:"));
+               me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "menu_cmd setresolution; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_singleplayer.c b/qcsrc/menu/xonotic/dialog_singleplayer.c
new file mode 100644 (file)
index 0000000..165a84c
--- /dev/null
@@ -0,0 +1,85 @@
+#ifdef INTERFACE
+CLASS(XonoticSingleplayerDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticSingleplayerDialog, fill, void(entity))
+       ATTRIB(XonoticSingleplayerDialog, title, string, "Singleplayer")
+       ATTRIB(XonoticSingleplayerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER)
+       ATTRIB(XonoticSingleplayerDialog, intendedWidth, float, 0.80)
+       ATTRIB(XonoticSingleplayerDialog, rows, float, 24)
+       ATTRIB(XonoticSingleplayerDialog, columns, float, 5)
+       ATTRIB(XonoticSingleplayerDialog, campaignBox, entity, NULL)
+ENDCLASS(XonoticSingleplayerDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+
+void InstantAction_LoadMap(entity btn, entity dummy)
+{
+       float glob, i, n, fh;
+       string s;
+       glob = search_begin("maps/*.instantaction", TRUE, TRUE);
+       if(glob < 0)
+               return;
+       i = ceil(random() * search_getsize(glob)) - 1;
+       fh = fopen(search_getfilename(glob, i), FILE_READ);
+       search_end(glob);
+       if(fh < 0)
+               return;
+       while((s = fgets(fh)))
+       {
+               if(substring(s, 0, 4) == "set ")
+                       s = substring(s, 4, strlen(s) - 4);
+               n = tokenize_console(s);
+               if(argv(0) == "bot_number")
+                       cvar_set("bot_number", argv(1));
+               else if(argv(0) == "skill")
+                       cvar_set("skill", argv(1));
+               else if(argv(0) == "timelimit")
+                       cvar_set("timelimit_override", argv(1));
+               else if(argv(0) == "fraglimit")
+                       cvar_set("fraglimit_override", argv(1));
+               else if(argv(0) == "changelevel")
+               {
+                       fclose(fh);
+                       localcmd("\nmenu_loadmap_prepare\n");
+                       MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
+                       MapInfo_LoadMap(argv(1));
+                       cvar_set("lastlevel", "1");
+                       return;
+               }
+       }
+       fclose(fh);
+}
+
+void fillXonoticSingleplayerDialog(entity me)
+{
+       entity e, btnPrev, btnNext, lblTitle;
+
+       me.TR(me);
+               me.TDempty(me, (me.columns - 3) / 2);
+               me.TD(me, 2, 3, e = makeXonoticBigButton("Instant action! (random map with bots)", '0 0 0'));
+                       e.onClick = InstantAction_LoadMap;
+                       e.onClickEntity = NULL;
+       me.TR(me);
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 1, btnPrev = makeXonoticButton("<<", '0 0 0'));
+               me.TD(me, 1, me.columns - 2, lblTitle = makeXonoticTextLabel(0.5, "???"));
+               me.TD(me, 1, 1, btnNext = makeXonoticButton(">>", '0 0 0'));
+       me.TR(me);
+               me.TD(me, me.rows - 5, me.columns, me.campaignBox = makeXonoticCampaignList());
+                       btnPrev.onClick = MultiCampaign_Prev;
+                       btnPrev.onClickEntity = me.campaignBox;
+                       btnNext.onClick = MultiCampaign_Next;
+                       btnNext.onClickEntity = me.campaignBox;
+                       me.campaignBox.buttonNext = btnNext;
+                       me.campaignBox.buttonPrev = btnPrev;
+                       me.campaignBox.labelTitle = lblTitle;
+                       me.campaignBox.campaignGo(me.campaignBox, 0);
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, 2, e = makeXonoticModButton("Singleplayer"));
+               me.TD(me, 1, me.columns - 2 , e = makeXonoticButton("Start Singleplayer!", '0 0 0'));
+                       e.onClick = CampaignList_LoadMap;
+                       e.onClickEntity = me.campaignBox;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_singleplayer_winner.c b/qcsrc/menu/xonotic/dialog_singleplayer_winner.c
new file mode 100644 (file)
index 0000000..b0df2d3
--- /dev/null
@@ -0,0 +1,25 @@
+#ifdef INTERFACE
+CLASS(XonoticWinnerDialog) EXTENDS(XonoticDialog)
+       METHOD(XonoticWinnerDialog, fill, void(entity))
+       ATTRIB(XonoticWinnerDialog, title, string, "Winner")
+       ATTRIB(XonoticWinnerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER)
+       ATTRIB(XonoticWinnerDialog, intendedWidth, float, 0.32)
+       ATTRIB(XonoticWinnerDialog, rows, float, 12)
+       ATTRIB(XonoticWinnerDialog, columns, float, 3)
+ENDCLASS(XonoticWinnerDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void fillXonoticWinnerDialog(entity me)
+{
+       entity e;
+
+       me.TR(me);
+               me.TD(me, me.rows - 2, me.columns, e = makeXonoticImage("/gfx/winner", -1));
+
+       me.gotoRC(me, me.rows - 1, 0);
+               me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+                       e.onClick = Dialog_Close;
+                       e.onClickEntity = me;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/dialog_teamselect.c b/qcsrc/menu/xonotic/dialog_teamselect.c
new file mode 100644 (file)
index 0000000..4a2f812
--- /dev/null
@@ -0,0 +1,55 @@
+#ifdef INTERFACE
+CLASS(XonoticTeamSelectDialog) EXTENDS(XonoticRootDialog)
+       METHOD(XonoticTeamSelectDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls
+       METHOD(XonoticTeamSelectDialog, showNotify, void(entity))
+       ATTRIB(XonoticTeamSelectDialog, title, string, "Team Selection") // ;)
+       ATTRIB(XonoticTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
+       ATTRIB(XonoticTeamSelectDialog, intendedWidth, float, 0.4)
+       ATTRIB(XonoticTeamSelectDialog, rows, float, 5)
+       ATTRIB(XonoticTeamSelectDialog, columns, float, 4)
+       ATTRIB(XonoticTeamSelectDialog, name, string, "TeamSelect")
+       ATTRIB(XonoticTeamSelectDialog, team1, entity, NULL)
+       ATTRIB(XonoticTeamSelectDialog, team2, entity, NULL)
+       ATTRIB(XonoticTeamSelectDialog, team3, entity, NULL)
+       ATTRIB(XonoticTeamSelectDialog, team4, entity, NULL)
+ENDCLASS(XonoticTeamSelectDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeTeamButton(string theName, vector theColor, string commandtheName)
+{
+       entity b;
+       b = makeXonoticBigCommandButton(theName, theColor, commandtheName, 1);
+       return b;
+}
+
+void showNotifyXonoticTeamSelectDialog(entity me)
+{
+       float teams, nTeams;
+       teams = cvar("_teams_available");
+       nTeams = 0;
+       me.team1.disabled = !(teams & 1); nTeams += !!(teams & 1);
+       me.team2.disabled = !(teams & 2); nTeams += !!(teams & 2);
+       me.team3.disabled = !(teams & 4); nTeams += !!(teams & 4);
+       me.team4.disabled = !(teams & 8); nTeams += !!(teams & 8);
+}
+
+void fillXonoticTeamSelectDialog(entity me)
+{
+       entity e;
+       me.TR(me);
+               me.TD(me, 2, 4, e = makeTeamButton("join 'best' team (auto-select)", '0 0 0', "cmd selectteam auto; cmd join"));
+                       e.preferredFocusPriority = 1;
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 2, 1, me.team1 = makeTeamButton("red", '1 0.5 0.5', "cmd selectteam red; cmd join"));
+               me.TD(me, 2, 1, me.team2 = makeTeamButton("blue", '0.5 0.5 1', "cmd selectteam blue; cmd join"));
+               me.TD(me, 2, 1, me.team3 = makeTeamButton("yellow", '1 1 0.5', "cmd selectteam yellow; cmd join"));
+               me.TD(me, 2, 1, me.team4 = makeTeamButton("pink", '1 0.5 1', "cmd selectteam pink; cmd join"));
+       me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 4, makeXonoticCommandButton("spectate", '0 0 0', "cmd spectate", 1));
+}
+#endif
+
+/* Click. The c-word is here so you can grep for it :-) */
diff --git a/qcsrc/menu/xonotic/gametypebutton.c b/qcsrc/menu/xonotic/gametypebutton.c
new file mode 100644 (file)
index 0000000..f88cb00
--- /dev/null
@@ -0,0 +1,73 @@
+#ifdef INTERFACE
+CLASS(XonoticGametypeButton) EXTENDS(RadioButton)
+       METHOD(XonoticGametypeButton, configureXonoticGametypeButton, void(entity, float, string, string))
+       METHOD(XonoticGametypeButton, setChecked, void(entity, float))
+       ATTRIB(XonoticGametypeButton, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticGametypeButton, image, string, SKINGFX_BUTTON_BIG)
+       ATTRIB(XonoticGametypeButton, color, vector, SKINCOLOR_BUTTON_N)
+       ATTRIB(XonoticGametypeButton, colorC, vector, SKINCOLOR_BUTTON_C)
+       ATTRIB(XonoticGametypeButton, colorF, vector, SKINCOLOR_BUTTON_F)
+       ATTRIB(XonoticGametypeButton, colorD, vector, SKINCOLOR_BUTTON_D)
+       ATTRIB(XonoticGametypeButton, srcMulti, float, 1)
+       ATTRIB(XonoticGametypeButton, useDownAsChecked, float, 1)
+
+       ATTRIB(XonoticGametypeButton, cvarName, string, string_null)
+       METHOD(XonoticGametypeButton, loadCvars, void(entity))
+       METHOD(XonoticGametypeButton, saveCvars, void(entity))
+
+       ATTRIB(XonoticGametypeButton, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticGametypeButton, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticGametypeButton)
+entity makeXonoticGametypeButton(float, string, string);
+#endif
+
+#ifdef IMPLEMENTATION
+void GameTypeButton_Click(entity me, entity other);
+entity makeXonoticGametypeButton(float theGroup, string theCvar, string theText)
+{
+       entity me;
+       me = spawnXonoticGametypeButton();
+       me.configureXonoticGametypeButton(me, theGroup, theCvar, theText);
+       return me;
+}
+void configureXonoticGametypeButtonXonoticGametypeButton(entity me, float theGroup, string theCvar, string theText)
+{
+       if(theCvar)
+       {
+               me.cvarName = theCvar;
+               me.tooltip = getZonedTooltipForIdentifier(theCvar);
+               me.loadCvars(me);
+       }
+       me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
+       me.align = 0.5;
+       me.onClick = GameTypeButton_Click;
+       me.onClickEntity = NULL;
+}
+void setCheckedXonoticGametypeButton(entity me, float val)
+{
+       if(val != me.checked)
+       {
+               me.checked = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticGametypeButton(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       me.checked = cvar(me.cvarName);
+}
+void saveCvarsXonoticGametypeButton(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       cvar_set(me.cvarName, ftos(me.checked));
+}
+void GameTypeButton_Click(entity me, entity other)
+{
+       RadioButton_Click(me, other);
+       me.parent.gameTypeChangeNotify(me.parent);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/image.c b/qcsrc/menu/xonotic/image.c
new file mode 100644 (file)
index 0000000..40709cd
--- /dev/null
@@ -0,0 +1,28 @@
+#ifdef INTERFACE
+CLASS(XonoticImage) EXTENDS(Image)
+       METHOD(XonoticImage, configureXonoticImage, void(entity, string, float))
+ENDCLASS(XonoticImage)
+entity makeXonoticImage(string theImage, float theAspect);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticImage(string theImage, float theAspect)
+{
+       entity me;
+       me = spawnXonoticImage();
+       me.configureXonoticImage(me, theImage, theAspect);
+       return me;
+}
+void configureXonoticImageXonoticImage(entity me, string theImage, float theAspect)
+{
+       me.configureImage(me, theImage);
+       if(theAspect < 0) // use image aspect
+       {
+               vector sz;
+               sz = draw_PictureSize(theImage);
+               me.forcedAspect = sz_x / sz_y;
+       }
+       else
+               me.forcedAspect = theAspect;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/inputbox.c b/qcsrc/menu/xonotic/inputbox.c
new file mode 100644 (file)
index 0000000..0793ae1
--- /dev/null
@@ -0,0 +1,90 @@
+#ifdef INTERFACE
+CLASS(XonoticInputBox) EXTENDS(InputBox)
+       METHOD(XonoticInputBox, configureXonoticInputBox, void(entity, float, string))
+       METHOD(XonoticInputBox, focusLeave, void(entity))
+       METHOD(XonoticInputBox, setText, void(entity, string))
+       ATTRIB(XonoticInputBox, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticInputBox, image, string, SKINGFX_INPUTBOX)
+       ATTRIB(XonoticInputBox, onChange, void(entity, entity), SUB_Null)
+       ATTRIB(XonoticInputBox, onChangeEntity, entity, NULL)
+       ATTRIB(XonoticInputBox, onEnter, void(entity, entity), SUB_Null)
+       ATTRIB(XonoticInputBox, onEnterEntity, entity, NULL)
+       ATTRIB(XonoticInputBox, marginLeft, float, SKINMARGIN_INPUTBOX_CHARS)
+       ATTRIB(XonoticInputBox, marginRight, float, SKINMARGIN_INPUTBOX_CHARS)
+       ATTRIB(XonoticInputBox, color, vector, SKINCOLOR_INPUTBOX_N)
+       ATTRIB(XonoticInputBox, colorF, vector, SKINCOLOR_INPUTBOX_F)
+
+       ATTRIB(XonoticInputBox, alpha, float, SKINALPHA_TEXT)
+
+       ATTRIB(XonoticInputBox, cvarName, string, string_null)
+       METHOD(XonoticInputBox, loadCvars, void(entity))
+       METHOD(XonoticInputBox, saveCvars, void(entity))
+       METHOD(XonoticInputBox, keyDown, float(entity, float, float, float))
+ENDCLASS(XonoticInputBox)
+entity makeXonoticInputBox(float, string);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticInputBox(float doEditColorCodes, string theCvar)
+{
+       entity me;
+       me = spawnXonoticInputBox();
+       me.configureXonoticInputBox(me, doEditColorCodes, theCvar);
+       return me;
+}
+void configureXonoticInputBoxXonoticInputBox(entity me, float doEditColorCodes, string theCvar)
+{
+       me.configureInputBox(me, "", 0, me.fontSize, me.image);
+       me.editColorCodes = doEditColorCodes;
+       if(theCvar)
+       {
+               me.cvarName = theCvar;
+               me.tooltip = getZonedTooltipForIdentifier(theCvar);
+               me.loadCvars(me);
+       }
+       me.cursorPos = strlen(me.text);
+}
+void focusLeaveXonoticInputBox(entity me)
+{
+       me.saveCvars(me);
+}
+void setTextXonoticInputBox(entity me, string new)
+{
+       if(me.text != new)
+       {
+               setTextInputBox(me, new);
+               me.onChange(me, me.onChangeEntity);
+       }
+       else
+               setTextInputBox(me, new);
+}
+void loadCvarsXonoticInputBox(entity me)
+{
+       if not(me.cvarName)
+               return;
+       setTextInputBox(me, cvar_string(me.cvarName));
+}
+void saveCvarsXonoticInputBox(entity me)
+{
+       if not(me.cvarName)
+               return;
+       cvar_set(me.cvarName, me.text);
+}
+float keyDownXonoticInputBox(entity me, float key, float ascii, float shift)
+{
+       float r;
+       r = 0;
+       if(key == K_ENTER)
+       {
+               if(me.cvarName)
+               {
+                       me.saveCvars(me);
+                       r = 1;
+               }
+               me.onEnter(me, me.onEnterEntity);
+       }
+       if(keyDownInputBox(me, key, ascii, shift))
+               r = 1;
+       return r;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/keybinder.c b/qcsrc/menu/xonotic/keybinder.c
new file mode 100644 (file)
index 0000000..6b490be
--- /dev/null
@@ -0,0 +1,319 @@
+#ifdef INTERFACE
+CLASS(XonoticKeyBinder) EXTENDS(XonoticListBox)
+       METHOD(XonoticKeyBinder, configureXonoticKeyBinder, void(entity))
+       ATTRIB(XonoticKeyBinder, rowsPerItem, float, 1)
+       METHOD(XonoticKeyBinder, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticKeyBinder, clickListBoxItem, void(entity, float, vector))
+       METHOD(XonoticKeyBinder, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticKeyBinder, setSelected, void(entity, float))
+       METHOD(XonoticKeyBinder, keyDown, float(entity, float, float, float))
+       METHOD(XonoticKeyBinder, keyGrabbed, void(entity, float, float))
+
+       ATTRIB(XonoticKeyBinder, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticKeyBinder, realUpperMargin, float, 0)
+       ATTRIB(XonoticKeyBinder, columnFunctionOrigin, float, 0)
+       ATTRIB(XonoticKeyBinder, columnFunctionSize, float, 0)
+       ATTRIB(XonoticKeyBinder, columnKeysOrigin, float, 0)
+       ATTRIB(XonoticKeyBinder, columnKeysSize, float, 0)
+
+       ATTRIB(XonoticKeyBinder, lastClickedKey, float, -1)
+       ATTRIB(XonoticKeyBinder, lastClickedTime, float, 0)
+       ATTRIB(XonoticKeyBinder, previouslySelected, float, -1)
+       ATTRIB(XonoticKeyBinder, inMouseHandler, float, 0)
+       ATTRIB(XonoticKeyBinder, userbindEditButton, entity, NULL)
+       ATTRIB(XonoticKeyBinder, keyGrabButton, entity, NULL)
+       ATTRIB(XonoticKeyBinder, userbindEditDialog, entity, NULL)
+       METHOD(XonoticKeyBinder, editUserbind, void(entity, string, string, string))
+ENDCLASS(XonoticKeyBinder)
+entity makeXonoticKeyBinder();
+void KeyBinder_Bind_Change(entity btn, entity me);
+void KeyBinder_Bind_Clear(entity btn, entity me);
+void KeyBinder_Bind_Edit(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+
+#define MAX_KEYS_PER_FUNCTION 2
+#define MAX_KEYBINDS 256
+string Xonotic_KeyBinds_Functions[MAX_KEYBINDS];
+string Xonotic_KeyBinds_Descriptions[MAX_KEYBINDS];
+var float Xonotic_KeyBinds_Count = -1;
+
+void Xonotic_KeyBinds_Read()
+{
+       float fh;
+       string s;
+
+       Xonotic_KeyBinds_Count = 0;
+       fh = fopen("keybinds.txt", FILE_READ);
+       if(fh < 0)
+               return;
+       while((s = fgets(fh)))
+       {
+               if(tokenize_console(s) != 2)
+                       continue;
+               Xonotic_KeyBinds_Functions[Xonotic_KeyBinds_Count] = strzone(argv(0));
+               Xonotic_KeyBinds_Descriptions[Xonotic_KeyBinds_Count] = strzone(argv(1));
+               ++Xonotic_KeyBinds_Count;
+               if(Xonotic_KeyBinds_Count >= MAX_KEYBINDS)
+                       break;
+       }
+       fclose(fh);
+}
+
+entity makeXonoticKeyBinder()
+{
+       entity me;
+       me = spawnXonoticKeyBinder();
+       me.configureXonoticKeyBinder(me);
+       return me;
+}
+void configureXonoticKeyBinderXonoticKeyBinder(entity me)
+{
+       me.configureXonoticListBox(me);
+       if(Xonotic_KeyBinds_Count < 0)
+               Xonotic_KeyBinds_Read();
+       me.nItems = Xonotic_KeyBinds_Count;
+       me.setSelected(me, 0);
+}
+void resizeNotifyXonoticKeyBinder(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
+       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
+       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+
+       me.columnFunctionOrigin = 0;
+       me.columnKeysSize = me.realFontSize_x * 12;
+       me.columnFunctionSize = 1 - me.columnKeysSize - 2 * me.realFontSize_x;
+       me.columnKeysOrigin = me.columnFunctionOrigin + me.columnFunctionSize + me.realFontSize_x;
+
+       if(me.userbindEditButton)
+               me.userbindEditButton.disabled = (substring(Xonotic_KeyBinds_Descriptions[me.selectedItem], 0, 1) != "$");
+}
+void KeyBinder_Bind_Change(entity btn, entity me)
+{
+       string func;
+
+       func = Xonotic_KeyBinds_Functions[me.selectedItem];
+       if(func == "")
+               return;
+
+       me.keyGrabButton.forcePressed = 1;
+       keyGrabber = me;
+}
+void keyGrabbedXonoticKeyBinder(entity me, float key, float ascii)
+{
+       float n, j, k, nvalid;
+       string func;
+
+       me.keyGrabButton.forcePressed = 0;
+       if(key == K_ESCAPE)
+               return;
+
+       func = Xonotic_KeyBinds_Functions[me.selectedItem];
+       if(func == "")
+               return;
+
+       n = tokenize(findkeysforcommand(func)); // uses '...' strings
+       nvalid = 0;
+       for(j = 0; j < n; ++j)
+       {
+               k = stof(argv(j));
+               if(k != -1)
+                       ++nvalid;
+       }
+       if(nvalid >= MAX_KEYS_PER_FUNCTION)
+       {
+               for(j = 0; j < n; ++j)
+               {
+                       k = stof(argv(j));
+                       if(k != -1)
+                               localcmd("\nunbind \"", keynumtostring(k), "\"\n");
+               }
+       }
+       localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
+}
+void editUserbindXonoticKeyBinder(entity me, string theName, string theCommandPress, string theCommandRelease)
+{
+       string func, descr;
+
+       if(!me.userbindEditDialog)
+               return;
+       
+       func = Xonotic_KeyBinds_Functions[me.selectedItem];
+       if(func == "")
+               return;
+       
+       descr = Xonotic_KeyBinds_Descriptions[me.selectedItem];
+       if(substring(descr, 0, 1) != "$")
+               return;
+       descr = substring(descr, 1, strlen(descr) - 1);
+
+       // Hooray! It IS a user bind!
+       cvar_set(strcat(descr, "_description"), theName);
+       cvar_set(strcat(descr, "_press"), theCommandPress);
+       cvar_set(strcat(descr, "_release"), theCommandRelease);
+}
+void KeyBinder_Bind_Edit(entity btn, entity me)
+{
+       string func, descr;
+
+       if(!me.userbindEditDialog)
+               return;
+       
+       func = Xonotic_KeyBinds_Functions[me.selectedItem];
+       if(func == "")
+               return;
+       
+       descr = Xonotic_KeyBinds_Descriptions[me.selectedItem];
+       if(substring(descr, 0, 1) != "$")
+               return;
+       descr = substring(descr, 1, strlen(descr) - 1);
+
+       // Hooray! It IS a user bind!
+       me.userbindEditDialog.loadUserBind(me.userbindEditDialog, cvar_string(strcat(descr, "_description")), cvar_string(strcat(descr, "_press")), cvar_string(strcat(descr, "_release")));
+
+       DialogOpenButton_Click(btn, me.userbindEditDialog);
+}
+void KeyBinder_Bind_Clear(entity btn, entity me)
+{
+       float n, j, k;
+       string func;
+
+       func = Xonotic_KeyBinds_Functions[me.selectedItem];
+       if(func == "")
+               return;
+
+       n = tokenize(findkeysforcommand(func)); // uses '...' strings
+       for(j = 0; j < n; ++j)
+       {
+               k = stof(argv(j));
+               if(k != -1)
+                       localcmd("\nunbind \"", keynumtostring(k), "\"\n");
+       }
+
+}
+void clickListBoxItemXonoticKeyBinder(entity me, float i, vector where)
+{
+       if(i == me.lastClickedServer)
+               if(time < me.lastClickedTime + 0.3)
+               {
+                       // DOUBLE CLICK!
+                       KeyBinder_Bind_Change(NULL, me);
+               }
+       me.lastClickedServer = i;
+       me.lastClickedTime = time;
+}
+void setSelectedXonoticKeyBinder(entity me, float i)
+{
+       // handling of "unselectable" items
+       i = floor(0.5 + bound(0, i, me.nItems - 1));
+       if(me.pressed == 0 || me.pressed == 1) // keyboard or scrolling - skip unselectable items
+       {
+               if(i > me.previouslySelected)
+               {
+                       while((i < me.nItems - 1) && (Xonotic_KeyBinds_Functions[i] == ""))
+                               ++i;
+               }
+               while((i > 0) && (Xonotic_KeyBinds_Functions[i] == ""))
+                       --i;
+               while((i < me.nItems - 1) && (Xonotic_KeyBinds_Functions[i] == ""))
+                       ++i;
+       }
+       if(me.pressed == 3) // released the mouse - fall back to last valid item
+       {
+               if(Xonotic_KeyBinds_Functions[i] == "")
+                       i = me.previouslySelected;
+       }
+       if(Xonotic_KeyBinds_Functions[i] != "")
+               me.previouslySelected = i;
+       if(me.userbindEditButton)
+               me.userbindEditButton.disabled = (substring(Xonotic_KeyBinds_Descriptions[i], 0, 1) != "$");
+       setSelectedListBox(me, i);
+}
+float keyDownXonoticKeyBinder(entity me, float key, float ascii, float shift)
+{
+       float r;
+       r = 1;
+       switch(key)
+       {
+               case K_ENTER:
+               case K_SPACE:
+                       KeyBinder_Bind_Change(me, me);
+                       break;
+               case K_DEL:
+               case K_BACKSPACE:
+                       KeyBinder_Bind_Clear(me, me);
+                       break;
+               default:
+                       r = keyDownListBox(me, key, ascii, shift);
+                       break;
+       }
+       return r;
+}
+void drawListBoxItemXonoticKeyBinder(entity me, float i, vector absSize, float isSelected)
+{
+       string s;
+       float j, k, n;
+       vector theColor;
+       float theAlpha;
+       string func, descr;
+       float extraMargin;
+
+       descr = Xonotic_KeyBinds_Descriptions[i];
+       func = Xonotic_KeyBinds_Functions[i];
+
+       if(func == "")
+       {
+               theAlpha = 1;
+               theColor = SKINCOLOR_KEYGRABBER_TITLES;
+               theAlpha = SKINALPHA_KEYGRABBER_TITLES;
+               extraMargin = 0;
+       }
+       else
+       {
+               if(isSelected)
+               {
+                       if(keyGrabber == me)
+                               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_WAITING, SKINALPHA_LISTBOX_WAITING);
+                       else
+                               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+               }
+               theAlpha = SKINALPHA_KEYGRABBER_KEYS;
+               theColor = SKINCOLOR_KEYGRABBER_KEYS;
+               extraMargin = me.realFontSize_x * 0.5;
+       }
+
+       if(substring(descr, 0, 1) == "$")
+       {
+               s = substring(descr, 1, strlen(descr) - 1);
+               descr = cvar_string(strcat(s, "_description"));
+               if(descr == "")
+                       descr = s;
+               if(cvar_string(strcat(s, "_press")) == "")
+                       if(cvar_string(strcat(s, "_release")) == "")
+                               theAlpha *= SKINALPHA_DISABLED;
+       }
+
+       draw_Text(me.realUpperMargin * eY + extraMargin * eX, descr, me.realFontSize, theColor, theAlpha, 0);
+       if(func != "")
+       {
+               n = tokenize(findkeysforcommand(func)); // uses '...' strings
+               s = "";
+               for(j = 0; j < n; ++j)
+               {
+                       k = stof(argv(j));
+                       if(k != -1)
+                       {
+                               if(s != "")
+                                       s = strcat(s, ", ");
+                               s = strcat(s, keynumtostring(k));
+                       }
+               }
+               s = draw_TextShortenToWidth(s, me.columnKeysSize, 0, me.realFontSize);
+               draw_CenterText(me.realUpperMargin * eY + (me.columnKeysOrigin + 0.5 * me.columnKeysSize) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       }
+}
+#endif
diff --git a/qcsrc/menu/xonotic/listbox.c b/qcsrc/menu/xonotic/listbox.c
new file mode 100644 (file)
index 0000000..ce08d4b
--- /dev/null
@@ -0,0 +1,37 @@
+#ifdef INTERFACE
+CLASS(XonoticListBox) EXTENDS(ListBox)
+       METHOD(XonoticListBox, configureXonoticListBox, void(entity))
+       ATTRIB(XonoticListBox, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticListBox, scrollbarWidth, float, SKINWIDTH_SCROLLBAR)
+       ATTRIB(XonoticListBox, src, string, SKINGFX_SCROLLBAR)
+       ATTRIB(XonoticListBox, tolerance, vector, SKINTOLERANCE_SLIDER)
+       ATTRIB(XonoticListBox, rowsPerItem, float, 1)
+       METHOD(XonoticListBox, resizeNotify, void(entity, vector, vector, vector, vector))
+       ATTRIB(XonoticListBox, color, vector, SKINCOLOR_SCROLLBAR_N)
+       ATTRIB(XonoticListBox, colorF, vector, SKINCOLOR_SCROLLBAR_F)
+       ATTRIB(XonoticListBox, color2, vector, SKINCOLOR_SCROLLBAR_S)
+       ATTRIB(XonoticListBox, colorC, vector, SKINCOLOR_SCROLLBAR_C)
+       ATTRIB(XonoticListBox, colorBG, vector, SKINCOLOR_LISTBOX_BACKGROUND)
+       ATTRIB(XonoticListBox, alphaBG, float, SKINALPHA_LISTBOX_BACKGROUND)
+ENDCLASS(XonoticListBox)
+entity makeXonoticListBox();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticListBox()
+{
+       entity me;
+       me = spawnXonoticListBox();
+       me.configureXonoticListBox(me);
+       return me;
+}
+void configureXonoticListBoxXonoticListBox(entity me)
+{
+       me.configureListBox(me, me.scrollbarWidth, 1); // item height gets set up later
+}
+void resizeNotifyXonoticListBox(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       me.itemHeight = me.rowsPerItem * me.fontSize / absSize_y;
+       resizeNotifyListBox(me, relOrigin, relSize, absOrigin, absSize);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/mainwindow.c b/qcsrc/menu/xonotic/mainwindow.c
new file mode 100644 (file)
index 0000000..979bb57
--- /dev/null
@@ -0,0 +1,115 @@
+#ifdef INTERFACE
+CLASS(MainWindow) EXTENDS(ModalController)
+       METHOD(MainWindow, configureMainWindow, void(entity))
+       ATTRIB(MainWindow, advancedDialog, entity, NULL)
+       ATTRIB(MainWindow, mutatorsDialog, entity, NULL)
+       ATTRIB(MainWindow, weaponsDialog, entity, NULL)
+       ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
+       ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
+       ATTRIB(MainWindow, winnerDialog, entity, NULL)
+       ATTRIB(MainWindow, radarDialog, entity, NULL)
+       ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
+       ATTRIB(MainWindow, cvarsDialog, entity, NULL)
+       ATTRIB(MainWindow, mainNexposee, entity, NULL)
+       ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
+ENDCLASS(MainWindow)
+#endif
+
+#ifdef IMPLEMENTATION
+
+void DemoButton_Click(entity me, entity other)
+{
+       if(me.text == "Do not press this button again!")
+               DialogOpenButton_Click(me, other);
+       else
+               me.setText(me, "Do not press this button again!");
+}
+
+void configureMainWindowMainWindow(entity me)
+{
+       entity n, i;
+
+       i = spawnXonoticTeamSelectDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.advancedDialog = i = spawnXonoticAdvancedDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.mapInfoDialog = i = spawnXonoticMapInfoDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.winnerDialog = i = spawnXonoticWinnerDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.weaponsDialog = i = spawnXonoticWeaponsDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+       me.radarDialog = i = spawnXonoticRadarDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       me.serverInfoDialog = i = spawnXonoticServerInfoDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       me.cvarsDialog = i = spawnXonoticCvarsDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       
+       me.mainNexposee = n = spawnXonoticNexposee();
+       /*
+               if(checkextension("DP_GECKO_SUPPORT"))
+               {
+                       i = spawnXonoticNewsDialog();
+                       i.configureDialog(i);
+                       n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+                       n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               }
+       */
+               i = spawnXonoticSingleplayerDialog();
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               
+               i = spawnXonoticMultiplayerDialog();
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+
+               i = spawnXonoticSettingsDialog();
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+
+               i = spawnXonoticCreditsDialog();
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
+
+               i = spawnXonoticQuitDialog();
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
+       me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
+       me.moveItemAfter(me, n, NULL);
+
+       me.initializeDialog(me, n);
+}
+#endif
+
+/* Click. The c-word is here so you can grep for it :-) */
diff --git a/qcsrc/menu/xonotic/maplist.c b/qcsrc/menu/xonotic/maplist.c
new file mode 100644 (file)
index 0000000..9bce96d
--- /dev/null
@@ -0,0 +1,355 @@
+#ifdef INTERFACE
+CLASS(XonoticMapList) EXTENDS(XonoticListBox)
+       METHOD(XonoticMapList, configureXonoticMapList, void(entity))
+       ATTRIB(XonoticMapList, rowsPerItem, float, 4)
+       METHOD(XonoticMapList, draw, void(entity))
+       METHOD(XonoticMapList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticMapList, clickListBoxItem, void(entity, float, vector))
+       METHOD(XonoticMapList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticMapList, refilter, void(entity))
+       METHOD(XonoticMapList, refilterCallback, void(entity, entity))
+       METHOD(XonoticMapList, keyDown, float(entity, float, float, float))
+
+       ATTRIB(XonoticMapList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticMapList, columnPreviewOrigin, float, 0)
+       ATTRIB(XonoticMapList, columnPreviewSize, float, 0)
+       ATTRIB(XonoticMapList, columnNameOrigin, float, 0)
+       ATTRIB(XonoticMapList, columnNameSize, float, 0)
+       ATTRIB(XonoticMapList, checkMarkOrigin, vector, '0 0 0')
+       ATTRIB(XonoticMapList, checkMarkSize, vector, '0 0 0')
+       ATTRIB(XonoticMapList, realUpperMargin1, float, 0)
+       ATTRIB(XonoticMapList, realUpperMargin2, float, 0)
+
+       ATTRIB(XonoticMapList, lastClickedMap, float, -1)
+       ATTRIB(XonoticMapList, lastClickedTime, float, 0)
+
+       ATTRIB(XonoticMapList, lastGametype, float, 0)
+       ATTRIB(XonoticMapList, lastFeatures, float, 0)
+
+       ATTRIB(XonoticMapList, origin, vector, '0 0 0')
+       ATTRIB(XonoticMapList, itemAbsSize, vector, '0 0 0')
+
+       ATTRIB(XonoticMapList, g_maplistCache, string, string_null)
+       METHOD(XonoticMapList, g_maplistCacheToggle, void(entity, float))
+       METHOD(XonoticMapList, g_maplistCacheQuery, float(entity, float))
+
+       ATTRIB(XonoticMapList, startButton, entity, NULL)
+
+       METHOD(XonoticMapList, loadCvars, void(entity))
+
+       ATTRIB(XonoticMapList, typeToSearchString, string, string_null)
+       ATTRIB(XonoticMapList, typeToSearchTime, float, 0)
+
+       METHOD(XonoticMapList, destroy, void(entity))
+
+       ATTRIB(XonoticListBox, alphaBG, float, 0)
+ENDCLASS(XonoticMapList)
+entity makeXonoticMapList();
+void MapList_All(entity btn, entity me);
+void MapList_None(entity btn, entity me);
+void MapList_LoadMap(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+void destroyXonoticMapList(entity me)
+{
+       MapInfo_Shutdown();
+}
+
+entity makeXonoticMapList()
+{
+       entity me;
+       me = spawnXonoticMapList();
+       me.configureXonoticMapList(me);
+       return me;
+}
+
+void configureXonoticMapListXonoticMapList(entity me)
+{
+       me.configureXonoticListBox(me);
+       me.refilter(me);
+}
+
+void loadCvarsXonoticMapList(entity me)
+{
+       me.refilter(me);
+}
+
+float g_maplistCacheQueryXonoticMapList(entity me, float i)
+{
+       return stof(substring(me.g_maplistCache, i, 1));
+}
+void g_maplistCacheToggleXonoticMapList(entity me, float i)
+{
+       string a, b, c, s, bspname;
+       float n;
+       s = me.g_maplistCache;
+       if not(s)
+               return;
+       b = substring(s, i, 1);
+       if(b == "0")
+               b = "1";
+       else if(b == "1")
+               b = "0";
+       else
+               return; // nothing happens
+       a = substring(s, 0, i);
+       c = substring(s, i+1, strlen(s) - (i+1));
+       strunzone(s);
+       me.g_maplistCache = strzone(strcat(a, b, c));
+       // TODO also update the actual cvar
+       if not((bspname = MapInfo_BSPName_ByID(i)))
+               return;
+       if(b == "1")
+               cvar_set("g_maplist", strcat(bspname, " ", cvar_string("g_maplist")));
+       else
+       {
+               s = "";
+               n = tokenize_console(cvar_string("g_maplist"));
+               for(i = 0; i < n; ++i)
+                       if(argv(i) != bspname)
+                               s = strcat(s, " ", argv(i));
+               cvar_set("g_maplist", substring(s, 1, strlen(s) - 1));
+       }
+}
+
+void drawXonoticMapList(entity me)
+{
+       if(me.startButton)
+               me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems));
+       drawListBox(me);
+}
+
+void resizeNotifyXonoticMapList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       me.itemAbsSize = '0 0 0';
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
+       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
+       me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize_y);
+       me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize_y;
+
+       me.columnPreviewOrigin = 0;
+       me.columnPreviewSize = me.itemAbsSize_y / me.itemAbsSize_x * 4 / 3;
+       me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize_x;
+       me.columnNameSize = 1 - me.columnPreviewSize - 2 * me.realFontSize_x;
+
+       me.checkMarkSize = (eX * (me.itemAbsSize_y / me.itemAbsSize_x) + eY) * 0.5;
+       me.checkMarkOrigin = eY + eX * (me.columnPreviewOrigin + me.columnPreviewSize) - me.checkMarkSize;
+}
+
+void clickListBoxItemXonoticMapList(entity me, float i, vector where)
+{
+       if(where_x <= me.columnPreviewOrigin + me.columnPreviewSize)
+       {
+               if(where_x >= 0)
+                       me.g_maplistCacheToggle(me, i);
+       }
+       if(where_x >= me.columnNameOrigin)
+               if(where_x <= 1)
+                       {
+                               if(i == me.lastClickedMap)
+                                       if(time < me.lastClickedTime + 0.3)
+                                       {
+                                               // DOUBLE CLICK!
+                                               // pop up map info screen
+                                               main.mapInfoDialog.loadMapInfo(main.mapInfoDialog, i, me);
+                                               DialogOpenButton_Click_withCoords(NULL, main.mapInfoDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * i - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
+                                               return;
+                                       }
+                               me.lastClickedMap = i;
+                               me.lastClickedTime = time;
+                       }
+}
+
+void drawListBoxItemXonoticMapList(entity me, float i, vector absSize, float isSelected)
+{
+       // layout: Ping, Map name, Map name, NP, TP, MP
+       string s;
+       float p;
+       float theAlpha;
+       float included;
+
+       if(!MapInfo_Get_ByID(i))
+               return;
+
+       included = me.g_maplistCacheQuery(me, i);
+       if(included || isSelected)
+               theAlpha = SKINALPHA_MAPLIST_INCLUDEDFG;
+       else
+               theAlpha = SKINALPHA_MAPLIST_NOTINCLUDEDFG;
+
+       if(isSelected)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+       else if(included)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
+
+       s = ftos(p);
+       draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
+       if(included)
+               draw_Picture(me.checkMarkOrigin, "checkmark", me.checkMarkSize, '1 1 1', 1);
+       s = draw_TextShortenToWidth(strcat(MapInfo_Map_bspname, ": ", MapInfo_Map_title), me.columnNameSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_MAPLIST_TITLE, theAlpha, 0);
+       s = draw_TextShortenToWidth(MapInfo_Map_author, me.columnNameSize, 0,  me.realFontSize);
+       draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_MAPLIST_AUTHOR, theAlpha, 0);
+
+       MapInfo_ClearTemps();
+}
+
+void refilterXonoticMapList(entity me)
+{
+       float i, j, n;
+       string s;
+       float gt, f;
+       gt = MapInfo_CurrentGametype();
+       f = MapInfo_CurrentFeatures();
+       MapInfo_FilterGametype(gt, f, MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
+       me.nItems = MapInfo_count;
+       for(i = 0; i < MapInfo_count; ++i)
+               draw_PreloadPicture(strcat("/maps/", MapInfo_BSPName_ByID(i)));
+       if(me.g_maplistCache)
+               strunzone(me.g_maplistCache);
+       s = "0";
+       for(i = 1; i < MapInfo_count; i *= 2)
+               s = strcat(s, s);
+       n = tokenize_console(cvar_string("g_maplist"));
+       for(i = 0; i < n; ++i)
+       {
+               j = MapInfo_FindName(argv(i));
+               if(j >= 0)
+                       s = strcat(
+                               substring(s, 0, j),
+                               "1",
+                               substring(s, j+1, MapInfo_count - (j+1))
+                       );
+       }
+       me.g_maplistCache = strzone(s);
+       if(gt != me.lastGametype || f != me.lastFeatures)
+       {
+               me.lastGametype = gt;
+               me.lastFeatures = f;
+               me.setSelected(me, 0);
+       }
+}
+
+void refilterCallbackXonoticMapList(entity me, entity cb)
+{
+       me.refilter(me);
+}
+
+void MapList_All(entity btn, entity me)
+{
+       float i;
+       string s;
+       MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_FORBIDDEN, 0); // all
+       s = "";
+       for(i = 0; i < MapInfo_count; ++i)
+               s = strcat(s, " ", MapInfo_BSPName_ByID(i));
+       cvar_set("g_maplist", substring(s, 1, strlen(s) - 1));
+       me.refilter(me);
+}
+
+void MapList_None(entity btn, entity me)
+{
+       cvar_set("g_maplist", "");
+       me.refilter(me);
+}
+
+void MapList_LoadMap(entity btn, entity me)
+{
+       string m;
+       float i;
+
+       i = me.selectedItem;
+
+       if(btn.parent.instanceOfXonoticMapInfoDialog)
+       {
+               i = btn.parent.currentMapIndex;
+               Dialog_Close(btn, btn.parent);
+       }
+
+       if(i >= me.nItems || i < 0)
+               return;
+
+       m = MapInfo_BSPName_ByID(i);
+       if not(m)
+       {
+               print("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n");
+               return;
+       }
+       if(MapInfo_CheckMap(m))
+       {
+               localcmd("\nmenu_loadmap_prepare\n");
+               if(cvar("menu_use_default_hostname"))
+                       localcmd("hostname \"", strdecolorize(cvar_string("_cl_name")), "'s Xonotic server\"\n");
+               MapInfo_LoadMap(m);
+       }
+       else
+       {
+               print("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n");
+               me.refilter(me);
+       }
+}
+
+float keyDownXonoticMapList(entity me, float scan, float ascii, float shift)
+{
+       string ch, save;
+       if(scan == K_ENTER)
+       {
+               // pop up map info screen
+               main.mapInfoDialog.loadMapInfo(main.mapInfoDialog, me.selectedItem, me);
+               DialogOpenButton_Click_withCoords(NULL, main.mapInfoDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * me.selectedItem - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
+       }
+       else if(scan == K_SPACE)
+       {
+               me.g_maplistCacheToggle(me, me.selectedItem);
+       }
+       else if(ascii == 43) // +
+       {
+               if not(me.g_maplistCacheQuery(me, me.selectedItem))
+                       me.g_maplistCacheToggle(me, me.selectedItem);
+       }
+       else if(ascii == 45) // -
+       {
+               if(me.g_maplistCacheQuery(me, me.selectedItem))
+                       me.g_maplistCacheToggle(me, me.selectedItem);
+       }
+       else if(scan == K_BACKSPACE)
+       {
+               if(time < me.typeToSearchTime)
+               {
+                       save = substring(me.typeToSearchString, 0, strlen(me.typeToSearchString) - 1);
+                       if(me.typeToSearchString)
+                               strunzone(me.typeToSearchString);
+                       me.typeToSearchString = strzone(save);
+                       me.typeToSearchTime = time + 0.5;
+                       if(strlen(me.typeToSearchString))
+                       {
+                               MapInfo_FindName(me.typeToSearchString);
+                               if(MapInfo_FindName_firstResult >= 0)
+                                       me.setSelected(me, MapInfo_FindName_firstResult);
+                       }
+               }
+       }
+       else if(ascii >= 32 && ascii != 127)
+       {
+               ch = chr(ascii);
+               if(time > me.typeToSearchTime)
+                       save = ch;
+               else
+                       save = strcat(me.typeToSearchString, ch);
+               if(me.typeToSearchString)
+                       strunzone(me.typeToSearchString);
+               me.typeToSearchString = strzone(save);
+               me.typeToSearchTime = time + 0.5;
+               MapInfo_FindName(me.typeToSearchString);
+               if(MapInfo_FindName_firstResult >= 0)
+                       me.setSelected(me, MapInfo_FindName_firstResult);
+       }
+       else
+               return keyDownListBox(me, scan, ascii, shift);
+       return 1;
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/modbutton.c b/qcsrc/menu/xonotic/modbutton.c
new file mode 100644 (file)
index 0000000..0f52371
--- /dev/null
@@ -0,0 +1,46 @@
+#ifdef INTERFACE
+CLASS(XonoticModButton) EXTENDS(XonoticButton)
+       METHOD(XonoticModButton, configureXonoticModButton, void(entity, string))
+       ATTRIB(XonoticModButton, destination, string, string_null)
+ENDCLASS(XonoticModButton)
+entity makeXonoticModButton(string menu);
+void XonoticModButton_Click(entity me, entity other);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticModButton(string menu)
+{
+       entity me;
+       me = spawnXonoticModButton();
+       me.configureXonoticModButton(me, menu);
+       return me;
+}
+
+void XonoticModButton_Click(entity me, entity other)
+{
+       string thecmd;
+       thecmd = strcat("\ndisconnect\nmenu_restart");
+
+       if (me.destination != "")
+               thecmd = strcat(thecmd, "\ntogglemenu\ndefer 0.1 \"menu_cmd directmenu ", me.destination,"\"\n");
+
+       if (cvar_string("menu_slist_modfilter") == "havoc")
+               thecmd = strcat("\ngamedir data", thecmd);
+       else
+               thecmd = strcat("\ngamedir havoc", thecmd);
+       cmd(thecmd);
+}
+
+void configureXonoticModButtonXonoticModButton(entity me, string menu)
+{
+       me.configureXonoticButton(me, "", '0 0 0');
+       me.onClick = XonoticModButton_Click;
+       me.onClickEntity = me;
+       me.destination = menu;
+
+       if (cvar_string("menu_slist_modfilter") == "havoc")
+               me.text = "Switch to Xonotic mode";
+       else
+               me.text = "Switch to Havoc mode";
+}
+#endif
diff --git a/qcsrc/menu/xonotic/nexposee.c b/qcsrc/menu/xonotic/nexposee.c
new file mode 100644 (file)
index 0000000..32253b0
--- /dev/null
@@ -0,0 +1,26 @@
+#ifdef INTERFACE
+CLASS(XonoticNexposee) EXTENDS(Nexposee)
+       METHOD(XonoticNexposee, configureXonoticNexposee, void(entity))
+       METHOD(XonoticNexposee, close, void(entity))
+ENDCLASS(XonoticNexposee)
+entity makeXonoticNexposee();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticNexposee()
+{
+       entity me;
+       me = spawnXonoticNexposee();
+       me.configureXonoticNexposee(me);
+       return me;
+}
+
+void configureXonoticNexposeeXonoticNexposee(entity me)
+{
+}
+
+void closeXonoticNexposee(entity me)
+{
+       m_goto(string_null); // hide
+}
+#endif
diff --git a/qcsrc/menu/xonotic/playerlist.c b/qcsrc/menu/xonotic/playerlist.c
new file mode 100644 (file)
index 0000000..4406e58
--- /dev/null
@@ -0,0 +1,137 @@
+#ifdef INTERFACE
+CLASS(XonoticPlayerList) EXTENDS(XonoticListBox)
+       ATTRIB(XonoticPlayerList, rowsPerItem, float, 1)
+       METHOD(XonoticPlayerList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticPlayerList, drawListBoxItem, void(entity, float, vector, float))
+       ATTRIB(XonoticPlayerList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticPlayerList, columnNameOrigin, float, 0)
+       ATTRIB(XonoticPlayerList, columnNameSize, float, 0)
+       ATTRIB(XonoticPlayerList, columnScoreOrigin, float, 0)
+       ATTRIB(XonoticPlayerList, columnScoreSize, float, 0)
+       ATTRIB(XonoticPlayerList, realUpperMargin, float, 0)
+       ATTRIB(XonoticPlayerList, origin, vector, '0 0 0')
+       ATTRIB(XonoticPlayerList, itemAbsSize, vector, '0 0 0')
+       METHOD(XonoticPlayerList, setPlayerList, void(entity, string))
+       METHOD(XonoticPlayerList, getPlayerList, string(entity, float, float))
+       ATTRIB(XonoticPlayerList, playerList, float, -1)
+ENDCLASS(XonoticPlayerList)
+entity makeXonoticPlayerList();
+#endif
+
+#ifdef IMPLEMENTATION
+
+#define PLAYERPARM_SCORE 0
+#define PLAYERPARM_PING 1
+#define PLAYERPARM_TEAM 2
+#define PLAYERPARM_NAME 3
+#define PLAYERPARM_COUNT 4
+
+entity makeXonoticPlayerList()
+{
+       entity me;
+       me = spawnXonoticPlayerList();
+       me.configureXonoticListBox(me);
+       return me;
+}
+
+void setPlayerListXonoticPlayerList(entity me, string plist)
+{
+       dprint(plist,"------------\n");
+
+       float buf,i,n;
+       string s;
+
+       buf = buf_create();
+       me.nItems = tokenizebyseparator(plist, "\n");
+       for(i = 0; i < me.nItems; ++i)
+       {
+               bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME, argv(i)); // -666 100 "^4Nex ^2Player"
+       }
+
+       for(i = 0; i < me.nItems; ++i)
+       {
+               s = bufstr_get(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME);
+               n = tokenize_console(s);
+
+               if(n == 4)
+               {
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_SCORE, argv(0)); // -666
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_PING,  argv(1)); // 100
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_TEAM,  argv(2)); // 0 for spec, else 1, 2, 3, 4
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME,  argv(3)); // ^4Nex ^2Player
+               }
+               else
+               {
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_SCORE, argv(0)); // -666
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_PING,  argv(1)); // 100
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_TEAM,  "-1");
+                       bufstr_set(buf, i * PLAYERPARM_COUNT + PLAYERPARM_NAME,  argv(2)); // ^4Nex ^2Player
+               }
+       }
+       me.playerList = buf;
+}
+
+string getPlayerListXonoticPlayerList(entity me, float i, float key)
+{
+       return bufstr_get(me.playerList, i * PLAYERPARM_COUNT + key);
+}
+
+void resizeNotifyXonoticPlayerList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       me.itemAbsSize = '0 0 0';
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
+       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
+       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+
+       // this list does 1 char left and right margin
+       me.columnScoreSize = 3 * me.realFontSize_x;
+       me.columnNameSize = 1 - 3 * me.realFontSize_x - me.columnScoreSize;
+
+       me.columnNameOrigin = me.realFontSize_x;
+       me.columnScoreOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
+}
+
+void drawListBoxItemXonoticPlayerList(entity me, float i, vector absSize, float isSelected)
+{
+       string s;
+       string score;
+       float t;
+       vector rgb;
+
+       t = stof(me.getPlayerList(me, i, PLAYERPARM_TEAM));
+       if(t == 1)
+               rgb = colormapPaletteColor(4, 0);
+       else if(t == 2)
+               rgb = colormapPaletteColor(13, 0);
+       else if(t == 3)
+               rgb = colormapPaletteColor(12, 0);
+       else if(t == 4)
+               rgb = colormapPaletteColor(9, 0);
+       else
+               rgb = '1 1 1';
+       
+       s = me.getPlayerList(me, i, PLAYERPARM_NAME);
+       score = me.getPlayerList(me, i, PLAYERPARM_SCORE);
+
+       if(substring(score, strlen(score) - 10, 10) == ":spectator")
+       {
+               score = "-666";
+       }
+       else
+       {
+               if((t = strstrofs(score, ":", 0)) >= 0)
+                       score = substring(score, 0, t);
+               if((t = strstrofs(score, ",", 0)) >= 0)
+                       score = substring(score, 0, t);
+       }
+
+       s = draw_TextShortenToWidth(s, me.columnNameSize, 1, me.realFontSize);
+       score = draw_TextShortenToWidth(score, me.columnScoreSize, 0, me.realFontSize);
+
+       draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 1, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', 1, 1);
+       draw_Text(me.realUpperMargin2 * eY + (me.columnScoreOrigin + 1.00 * (me.columnScoreSize - draw_TextWidth(score, 1, me.realFontSize))) * eX, score, me.realFontSize, rgb, 1, 0);
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/playermodel.c b/qcsrc/menu/xonotic/playermodel.c
new file mode 100644 (file)
index 0000000..deeb30c
--- /dev/null
@@ -0,0 +1,200 @@
+#ifdef INTERFACE
+CLASS(XonoticPlayerModelSelector) EXTENDS(XonoticImage)
+       METHOD(XonoticPlayerModelSelector, configureXonoticPlayerModelSelector, void(entity))
+       METHOD(XonoticPlayerModelSelector, loadCvars, void(entity))
+       METHOD(XonoticPlayerModelSelector, saveCvars, void(entity))
+       METHOD(XonoticPlayerModelSelector, draw, void(entity))
+       METHOD(XonoticPlayerModelSelector, resizeNotify, void(entity, vector, vector, vector, vector))
+       ATTRIB(XonoticPlayerModelSelector, currentModel, string, string_null)
+       ATTRIB(XonoticPlayerModelSelector, currentSkin, float, 0)
+       ATTRIB(XonoticPlayerModelSelector, currentModelName, string, string_null)
+       ATTRIB(XonoticPlayerModelSelector, currentModelTitle, string, string_null)
+       ATTRIB(XonoticPlayerModelSelector, currentModelTxtName, string, string_null)
+       ATTRIB(XonoticPlayerModelSelector, currentModelDescription, string, string_null)
+       METHOD(XonoticPlayerModelSelector, go, void(entity, float))
+       ATTRIB(XonoticPlayerModelSelector, origin, vector, '0 0 0')
+       ATTRIB(XonoticPlayerModelSelector, size, vector, '0 0 0')
+       ATTRIB(XonoticPlayerModelSelector, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticPlayerModelSelector, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticPlayerModelSelector, titleFontSize, float, SKINFONTSIZE_TITLE)
+ENDCLASS(XonoticPlayerModelSelector)
+entity makeXonoticPlayerModelSelector();
+void PlayerModelSelector_Next_Click(entity btn, entity me);
+void PlayerModelSelector_Prev_Click(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticPlayerModelSelector()
+{
+       entity me;
+       me = spawnXonoticPlayerModelSelector();
+       me.configureXonoticPlayerModelSelector(me);
+       return me;
+}
+
+void configureXonoticPlayerModelSelectorXonoticPlayerModelSelector(entity me)
+{
+       me.configureXonoticImage(me, string_null, 263.0/360.0);
+       me.loadCvars(me);
+}
+
+void loadCvarsXonoticPlayerModelSelector(entity me)
+{
+       float glob, i, fh;
+       string fn;
+       string nm, t, l;
+
+       if(me.currentModel)
+               strunzone(me.currentModel);
+       if(me.currentModelTitle)
+               strunzone(me.currentModelTitle);
+       if(me.currentModelName)
+               strunzone(me.currentModelName);
+       if(me.currentModelTxtName)
+               strunzone(me.currentModelTxtName);
+       if(me.currentModelDescription)
+               strunzone(me.currentModelDescription);
+       me.currentSkin = cvar("_cl_playerskin");
+       me.currentModel = strzone(cvar_string("_cl_playermodel"));
+       me.currentModelName = string_null;
+       me.currentModelDescription = string_null;
+       me.currentModelTitle = string_null;
+       me.currentModelTxtName = string_null;
+
+       // lookup model name
+       glob = search_begin("models/player/*.txt", TRUE, TRUE);
+       if(glob < 0)
+               return;
+       for(i = 0; i < search_getsize(glob); ++i)
+       {
+               fn = search_getfilename(glob, i);
+               fh = fopen(fn, FILE_READ);
+               if(fh < 0)
+                       continue;
+               t = fgets(fh);
+               nm = fgets(fh);
+               if(stof(fgets(fh)) == me.currentSkin)
+               if(fgets(fh) == me.currentModel)
+               {
+                       me.currentModelName = strzone(strcat("/", nm));
+                       me.currentModelTxtName = strzone(fn);
+                       me.currentModelTitle = strzone(t);
+                       me.currentModelDescription = "";
+                       fgets(fh); // Skip species
+                       while((l = fgets(fh)))
+                       {
+                               if(me.currentModelDescription != "")
+                                       me.currentModelDescription = strcat(me.currentModelDescription, "\n");
+                               me.currentModelDescription = strcat(me.currentModelDescription, l);
+                       }
+                       me.currentModelDescription = strzone(me.currentModelDescription);
+                       fclose(fh);
+                       break;
+               }
+               fclose(fh);
+       }
+       search_end(glob);
+}
+
+void goXonoticPlayerModelSelector(entity me, float d)
+{
+       float glob, i, fh;
+       string l;
+
+       glob = search_begin("models/player/*.txt", TRUE, TRUE);
+       if(glob < 0)
+               return;
+       for(i = 0; i < search_getsize(glob); ++i)
+               if(search_getfilename(glob, i) == me.currentModelTxtName)
+                       break;
+       // now i is search_getsize(glob) if not found, and the right index if found.
+       if(i == search_getsize(glob))
+       {
+               if(d < 0)
+                       i = search_getsize(glob) - 1;
+               else
+                       i = 0;
+       }
+       else
+       {
+               i = mod(i + d + search_getsize(glob), search_getsize(glob));
+       }
+
+       if(me.currentModel)
+               strunzone(me.currentModel);
+       if(me.currentModelTitle)
+               strunzone(me.currentModelTitle);
+       if(me.currentModelName)
+               strunzone(me.currentModelName);
+       if(me.currentModelTxtName)
+               strunzone(me.currentModelTxtName);
+       if(me.currentModelDescription)
+               strunzone(me.currentModelDescription);
+
+       // select model #i!
+       me.currentModelTxtName = strzone(search_getfilename(glob, i));
+       fh = fopen(me.currentModelTxtName, FILE_READ);
+       search_end(glob);
+       if(fh < 0)
+               return;
+       me.currentModelTitle = strzone(fgets(fh));
+       me.currentModelName = strzone(strcat("/", fgets(fh)));
+       me.currentSkin = stof(fgets(fh));
+       me.currentModel = strzone(fgets(fh));
+       me.currentModelDescription = "";
+       fgets(fh); // Skip species
+       while((l = fgets(fh)))
+       {
+               if(me.currentModelDescription != "")
+                       me.currentModelDescription = strcat(me.currentModelDescription, "\n");
+               me.currentModelDescription = strcat(me.currentModelDescription, l);
+       }
+       me.currentModelDescription = strzone(me.currentModelDescription);
+       fclose(fh);
+}
+
+void PlayerModelSelector_Next_Click(entity btn, entity me)
+{
+       me.go(me, +1);
+       me.saveCvars(me);
+}
+
+void PlayerModelSelector_Prev_Click(entity btn, entity me)
+{
+       me.go(me, -1);
+       me.saveCvars(me);
+}
+
+void saveCvarsXonoticPlayerModelSelector(entity me)
+{
+       // TODO rather set the _cl ones and apply later?
+       localcmd(strcat("playermodel ", me.currentModel, "\nplayerskin ", ftos(me.currentSkin), "\n"));
+}
+
+void drawXonoticPlayerModelSelector(entity me)
+{
+       float i, n;
+       vector o;
+
+       me.src = me.currentModelName;
+       drawImage(me);
+       me.src = string_null;
+
+       // draw text on the image, handle \n in the description
+       draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE);
+
+       o = '0.5 1 0' - eY * me.realFontSize_y * ((n = tokenizebyseparator(me.currentModelDescription, "\n")) + 0.5);
+       for(i = 0; i < n; ++i)
+       {
+               draw_CenterText(o, argv(i), me.realFontSize, '1 1 1', 1, FALSE);
+               o += eY * me.realFontSize_y;
+       }
+}
+
+void resizeNotifyXonoticPlayerModelSelector(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       resizeNotifyImage(me, relOrigin, relSize, absOrigin, absSize);
+       me.realFontSize_y = me.fontSize / absSize_y;
+       me.realFontSize_x = me.fontSize / absSize_x;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/radiobutton.c b/qcsrc/menu/xonotic/radiobutton.c
new file mode 100644 (file)
index 0000000..0281a54
--- /dev/null
@@ -0,0 +1,114 @@
+#ifdef INTERFACE
+CLASS(XonoticRadioButton) EXTENDS(RadioButton)
+       METHOD(XonoticRadioButton, configureXonoticRadioButton, void(entity, float, string, string, string))
+       METHOD(XonoticRadioButton, draw, void(entity))
+       METHOD(XonoticRadioButton, setChecked, void(entity, float))
+       ATTRIB(XonoticRadioButton, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticRadioButton, image, string, SKINGFX_RADIOBUTTON)
+       ATTRIB(XonoticRadioButton, color, vector, SKINCOLOR_RADIOBUTTON_N)
+       ATTRIB(XonoticRadioButton, colorC, vector, SKINCOLOR_RADIOBUTTON_C)
+       ATTRIB(XonoticRadioButton, colorF, vector, SKINCOLOR_RADIOBUTTON_F)
+       ATTRIB(XonoticRadioButton, colorD, vector, SKINCOLOR_RADIOBUTTON_D)
+
+       ATTRIB(XonoticRadioButton, cvarName, string, string_null)
+       ATTRIB(XonoticRadioButton, cvarValue, string, string_null)
+       ATTRIB(XonoticRadioButton, cvarOffValue, string, string_null)
+       METHOD(XonoticRadioButton, loadCvars, void(entity))
+       METHOD(XonoticRadioButton, saveCvars, void(entity))
+
+       ATTRIB(XonoticRadioButton, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticRadioButton, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticRadioButton)
+entity makeXonoticRadioButton(float, string, string, string);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
+{
+       entity me;
+       me = spawnXonoticRadioButton();
+       me.configureXonoticRadioButton(me, theGroup, theCvar, theValue, theText);
+       return me;
+}
+void configureXonoticRadioButtonXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText)
+{
+       if(theCvar)
+       {
+               me.cvarName = theCvar;
+               me.cvarValue = theValue;
+               me.tooltip = getZonedTooltipForIdentifier(theCvar);
+               me.loadCvars(me);
+       }
+       me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
+}
+void setCheckedXonoticRadioButton(entity me, float val)
+{
+       if(val != me.checked)
+       {
+               me.checked = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticRadioButton(entity me)
+{
+       if(me.cvarValue)
+       {
+               if(me.cvarName)
+                       me.checked = (cvar_string(me.cvarName) == me.cvarValue);
+       }
+       else
+       {
+               if(me.cvarName)
+               {
+                       me.checked = !!cvar(me.cvarName);
+               }
+               else
+               {
+                       // this is difficult
+                       // this is the "generic" selection... but at this time, not
+                       // everything is constructed yet.
+                       // we need to set this later in draw()
+                       me.checked = 0;
+               }
+       }
+}
+void drawXonoticRadioButton(entity me)
+{
+       if not(me.cvarValue)
+               if not(me.cvarName)
+               {
+                       // this is the "other" option
+                       // always select this if none other is
+                       entity e;
+                       float found;
+                       found = 0;
+                       for(e = me.parent.firstChild; e; e = e.nextSibling)
+                               if(e.group == me.group)
+                                       if(e.checked)
+                                               found = 1;
+                       if(!found)
+                               me.setChecked(me, 1);
+               }
+       drawCheckBox(me);
+}
+void saveCvarsXonoticRadioButton(entity me)
+{
+       if(me.cvarValue)
+       {
+               if(me.cvarName)
+               {
+                       if(me.checked)
+                               cvar_set(me.cvarName, me.cvarValue);
+                       else if(me.cvarOffValue)
+                               cvar_set(me.cvarName, me.cvarOffValue);
+               }
+       }
+       else
+       {
+               if(me.cvarName)
+               {
+                       cvar_set(me.cvarName, ftos(me.checked));
+               }
+       }
+}
+#endif
diff --git a/qcsrc/menu/xonotic/rootdialog.c b/qcsrc/menu/xonotic/rootdialog.c
new file mode 100644 (file)
index 0000000..d784cba
--- /dev/null
@@ -0,0 +1,21 @@
+#ifdef INTERFACE
+CLASS(XonoticRootDialog) EXTENDS(XonoticDialog)
+       // still to be customized by user
+       /*
+       ATTRIB(XonoticDialog, closable, float, 1)
+       ATTRIB(XonoticDialog, title, string, "Form1") // ;)
+       ATTRIB(XonoticDialog, color, vector, '1 0.5 1')
+       ATTRIB(XonoticDialog, intendedWidth, float, 0)
+       ATTRIB(XonoticDialog, rows, float, 3)
+       ATTRIB(XonoticDialog, columns, float, 2)
+       */
+       METHOD(XonoticRootDialog, close, void(entity))
+ENDCLASS(XonoticRootDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void closeXonoticRootDialog(entity me)
+{
+       m_goto(string_null);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/serverlist.c b/qcsrc/menu/xonotic/serverlist.c
new file mode 100644 (file)
index 0000000..d4b01e2
--- /dev/null
@@ -0,0 +1,611 @@
+#ifdef INTERFACE
+CLASS(XonoticServerList) EXTENDS(XonoticListBox)
+       METHOD(XonoticServerList, configureXonoticServerList, void(entity))
+       ATTRIB(XonoticServerList, rowsPerItem, float, 1)
+       METHOD(XonoticServerList, draw, void(entity))
+       METHOD(XonoticServerList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticServerList, clickListBoxItem, void(entity, float, vector))
+       METHOD(XonoticServerList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticServerList, keyDown, float(entity, float, float, float))
+
+       ATTRIB(XonoticServerList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticServerList, realUpperMargin, float, 0)
+       ATTRIB(XonoticServerList, columnPingOrigin, float, 0)
+       ATTRIB(XonoticServerList, columnPingSize, float, 0)
+       ATTRIB(XonoticServerList, columnNameOrigin, float, 0)
+       ATTRIB(XonoticServerList, columnNameSize, float, 0)
+       ATTRIB(XonoticServerList, columnMapOrigin, float, 0)
+       ATTRIB(XonoticServerList, columnMapSize, float, 0)
+       ATTRIB(XonoticServerList, columnTypeOrigin, float, 0)
+       ATTRIB(XonoticServerList, columnTypeSize, float, 0)
+       ATTRIB(XonoticServerList, columnPlayersOrigin, float, 0)
+       ATTRIB(XonoticServerList, columnPlayersSize, float, 0)
+
+       ATTRIB(XonoticServerList, selectedServer, string, string_null) // to restore selected server when needed
+       METHOD(XonoticServerList, setSelected, void(entity, float))
+       METHOD(XonoticServerList, setSortOrder, void(entity, float, float))
+       ATTRIB(XonoticServerList, filterShowEmpty, float, 1)
+       ATTRIB(XonoticServerList, filterShowFull, float, 1)
+       ATTRIB(XonoticServerList, filterString, string, string_null)
+       ATTRIB(XonoticServerList, controlledTextbox, entity, NULL)
+       ATTRIB(XonoticServerList, ipAddressBox, entity, NULL)
+       ATTRIB(XonoticServerList, favoriteButton, entity, NULL)
+       ATTRIB(XonoticServerList, nextRefreshTime, float, 0)
+       METHOD(XonoticServerList, refreshServerList, void(entity, float)) // refresh mode: 0 = just reparametrize, 1 = send new requests, 2 = clear
+       ATTRIB(XonoticServerList, needsRefresh, float, 1)
+       METHOD(XonoticServerList, focusEnter, void(entity))
+       METHOD(XonoticServerList, positionSortButton, void(entity, entity, float, float, string, void(entity, entity)))
+       ATTRIB(XonoticServerList, sortButton1, entity, NULL)
+       ATTRIB(XonoticServerList, sortButton2, entity, NULL)
+       ATTRIB(XonoticServerList, sortButton3, entity, NULL)
+       ATTRIB(XonoticServerList, sortButton4, entity, NULL)
+       ATTRIB(XonoticServerList, sortButton5, entity, NULL)
+       ATTRIB(XonoticServerList, connectButton, entity, NULL)
+       ATTRIB(XonoticServerList, infoButton, entity, NULL)
+       ATTRIB(XonoticServerList, currentSortOrder, float, 0)
+       ATTRIB(XonoticServerList, currentSortField, float, -1)
+       ATTRIB(XonoticServerList, lastClickedServer, float, -1)
+       ATTRIB(XonoticServerList, lastClickedTime, float, 0)
+
+       ATTRIB(XonoticServerList, ipAddressBoxFocused, float, -1)
+ENDCLASS(XonoticServerList)
+entity makeXonoticServerList();
+void ServerList_Connect_Click(entity btn, entity me);
+void ServerList_ShowEmpty_Click(entity box, entity me);
+void ServerList_ShowFull_Click(entity box, entity me);
+void ServerList_Filter_Change(entity box, entity me);
+void ServerList_Favorite_Click(entity btn, entity me);
+void ServerList_Info_Click(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+float SLIST_FIELD_CNAME;
+float SLIST_FIELD_PING;
+float SLIST_FIELD_GAME;
+float SLIST_FIELD_MOD;
+float SLIST_FIELD_MAP;
+float SLIST_FIELD_NAME;
+float SLIST_FIELD_MAXPLAYERS;
+float SLIST_FIELD_NUMPLAYERS;
+float SLIST_FIELD_NUMHUMANS;
+float SLIST_FIELD_NUMBOTS;
+float SLIST_FIELD_PROTOCOL;
+float SLIST_FIELD_FREESLOTS;
+float SLIST_FIELD_PLAYERS;
+float SLIST_FIELD_QCSTATUS;
+float SLIST_FIELD_ISFAVORITE;
+void ServerList_UpdateFieldIDs()
+{
+       SLIST_FIELD_CNAME = gethostcacheindexforkey( "cname" );
+       SLIST_FIELD_PING = gethostcacheindexforkey( "ping" );
+       SLIST_FIELD_GAME = gethostcacheindexforkey( "game" );
+       SLIST_FIELD_MOD = gethostcacheindexforkey( "mod" );
+       SLIST_FIELD_MAP = gethostcacheindexforkey( "map" );
+       SLIST_FIELD_NAME = gethostcacheindexforkey( "name" );
+       SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey( "maxplayers" );
+       SLIST_FIELD_NUMPLAYERS = gethostcacheindexforkey( "numplayers" );
+       SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey( "numhumans" );
+       SLIST_FIELD_NUMBOTS = gethostcacheindexforkey( "numbots" );
+       SLIST_FIELD_PROTOCOL = gethostcacheindexforkey( "protocol" );
+       SLIST_FIELD_FREESLOTS = gethostcacheindexforkey( "freeslots" );
+       SLIST_FIELD_PLAYERS = gethostcacheindexforkey( "players" );
+       SLIST_FIELD_QCSTATUS = gethostcacheindexforkey( "qcstatus" );
+       SLIST_FIELD_ISFAVORITE = gethostcacheindexforkey( "isfavorite" );
+}
+
+float IsFavorite(string srv)
+{
+       float i, n;
+       srv = netaddress_resolve(srv, 26000);
+       n = tokenize_console(cvar_string("net_slist_favorites"));
+       for(i = 0; i < n; ++i)
+               if(srv == netaddress_resolve(argv(i), 26000))
+                       return TRUE;
+       return FALSE;
+}
+
+void ToggleFavorite(string srv)
+{
+       string s, s0, s1, s2, srv_resolved;
+       float i, n;
+       srv_resolved = netaddress_resolve(srv, 26000);
+       s = cvar_string("net_slist_favorites");
+       n = tokenize_console(s);
+       for(i = 0; i < n; ++i)
+               if(srv_resolved == netaddress_resolve(argv(i), 26000))
+               {
+                       s0 = s1 = s2 = "";
+                       if(i > 0)
+                               s0 = substring(s, 0, argv_end_index(i - 1));
+                       if(i < n-1)
+                               s2 = substring(s, argv_start_index(i + 1), -1);
+                       if(s0 != "" && s2 != "")
+                               s1 = " ";
+                       print("s0 = >>", s0, "<<\ns1 = >>", s1, "<<\ns2 = >>", s2, "<<\n");
+                       cvar_set("net_slist_favorites", strcat(s0, s1, s2));
+                       return;
+               }
+       
+       s1 = "";
+       if(s != "")
+               s1 = " ";
+       cvar_set("net_slist_favorites", strcat(s, " ", srv));
+
+       resorthostcache();
+}
+
+entity makeXonoticServerList()
+{
+       entity me;
+       me = spawnXonoticServerList();
+       me.configureXonoticServerList(me);
+       return me;
+}
+void configureXonoticServerListXonoticServerList(entity me)
+{
+       me.configureXonoticListBox(me);
+
+       ServerList_UpdateFieldIDs();
+
+       me.nItems = 0;
+}
+void setSelectedXonoticServerList(entity me, float i)
+{
+       float save;
+       save = me.selectedItem;
+       setSelectedListBox(me, i);
+       /*
+       if(me.selectedItem == save)
+               return;
+       */
+       if(me.nItems == 0)
+               return;
+       if(gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT) != me.nItems)
+               return; // sorry, it would be wrong
+
+       if(me.selectedServer)
+               strunzone(me.selectedServer);
+       me.selectedServer = strzone(gethostcachestring(SLIST_FIELD_CNAME, me.selectedItem));
+
+       me.ipAddressBox.setText(me.ipAddressBox, me.selectedServer);
+       me.ipAddressBox.cursorPos = strlen(me.selectedServer);
+       me.ipAddressBoxFocused = -1;
+}
+void refreshServerListXonoticServerList(entity me, float mode)
+{
+       // 0: just reparametrize
+       // 1: also ask for new servers
+       // 2: clear
+       //print("refresh of type ", ftos(mode), "\n");
+       /* if(mode == 2) // borken
+       {
+               // clear list
+               localcmd("net_slist\n");
+               me.needsRefresh = 1; // net_slist kills sort order, so we need to restore it later
+       }
+       else */
+       {
+               float m, o;
+               string s, typestr, modstr;
+               s = me.filterString;
+
+               m = strstrofs(s, ":", 0);
+               if(m >= 0)
+               {
+                       typestr = substring(s, 0, m);
+                       s = substring(s, m + 1, strlen(s) - m - 1);
+                       while(substring(s, 0, 1) == " ")
+                               s = substring(s, 1, strlen(s) - 1);
+               }
+               else
+                       typestr = "";
+
+               modstr = cvar_string("menu_slist_modfilter");
+
+               m = SLIST_MASK_AND - 1;
+               resethostcachemasks();
+               if(!me.filterShowFull)
+                       sethostcachemasknumber(++m, SLIST_FIELD_FREESLOTS, 1, SLIST_TEST_GREATEREQUAL);
+               if(!me.filterShowEmpty)
+                       sethostcachemasknumber(++m, SLIST_FIELD_NUMHUMANS, 1, SLIST_TEST_GREATEREQUAL);
+               if(typestr != "")
+                       sethostcachemaskstring(++m, SLIST_FIELD_QCSTATUS, strcat(typestr, ":"), SLIST_TEST_STARTSWITH);
+               if(modstr != "")
+               {
+                       if(substring(modstr, 0, 1) == "!")
+                               sethostcachemaskstring(++m, SLIST_FIELD_MOD, resolvemod(substring(modstr, 1, strlen(modstr) - 1)), SLIST_TEST_NOTEQUAL);
+                       else
+                               sethostcachemaskstring(++m, SLIST_FIELD_MOD, resolvemod(modstr), SLIST_TEST_EQUAL);
+               }
+               m = SLIST_MASK_OR - 1;
+               if(s != "")
+               {
+                       sethostcachemaskstring(++m, SLIST_FIELD_NAME, s, SLIST_TEST_CONTAINS);
+                       sethostcachemaskstring(++m, SLIST_FIELD_MAP, s, SLIST_TEST_CONTAINS);
+                       sethostcachemaskstring(++m, SLIST_FIELD_PLAYERS, s, SLIST_TEST_CONTAINS);
+                       sethostcachemaskstring(++m, SLIST_FIELD_QCSTATUS, strcat(s, ":"), SLIST_TEST_STARTSWITH);
+               }
+               o = 2; // favorites first
+               if(me.currentSortOrder < 0)
+                       o |= 1; // descending
+               sethostcachesort(me.currentSortField, o);
+               resorthostcache();
+               if(mode >= 1)
+                       refreshhostcache();
+       }
+}
+void focusEnterXonoticServerList(entity me)
+{
+       if(time < me.nextRefreshTime)
+       {
+               //print("sorry, no refresh yet\n");
+               return;
+       }
+       me.nextRefreshTime = time + 10;
+       me.refreshServerList(me, 1);
+}
+void drawXonoticServerList(entity me)
+{
+       float i, found, owned;
+
+       if(me.currentSortField == -1)
+       {
+               me.setSortOrder(me, SLIST_FIELD_PING, +1);
+               me.refreshServerList(me, 2);
+       }
+       else if(me.needsRefresh == 1)
+       {
+               me.needsRefresh = 2; // delay by one frame to make sure "slist" has been executed
+       }
+       else if(me.needsRefresh == 2)
+       {
+               me.needsRefresh = 0;
+               me.refreshServerList(me, 0);
+       }
+
+       owned = ((me.selectedServer == me.ipAddressBox.text) && (me.ipAddressBox.text != ""));
+
+       me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT);
+
+       me.connectButton.disabled = ((me.nItems == 0) && (me.ipAddressBox.text == ""));
+       me.infoButton.disabled = ((me.nItems == 0) || !owned);
+
+       found = 0;
+       if(me.selectedServer)
+       {
+               for(i = 0; i < me.nItems; ++i)
+                       if(gethostcachestring(SLIST_FIELD_CNAME, i) == me.selectedServer)
+                       {
+                               if(i != me.selectedItem)
+                               {
+                                       me.lastClickedServer = -1;
+                                       me.selectedItem = i;
+                               }
+                               found = 1;
+                               break;
+                       }
+       }
+       if(!found)
+               if(me.nItems > 0)
+               {
+                       if(me.selectedItem >= me.nItems)
+                               me.selectedItem = me.nItems - 1;
+                       if(me.selectedServer)
+                               strunzone(me.selectedServer);
+                       me.selectedServer = strzone(gethostcachestring(SLIST_FIELD_CNAME, me.selectedItem));
+               }
+
+       if(owned)
+       {
+               if(me.selectedServer != me.ipAddressBox.text)
+               {
+                       me.ipAddressBox.setText(me.ipAddressBox, me.selectedServer);
+                       me.ipAddressBox.cursorPos = strlen(me.selectedServer);
+                       me.ipAddressBoxFocused = -1;
+               }
+       }
+
+       if(me.ipAddressBoxFocused != me.ipAddressBox.focused)
+       {
+               if(me.ipAddressBox.focused || me.ipAddressBoxFocused < 0)
+               {
+                       if(IsFavorite(me.ipAddressBox.text))
+                               me.favoriteButton.setText(me.favoriteButton, "Remove");
+                       else
+                               me.favoriteButton.setText(me.favoriteButton, "Bookmark");
+               }
+               me.ipAddressBoxFocused = me.ipAddressBox.focused;
+       }
+
+       drawListBox(me);
+}
+void ServerList_PingSort_Click(entity btn, entity me)
+{
+       me.setSortOrder(me, SLIST_FIELD_PING, +1);
+}
+void ServerList_NameSort_Click(entity btn, entity me)
+{
+       me.setSortOrder(me, SLIST_FIELD_NAME, -1); // why?
+}
+void ServerList_MapSort_Click(entity btn, entity me)
+{
+       me.setSortOrder(me, SLIST_FIELD_MAP, -1); // why?
+}
+void ServerList_PlayerSort_Click(entity btn, entity me)
+{
+       me.setSortOrder(me, SLIST_FIELD_NUMHUMANS, -1);
+}
+void ServerList_TypeSort_Click(entity btn, entity me)
+{
+       string s, t;
+       float i, m;
+       s = me.filterString;
+       m = strstrofs(s, ":", 0);
+       if(m >= 0)
+       {
+               s = substring(s, 0, m);
+               while(substring(s, m+1, 1) == " ") // skip spaces
+                       ++m;
+       }
+       else
+               s = "";
+
+       for(i = 1; ; ++i) // 20 modes ought to be enough for anyone
+       {
+               t = GametypeNameFromType(i);
+               if(i > 1)
+                       if(t == GametypeNameFromType(0)) // it repeats (default case)
+                       {
+                               // no type was found
+                               // choose the first one
+                               s = t;
+                               break;
+                       }
+               if(s == GametypeNameFromType(i))
+               {
+                       // the type was found
+                       // choose the next one
+                       s = GametypeNameFromType(i + 1);
+                       if(s == GametypeNameFromType(0))
+                               s = "";
+                       break;
+               }
+       }
+
+       if(s != "")
+               s = strcat(s, ":");
+       s = strcat(s, substring(me.filterString, m+1, strlen(me.filterString) - m - 1));
+
+       me.controlledTextbox.setText(me.controlledTextbox, s);
+       me.controlledTextbox.keyDown(me.controlledTextbox, K_END, 0, 0);
+       me.controlledTextbox.keyUp(me.controlledTextbox, K_END, 0, 0);
+       //ServerList_Filter_Change(me.controlledTextbox, me);
+}
+void ServerList_Filter_Change(entity box, entity me)
+{
+       if(me.filterString)
+               strunzone(me.filterString);
+       if(box.text != "")
+               me.filterString = strzone(box.text);
+       else
+               me.filterString = string_null;
+       me.refreshServerList(me, 0);
+
+       me.ipAddressBox.setText(me.ipAddressBox, "");
+       me.ipAddressBox.cursorPos = 0;
+       me.ipAddressBoxFocused = -1;
+}
+void ServerList_ShowEmpty_Click(entity box, entity me)
+{
+       box.setChecked(box, me.filterShowEmpty = !me.filterShowEmpty);
+       me.refreshServerList(me, 0);
+
+       me.ipAddressBox.setText(me.ipAddressBox, "");
+       me.ipAddressBox.cursorPos = 0;
+       me.ipAddressBoxFocused = -1;
+}
+void ServerList_ShowFull_Click(entity box, entity me)
+{
+       box.setChecked(box, me.filterShowFull = !me.filterShowFull);
+       me.refreshServerList(me, 0);
+
+       me.ipAddressBox.setText(me.ipAddressBox, "");
+       me.ipAddressBox.cursorPos = 0;
+       me.ipAddressBoxFocused = -1;
+}
+void setSortOrderXonoticServerList(entity me, float field, float direction)
+{
+       if(me.currentSortField == field)
+               direction = -me.currentSortOrder;
+       me.currentSortOrder = direction;
+       me.currentSortField = field;
+       me.sortButton1.forcePressed = (field == SLIST_FIELD_PING);
+       me.sortButton2.forcePressed = (field == SLIST_FIELD_NAME);
+       me.sortButton3.forcePressed = (field == SLIST_FIELD_MAP);
+       me.sortButton4.forcePressed = 0;
+       me.sortButton5.forcePressed = (field == SLIST_FIELD_NUMHUMANS);
+       me.selectedItem = 0;
+       if(me.selectedServer)
+               strunzone(me.selectedServer);
+       me.selectedServer = string_null;
+       me.refreshServerList(me, 0);
+}
+void positionSortButtonXonoticServerList(entity me, entity btn, float theOrigin, float theSize, string theTitle, void(entity, entity) theFunc)
+{
+       vector originInLBSpace, sizeInLBSpace;
+       originInLBSpace = eY * (-me.itemHeight);
+       sizeInLBSpace = eY * me.itemHeight + eX * (1 - me.controlWidth);
+
+       vector originInDialogSpace, sizeInDialogSpace;
+       originInDialogSpace = boxToGlobal(originInLBSpace, me.Container_origin, me.Container_size);
+       sizeInDialogSpace = boxToGlobalSize(sizeInLBSpace, me.Container_size);
+
+       btn.Container_origin_x = originInDialogSpace_x + sizeInDialogSpace_x * theOrigin;
+       btn.Container_size_x   =                         sizeInDialogSpace_x * theSize;
+       btn.setText(btn, theTitle);
+       btn.onClick = theFunc;
+       btn.onClickEntity = me;
+       btn.resized = 1;
+}
+void resizeNotifyXonoticServerList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
+       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
+       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+
+       me.columnPingOrigin = 0;
+       me.columnPingSize = me.realFontSize_x * 4;
+       me.columnMapSize = me.realFontSize_x * 12;
+       me.columnTypeSize = me.realFontSize_x * 4;
+       me.columnPlayersSize = me.realFontSize_x * 6;
+       me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnTypeSize - 4 * me.realFontSize_x;
+       me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
+       me.columnMapOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
+       me.columnTypeOrigin = me.columnMapOrigin + me.columnMapSize + me.realFontSize_x;
+       me.columnPlayersOrigin = me.columnTypeOrigin + me.columnTypeSize + me.realFontSize_x;
+
+       me.positionSortButton(me, me.sortButton1, me.columnPingOrigin, me.columnPingSize, "Ping", ServerList_PingSort_Click);
+       me.positionSortButton(me, me.sortButton2, me.columnNameOrigin, me.columnNameSize, "Host name", ServerList_NameSort_Click);
+       me.positionSortButton(me, me.sortButton3, me.columnMapOrigin, me.columnMapSize, "Map", ServerList_MapSort_Click);
+       me.positionSortButton(me, me.sortButton4, me.columnTypeOrigin, me.columnTypeSize, "Type", ServerList_TypeSort_Click);
+       me.positionSortButton(me, me.sortButton5, me.columnPlayersOrigin, me.columnPlayersSize, "Players", ServerList_PlayerSort_Click);
+
+       float f;
+       f = me.currentSortField;
+       if(f >= 0)
+       {
+               me.currentSortField = -1;
+               me.setSortOrder(me, f, me.currentSortOrder); // force resetting the sort order
+       }
+}
+void ServerList_Connect_Click(entity btn, entity me)
+{
+       if(me.ipAddressBox.text == "")
+               localcmd("connect ", me.selectedServer, "\n");
+       else
+               localcmd("connect ", me.ipAddressBox.text, "\n");
+}
+void ServerList_Favorite_Click(entity btn, entity me)
+{
+       string ipstr;
+       ipstr = netaddress_resolve(me.ipAddressBox.text, 26000);
+       if(ipstr != "")
+       {
+               ToggleFavorite(me.ipAddressBox.text);
+               me.ipAddressBoxFocused = -1;
+       }
+}
+void ServerList_Info_Click(entity btn, entity me)
+{
+       main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
+       DialogOpenButton_Click(me, main.serverInfoDialog);
+}
+void clickListBoxItemXonoticServerList(entity me, float i, vector where)
+{
+       if(i == me.lastClickedServer)
+               if(time < me.lastClickedTime + 0.3)
+               {
+                       // DOUBLE CLICK!
+                       ServerList_Connect_Click(NULL, me);
+               }
+       me.lastClickedServer = i;
+       me.lastClickedTime = time;
+}
+void drawListBoxItemXonoticServerList(entity me, float i, vector absSize, float isSelected)
+{
+       // layout: Ping, Server name, Map name, NP, TP, MP
+       string s;
+       float p;
+       vector theColor;
+       float theAlpha;
+
+       if(isSelected)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+
+       if(gethostcachenumber(SLIST_FIELD_NUMPLAYERS, i) >= gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i))
+               theAlpha = SKINALPHA_SERVERLIST_FULL;
+       else if not(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i))
+               theAlpha = SKINALPHA_SERVERLIST_EMPTY;
+       else
+               theAlpha = 1;
+
+       p = gethostcachenumber(SLIST_FIELD_PING, i);
+#define PING_LOW 75
+#define PING_MED 200
+#define PING_HIGH 500
+       if(p < PING_LOW)
+               theColor = SKINCOLOR_SERVERLIST_LOWPING + (SKINCOLOR_SERVERLIST_MEDPING - SKINCOLOR_SERVERLIST_LOWPING) * (p / PING_LOW);
+       else if(p < PING_MED)
+               theColor = SKINCOLOR_SERVERLIST_MEDPING + (SKINCOLOR_SERVERLIST_HIGHPING - SKINCOLOR_SERVERLIST_MEDPING) * ((p - PING_LOW) / (PING_MED - PING_LOW));
+       else if(p < PING_HIGH)
+       {
+               theColor = SKINCOLOR_SERVERLIST_HIGHPING;
+               theAlpha *= 1 + (SKINALPHA_SERVERLIST_HIGHPING - 1) * ((p - PING_MED) / (PING_HIGH - PING_MED));
+       }
+       else
+       {
+               theColor = eX;
+               theAlpha *= SKINALPHA_SERVERLIST_HIGHPING;
+       }
+
+       if(gethostcachenumber(SLIST_FIELD_ISFAVORITE, i))
+       {
+               theColor = theColor * (1 - SKINALPHA_SERVERLIST_FAVORITE) + SKINCOLOR_SERVERLIST_FAVORITE * SKINALPHA_SERVERLIST_FAVORITE;
+               theAlpha = theAlpha * (1 - SKINALPHA_SERVERLIST_FAVORITE) + SKINALPHA_SERVERLIST_FAVORITE;
+       }
+
+       s = ftos(p);
+       draw_Text(me.realUpperMargin * eY + (me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_NAME, i), me.columnNameSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_MAP, i), me.columnMapSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin * eY + (me.columnMapOrigin + (me.columnMapSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
+       p = strstrofs(s, ":", 0);
+       if(p >= 0)
+               s = substring(s, 0, p);
+       else
+               s = "";
+       s = draw_TextShortenToWidth(s, me.columnMapSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin * eY + (me.columnTypeOrigin + (me.columnTypeSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       s = strcat(ftos(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i)), "/", ftos(gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i)));
+       draw_Text(me.realUpperMargin * eY + (me.columnPlayersOrigin + (me.columnPlayersSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+}
+
+float keyDownXonoticServerList(entity me, float scan, float ascii, float shift)
+{
+       float i;
+       vector org, sz;
+
+       org = boxToGlobal(eY * (me.selectedItem * me.itemHeight - me.scrollPos), me.origin, me.size);
+       sz = boxToGlobalSize(eY * me.itemHeight + eX * (1 - me.controlWidth), me.size);
+
+       if(scan == K_ENTER)
+       {
+               ServerList_Connect_Click(NULL, me);
+               return 1;
+       }
+       else if(scan == K_MOUSE2 || scan == K_SPACE)
+       {
+               main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
+               DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
+       }
+       else if(scan == K_INS || scan == K_MOUSE3)
+       {
+               i = me.selectedItem;
+               if(i < me.nItems)
+               {
+                       ToggleFavorite(me.selectedServer);
+                       me.ipAddressBoxFocused = -1;
+               }
+       }
+       else if(keyDownListBox(me, scan, ascii, shift))
+               return 1;
+       else if(!me.controlledTextbox)
+               return 0;
+       else
+               return me.controlledTextbox.keyDown(me.controlledTextbox, scan, ascii, shift);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/skinlist.c b/qcsrc/menu/xonotic/skinlist.c
new file mode 100644 (file)
index 0000000..78ff80c
--- /dev/null
@@ -0,0 +1,205 @@
+#ifdef INTERFACE
+CLASS(XonoticSkinList) EXTENDS(XonoticListBox)
+       METHOD(XonoticSkinList, configureXonoticSkinList, void(entity))
+       ATTRIB(XonoticSkinList, rowsPerItem, float, 4)
+       METHOD(XonoticSkinList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticSkinList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticSkinList, getSkins, void(entity))
+       METHOD(XonoticSkinList, setSkin, void(entity))
+       METHOD(XonoticSkinList, loadCvars, void(entity))
+       METHOD(XonoticSkinList, saveCvars, void(entity))
+       METHOD(XonoticSkinList, skinParameter, string(entity, float, float))
+       METHOD(XonoticSkinList, clickListBoxItem, void(entity, float, vector))
+       METHOD(XonoticSkinList, keyDown, float(entity, float, float, float))
+       METHOD(XonoticSkinList, destroy, void(entity))
+
+       ATTRIB(XonoticSkinList, skinlist, float, -1)
+       ATTRIB(XonoticSkinList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticSkinList, columnPreviewOrigin, float, 0)
+       ATTRIB(XonoticSkinList, columnPreviewSize, float, 0)
+       ATTRIB(XonoticSkinList, columnNameOrigin, float, 0)
+       ATTRIB(XonoticSkinList, columnNameSize, float, 0)
+       ATTRIB(XonoticSkinList, realUpperMargin1, float, 0)
+       ATTRIB(XonoticSkinList, realUpperMargin2, float, 0)
+       ATTRIB(XonoticSkinList, origin, vector, '0 0 0')
+       ATTRIB(XonoticSkinList, itemAbsSize, vector, '0 0 0')
+
+       ATTRIB(XonoticSkinList, lastClickedSkin, float, -1)
+       ATTRIB(XonoticSkinList, lastClickedTime, float, 0)
+
+       ATTRIB(XonoticSkinList, name, string, "skinselector")
+ENDCLASS(XonoticSkinList)
+
+entity makeXonoticSkinList();
+void SetSkin_Click(entity btn, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+
+#define SKINPARM_NAME 0
+#define SKINPARM_TITLE 1
+#define SKINPARM_AUTHOR 2
+#define SKINPARM_PREVIEW 3
+#define SKINPARM_COUNT 4
+
+entity makeXonoticSkinList()
+{
+       entity me;
+       me = spawnXonoticSkinList();
+       me.configureXonoticSkinList(me);
+       return me;
+}
+
+void configureXonoticSkinListXonoticSkinList(entity me)
+{
+       me.configureXonoticListBox(me);
+       me.getSkins(me);
+       me.loadCvars(me);
+}
+
+void loadCvarsXonoticSkinList(entity me)
+{
+       string s;
+       float i, n;
+       s = cvar_string("menu_skin");
+       n = me.nItems;
+       for(i = 0; i < n; ++i)
+       {
+               if(me.skinParameter(me, i, SKINPARM_NAME) == s)
+               {
+                       me.selectedItem = i;
+                       break;
+               }
+       }
+}
+
+void saveCvarsXonoticSkinList(entity me)
+{
+       cvar_set("menu_skin", me.skinParameter(me, me.selectedItem, SKINPARM_NAME));
+}
+
+string skinParameterXonoticSkinList(entity me, float i, float key)
+{
+       return bufstr_get(me.skinlist, i * SKINPARM_COUNT + key);
+}
+
+void getSkinsXonoticSkinList(entity me)
+{
+       float glob, buf, i, n, fh;
+       string s;
+
+       buf = buf_create();
+       glob = search_begin("gfx/menu/*/skinvalues.txt", TRUE, TRUE);
+       if(glob < 0)
+       {
+               me.skinlist = buf;
+               me.nItems = 0;
+               return;
+       }
+
+       n = search_getsize(glob);
+       for(i = 0; i < n; ++i)
+       {
+               s = search_getfilename(glob, i);
+               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part
+               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, "<TITLE>");
+               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, "<AUTHOR>");
+               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));
+               fh = fopen(s, FILE_READ);
+               if(fh < 0)
+               {
+                       print("Warning: can't open skinvalues.txt file\n");
+                       continue;
+               }
+               while((s = fgets(fh)))
+               {
+                       // these two are handled by skinlist.qc
+                       if(substring(s, 0, 6) == "title ")
+                               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, substring(s, 6, strlen(s) - 6));
+                       else if(substring(s, 0, 7) == "author ")
+                               bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, substring(s, 7, strlen(s) - 7));
+               }
+               fclose(fh);
+       }
+
+       search_end(glob);
+
+       me.skinlist = buf;
+       me.nItems = n;
+}
+
+void destroyXonoticSkinList(entity me)
+{
+       buf_del(me.skinlist);
+}
+
+void resizeNotifyXonoticSkinList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       me.itemAbsSize = '0 0 0';
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
+       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
+       me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize_y);
+       me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize_y;
+
+       me.columnPreviewOrigin = 0;
+       me.columnPreviewSize = me.itemAbsSize_y / me.itemAbsSize_x * 4 / 3;
+       me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize_x;
+       me.columnNameSize = 1 - me.columnPreviewSize - 2 * me.realFontSize_x;
+}
+
+void drawListBoxItemXonoticSkinList(entity me, float i, vector absSize, float isSelected)
+{
+       string s;
+       
+       if(isSelected)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+               
+       s = me.skinParameter(me, i, SKINPARM_PREVIEW);
+       draw_Picture(me.columnPreviewOrigin * eX, s, me.columnPreviewSize * eX + eY, '1 1 1', 1);
+       
+       s = me.skinParameter(me, i, SKINPARM_NAME);
+       s = strcat(s, ": ", me.skinParameter(me, i, SKINPARM_TITLE));
+       s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_SKINLIST_TITLE, SKINALPHA_TEXT, 0);
+
+       s = me.skinParameter(me, i, SKINPARM_AUTHOR);
+       s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
+       draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_SKINLIST_AUTHOR, SKINALPHA_TEXT, 0);
+}
+
+void setSkinXonoticSkinList(entity me)
+{
+       me.saveCvars(me);
+       localcmd("\nmenu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd skinselect\"\n");
+}
+
+void SetSkin_Click(entity btn, entity me)
+{
+       me.setSkin(me);
+}
+
+void clickListBoxItemXonoticSkinList(entity me, float i, vector where)
+{
+       if(i == me.lastClickedSkin)
+               if(time < me.lastClickedTime + 0.3)
+               {
+                       // DOUBLE CLICK!
+                       me.setSelected(me, i);
+                       me.setSkin(me);
+               }
+       me.lastClickedSkin = i;
+       me.lastClickedTime = time;
+}
+
+float keyDownXonoticSkinList(entity me, float scan, float ascii, float shift)
+{
+       if(scan == K_ENTER) {
+               me.setSkin(me);
+               return 1;
+       }
+       else
+               return keyDownListBox(me, scan, ascii, shift);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/slider.c b/qcsrc/menu/xonotic/slider.c
new file mode 100644 (file)
index 0000000..13ea0f2
--- /dev/null
@@ -0,0 +1,74 @@
+#ifdef INTERFACE
+CLASS(XonoticSlider) EXTENDS(Slider)
+       METHOD(XonoticSlider, configureXonoticSlider, void(entity, float, float, float, string))
+       METHOD(XonoticSlider, setValue, void(entity, float))
+       ATTRIB(XonoticSlider, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT)
+       ATTRIB(XonoticSlider, image, string, SKINGFX_SLIDER)
+       ATTRIB(XonoticSlider, tolerance, vector, SKINTOLERANCE_SLIDER)
+       ATTRIB(XonoticSlider, align, float, 0.5)
+       ATTRIB(XonoticSlider, color, vector, SKINCOLOR_SLIDER_N)
+       ATTRIB(XonoticSlider, colorC, vector, SKINCOLOR_SLIDER_C)
+       ATTRIB(XonoticSlider, colorF, vector, SKINCOLOR_SLIDER_F)
+       ATTRIB(XonoticSlider, colorD, vector, SKINCOLOR_SLIDER_D)
+       ATTRIB(XonoticSlider, color2, vector, SKINCOLOR_SLIDER_S)
+
+       ATTRIB(XonoticSlider, cvarName, string, string_null)
+       METHOD(XonoticSlider, loadCvars, void(entity))
+       METHOD(XonoticSlider, saveCvars, void(entity))
+
+       ATTRIB(XonoticSlider, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticSlider, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticSlider)
+entity makeXonoticSlider(float, float, float, string);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
+{
+       entity me;
+       me = spawnXonoticSlider();
+       me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar);
+       return me;
+}
+void configureXonoticSliderXonoticSlider(entity me, float theValueMin, float theValueMax, float theValueStep, string theCvar)
+{
+       float v, vk, vp;
+       v = theValueMin;
+       vk = theValueStep;
+       vp = theValueStep * 10;
+       while(fabs(vp) < fabs(theValueMax - theValueMin) / 40)
+               vp *= 10;
+       me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image);
+       me.configureSliderValues(me, theValueMin, v, theValueMax, theValueStep, vk, vp);
+       if(theCvar)
+       {
+               me.cvarName = theCvar;
+               me.loadCvars(me);
+               if(tooltipdb >= 0)
+                       me.tooltip = getZonedTooltipForIdentifier(theCvar);
+       }
+}
+void setValueXonoticSlider(entity me, float val)
+{
+       if(val != me.value)
+       {
+               me.value = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticSlider(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       me.value = cvar(me.cvarName);
+}
+void saveCvarsXonoticSlider(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       cvar_set(me.cvarName, ftos(me.value));
+}
+#endif
diff --git a/qcsrc/menu/xonotic/slider_decibels.c b/qcsrc/menu/xonotic/slider_decibels.c
new file mode 100644 (file)
index 0000000..20beec9
--- /dev/null
@@ -0,0 +1,56 @@
+#ifdef INTERFACE
+CLASS(XonoticDecibelsSlider) EXTENDS(XonoticSlider)
+       METHOD(XonoticDecibelsSlider, loadCvars, void(entity))
+       METHOD(XonoticDecibelsSlider, saveCvars, void(entity))
+       METHOD(XonoticDecibelsSlider, valueToText, string(entity, float))
+ENDCLASS(XonoticDecibelsSlider)
+entity makeXonoticDecibelsSlider(float, float, float, string);
+#endif
+
+#ifdef IMPLEMENTATION
+
+entity makeXonoticDecibelsSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
+{
+       entity me;
+       me = spawnXonoticDecibelsSlider();
+       me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar);
+       return me;
+}
+void loadCvarsXonoticDecibelsSlider(entity me)
+{
+       float v;
+
+       if not(me.cvarName)
+               return;
+
+       v = cvar(me.cvarName);
+       if(v >= 0.98)
+               me.value = 0;
+       else if(v < 0.0005)
+               me.value = -1000000;
+       else
+               me.value = 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName)) * 10);
+}
+void saveCvarsXonoticDecibelsSlider(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       if(me.value >= -0.1)
+               cvar_set(me.cvarName, "1");
+       if(me.value < -33)
+               cvar_set(me.cvarName, "0");
+       else
+               cvar_set(me.cvarName, ftos(pow(10, me.value / 10)));
+}
+
+string valueToTextXonoticDecibelsSlider(entity me, float v)
+{
+       if(v < -33)
+               return "OFF";
+       else if(v >= -0.1)
+               return "MAX";
+       return strcat(valueToTextSlider(me, v), " dB");
+}
+
+#endif
diff --git a/qcsrc/menu/xonotic/slider_resolution.c b/qcsrc/menu/xonotic/slider_resolution.c
new file mode 100644 (file)
index 0000000..ed6db5b
--- /dev/null
@@ -0,0 +1,107 @@
+#ifdef INTERFACE
+CLASS(XonoticResolutionSlider) EXTENDS(XonoticTextSlider)
+       METHOD(XonoticResolutionSlider, configureXonoticResolutionSlider, void(entity))
+       METHOD(XonoticResolutionSlider, addResolution, void(entity, float, float, float))
+       METHOD(XonoticResolutionSlider, loadCvars, void(entity))
+       METHOD(XonoticResolutionSlider, saveCvars, void(entity))
+ENDCLASS(XonoticResolutionSlider)
+entity makeXonoticResolutionSlider();
+void updateConwidths();
+#endif
+
+#ifdef IMPLEMENTATION
+void updateConwidths()
+{
+       vector r, c;
+       float minfactor, maxfactor;
+       float sz, f;
+       r_x = cvar("menu_vid_width");
+       r_y = cvar("menu_vid_height");
+       r_z = cvar("menu_vid_pixelheight");
+       sz = cvar("menu_vid_scale");
+
+       // calculate the base resolution
+       c_z = 0;
+       c_x = 800;
+       c_y = c_x * r_y * r_z / r_x;
+       if(c_y < 600)
+       {
+               c_y = 600;
+               c_x = c_y * r_x / (r_y * r_z);
+       }
+
+       f = min(r_x / c_x, r_y / c_y);
+       if(f < 1)
+               c = c * f; // ensures that c_x <= r_x and c_y <= r_y
+
+       minfactor = min(1, 640 / c_x);             // can be > 1 only if c_x is <640
+       maxfactor = max3(1, r_x / c_x, r_y / c_y); // can be < 1 only if r_x < c_x and r_y < c_y
+       dprint("min factor: ", ftos(minfactor), "\n");
+       dprint("max factor: ", ftos(maxfactor), "\n");
+
+       if(sz < 0)
+               f = 1 - (maxfactor - 1) * sz;
+       else if(sz > 0)
+               f = 1 + (minfactor - 1) * sz;
+       else
+               f = 1;
+       c = c * f; // fteqcc fail
+
+       cvar_set("vid_width", ftos(rint(r_x)));
+       cvar_set("vid_height", ftos(rint(r_y)));
+       cvar_set("vid_pixelheight", ftos(rint(r_z)));
+       cvar_set("vid_conwidth", ftos(rint(c_x)));
+       cvar_set("vid_conheight", ftos(rint(c_y)));
+}
+entity makeXonoticResolutionSlider()
+{
+       entity me;
+       me = spawnXonoticResolutionSlider();
+       me.configureXonoticResolutionSlider(me);
+       return me;
+}
+void addResolutionXonoticResolutionSlider(entity me, float w, float h, float pixelheight)
+{
+       me.addValue(me, strzone(strcat(ftos(w), "x", ftos(h))), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
+       // FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
+}
+void configureXonoticResolutionSliderXonoticResolutionSlider(entity me)
+{
+       float i;
+       vector r0, r;
+
+       me.configureXonoticTextSlider(me, "menu_vid_width");
+
+       r0 = '0 0 0';
+       for(i = 0;; ++i)
+       {
+               r = getresolution(i);
+               if(r_x == 0 && r_y == 0)
+                       break;
+               if(r_z == 0)
+                       r_z = 1; // compat
+               if(r == r0)
+                       continue;
+               r0 = r;
+               if(r_x < 640 || r_y < 400)
+                       continue;
+               me.addResolution(me, r_x, r_y, r_z);
+       }
+
+       me.configureXonoticTextSliderValues(me);
+}
+void loadCvarsXonoticResolutionSlider(entity me)
+{
+       me.setValueFromIdentifier(me, strcat(cvar_string("menu_vid_width"), " ", cvar_string("menu_vid_height"), " ", cvar_string("menu_vid_pixelheight")));
+}
+void saveCvarsXonoticResolutionSlider(entity me)
+{
+       if(me.value >= 0 || me.value < me.nValues)
+       {
+               tokenize_console(me.getIdentifier(me));
+               cvar_set("menu_vid_width", argv(0));
+               cvar_set("menu_vid_height", argv(1));
+               cvar_set("menu_vid_pixelheight", argv(2));
+       }
+}
+#endif
diff --git a/qcsrc/menu/xonotic/tab.c b/qcsrc/menu/xonotic/tab.c
new file mode 100644 (file)
index 0000000..d771d71
--- /dev/null
@@ -0,0 +1,30 @@
+#ifdef INTERFACE
+CLASS(XonoticTab) EXTENDS(Tab)
+       // still to be customized by user
+       /*
+       ATTRIB(XonoticTab, intendedWidth, float, 0)
+       ATTRIB(XonoticTab, rows, float, 3)
+       ATTRIB(XonoticTab, columns, float, 2)
+       */
+       METHOD(XonoticTab, showNotify, void(entity))
+
+       ATTRIB(XonoticTab, marginTop, float, 0) // pixels
+       ATTRIB(XonoticTab, marginBottom, float, 0) // pixels
+       ATTRIB(XonoticTab, marginLeft, float, 0) // pixels
+       ATTRIB(XonoticTab, marginRight, float, 0) // pixels
+       ATTRIB(XonoticTab, columnSpacing, float, SKINMARGIN_COLUMNS) // pixels
+       ATTRIB(XonoticTab, rowSpacing, float, SKINMARGIN_ROWS) // pixels
+       ATTRIB(XonoticTab, rowHeight, float, SKINFONTSIZE_NORMAL * SKINHEIGHT_NORMAL) // pixels
+       ATTRIB(XonoticTab, titleHeight, float, SKINFONTSIZE_TITLE * SKINHEIGHT_TITLE) // pixels
+
+       ATTRIB(XonoticTab, backgroundImage, string, string_null)
+ENDCLASS(XonoticTab)
+#endif
+
+#ifdef IMPLEMENTATION
+void showNotifyXonoticTab(entity me)
+{
+       loadAllCvars(me);
+       showNotifyContainer(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/tabcontroller.c b/qcsrc/menu/xonotic/tabcontroller.c
new file mode 100644 (file)
index 0000000..e454e23
--- /dev/null
@@ -0,0 +1,34 @@
+#ifdef INTERFACE
+CLASS(XonoticTabController) EXTENDS(ModalController)
+       METHOD(XonoticTabController, configureXonoticTabController, void(entity, float))
+       METHOD(XonoticTabController, makeTabButton, entity(entity, string, entity))
+       ATTRIB(XonoticTabController, rows, float, 0)
+       ATTRIB(XonoticTabController, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticTabController, image, string, SKINGFX_BUTTON)
+ENDCLASS(XonoticTabController)
+entity makeXonoticTabController(float theRows);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticTabController(float theRows)
+{
+       entity me;
+       me = spawnXonoticTabController();
+       me.configureXonoticTabController(me, theRows);
+       return me;
+}
+void configureXonoticTabControllerXonoticTabController(entity me, float theRows)
+{
+       me.rows = theRows;
+}
+entity makeTabButtonXonoticTabController(entity me, string theTitle, entity tab)
+{
+       entity b;
+       if(me.rows != tab.rows)
+               error("Tab dialog height mismatch!");
+       b = makeXonoticButton(theTitle, '0 0 0');
+               me.addTab(me, tab, b);
+       // TODO make this real tab buttons (with color parameters, and different gfx)
+       return b;
+}
+#endif
diff --git a/qcsrc/menu/xonotic/textlabel.c b/qcsrc/menu/xonotic/textlabel.c
new file mode 100644 (file)
index 0000000..020f790
--- /dev/null
@@ -0,0 +1,28 @@
+#ifdef INTERFACE
+CLASS(XonoticTextLabel) EXTENDS(Label)
+       METHOD(XonoticTextLabel, configureXonoticTextLabel, void(entity, float, string))
+       METHOD(XonoticTextLabel, draw, void(entity))
+       ATTRIB(XonoticTextLabel, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticTextLabel, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticTextLabel, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticTextLabel)
+entity makeXonoticTextLabel(float theAlign, string theText);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticTextLabel(float theAlign, string theText)
+{
+       entity me;
+       me = spawnXonoticTextLabel();
+       me.configureXonoticTextLabel(me, theAlign, theText);
+       return me;
+}
+void configureXonoticTextLabelXonoticTextLabel(entity me, float theAlign, string theText)
+{
+       me.configureLabel(me, theText, me.fontSize, theAlign);
+}
+void drawXonoticTextLabel(entity me)
+{
+       drawLabel(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/textslider.c b/qcsrc/menu/xonotic/textslider.c
new file mode 100644 (file)
index 0000000..d4786a7
--- /dev/null
@@ -0,0 +1,102 @@
+#ifdef INTERFACE
+CLASS(XonoticTextSlider) EXTENDS(TextSlider)
+       METHOD(XonoticTextSlider, configureXonoticTextSlider, void(entity, string))
+       METHOD(XonoticTextSlider, setValue, void(entity, float))
+       METHOD(XonoticTextSlider, configureXonoticTextSliderValues, void(entity))
+       ATTRIB(XonoticTextSlider, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticTextSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT)
+       ATTRIB(XonoticTextSlider, image, string, SKINGFX_SLIDER)
+       ATTRIB(XonoticSlider, tolerance, vector, SKINTOLERANCE_SLIDER)
+       ATTRIB(XonoticTextSlider, align, float, 0.5)
+       ATTRIB(XonoticSlider, color, vector, SKINCOLOR_SLIDER_N)
+       ATTRIB(XonoticSlider, colorC, vector, SKINCOLOR_SLIDER_C)
+       ATTRIB(XonoticSlider, colorF, vector, SKINCOLOR_SLIDER_F)
+       ATTRIB(XonoticSlider, colorD, vector, SKINCOLOR_SLIDER_D)
+       ATTRIB(XonoticSlider, color2, vector, SKINCOLOR_SLIDER_S)
+
+       ATTRIB(XonoticTextSlider, cvarName, string, string_null)
+       METHOD(XonoticTextSlider, loadCvars, void(entity))
+       METHOD(XonoticTextSlider, saveCvars, void(entity))
+
+       ATTRIB(XonoticTextSlider, alpha, float, SKINALPHA_TEXT)
+       ATTRIB(XonoticTextSlider, disabledAlpha, float, SKINALPHA_DISABLED)
+ENDCLASS(XonoticTextSlider)
+entity makeXonoticTextSlider(string); // note: you still need to call addValue and configureXonoticTextSliderValues!
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticTextSlider(string theCvar)
+{
+       entity me;
+       me = spawnXonoticTextSlider();
+       me.configureXonoticTextSlider(me, theCvar);
+       return me;
+}
+void configureXonoticTextSliderXonoticTextSlider(entity me, string theCvar)
+{
+       me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image);
+       if(theCvar)
+       {
+               me.cvarName = theCvar;
+               me.tooltip = getZonedTooltipForIdentifier(theCvar);
+               // don't load it yet
+       }
+}
+void setValueXonoticTextSlider(entity me, float val)
+{
+       if(val != me.value)
+       {
+               me.value = val;
+               me.saveCvars(me);
+       }
+}
+void loadCvarsXonoticTextSlider(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       var float n = tokenize_console(me.cvarName);
+       var string s = cvar_string(argv(0));
+       float i;
+       for(i = 1; i < n; ++i)
+               s = strcat(s, " ", cvar_string(argv(i)));
+       me.setValueFromIdentifier(me, s);
+}
+void saveCvarsXonoticTextSlider(entity me)
+{
+       if not(me.cvarName)
+               return;
+
+       if(me.value >= 0 && me.value < me.nValues)
+       {
+               var float n = tokenize_console(me.cvarName);
+               if(n == 1)
+               {
+                       // this is a special case to allow spaces in the identifiers
+                       cvar_set(argv(0), me.getIdentifier(me));
+               }
+               else
+               {
+                       float i;
+                       var float m = tokenize_console(strcat(me.cvarName, " ", me.getIdentifier(me)));
+                       if(m == n + 1)
+                       {
+                               for(i = 0; i < n; ++i)
+                                       cvar_set(argv(i), argv(n));
+                       }
+                       else if(m == n * 2)
+                       {
+                               for(i = 0; i < n; ++i)
+                                       cvar_set(argv(i), argv(i + n));
+                       }
+                       else
+                               error("XonoticTextSlider: invalid identifier ", me.getIdentifier(me), " does not match cvar list ", me.cvarName);
+               }
+       }
+}
+void configureXonoticTextSliderValuesXonoticTextSlider(entity me)
+{
+       me.configureTextSliderValues(me, string_null);
+       me.loadCvars(me);
+}
+#endif
diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc
new file mode 100644 (file)
index 0000000..4f365d7
--- /dev/null
@@ -0,0 +1,385 @@
+float tooltipdb;
+void loadTooltips()
+{
+       tooltipdb = db_load("tooltips.db");
+}
+void unloadTooltips()
+{
+       db_close(tooltipdb);
+       tooltipdb = -1;
+}
+string getZonedTooltipForIdentifier(string s)
+{
+       string t;
+       if(s == "")
+               return string_null;
+       t = db_get(tooltipdb, s);
+       if(t == "-")
+               return string_null;
+       if(t != "")
+               return strzone(t);
+       t = cvar_description(s);
+       if(t != "" && t != "custom cvar")
+               return strzone(t);
+       dprint("WARNING: no tooltip set for ", s, "\n");
+       return string_null;
+}
+
+void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass)
+{
+       depthfirst(root, parent, firstChild, nextSibling, funcPre, funcPost, pass);
+}
+
+.string cvarName;
+void SUB_Null_ee(entity e1, entity e2)
+{
+}
+void saveCvarsOf(entity ignore, entity e)
+{
+       if(e.saveCvars)
+               e.saveCvars(e);
+}
+void loadCvarsOf(entity ignore, entity e)
+{
+       if(e.loadCvars)
+               e.loadCvars(e);
+}
+void saveAllCvars(entity root)
+{
+       forAllDescendants(root, saveCvarsOf, SUB_Null_ee, NULL);
+}
+void loadAllCvars(entity root)
+{
+       forAllDescendants(root, loadCvarsOf, SUB_Null_ee, NULL);
+}
+
+.string cvarNames_Multi;
+.void(entity me) saveCvars_Multi;
+void saveCvarsMulti(entity me)
+{
+       float n, i;
+       string s;
+
+       me.saveCvars_Multi(me);
+       s = cvar_string(me.cvarName);
+
+       n = tokenize_console(me.cvarNames_Multi);
+       for(i = 0; i < n; ++i)
+               cvar_set(argv(i), s);
+}
+void makeMulti(entity e, string otherCvars)
+{
+       e.cvarNames_Multi = otherCvars;
+       e.saveCvars_Multi = e.saveCvars;
+       e.saveCvars = saveCvarsMulti;
+}
+
+.void(entity me) saveCvars_Callback;
+.entity saveCvars_Callback_ent;
+.void(entity me, entity cb) saveCvars_Callback_func;
+void saveCvarsCallback(entity me)
+{
+       me.saveCvars_Callback(me);
+       me.saveCvars_Callback_func(me.saveCvars_Callback_ent, me);
+}
+void makeCallback(entity e, entity cbent, void(entity, entity) cbfunc)
+{
+       e.saveCvars_Callback = e.saveCvars;
+       e.saveCvars = saveCvarsCallback;
+       e.saveCvars_Callback_ent = cbent;
+       e.saveCvars_Callback_func = cbfunc;
+}
+
+.void(entity) draw_setDependent;
+.string cvar_setDependent;
+.float cvarMin_setDependent;
+.float cvarMax_setDependent;
+.string cvar2_setDependent;
+.float cvar2Min_setDependent;
+.float cvar2Max_setDependent;
+.string cvar3_setDependent;
+.float cvar3Min_setDependent;
+.float cvar3Max_setDependent;
+.float op_setDependent;
+.string cvarString_setDependent;
+.string cvarValue_setDependent;
+.float(entity) func_setDependent;
+void setDependent_Check(entity e)
+{
+       float f;
+       string s;
+       if(e.func_setDependent)
+       {
+               e.disabled = !(e.func_setDependent(e));
+       }
+       else if(e.cvarString_setDependent)
+       {
+               s = cvar_string(e.cvarString_setDependent);
+               e.disabled = (cvar_string(e.cvarString_setDependent) == e.cvarValue_setDependent);
+       }
+       else
+       {
+               if(e.cvar_setDependent)
+               {
+                       f = cvar(e.cvar_setDependent);
+                       if(e.cvarMin_setDependent <= e.cvarMax_setDependent)
+                               e.disabled = ((f < e.cvarMin_setDependent) || (f > e.cvarMax_setDependent));
+                       else
+                               e.disabled = ((f >= e.cvarMax_setDependent) && (f <= e.cvarMin_setDependent));
+               }
+               if(e.cvar2_setDependent)
+               {
+                       f = cvar(e.cvar2_setDependent);
+                       if(e.cvar2Min_setDependent <= e.cvar2Max_setDependent)
+                               e.disabled = (e.disabled + ((f < e.cvar2Min_setDependent) || (f > e.cvar2Max_setDependent)) > e.op_setDependent);
+                       else
+                               e.disabled = (e.disabled + ((f >= e.cvar2Max_setDependent) && (f <= e.cvar2Min_setDependent)) > e.op_setDependent);
+               }
+               if(e.cvar3_setDependent)
+               {
+                       f = cvar(e.cvar3_setDependent);
+                       if(e.cvar3Min_setDependent <= e.cvar3Max_setDependent)
+                               e.disabled = (e.disabled + ((f < e.cvar3Min_setDependent) || (f > e.cvar3Max_setDependent)) > e.op_setDependent);
+                       else
+                               e.disabled = (e.disabled + ((f >= e.cvar3Max_setDependent) && (f <= e.cvar3Min_setDependent)) > e.op_setDependent);
+               }
+       }
+}
+void setDependent_Draw(entity e)
+{
+       setDependent_Check(e);
+       e.draw_setDependent(e);
+}
+void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
+{
+       e.draw_setDependent = e.draw;
+       e.cvar_setDependent = theCvarName;
+       e.cvarMin_setDependent = theCvarMin;
+       e.cvarMax_setDependent = theCvarMax;
+       e.cvar2_setDependent = string_null;
+       e.cvar3_setDependent = string_null;
+       e.func_setDependent = func_null;
+       e.draw = setDependent_Draw;
+       setDependent_Check(e);
+}
+void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue)
+{
+       e.draw_setDependent = e.draw;
+       e.cvarString_setDependent = theCvarName;
+       e.cvarValue_setDependent = theCvarValue;
+       e.cvar_setDependent = string_null;
+       e.cvar2_setDependent = string_null;
+       e.cvar3_setDependent = string_null;
+       e.func_setDependent = func_null;
+       e.draw = setDependent_Draw;
+       setDependent_Check(e);
+}
+void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max)
+{
+       e.draw_setDependent = e.draw;
+       e.cvar_setDependent = theCvarName;
+       e.cvarMin_setDependent = theCvarMin;
+       e.cvarMax_setDependent = theCvarMax;
+       e.cvar2_setDependent = theCvar2Name;
+       e.cvar2Min_setDependent = theCvar2Min;
+       e.cvar2Max_setDependent = theCvar2Max;
+       e.cvar3_setDependent = string_null;
+       e.op_setDependent = 0;
+       e.func_setDependent = func_null;
+       e.draw = setDependent_Draw;
+       setDependent_Check(e);
+}
+void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max)
+{
+       e.draw_setDependent = e.draw;
+       e.cvar_setDependent = theCvarName;
+       e.cvarMin_setDependent = theCvarMin;
+       e.cvarMax_setDependent = theCvarMax;
+       e.cvar2_setDependent = theCvar2Name;
+       e.cvar2Min_setDependent = theCvar2Min;
+       e.cvar2Max_setDependent = theCvar2Max;
+       e.cvar3_setDependent = string_null;
+       e.op_setDependent = 1;
+       e.func_setDependent = func_null;
+       e.draw = setDependent_Draw;
+       setDependent_Check(e);
+}
+void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max, string theCvar3Name, float theCvar3Min, float theCvar3Max)
+{
+       e.draw_setDependent = e.draw;
+       e.cvar_setDependent = theCvarName;
+       e.cvarMin_setDependent = theCvarMin;
+       e.cvarMax_setDependent = theCvarMax;
+       e.cvar2_setDependent = theCvar2Name;
+       e.cvar2Min_setDependent = theCvar2Min;
+       e.cvar2Max_setDependent = theCvar2Max;
+       e.cvar3_setDependent = theCvar3Name;
+       e.cvar3Min_setDependent = theCvar3Min;
+       e.cvar3Max_setDependent = theCvar3Max;
+       e.op_setDependent = 0;
+       e.func_setDependent = func_null;
+       e.draw = setDependent_Draw;
+       setDependent_Check(e);
+}
+void setDependentWeird(entity e, float(entity) func)
+{
+       e.draw_setDependent = e.draw;
+       e.func_setDependent = func;
+       e.draw = setDependent_Draw;
+       setDependent_Check(e);
+}
+
+// EXTRESPONSE SYSTEM ////////////////////////////////////////////////////////
+
+float _Nex_ExtResponseSystem_RequestsSent;
+float _Nex_ExtResponseSystem_VersionHandled;
+string _Nex_ExtResponseSystem_UpdateTo;
+float _Nex_ExtResponseSystem_RetryTime;
+float _Nex_ExtResponseSystem_RetryTime_LastDelay;
+
+void() Item_Nex_ExtResponseSystem_SendQuery =
+{
+       dprint("Sending extended response requests...\n");
+       localcmd(strcat("packet 64.22.107.122:27950 \"getExtResponse checkUpdates xonotic ", cvar_string("g_xonoticversion"), "\"\n"));
+       _Nex_ExtResponseSystem_RequestsSent = TRUE;
+       _Nex_ExtResponseSystem_RetryTime_LastDelay = _Nex_ExtResponseSystem_RetryTime_LastDelay * 2 + 1;
+       _Nex_ExtResponseSystem_RetryTime = time + _Nex_ExtResponseSystem_RetryTime_LastDelay;
+}
+
+void(float argc) Item_Nex_ExtResponseSystem_Parse =
+{
+       dprint("Received extended response packet from ", argv(0), "\n");
+       if(!_Nex_ExtResponseSystem_RequestsSent)
+       {
+               dprint("  But I haven't sent a request yet! Ignoring.\n");
+               return;
+       }
+       if(argv(1) == "noUpdateAvailable")
+       {
+               if(_Nex_ExtResponseSystem_VersionHandled)
+               {
+                       dprint("  duplicated update notice, ignored\n");
+                       return;
+               }
+               _Nex_ExtResponseSystem_VersionHandled = 1;
+       }
+       else if(argv(1) == "updateAvailable")
+       {
+               if(_Nex_ExtResponseSystem_VersionHandled)
+               {
+                       dprint("  duplicated update notice, ignored\n");
+                       return;
+               }
+               _Nex_ExtResponseSystem_VersionHandled = 1;
+               _Nex_ExtResponseSystem_UpdateTo = strzone(argv(2)); // note: only one packet can be handled, so this can't be a leak
+       }
+       else
+               dprint("  UNKNOWN RESPONSE TYPE: ", argv(1), "\n");
+}
+
+void() Item_Nex_ExtResponseSystem_CheckForResponse =
+{
+       local string s;
+       local float argc;
+       while(strlen((s = getextresponse())))
+       {
+               argc = tokenize_console(s);
+               Item_Nex_ExtResponseSystem_Parse(argc);
+       }
+}
+
+// END OF EXTRESPONSE SYSTEM /////////////////////////////////////////////////
+
+float preMenuInit()
+{
+       vector sz;
+       vector boxA, boxB;
+
+       MapInfo_Cache_Create();
+       MapInfo_Enumerate();
+       if(!MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
+       {
+               draw_reset_cropped();
+
+               sz = eX * 0.025 + eY * 0.025 * (draw_scale_x / draw_scale_y);
+               draw_CenterText('0.5 0.5 0' - 1.25 * sz_y * eY, "Autogenerating mapinfo for newly added maps...", sz, '1 1 1', 1, 0);
+
+               boxA = '0.05 0.5 0' + 0.25 * sz_y * eY;
+               boxB = '0.95 0.5 0' + 1.25 * sz_y * eY;
+               draw_Fill(boxA, boxB - boxA, '1 1 1', 1);
+               
+               boxA += sz * 0.1;
+               boxB -= sz * 0.1;
+               draw_Fill(boxA, boxB - boxA, '0.1 0.1 0.1', 1);
+
+               boxB_x = boxA_x * (1 - MapInfo_progress) + boxB_x * MapInfo_progress;
+               draw_Fill(boxA, boxB - boxA, '0 0 1', 1);
+
+               return FALSE;
+       }
+       return TRUE;
+}
+
+string campaign_name_previous;
+float campaign_won_previous;
+void postMenuDraw()
+{
+}
+void preMenuDraw()
+{
+       vector fs, sz, line, mid;
+
+       if(cvar("menu_updatecheck"))
+       {
+               Item_Nex_ExtResponseSystem_CheckForResponse();
+               if(!_Nex_ExtResponseSystem_VersionHandled)
+                       if(time > _Nex_ExtResponseSystem_RetryTime)
+                               Item_Nex_ExtResponseSystem_SendQuery();
+       }
+
+       if(_Nex_ExtResponseSystem_UpdateTo != "")
+       {
+               fs = ((1/draw_scale_x) * eX + (1/draw_scale_y) * eY) * 12;
+               line = eY * fs_y;
+               sz_x = draw_TextWidth("  http://www.xonotic.com/  ", 0, fs);
+               sz_y = 3 * fs_y;
+
+               draw_alpha = sin(time * 0.112 - 0.3) * 0.7;
+               mid = eX * (0.5 + 0.5 * (1 - sz_x) * cos(time * 0.071))
+                   + eY * (0.5 + 0.5 * (1 - sz_y) * sin(time * 0.071));
+
+               draw_Fill(mid - 0.5 * sz, sz, '1 1 0', 1);
+               draw_CenterText(mid - 1 * line, strcat("Update to ", _Nex_ExtResponseSystem_UpdateTo, " now!"), fs, '1 0 0', 1, 0);
+               draw_CenterText(mid - 0 * line, "http://www.xonotic.com/", fs, '0 0 1', 1, 0);
+       }
+       if not(campaign_name_previous)
+               campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
+       if(campaign_name == campaign_name_previous)
+       {
+               if(cvar(strcat("g_campaign", campaign_name, "_won")))
+               {
+                       if(!campaign_won_previous)
+                       {
+                               m_display();
+                               DialogOpenButton_Click_withCoords(NULL, main.winnerDialog, '0 0 0', eX * conwidth + eY * conheight);
+                       }
+                       campaign_won_previous = 1;
+               }
+               else
+                       campaign_won_previous = 0;
+       }
+       else
+       {
+               strunzone(campaign_name_previous);
+               campaign_name_previous = strzone(campaign_name);
+               campaign_won_previous = cvar(strcat("g_campaign", campaign_name, "_won"));
+       }
+}
+
+string resolvemod(string m)
+{
+       if(m == "=")
+               return getcurrentmod();
+       else
+               return m;
+}
diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh
new file mode 100644 (file)
index 0000000..55d9941
--- /dev/null
@@ -0,0 +1,20 @@
+void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
+void saveAllCvars(entity root);
+void loadAllCvars(entity root);
+
+void makeMulti(entity me, string otherCvars);
+void makeCallback(entity me, entity cbent, void(entity, entity) cbfunc);
+
+void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax);
+void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
+void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
+void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max, string theCvar3Name, float theCvar3Min, float theCvar3Max);
+void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue);
+void setDependentWeird(entity e, float(entity) func);
+
+float tooltipdb;
+void loadTooltips();
+void unloadTooltips();
+string getZonedTooltipForIdentifier(string s);
+
+string resolvemod(string m);
diff --git a/qcsrc/menu/xonotic/weaponslist.c b/qcsrc/menu/xonotic/weaponslist.c
new file mode 100644 (file)
index 0000000..012f7bc
--- /dev/null
@@ -0,0 +1,118 @@
+#ifdef INTERFACE
+CLASS(XonoticWeaponsList) EXTENDS(XonoticListBox)
+       METHOD(XonoticWeaponsList, configureXonoticWeaponsList, void(entity))
+       METHOD(XonoticWeaponsList, toString, string(entity))
+       ATTRIB(XonoticWeaponsList, rowsPerItem, float, 1)
+       METHOD(XonoticWeaponsList, draw, void(entity))
+       METHOD(XonoticWeaponsList, drawListBoxItem, void(entity, float, vector, float))
+       METHOD(XonoticWeaponsList, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticWeaponsList, keyDown, float(entity, float, float, float))
+       ATTRIB(XonoticWeaponsList, realFontSize, vector, '0 0 0')
+       ATTRIB(XonoticWeaponsList, realUpperMargin, float, 0)
+       METHOD(XonoticWeaponsList, mouseDrag, float(entity, vector))
+       ATTRIB(XonoticWeaponsList, scrollbarWidth, float, 0)
+ENDCLASS(XonoticWeaponsList)
+entity makeXonoticWeaponsList();
+void WeaponsList_MoveUp_Click(entity btn, entity me);
+void WeaponsList_MoveDown_Click(entity box, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticWeaponsList()
+{
+       entity me;
+       me = spawnXonoticWeaponsList();
+       me.configureXonoticWeaponsList(me);
+       return me;
+}
+void configureXonoticWeaponsListXonoticWeaponsList(entity me)
+{
+       me.configureXonoticListBox(me);
+}
+void drawXonoticWeaponsList(entity me)
+{
+       // read in cvar?
+       string s, t;
+       s = W_NumberWeaponOrder(cvar_string("cl_weaponpriority"));
+       t = W_FixWeaponOrder(s, 1);
+       if(t != s)
+       {
+               print("AUTOFIXED\n");
+               cvar_set("cl_weaponpriority", W_NameWeaponOrder(t));
+       }
+       me.nItems = tokenize_console(t);
+       drawListBox(me);
+}
+void WeaponsList_MoveUp_Click(entity box, entity me)
+{
+       if(me.selectedItem > 0)
+       {
+               cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem - 1, me.selectedItem));
+               me.selectedItem -= 1;
+       }
+}
+void WeaponsList_MoveDown_Click(entity box, entity me)
+{
+       if(me.selectedItem < me.nItems - 1)
+       {
+               cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, me.selectedItem + 1));
+               me.selectedItem += 1;
+       }
+}
+void resizeNotifyXonoticWeaponsList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+
+       me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
+       me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
+       me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+}
+float mouseDragXonoticWeaponsList(entity me, vector pos)
+{
+       float f, i;
+       i = me.selectedItem;
+       f = mouseDragListBox(me, pos);
+       if(me.selectedItem != i)
+               cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i));
+       return f;
+}
+string toStringXonoticWeaponsList(entity me)
+{
+       float n, i;
+       string s;
+       entity e;
+       n = tokenize_console(W_NumberWeaponOrder(cvar_string("cl_weaponpriority")));
+       s = "";
+       for(i = 0; i < n; ++i)
+       {
+               e = get_weaponinfo(stof(argv(i)));
+               s = strcat(s, e.message, ", ");
+       }
+       return substring(s, 0, strlen(s) - 2);
+}
+void drawListBoxItemXonoticWeaponsList(entity me, float i, vector absSize, float isSelected)
+{
+       entity e;
+       if(isSelected)
+               draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+       e = get_weaponinfo(stof(argv(i)));
+       draw_Text(me.realUpperMargin * eY, e.message, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+}
+
+float keyDownXonoticWeaponsList(entity me, float scan, float ascii, float shift)
+{
+       if(ascii == 43) // +
+       {
+               WeaponsList_MoveUp_Click(NULL, me);
+               return 1;
+       }
+       else if(scan == 45) // -
+       {
+               WeaponsList_MoveDown_Click(NULL, me);
+               return 1;
+       }
+       else if(keyDownListBox(me, scan, ascii, shift))
+               return 1;
+       return 0;
+}
+#endif
diff --git a/qcsrc/nexuiz.ncb b/qcsrc/nexuiz.ncb
deleted file mode 100644 (file)
index ff35fe9..0000000
Binary files a/qcsrc/nexuiz.ncb and /dev/null differ
diff --git a/qcsrc/nexuiz.sln b/qcsrc/nexuiz.sln
deleted file mode 100644 (file)
index f1bb89c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 10.00\r
-# Visual C++ Express 2008\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nexuiz", "nexuiz.vcproj", "{5C916FA4-69D0-41AA-A96F-8C492E9406E8}"\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Release|Win32 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {5C916FA4-69D0-41AA-A96F-8C492E9406E8}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {5C916FA4-69D0-41AA-A96F-8C492E9406E8}.Debug|Win32.Build.0 = Debug|Win32\r
-               {5C916FA4-69D0-41AA-A96F-8C492E9406E8}.Release|Win32.ActiveCfg = Release|Win32\r
-               {5C916FA4-69D0-41AA-A96F-8C492E9406E8}.Release|Win32.Build.0 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-EndGlobal\r
diff --git a/qcsrc/nexuiz.suo b/qcsrc/nexuiz.suo
deleted file mode 100644 (file)
index 9044a4f..0000000
Binary files a/qcsrc/nexuiz.suo and /dev/null differ
diff --git a/qcsrc/nexuiz.vcproj b/qcsrc/nexuiz.vcproj
deleted file mode 100644 (file)
index 31f1c50..0000000
+++ /dev/null
@@ -1,1384 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="nexuiz"\r
-       ProjectGUID="{5C916FA4-69D0-41AA-A96F-8C492E9406E8}"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="0"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       OutputDirectory="Debug"\r
-                       IntermediateDirectory="Debug"\r
-                       ConfigurationType="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;"\r
-                               MinimalRebuild="true"\r
-                               BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="3"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="4"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               LinkIncremental="2"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="Release"\r
-                       IntermediateDirectory="Release"\r
-                       ConfigurationType="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"\r
-                               RuntimeLibrary="2"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               LinkIncremental="2"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\menu\oo\base.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\oo\classdefs.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\oo\constructors.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\oo\implementation.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\server\progdefs.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\skin-customizables.inc"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
-                       >\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\bigbutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\bigcommandbutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\borderimage.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\button.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\button.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\campaign.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\charmap.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\checkbox.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\checkbox.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\checkbox_slider_invalid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\classes.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\colorbutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\colorpicker.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\commandbutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\container.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\credits.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\crosshairbutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\cvarlist.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\demolist.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\dialog.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_credits.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_create.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_create_advanced.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_create_mapinfo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_create_mutators.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_demo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_join.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_join_serverinfo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_playersetup.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_playersetup_radar.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_multiplayer_playersetup_weapons.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_news.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_quit.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_audio.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_effects.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_input.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_input_userbind.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_misc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_misc_cvars.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_network.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_settings_video.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_singleplayer.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_singleplayer_winner.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\dialog_teamselect.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\gametypebutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\gecko.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\image.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\image.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\inputbox.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\inputbox.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\inputcontainer.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\keybinder.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\label.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\listbox.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\listbox.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\mainwindow.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\maplist.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\modalcontroller.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\modbutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\nexposee.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\nexposee.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\playerlist.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\playermodel.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\radiobutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\radiobutton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\rootdialog.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\serverlist.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\skinlist.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\slider.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\slider.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\slider_decibels.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\slider_resolution.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\tab.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\tab.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\tabcontroller.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\textlabel.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\item\textslider.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\textslider.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\menu\nexuiz\weaponslist.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <File\r
-                       RelativePath=".\server\monsters\ai.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\aim.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\aim.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\antilag.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\antilag.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\arena.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\assault.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\bgmscript.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\bgmscript.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\bot.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\bot.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\builtins.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\campaign.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\campaign.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\campaign_common.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\campaign_file.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\campaign_setup.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\casings.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\cl_client.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\cl_impulse.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\cl_physics.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\cl_player.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\cl_weapons.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\cl_weaponsystem.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\clientcommands.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\config.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\constants.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\constants.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\costs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\credit.txt"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\csqc_builtins.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\csqc_constants.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\csqceffects.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\csqcprojectile.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\csqcprojectile.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\ctf.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\ctf.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\damage.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\debug.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\monsters\defs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\Defs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\defs.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\domination.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\draw.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\draw.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\effects.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\ent_cs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\expandnode.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\extensions.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\monsters\fight.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\frags.txt"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\func_breakable.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_casings.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_damage.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_hook.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_hook.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_lights.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_models.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_subs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_swamp.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_tetris.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_triggers.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_violence.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\g_world.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\gamecommand.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\gamecommand.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\gamecommand.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\gamecommand.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\gibs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\havocbot\havocbot.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\havocbot\havocbot.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\hook.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\interpolate.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\interpolate.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\ipban.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\ipban.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\items.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\items.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\keyhunt.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\keyhunt.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\laser.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\monsters\m_monsters.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\Main.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\main.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\main.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\mapinfo.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\mapinfo.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\mapvoting.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\mbuiltin.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\menu.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\menu.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\miscfunctions.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\miscfunctions.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\monsters\mode_management.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\mode_onslaught.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\modeleffects.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\movelib.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\movenode.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\movetypes.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\movetypes.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\msys.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\navigation.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\navigation.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\nexball.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\particles.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\pathlib.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\portals.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\portals.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\post-builtins.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\prandom.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\prandom.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pre-builtins.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\pre.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\progs.src"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\progs.src"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\progs.src"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\projectile.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\qcc.cfg"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\race.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\race.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\vehicles\racer.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\havocbot\role_ctf.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\havocbot\role_keyhunt.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\havocbot\role_onslaught.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\havocbot\roles.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\rubble.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\runematch.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\sbar.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\scores.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\scores.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\scores_rules.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\scripting.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\server.cbp"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\skin.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\sortlist.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\vehicles\spiderbot.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\steerlib.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\sv_main.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\sv_stats.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\sys.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\system\system_aimprocs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\system\system_damage.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\system\system_main.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\system\system_misc.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\system\system_scoreprocs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_halflife.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_items.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_jumppads.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_plats.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_quake.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_quake3.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_swamp.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\t_teleporters.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\target_spawn.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\teamplay.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\teamplay.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\teamradar.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\teamradar.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\todo.txt"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\include\turrets.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\include\turrets_early.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_checkpoint.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_common.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_ewheel.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_flac.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_fusionreactor.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_hellion.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_hk.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_machinegun.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_mlrs.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_phaser.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_plasma.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_targettrigger.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_tessla.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\tturrets\units\unit_walker.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\util-pre.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\util.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\nexuiz\util.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\menu\nexuiz\util.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\common\util.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\pathlib\utility.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\vehicles\vehicles.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\vehicles\vehicles.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\verbstack.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\View.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\vote.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\vote.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_campingrifle.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_common.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_crylink.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_electro.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_fireball.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_grenadelauncher.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_hagar.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_hlac.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_hook.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_laser.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_minstanex.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_nex.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_porto.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_rocketlauncher.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_shotgun.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_tuba.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\w_uzi.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\wall.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\waypoints.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\bot\waypoints.qh"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\server\waypointsprites.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\waypointsprites.qc"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\client\waypointsprites.qh"\r
-                       >\r
-               </File>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/qcsrc/nexuiz.vcproj.user b/qcsrc/nexuiz.vcproj.user
deleted file mode 100644 (file)
index 0ce2ced..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><VisualStudioUserFile ProjectType="Visual C++" Version="9.00" ShowAllFiles="true"></VisualStudioUserFile>
\ No newline at end of file
index 520d4a3c04b223514a06fb545703e0aef73012ad..c05013bfe0203218539c4c58b3f95a4dc3a08363 100755 (executable)
@@ -18,7 +18,7 @@ engine=$1; shift
 map=$1; shift
 echo "$testcase" > "$dir/testcase.qc"
 if ( cd $dir && fteqcc ); then
 map=$1; shift
 echo "$testcase" > "$dir/testcase.qc"
 if ( cd $dir && fteqcc ); then
-       set -- "$engine" -nexuiz -basedir "$dir/../../.." +sv_progs progs-testcase.dat "$@" +map "$map"
+       set -- "$engine" -xonotic -basedir "$dir/../../.." +sv_progs progs-testcase.dat "$@" +map "$map"
        if [ -n "$GDB_ME" ]; then
                cmdfile=`mktemp`
                {
        if [ -n "$GDB_ME" ]; then
                cmdfile=`mktemp`
                {
index 9575965c148a208753e7638b4cccf2b62e2155b8..2f424b8a8f49d81bd3b82f7a53181fe05df15aac 100644 (file)
@@ -453,8 +453,8 @@ float Client_customizeentityforclient()
        modelsource = self;
 
 #ifdef ALLOW_FORCEMODELS
        modelsource = self;
 
 #ifdef ALLOW_FORCEMODELS
-       if(other.cvar_cl_forceplayermodelsfromnexuiz)
-               if not(self.modelindex_lod0_from_nexuiz)
+       if(other.cvar_cl_forceplayermodelsfromxonotic)
+               if not(self.modelindex_lod0_from_xonotic)
                        modelsource = other;
        if(other.cvar_cl_forceplayermodels && sv_clforceplayermodels)
                modelsource = other;
                        modelsource = other;
        if(other.cvar_cl_forceplayermodels && sv_clforceplayermodels)
                modelsource = other;
@@ -549,7 +549,7 @@ void setmodel_lod(entity e, string modelname)
        }
 
        s = whichpack(self.model);
        }
 
        s = whichpack(self.model);
-       self.modelindex_lod0_from_nexuiz = ((s == "") || (substring(s, 0, 4) == "data"));
+       self.modelindex_lod0_from_xonotic = ((s == "") || (substring(s, 0, 4) == "data"));
 
        player_setupanimsformodel();
        UpdatePlayerSounds();
 
        player_setupanimsformodel();
        UpdatePlayerSounds();
@@ -2446,29 +2446,29 @@ void PlayerPreThink (void)
 
        // version nagging
        if(self.version_nagtime)
 
        // version nagging
        if(self.version_nagtime)
-               if(self.cvar_g_nexuizversion)
+               if(self.cvar_g_xonoticversion)
                        if(time > self.version_nagtime)
                        {
                        if(time > self.version_nagtime)
                        {
-                               if(strstr(self.cvar_g_nexuizversion, "svn", 0) < 0)
+                               if(strstr(self.cvar_g_xonoticversion, "svn", 0) < 0)
                                {
                                {
-                                       if(strstr(cvar_string("g_nexuizversion"), "svn", 0) >= 0)
+                                       if(strstr(cvar_string("g_xonoticversion"), "svn", 0) >= 0)
                                        {
                                        {
-                                               dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Nexuiz ", cvar_string("g_nexuizversion"), " (beta)^7, you have ^3Nexuiz ", self.cvar_g_nexuizversion, "^1\n");
-                                               sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Nexuiz ", cvar_string("g_nexuizversion"), " (beta)^7, you have ^3Nexuiz ", self.cvar_g_nexuizversion, "^1\n"));
+                                               dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                               sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
                                        }
                                        else
                                        {
                                                float r;
                                        }
                                        else
                                        {
                                                float r;
-                                               r = vercmp(self.cvar_g_nexuizversion, cvar_string("g_nexuizversion"));
+                                               r = vercmp(self.cvar_g_xonoticversion, cvar_string("g_xonoticversion"));
                                                if(r < 0)
                                                {
                                                if(r < 0)
                                                {
-                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Nexuiz ", cvar_string("g_nexuizversion"), "^7 is out, and you still have ^3Nexuiz ", self.cvar_g_nexuizversion, "^1 - get the update from ^4http://www.nexuiz.com/^1!\n");
-                                                       sprint(self, strcat("\{1}^1NOTE: ^3Nexuiz ", cvar_string("g_nexuizversion"), "^7 is out, and you still have ^3Nexuiz ", self.cvar_g_nexuizversion, "^1 - get the update from ^4http://www.nexuiz.com/^1!\n"));
+                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", cvar_string("g_xonoticversion"), "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.com/^1!\n");
+                                                       sprint(self, strcat("\{1}^1NOTE: ^3Xonotic ", cvar_string("g_xonoticversion"), "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.com/^1!\n"));
                                                }
                                                else if(r > 0)
                                                {
                                                }
                                                else if(r > 0)
                                                {
-                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Nexuiz ", cvar_string("g_nexuizversion"), "^7, you have ^3Nexuiz ", self.cvar_g_nexuizversion, "^1\n");
-                                                       sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Nexuiz ", cvar_string("g_nexuizversion"), "^7, you have ^3Nexuiz ", self.cvar_g_nexuizversion, "^1\n"));
+                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                                       sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
                                                }
                                        }
                                }
                                                }
                                        }
                                }
index c136ef7b0a6e40f6ed96a5c69def085613599e0a..56823b3e2988e4b301aefee956b7b0be38a585d1 100644 (file)
@@ -87,7 +87,7 @@ void PlayerJump (void)
                self.velocity_z = max(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_min"), self.velocity_z);
        if(cvar_string("sv_jumpspeedcap_max") != "") {
                if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")) {
                self.velocity_z = max(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_min"), self.velocity_z);
        if(cvar_string("sv_jumpspeedcap_max") != "") {
                if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")) {
-                       // don't do jump speedcaps on ramps to preserve old nexuiz ramjump style
+                       // don't do jump speedcaps on ramps to preserve old xonotic ramjump style
                        //print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling speed cap!\n");
                }
                else
                        //print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling speed cap!\n");
                }
                else
index 58f4979909a2b92cfa2dce38e9b601dd033ac463..92335faeef3a5c206e2a9bfce0bf9892f5b01880 100644 (file)
@@ -134,7 +134,7 @@ void CopyBody(float keepvelocity)
        self.model = oldself.model;
        self.modelindex = oldself.modelindex;
        self.modelindex_lod0 = oldself.modelindex_lod0;
        self.model = oldself.model;
        self.modelindex = oldself.modelindex;
        self.modelindex_lod0 = oldself.modelindex_lod0;
-       self.modelindex_lod0_from_nexuiz = oldself.modelindex_lod0_from_nexuiz;
+       self.modelindex_lod0_from_xonotic = oldself.modelindex_lod0_from_xonotic;
        self.modelindex_lod1 = oldself.modelindex_lod1;
        self.modelindex_lod2 = oldself.modelindex_lod2;
        self.skinindex = oldself.skinindex;
        self.modelindex_lod1 = oldself.modelindex_lod1;
        self.modelindex_lod2 = oldself.modelindex_lod2;
        self.skinindex = oldself.skinindex;
index d4c1eaa6ceb7681ad413dd77984a81422f4df0f9..8fc949fa412f49ea70263db21c7f5066ef9a55a8 100644 (file)
@@ -158,7 +158,7 @@ void SV_ParseClientCommand(string s) {
                if not(self.flags & FL_CLIENT)
                        return;
                if (argv(1) == "$gameversion") {
                if not(self.flags & FL_CLIENT)
                        return;
                if (argv(1) == "$gameversion") {
-                       //versionmsg = "^1client is too old to get versioninfo.\nUPDATE!!! (http://www.nexuiz.com)^8";
+                       //versionmsg = "^1client is too old to get versioninfo.\nUPDATE!!! (http://www.xonotic.com)^8";
                        // either that or someone wants to be funny
                        self.version = 1;
                } else {
                        // either that or someone wants to be funny
                        self.version = 1;
                } else {
index b97fefd19d0f6297d545617d31dc2d744b66d34b..bc9e300ebf77dfa94c61880b6eba6aeb83f9ee09 100644 (file)
@@ -324,12 +324,12 @@ float default_weapon_alpha;
 .float cvar_cl_playerdetailreduction;
 .float cvar_scr_centertime;
 .float cvar_cl_shownames;
 .float cvar_cl_playerdetailreduction;
 .float cvar_scr_centertime;
 .float cvar_cl_shownames;
-.string cvar_g_nexuizversion;
+.string cvar_g_xonoticversion;
 .string cvar_cl_weaponpriority;
 .string cvar_cl_weaponpriorities[10];
 #ifdef ALLOW_FORCEMODELS
 .float cvar_cl_forceplayermodels;
 .string cvar_cl_weaponpriority;
 .string cvar_cl_weaponpriorities[10];
 #ifdef ALLOW_FORCEMODELS
 .float cvar_cl_forceplayermodels;
-.float cvar_cl_forceplayermodelsfromnexuiz;
+.float cvar_cl_forceplayermodelsfromxonotic;
 float sv_clforceplayermodels;
 #endif
 float sv_loddistance1;
 float sv_clforceplayermodels;
 #endif
 float sv_loddistance1;
@@ -343,7 +343,7 @@ void AnnounceTo(entity e, string snd);
 .float version_nagtime;
 
 .float modelindex_lod0;
 .float version_nagtime;
 
 .float modelindex_lod0;
-.float modelindex_lod0_from_nexuiz;
+.float modelindex_lod0_from_xonotic;
 .float skinindex;
 .float modelindex_lod1;
 .float modelindex_lod2;
 .float skinindex;
 .float modelindex_lod1;
 .float modelindex_lod2;
index 445e72d2d988e9a5fc3e3cc1de52806050dc96e5..f73259cf9c13bcb42090f80bfae183f5a8c400bd 100644 (file)
@@ -2070,8 +2070,8 @@ string(float n) argv = #442;
 //description:
 //when a savegame is loaded, this function is called
 
 //description:
 //when a savegame is loaded, this function is called
 
-//NEXUIZ_PLAYERMODEL
-//idea: Nexuiz
+//XONOTIC_PLAYERMODEL
+//idea: Xonotic
 //darkplaces implementation: Black
 //console commands:
 //playermodel <name> - FIXME: EXAMPLE NEEDED
 //darkplaces implementation: Black
 //console commands:
 //playermodel <name> - FIXME: EXAMPLE NEEDED
@@ -2080,7 +2080,7 @@ string(float n) argv = #442;
 .string playermodel; // name of player model sent by client
 .string playerskin; // name of player skin sent by client
 //description:
 .string playermodel; // name of player model sent by client
 .string playerskin; // name of player skin sent by client
 //description:
-//these client properties are used by Nexuiz.
+//these client properties are used by Xonotic.
 
 //NXQ_GFX_LETTERBOX
 //idea: nxQuake
 
 //NXQ_GFX_LETTERBOX
 //idea: nxQuake
index 93f7ed96cfa8b3be8a99e2eb91ac1ac3d1aaf305..a88fae947bf9b987646fde1e361cffd27038708c 100644 (file)
@@ -1,6 +1,6 @@
 /*============================================
 
 /*============================================
 
-      Wazat's Nexuiz Grappling Hook
+      Wazat's Xonotic Grappling Hook
 
         Contact: Wazat1@gmail.com
 
 
         Contact: Wazat1@gmail.com
 
@@ -326,7 +326,7 @@ void FireGrapplingHook (void)
 
 //  void GrapplingHookFrame()
 //  {
 
 //  void GrapplingHookFrame()
 //  {
-//         // this function has been modified for Nexuiz
+//         // this function has been modified for Xonotic
 // -       if (self.BUTTON_HOOK && g_grappling_hook)
 //         {
 // -               if (!self.hook && self.hook_time <= time && !self.button6_pressed_before)
 // -       if (self.BUTTON_HOOK && g_grappling_hook)
 //         {
 // -               if (!self.hook && self.hook_time <= time && !self.button6_pressed_before)
@@ -441,7 +441,7 @@ void GrappleHookInit()
 
 void SetGrappleHookBindings()
 {
 
 void SetGrappleHookBindings()
 {
-       // this function has been modified for Nexuiz
+       // this function has been modified for Xonotic
        // don't remove these lines! old server or demos coud overwrite the new aliases
        stuffcmd(self, "alias +hook +button6\n");
        stuffcmd(self, "alias -hook -button6\n");
        // don't remove these lines! old server or demos coud overwrite the new aliases
        stuffcmd(self, "alias +hook +button6\n");
        stuffcmd(self, "alias -hook -button6\n");
index b2a4c0206e8d19fefdd9c57473676bf93ec65bf6..fe64e7c006c32e91d8061f188ffe7293997c1517 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *              t_swamp.c
 /*
 *              t_swamp.c
-*              Adds spawnfunc_trigger_swamp and suppoart routines for nexuiz 1.2.1+
+*              Adds spawnfunc_trigger_swamp and suppoart routines for xonotic 1.2.1+
 *              Author tZork (Jakob MG) 
 *              jakob@games43.se
 *              2005 11 29
 *              Author tZork (Jakob MG) 
 *              jakob@games43.se
 *              2005 11 29
index 24558057c1e5edf009fc0f5909012c47c43b77c2..af03b8348d7af30c96b0b979ec911475d35b6931 100644 (file)
@@ -588,7 +588,7 @@ void EffectIndexDump()
        db_put(d, "TR_KNIGHTSPIKE", "1"); print("effect TR_KNIGHTSPIKE is ", ftos(particleeffectnum("TR_KNIGHTSPIKE")), "\n");
        db_put(d, "TR_VORESPIKE", "1"); print("effect TR_VORESPIKE is ", ftos(particleeffectnum("TR_VORESPIKE")), "\n");
        db_put(d, "TR_NEHAHRASMOKE", "1"); print("effect TR_NEHAHRASMOKE is ", ftos(particleeffectnum("TR_NEHAHRASMOKE")), "\n");
        db_put(d, "TR_KNIGHTSPIKE", "1"); print("effect TR_KNIGHTSPIKE is ", ftos(particleeffectnum("TR_KNIGHTSPIKE")), "\n");
        db_put(d, "TR_VORESPIKE", "1"); print("effect TR_VORESPIKE is ", ftos(particleeffectnum("TR_VORESPIKE")), "\n");
        db_put(d, "TR_NEHAHRASMOKE", "1"); print("effect TR_NEHAHRASMOKE is ", ftos(particleeffectnum("TR_NEHAHRASMOKE")), "\n");
-       db_put(d, "TR_NEXUIZPLASMA", "1"); print("effect TR_NEXUIZPLASMA is ", ftos(particleeffectnum("TR_NEXUIZPLASMA")), "\n");
+       db_put(d, "TR_XONOTICPLASMA", "1"); print("effect TR_XONOTICPLASMA is ", ftos(particleeffectnum("TR_XONOTICPLASMA")), "\n");
        db_put(d, "TR_GLOWTRAIL", "1"); print("effect TR_GLOWTRAIL is ", ftos(particleeffectnum("TR_GLOWTRAIL")), "\n");
        db_put(d, "SVC_PARTICLE", "1"); print("effect SVC_PARTICLE is ", ftos(particleeffectnum("SVC_PARTICLE")), "\n");
 
        db_put(d, "TR_GLOWTRAIL", "1"); print("effect TR_GLOWTRAIL is ", ftos(particleeffectnum("TR_GLOWTRAIL")), "\n");
        db_put(d, "SVC_PARTICLE", "1"); print("effect SVC_PARTICLE is ", ftos(particleeffectnum("SVC_PARTICLE")), "\n");
 
index f31f4f9203eb34e2fef82821c5e63ba025a04009..16f4a33fbbdf9abb4901af37fa3b9f6429a7b107 100644 (file)
@@ -599,7 +599,7 @@ void GetCvars(float f)
        GetCvars_handleFloat(s, f, cvar_cl_playerdetailreduction, "cl_playerdetailreduction");
        GetCvars_handleFloat(s, f, cvar_scr_centertime, "scr_centertime");
        GetCvars_handleFloat(s, f, cvar_cl_shownames, "cl_shownames");
        GetCvars_handleFloat(s, f, cvar_cl_playerdetailreduction, "cl_playerdetailreduction");
        GetCvars_handleFloat(s, f, cvar_scr_centertime, "scr_centertime");
        GetCvars_handleFloat(s, f, cvar_cl_shownames, "cl_shownames");
-       GetCvars_handleString(s, f, cvar_g_nexuizversion, "g_nexuizversion");
+       GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion");
        GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete);
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
        GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete);
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
@@ -625,7 +625,7 @@ void GetCvars(float f)
 
 #ifdef ALLOW_FORCEMODELS
        GetCvars_handleFloat(s, f, cvar_cl_forceplayermodels, "cl_forceplayermodels");
 
 #ifdef ALLOW_FORCEMODELS
        GetCvars_handleFloat(s, f, cvar_cl_forceplayermodels, "cl_forceplayermodels");
-       GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromnexuiz, "cl_forceplayermodelsfromnexuiz");
+       GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromxonotic, "cl_forceplayermodelsfromxonotic");
 #endif
        GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
 
 #endif
        GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
 
index 3be0212af939b98fa8f1301985f18a0a1956fa81..1a43fc78ea8d89a026b6b8406fe27318ca0e834b 100644 (file)
@@ -6,8 +6,8 @@
 .void()         th_run;
 .float()        th_missile; // LordHavoc: changed from void() to float(), returns true if attacking
 .void()         th_melee;
 .void()         th_run;
 .float()        th_missile; // LordHavoc: changed from void() to float(), returns true if attacking
 .void()         th_melee;
-//.void(entity attacker, float damage, float damgtype, string dethtype)           th_pain; // TODO Nexuiz uses event_damage
-//.void()         th_die; // TODO never called directly by Nexuiz
+//.void(entity attacker, float damage, float damgtype, string dethtype)           th_pain; // TODO Xonotic uses event_damage
+//.void()         th_die; // TODO never called directly by Xonotic
 .entity         oldenemy;               // mad at this player before taking damage
 entity  newmis;                 // launch_spike sets this after spawning it
 
 .entity         oldenemy;               // mad at this player before taking damage
 entity  newmis;                 // launch_spike sets this after spawning it
 
index 3c13d5b042eada5c7c59cb363ace053ec5a60899..4dff570d317798035ea13f029c507ba6eb9f25ee 100644 (file)
@@ -1246,7 +1246,7 @@ float race_GetFractionalLapCount(entity e)
        // scoreboard, immediately updates when overtaking
        //
        // requires the track to be built so you never get farther away from the
        // scoreboard, immediately updates when overtaking
        //
        // requires the track to be built so you never get farther away from the
-       // next checkpoint, though, and current Nexuiz race maps are not built that
+       // next checkpoint, though, and current Xonotic race maps are not built that
        // way
        //
        // also, this code is slow and would need optimization (i.e. "next CP"
        // way
        //
        // also, this code is slow and would need optimization (i.e. "next CP"
index 30adf39fb1fffb24a90af13c24fdfa9302228885..97b78ca7978a22e058ef4598f57c9c8b7b682340 100644 (file)
@@ -367,7 +367,7 @@ void WinningConditionHelper()
        entity sk;
 
        s = GetGametype();
        entity sk;
 
        s = GetGametype();
-       s = strcat(s, ":", cvar_string("g_nexuizversion"));
+       s = strcat(s, ":", cvar_string("g_xonoticversion"));
        s = strcat(s, "::", GetPlayerScoreString(world, 2)); // make this 1 once we can
 
        fullstatus = cvar("g_full_getstatus_responses");
        s = strcat(s, "::", GetPlayerScoreString(world, 2)); // make this 1 once we can
 
        fullstatus = cvar("g_full_getstatus_responses");
index 1d398d122f5b0fe072c5198e6d52ee8da3afa8d2..04328de873f246593fe148514231adab3fe6821c 100644 (file)
@@ -1290,7 +1290,7 @@ void spawnfunc_item_health_mega (void) {
 }
 
 // support old misnamed entities
 }
 
 // support old misnamed entities
-void spawnfunc_item_armor1() { spawnfunc_item_armor_small(); }  // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
+void spawnfunc_item_armor1() { spawnfunc_item_armor_small(); }  // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
 void spawnfunc_item_armor25() { spawnfunc_item_armor_large(); }
 void spawnfunc_item_health1() { spawnfunc_item_health_small(); }
 void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
 void spawnfunc_item_armor25() { spawnfunc_item_armor_large(); }
 void spawnfunc_item_health1() { spawnfunc_item_health_small(); }
 void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
index 852983896ed568e0aa966e5163e412e7677305fd..ada78846b97cf77735fcbc89ff1dbe61b228a740 100644 (file)
@@ -1,12 +1,12 @@
 //***********************
 //***********************
-//QUAKE 1 ENTITIES - So people can play quake1 maps with the nexuiz weapons
+//QUAKE 1 ENTITIES - So people can play quake1 maps with the xonotic weapons
 //***********************
 void spawnfunc_weapon_nailgun (void) {spawnfunc_weapon_electro();}
 void spawnfunc_weapon_supernailgun (void) {spawnfunc_weapon_hagar();}
 void spawnfunc_weapon_supershotgun (void) {spawnfunc_weapon_uzi();}
 
 void spawnfunc_item_spikes (void) {spawnfunc_item_bullets();}
 //***********************
 void spawnfunc_weapon_nailgun (void) {spawnfunc_weapon_electro();}
 void spawnfunc_weapon_supernailgun (void) {spawnfunc_weapon_hagar();}
 void spawnfunc_weapon_supershotgun (void) {spawnfunc_weapon_uzi();}
 
 void spawnfunc_item_spikes (void) {spawnfunc_item_bullets();}
-//void spawnfunc_item_armor1 (void) {spawnfunc_item_armor_medium;}  // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
+//void spawnfunc_item_armor1 (void) {spawnfunc_item_armor_medium;}  // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
 void spawnfunc_item_armor2 (void) {spawnfunc_item_armor_large();}
 void item_armorInv (void) {spawnfunc_item_armor_large();}
 void spawnfunc_item_health (void) {if (self.spawnflags & 2) spawnfunc_item_health_mega();else spawnfunc_item_health_medium();}
 void spawnfunc_item_armor2 (void) {spawnfunc_item_armor_large();}
 void item_armorInv (void) {spawnfunc_item_armor_large();}
 void spawnfunc_item_health (void) {if (self.spawnflags & 2) spawnfunc_item_health_mega();else spawnfunc_item_health_medium();}
index 5eb5544c6e9bc44105b7b1da17c9dfcb2435a599..52214c2a6d276958dd933731fa16a487589e26f0 100644 (file)
@@ -1,5 +1,5 @@
 //***********************
 //***********************
-//QUAKE 3 ENTITIES - So people can play quake3 maps with the nexuiz weapons
+//QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons
 //***********************
 
 // NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
 //***********************
 
 // NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
index 9a24e3b77247f3990fad94fb66289410bc16710d..5ad7e62cb7243691bd8d6ebabd3fb241d0319785 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *              t_swamp.c
 /*
 *              t_swamp.c
-*              Adds spawnfunc_trigger_swamp and suppoart routines for nexuiz 1.2.1+
+*              Adds spawnfunc_trigger_swamp and suppoart routines for xonotic 1.2.1+
 *              Author tZork (Jakob MG) 
 *              jakob@games43.se
 *              2005 11 29
 *              Author tZork (Jakob MG) 
 *              jakob@games43.se
 *              2005 11 29
index 7b1a85abc7a8d3f7f5a0fb9c4f9266fd9f220825..1c07a602f61fa78efdd49df1b07d34838fda6a51 100644 (file)
@@ -431,7 +431,7 @@ string GetClientVersionMessage() {
                if(self.version < cvar("gameversion")) {
                        versionmsg = "^3Your client version is outdated.\n\n\n### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###\n\n\nPlease update!!!^8";
                } else {
                if(self.version < cvar("gameversion")) {
                        versionmsg = "^3Your client version is outdated.\n\n\n### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###\n\n\nPlease update!!!^8";
                } else {
-                       versionmsg = "^3This server is using an outdated Nexuiz version.\n\n\n ### THIS SERVER IS INCOMPATIBLE AND THUS YOU CANNOT JOIN ###.^8";
+                       versionmsg = "^3This server is using an outdated Xonotic version.\n\n\n ### THIS SERVER IS INCOMPATIBLE AND THUS YOU CANNOT JOIN ###.^8";
                }
        } else {
                versionmsg = "^2client version and server version are compatible.^8";
                }
        } else {
                versionmsg = "^2client version and server version are compatible.^8";
@@ -530,7 +530,7 @@ void PrintWelcomeMessage(entity pl)
        local string versionmessage;
        versionmessage = GetClientVersionMessage();
 
        local string versionmessage;
        versionmessage = GetClientVersionMessage();
 
-       s = strcat(s, NEWLINES, "This is Nexuiz ", cvar_string("g_nexuizversion"), "\n", versionmessage);
+       s = strcat(s, NEWLINES, "This is Xonotic ", cvar_string("g_xonoticversion"), "\n", versionmessage);
        s = strcat(s, "^8\n\nmatch type is ^1", gamemode_name, "^8\n");
 
        if(modifications != "")
        s = strcat(s, "^8\n\nmatch type is ^1", gamemode_name, "^8\n");
 
        if(modifications != "")
index edef7105df738fa6de7bb1777d39c6e1109c250c..c8f83abf78b29ead3fa1fee48d1a8c88f03d89a0 100644 (file)
@@ -1 +1 @@
-http://www.alientrap.org/devwiki/index.php?n=Nexuiz.Todo (and get this Todo actually updated :P)
+http://www.alientrap.org/devwiki/index.php?n=Xonotic.Todo (and get this Todo actually updated :P)
index 0b79c1d131e53417006fd9bc253d8359aa173539..1713f24e9e874f5d34135ce389f560cce7a28ff5 100644 (file)
@@ -60,7 +60,7 @@ Note : Default project settings are for single player... this can be changed thr
 <key name="bsp_Q3Map2: (final) BSP -meta, -vis, -light -fast -filter -super 2 -bounce 8" value="! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis -saveprt $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -fast -super 2 -filter -bounce 8 $" />
 <key name="bsp_Q3Map2: (final) BSP -meta, -vis, -light -deluxe -fast -filter -super 2 -bounce 8" value="! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis -saveprt $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -deluxe -fast -super 2 -filter -bounce 8 $" />
 
 <key name="bsp_Q3Map2: (final) BSP -meta, -vis, -light -fast -filter -super 2 -bounce 8" value="! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis -saveprt $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -fast -super 2 -filter -bounce 8 $" />
 <key name="bsp_Q3Map2: (final) BSP -meta, -vis, -light -deluxe -fast -filter -super 2 -bounce 8" value="! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis -saveprt $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; -v # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -deluxe -fast -super 2 -filter -bounce 8 $" />
 
-<key name="bsp_Q3Map2: (final) Nexuiz standard" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 $" />
+<key name="bsp_Q3Map2: (final) Xonotic standard" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 $" />
 <key name="bsp_Q3Map2: (final) Bloodprison(ctf)" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta -samplesize 8 -mv 1000000 -mi 6000000 $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -scale 1.2 $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -deluxe -fast -filter -deluxe -patchshadows -samples 3 $" />
 <key name="bsp_Q3Map2: (final) Final Rage" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta -v -samplesize 8 -skyfix -np 50 $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis -v $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -deluxe -compensate 1.4 -fast -gamma 1.5 -patchshadows -areascale 1.5 -pointscale 2 -v -bounce 3 -bouncegrid $" />
 <key name="bsp_Q3Map2: (final) Reslimed" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta -patchmeta -v $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 $" />
 <key name="bsp_Q3Map2: (final) Bloodprison(ctf)" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta -samplesize 8 -mv 1000000 -mi 6000000 $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -scale 1.2 $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -deluxe -fast -filter -deluxe -patchshadows -samples 3 $" />
 <key name="bsp_Q3Map2: (final) Final Rage" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta -v -samplesize 8 -skyfix -np 50 $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis -v $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -deluxe -compensate 1.4 -fast -gamma 1.5 -patchshadows -areascale 1.5 -pointscale 2 -v -bounce 3 -bouncegrid $" />
 <key name="bsp_Q3Map2: (final) Reslimed" value="! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -meta -patchmeta -v $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -vis $ &amp;&amp; ! &quot;$TEMPLATEapppathq3map2&quot; # -game quake3 -fs_basepath &quot;$TEMPLATEenginepath&quot; -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 $" />
index 436eb4940b5f29f8fccc0367eab42c505f55b3a6..e7ccf38adfbea0ffa33705964d0ee80f55a41849 100644 (file)
@@ -1032,7 +1032,7 @@ NOSPLASH: if set, splash damage cannot activate the door, only direct damage can
 /*QUAKED trigger_push (1 .5 0) ? - - INVERT_TEAM
 Jump pad. What else?
 Can be used in three ways:
 /*QUAKED trigger_push (1 .5 0) ? - - INVERT_TEAM
 Jump pad. What else?
 Can be used in three ways:
-Nexuiz "target/height" way: put the target_position where the player should land, and tune height to get a nice jump path. A good starting value for height is 100.
+Xonotic "target/height" way: put the target_position where the player should land, and tune height to get a nice jump path. A good starting value for height is 100.
 Q3A "target" way: put the target_position at the apex of the jump, and hope the player will land at the right spot. Good luck.
 Quake "movedir/speed" way: player will get velocity movedir * speed * 10 when using the jump pad
 -------- KEYS --------
 Q3A "target" way: put the target_position at the apex of the jump, and hope the player will land at the right spot. Good luck.
 Quake "movedir/speed" way: player will get velocity movedir * speed * 10 when using the jump pad
 -------- KEYS --------
@@ -1072,7 +1072,7 @@ swamp_slowdown: amount of slowdown caused by the swamp (default is 0.5)
 
 /*QUAKED trigger_teleport (.5 .5 .5) ? - - INVERT_TEAM
 Touching this will teleport players to the location of the targeted misc_teleporter_dest entity.
 
 /*QUAKED trigger_teleport (.5 .5 .5) ? - - INVERT_TEAM
 Touching this will teleport players to the location of the targeted misc_teleporter_dest entity.
-Note that in Nexuiz, teleporters preserve momentum of the player using them.
+Note that in Xonotic, teleporters preserve momentum of the player using them.
 -------- KEYS --------
 target: this must point to a misc_teleporter_dest entity. If it points to more than one, a destination is randomly selected on teleport.
 team: team that owns this teleporter (5 = red, 14 = blue, etc) (when set, only this team can teleport)
 -------- KEYS --------
 target: this must point to a misc_teleporter_dest entity. If it points to more than one, a destination is randomly selected on teleport.
 team: team that owns this teleporter (5 = red, 14 = blue, etc) (when set, only this team can teleport)
index 23e90e7b8be0f2c504d49eeae88a8190644e91ac..00609c0d14a3318a35aaa549e02a7b8a1ccc2532 100644 (file)
@@ -1,6 +1,6 @@
 
 //Water for Q3texture, temp use.
 
 //Water for Q3texture, temp use.
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/liquids/clear_ripple3
 {
 
 textures/liquids/clear_ripple3
 {
index ebfe5f255a9294d0f29e7d5fd0207306d1b9586f..24aeea3e29e1aff07efd3a4265cbb77302e0da2b 100644 (file)
@@ -6,7 +6,7 @@ Version:  1.0
 Released: October 2009
 Author:   Severin "sev" Meyer
 
 Released: October 2009
 Author:   Severin "sev" Meyer
 
-Created for Nexuiz and first released at <http://www.alientrap.org/forum/>
+Created for Xonotic and first released at <http://www.alientrap.org/forum/>
 
 ================================================================================
 Blender and Gimp
 
 ================================================================================
 Blender and Gimp
index ffeeac503b9093f889c09befeb8835c3e5e2266d..aceaf0f4eb497a217fe0458aa16c75d5c8e7d79b 100644 (file)
@@ -104,7 +104,7 @@ textures/shad/shad
 }
 
 //Corona for lud_Corona.tga
 }
 
 //Corona for lud_Corona.tga
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/Reaptxt/lud_Corona
 {
 
 textures/Reaptxt/lud_Corona
 {
@@ -122,7 +122,7 @@ textures/Reaptxt/lud_Corona
 }
 
 //Water for Q3texture, temp use.
 }
 
 //Water for Q3texture, temp use.
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/water/pool3d_5e
 {
 
 textures/water/pool3d_5e
 {
@@ -142,7 +142,7 @@ textures/water/pool3d_5e
 }
 
 //Water for Q3texture, temp use.
 }
 
 //Water for Q3texture, temp use.
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/liquids/slime1
 {
 
 textures/liquids/slime1
 {
@@ -179,7 +179,7 @@ textures/liquids/protolava
 }
 
 //Corona for HRglow01.tga
 }
 
 //Corona for HRglow01.tga
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/Reaptxt/HRglow01
 {
 
 textures/Reaptxt/HRglow01
 {
@@ -197,7 +197,7 @@ textures/Reaptxt/HRglow01
 }
 
 //Corona for HRglow02.tga
 }
 
 //Corona for HRglow02.tga
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/Reaptxt/HRglow02
 {
 
 textures/Reaptxt/HRglow02
 {
@@ -215,7 +215,7 @@ textures/Reaptxt/HRglow02
 }
 
 //Corona for HRglow03.tga
 }
 
 //Corona for HRglow03.tga
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/Reaptxt/HRglow03
 {
 
 textures/Reaptxt/HRglow03
 {
@@ -233,7 +233,7 @@ textures/Reaptxt/HRglow03
 }
 
 //Corona for HRsun01.tga
 }
 
 //Corona for HRsun01.tga
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/Reaptxt/HRsun01
 {
 
 textures/Reaptxt/HRsun01
 {
index 690f8f6da1309d7016cd83b8415e2dea6d899027..9cf8aa4241cf2c58abbf7c24ff56704164ddd807 100644 (file)
@@ -1,5 +1,5 @@
 //Water for Q3texture, temp use.
 //Water for Q3texture, temp use.
-//This shader is for DarkPlaces Engine - Nexuiz
+//This shader is for DarkPlaces Engine - Xonotic
 
 textures/sav-liquids/slime1
 {
 
 textures/sav-liquids/slime1
 {
index 5cac17004286af6d95a08560ba1da910c0dc679a..7b5855f1e36b363c4efccadf6f1f39f4ae5817cf 100644 (file)
@@ -4,5 +4,5 @@ echo The server will therefore run at default settings.
 echo
 echo For information on how to set up a dedicated server,
 echo look at the files in the server/ subdirectory of your
 echo
 echo For information on how to set up a dedicated server,
 echo look at the files in the server/ subdirectory of your
-echo Nexuiz install.
+echo Xonotic install.
 echo
 echo
index 38eab0da82eb3524dcac253e7acd1bf0eac6357e..c1e9f70b86fbc2de1845272ab2607f699a3bc44a 100644 (file)
@@ -20,5 +20,5 @@ g_nixnex_with_laser 1
 g_balance_nixnex_roundtime 3
 map downer
 
 g_balance_nixnex_roundtime 3
 map downer
 
-// time darkplaces/nexuiz-dedicated +exec serverbench.cfg | grep ^: > serverbench.log
+// time darkplaces/xonotic-dedicated +exec serverbench.cfg | grep ^: > serverbench.log
 // on Linux/Ubuntu, this should always yield a file with the md5sum
 // on Linux/Ubuntu, this should always yield a file with the md5sum
index cf7403901bbf5e5102ad37f512976c153148e1b3..b0ffe6c7b800daafb9d7f8c5a86d7a0840193864 100644 (file)
@@ -9,4 +9,4 @@ and
 
   sparks1.ogg
 
 
   sparks1.ogg
 
-from the Nexuiz data pk3
+from the Xonotic data pk3
index dd9ff2d7a83a02c790ecb74aa0fd0af1b6f0f678..58fc76c3890088b57f62b8722beb18d920cee786 100644 (file)
@@ -1,24 +1,24 @@
 0
 0
-\NexuizSingleplayerDialog\Play the singleplayer campaign or instant action matches against bots
+\XonoticSingleplayerDialog\Play the singleplayer campaign or instant action matches against bots
 
 
 
 
-\NexuizMultiplayerDialog\Play online, against your friends in LAN, view demos or change player settings
-\NexuizMultiplayerDialog/Servers\Find servers to play on
+\XonoticMultiplayerDialog\Play online, against your friends in LAN, view demos or change player settings
+\XonoticMultiplayerDialog/Servers\Find servers to play on
 \menu_slist_showempty\Show empty servers
 \menu_slist_showfull\Show full servers that have no slots available
 \net_slist_pause\Pause updating the server list to prevent servers from "jumping around"
 \menu_slist_showempty\Show empty servers
 \menu_slist_showfull\Show full servers that have no slots available
 \net_slist_pause\Pause updating the server list to prevent servers from "jumping around"
-\NexuizMultiplayerDialog/Info\Show more information about the currently highlighted server
-\NexuizMultiplayerDialog/Bookmark\Bookmark the currently highlighted server so that it's faster to find in the future
-\NexuizMultiplayerDialog/Havoc\Change to Havoc mode which has some modifications to the gameplay
-\NexuizMultiplayerDialog/Create\Host your own game
-\NexuizMultiplayerDialog/Demos\Browse and view demos
-\NexuizMultiplayerDialog/Player Setup\Customize your player settings
-
-\NexuizTeamSelectDialog/join 'best' team (auto-select)\Autoselect team (recommended)
-\NexuizTeamSelectDialog/red\Join the red team
-\NexuizTeamSelectDialog/blue\Join the blue team
-\NexuizTeamSelectDialog/yellow\Join the yellow team
-\NexuizTeamSelectDialog/pink\Join the pink team
+\XonoticMultiplayerDialog/Info\Show more information about the currently highlighted server
+\XonoticMultiplayerDialog/Bookmark\Bookmark the currently highlighted server so that it's faster to find in the future
+\XonoticMultiplayerDialog/Havoc\Change to Havoc mode which has some modifications to the gameplay
+\XonoticMultiplayerDialog/Create\Host your own game
+\XonoticMultiplayerDialog/Demos\Browse and view demos
+\XonoticMultiplayerDialog/Player Setup\Customize your player settings
+
+\XonoticTeamSelectDialog/join 'best' team (auto-select)\Autoselect team (recommended)
+\XonoticTeamSelectDialog/red\Join the red team
+\XonoticTeamSelectDialog/blue\Join the blue team
+\XonoticTeamSelectDialog/yellow\Join the yellow team
+\XonoticTeamSelectDialog/pink\Join the pink team
 
 \timelimit_override\Timelimit in minutes that when hit, will end the match
 \fraglimit_override\The amount of frags needed before the match will end
 
 \timelimit_override\Timelimit in minutes that when hit, will end the match
 \fraglimit_override\The amount of frags needed before the match will end
@@ -27,8 +27,8 @@
 \skill\Specify how experienced the bots will be
 \g_maplist_votable\Number of maps that are shown in the map voting at the end of a match
 \sv_vote_simple_majority_factor\Simple majority wins a vote
 \skill\Specify how experienced the bots will be
 \g_maplist_votable\Number of maps that are shown in the map voting at the end of a match
 \sv_vote_simple_majority_factor\Simple majority wins a vote
-\NexuizMultiplayerDialog/Advanced settings...\Advanced server settings
-\NexuizMultiplayerDialog/Mutators...\Mutators and weapon arenas
+\XonoticMultiplayerDialog/Advanced settings...\Advanced server settings
+\XonoticMultiplayerDialog/Mutators...\Mutators and weapon arenas
 \g_cloaked\All players are almost invisible
 \g_footsteps\Enable footstep sounds
 \g_midair\Only possible to inflict damage on your enemy while he's airborn
 \g_cloaked\All players are almost invisible
 \g_footsteps\Enable footstep sounds
 \g_midair\Only possible to inflict damage on your enemy while he's airborn
 \g_weaponarena\Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.
 \menu_weaponarena_with_laser\Also enable the laser in the weapon arena
 \g_minstagib\Players will be given the Minstanex, which is a railgun with infinite damage. If the player runs out of ammo, he will have 10 seconds to find some or if he fails to do so, face death. The secondary fire mode is a laser which does not inflict any damage and is good for doing trickjumps.
 \g_weaponarena\Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.
 \menu_weaponarena_with_laser\Also enable the laser in the weapon arena
 \g_minstagib\Players will be given the Minstanex, which is a railgun with infinite damage. If the player runs out of ammo, he will have 10 seconds to find some or if he fails to do so, face death. The secondary fire mode is a laser which does not inflict any damage and is good for doing trickjumps.
-\g_nixnex\No items Nexuiz - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon.
+\g_nixnex\No items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon.
 \g_nixnex_with_laser\Always carry the laser as an additional weapon in NixNex
 \g_nixnex_with_laser\Always carry the laser as an additional weapon in NixNex
-\NexuizMultiplayerDialog/All\Select all maps
-\NexuizMultiplayerDialog/None\Unselect all maps
+\XonoticMultiplayerDialog/All\Select all maps
+\XonoticMultiplayerDialog/None\Unselect all maps
 
 
 
 
-\NexuizMultiplayerDialog/Timedemo\Benchmark how fast your computer can run the highlighted demo
+\XonoticMultiplayerDialog/Timedemo\Benchmark how fast your computer can run the highlighted demo
 
 \fov\Field of vision in degrees from 60 to 130, default is 90
 \cl_bobcycle\View bobbing frequency, disable for no bobbing
 \cl_zoomfactor\How big the zoom factor is when the zoom button is pressed
 \cl_zoomsensitivity\How zoom changes sensitivity, from 0 (lower sensitivity) to 1 (no sensitivity change)
 \cl_zoomspeed\How fast the view will be zoomed, disable to zoom instantly
 
 \fov\Field of vision in degrees from 60 to 130, default is 90
 \cl_bobcycle\View bobbing frequency, disable for no bobbing
 \cl_zoomfactor\How big the zoom factor is when the zoom button is pressed
 \cl_zoomsensitivity\How zoom changes sensitivity, from 0 (lower sensitivity) to 1 (no sensitivity change)
 \cl_zoomspeed\How fast the view will be zoomed, disable to zoom instantly
-\NexuizMultiplayerDialog/Weapon settings...\Set your most preferred weapons, autoswitch and weapon model settings
+\XonoticMultiplayerDialog/Weapon settings...\Set your most preferred weapons, autoswitch and weapon model settings
 
 \cl_weaponpriority_useforcycling\Make use of the list above when cycling through weapons with the mouse wheel
 \cl_autoswitch\Automatically switch to newly picked up weapons if they are better than what you are carrying
 
 \cl_weaponpriority_useforcycling\Make use of the list above when cycling through weapons with the mouse wheel
 \cl_autoswitch\Automatically switch to newly picked up weapons if they are better than what you are carrying
 \crosshair_color_green\Green color component of the crosshair color
 \crosshair_color_blue\Blue color component of the crosshair color
 \sbar_hudselector\Use the old HUD layout
 \crosshair_color_green\Green color component of the crosshair color
 \crosshair_color_blue\Blue color component of the crosshair color
 \sbar_hudselector\Use the old HUD layout
-\NexuizMultiplayerDialog/Radar, HUD & Waypoints...\Adjust the radar, HUD and waypoints
+\XonoticMultiplayerDialog/Radar, HUD & Waypoints...\Adjust the radar, HUD and waypoints
 \_cl_name\Name under which you will appear in the game
 
 \_cl_name\Name under which you will appear in the game
 
-\NexuizSettingsDialog\Change the game settings
-\NexuizCreditsDialog\The Nexuiz credits
-\NexuizTeamSelectDialog\-
-\NexuizMutatorsDialog\-
-\NexuizMapInfoDialog\-
-\NexuizUserbindEditDialog\-
-\NexuizWinnerDialog\-
-\NexuizWeaponsDialog\-
-\NexuizRadarDialog\-
-\NexuizServerInfoDialog\-
-\NexuizCvarsDialog\-
-
-\NexuizQuitDialog\Quit the game
-\NexuizQuitDialog/Yes\Back to work...
-\NexuizQuitDialog/No\I got some more fragging to do!
-
-\NexuizSettingsDialog/Input\Input settings
+\XonoticSettingsDialog\Change the game settings
+\XonoticCreditsDialog\The Xonotic credits
+\XonoticTeamSelectDialog\-
+\XonoticMutatorsDialog\-
+\XonoticMapInfoDialog\-
+\XonoticUserbindEditDialog\-
+\XonoticWinnerDialog\-
+\XonoticWeaponsDialog\-
+\XonoticRadarDialog\-
+\XonoticServerInfoDialog\-
+\XonoticCvarsDialog\-
+
+\XonoticQuitDialog\Quit the game
+\XonoticQuitDialog/Yes\Back to work...
+\XonoticQuitDialog/No\I got some more fragging to do!
+
+\XonoticSettingsDialog/Input\Input settings
 \sensitivity\Mouse speed multiplier
 \menu_mouse_speed\Mouse speed multiplier in the menu, does not affect aiming in the game
 \m_filter\Smoothes the mouse movement, but makes aiming slightly less responsive
 \sensitivity\Mouse speed multiplier
 \menu_mouse_speed\Mouse speed multiplier in the menu, does not affect aiming in the game
 \m_filter\Smoothes the mouse movement, but makes aiming slightly less responsive
 \sbar_showbinds\Display actions / bound keys in the strings shown during the game
 \cl_showpressedkeys\Show which movement keys the player is pressing
 
 \sbar_showbinds\Display actions / bound keys in the strings shown during the game
 \cl_showpressedkeys\Show which movement keys the player is pressing
 
-\NexuizSettingsDialog/Video\Video settings
+\XonoticSettingsDialog/Video\Video settings
 \vid_width\Screen resolution
 \vid_bitsperpixel\How many bits per pixel (BPP) to render at, 32 is recommended
 \vid_fullscreen\Enable fullscreen mode (default: enabled)
 \vid_width\Screen resolution
 \vid_bitsperpixel\How many bits per pixel (BPP) to render at, 32 is recommended
 \vid_fullscreen\Enable fullscreen mode (default: enabled)
 \vid_samples\Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot (default: disabled)
 \v_flipped\Poor man's left handed mode (default: off)
 
 \vid_samples\Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot (default: disabled)
 \v_flipped\Poor man's left handed mode (default: off)
 
-\NexuizSettingsDialog/Effects\Effect settings
+\XonoticSettingsDialog/Effects\Effect settings
 \r_subdivisions_tolerance\Change the smoothness of the curves on the map (default: normal)
 \gl_picmip\Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry. (default: good)
 \r_picmipworld\If set, only reduce the texture quality of models (default: enabled)
 \r_subdivisions_tolerance\Change the smoothness of the curves on the map (default: normal)
 \gl_picmip\Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry. (default: good)
 \r_picmipworld\If set, only reduce the texture quality of models (default: enabled)
 \r_motionblur\Motion blur strength - 0.5 recommended
 \r_damageblur\Amount of motion blur when hurt - 0.4 recommended
 
 \r_motionblur\Motion blur strength - 0.5 recommended
 \r_damageblur\Amount of motion blur when hurt - 0.4 recommended
 
-\NexuizSettingsDialog/Audio\Audio settings
+\XonoticSettingsDialog/Audio\Audio settings
 \bgmvolume\-
 \volume\-
 \snd_staticvolume\-
 \bgmvolume\-
 \volume\-
 \snd_staticvolume\-
 \cl_hitsound\Play a hit indicator sound when your shot hits an enemy
 \menu_sounds\Play sounds when clicking or hovering over menu items
 
 \cl_hitsound\Play a hit indicator sound when your shot hits an enemy
 \menu_sounds\Play sounds when clicking or hovering over menu items
 
-\NexuizSettingsDialog/Network\Network settings
+\XonoticSettingsDialog/Network\Network settings
 \cl_movement\Enable clientside movement prediction
 \cl_nolerp\Enable network update smoothing
 \shownetgraph\Show a graph of packet sizes and other information
 \cl_movement\Enable clientside movement prediction
 \cl_nolerp\Enable network update smoothing
 \shownetgraph\Show a graph of packet sizes and other information
 \cl_curl_maxspeed\Maximum download speed
 \cl_port\Force client to use chosen port unless it is set to 0
 
 \cl_curl_maxspeed\Maximum download speed
 \cl_port\Force client to use chosen port unless it is set to 0
 
-\NexuizSettingsDialog/Misc\Misc settings
+\XonoticSettingsDialog/Misc\Misc settings
 \showtime\Show current time of day, useful on screenshots
 \showdate\Show current date, useful on screenshots
 \showfps\Show your rendered frames per second
 \showtime\Show current time of day, useful on screenshots
 \showdate\Show current date, useful on screenshots
 \showfps\Show your rendered frames per second
 \cl_showacceleration\Show the acceleration of the player
 \cl_showacceleration_scale\Excaggerate the accelerometer by this scale multiplier
 
 \cl_showacceleration\Show the acceleration of the player
 \cl_showacceleration_scale\Excaggerate the accelerometer by this scale multiplier
 
-\NexuizSettingsDialog/Advanced settings...\Advanced settings where you can tweak every single variable of the game
+\XonoticSettingsDialog/Advanced settings...\Advanced settings where you can tweak every single variable of the game
 \g_friendlyfire\Percentage of damage dealt to teammates
 \g_mirrordamage\Percentage of teamdamage that will be mirrored to you
 \g_tdm_teams_override\Override the default amount of teams in teamgames
 \g_friendlyfire\Percentage of damage dealt to teammates
 \g_mirrordamage\Percentage of teamdamage that will be mirrored to you
 \g_tdm_teams_override\Override the default amount of teams in teamgames
diff --git a/xonotic-credits.txt b/xonotic-credits.txt
new file mode 100644 (file)
index 0000000..c455c48
--- /dev/null
@@ -0,0 +1,201 @@
+**Team Leaders:
+
+Lee Vermeulen
+*Project Founder and Co-Designer
+
+Forest "LordHavoc" Hale
+*Lead Programmer and Co-Designer
+
+Rudolf "div0" Polzer
+*Programmer
+
+
+**Project maintainers:
+
+Kristian "morfar" Johansson
+
+Maik "SavageX" Merten
+
+
+**Development Team:
+
+Andreas "Black" Kirsch
+*Programmer
+
+Paul "Strahlemann" Evers
+*Level Designer
+
+Peter "Morphed" Pielak
+*Artist
+
+Samual Lenks
+*Programmer
+
+Rasmus "FruitieX" Eskola
+*Artist and Programmer
+
+Saulo "mand1nga" Gil
+*Programmer
+
+Stephan "esteel" Stahl
+*Programmer
+
+Jakob "tZork" Markstrom Grohn
+*Programmer and Artist
+
+Tyler "-z-" Mulligan
+*Web Developer and Interaction Designer
+
+Wolfgang "Blub\0" Bumiller
+*Programmer
+
+Merlijn Hofstra
+*Programmer and server admin
+
+
+
+**Past Team Members
+*In alphabetical order
+*(nickname or surname)
+
+Kurt Dereli
+*Artist
+
+Yves "EviLair" Allaire
+*Artist
+
+Fabien "H. Reaper" Tschirhart
+*Level Designer
+
+"Innovati"
+*Artist
+
+KadaverJack
+*Programmer
+
+William Libert
+* Level Designer
+
+MauveBib
+*Bot Programmer
+
+Rick "Rat" Kelley
+*Lead Animator, Skinner
+
+Michael "Tenshihan" Quinn
+*Sound FX and Player-Voices
+
+Gottfried "Toddd" Hofmann
+*Sound FX
+
+Marko "Urre" Permanto
+*Bot Programmer
+
+Dan "Wazat" Hale
+*Programmer
+
+Garth "Zombie" Hendy
+*Level Designer
+
+
+
+**Special Thanks:
+*In alphabetical order
+*(nickname or surname)
+
+Robert "ai" Kuroto
+*Various models
+
+Chris "amethyst7" Matz
+*Level design
+
+blkrbt
+*Music
+
+Gerd "Elysis" Raudenbusch
+*Music
+
+Marius "GreEn`mArine" Shekow
+*Programmer
+
+Braden "meoblast001" Walters
+*Music
+
+Alexander "motorsep" Zubov
+*Weapon animation
+
+Eric "Munyul Verminard" Sambach
+*Level design
+
+Severin "sev" Meyer
+*Artist
+
+Simon O'Callaghan
+*egyptsoc texture set
+
+Michael "Tenshihan" Quinn
+*Sound effects
+
+Amos "torus" Dudley
+*Announcer voices
+
+Mattrew "Tronyn" Rye
+*Level design
+
+Henning "Tymo" Janssen
+*Level design
+
+Kevin "Tyrann" Shanahan
+*Level design
+
+William "Willis" Weilep
+*Master server host
+
+
+**Thanks:
+
+Attila "WW3" Houtkooper
+BigMac
+Brain Younds
+Christian Ice
+Clinton "Kaziganthe" Freeman
+Dan "Digger" Korostelev
+Donkey
+Dustin Geeraert
+Edgenetwork
+Edward "Ed" Holness
+FrikaC
+Jitspoe
+Jody Gallagher
+Juergen "LowDragon" Timm
+Lee David Ash
+Mathieu "Elric" Olivier
+Mephisto
+MirceaKitsune
+MrBougo
+Munyul
+Netzwerg
+NoelCower
+Parapraxis
+Petithomme
+Q1 Retexturing Project
+Qantourisc
+Ronan
+Sajt
+Shaggy
+Shank
+SomeGuy
+Spike
+Spirit
+Steve Vermeulen
+Supajoe
+Tei
+Tomaz
+Ulrich Galbraith
+Vortex
+Zenex
+dstrek
+lcatlnx
+leileilol
+michaelb
+terencehill