]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
authorLyberta <lyberta@lyberta.net>
Thu, 22 Feb 2018 03:38:29 +0000 (06:38 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 22 Feb 2018 03:38:29 +0000 (06:38 +0300)
139 files changed:
commands.cfg
default.cfg
defaultClient.cfg [deleted file]
defaultOverkill.cfg [deleted file]
defaultServer.cfg [deleted file]
defaultXDF.cfg [deleted file]
defaultXPM.cfg [deleted file]
defaultXonotic.cfg [deleted file]
mutators.cfg
qcsrc/client/main.qc
qcsrc/client/teamradar.qc
qcsrc/client/wall.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/debug.qh
qcsrc/common/effects/all.qc
qcsrc/common/effects/qc/casings.qc
qcsrc/common/effects/qc/damageeffects.qc
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/lightningarc.qc
qcsrc/common/effects/qc/modeleffects.qc
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/nexball/sv_weapon.qc
qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc
qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_generator.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/buffs.qh
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/nades/nades.qh
qcsrc/common/mutators/mutator/nades/net.qc
qcsrc/common/mutators/mutator/offhand_blaster/sv_offhand_blaster.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/physics/player.qh
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/plat.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/func/rainsnow.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/misc/corner.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/misc/teleport_dest.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/secret.qc
qcsrc/common/triggers/trigger/secret.qh
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/vehicles/cl_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/sv_vehicles.qh
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/ecs/systems/cl_physics.qc
qcsrc/ecs/systems/physics.qc
qcsrc/ecs/systems/sv_physics.qc
qcsrc/lib/csqcmodel/common.qh
qcsrc/lib/warpzone/client.qc
qcsrc/lib/warpzone/server.qc
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/draw.qc
qcsrc/menu/item.qc
qcsrc/menu/item.qh
qcsrc/menu/item/button.qc
qcsrc/menu/item/button.qh
qcsrc/menu/item/container.qc
qcsrc/menu/item/container.qh
qcsrc/menu/item/image.qc
qcsrc/menu/item/inputbox.qc
qcsrc/menu/item/inputbox.qh
qcsrc/menu/item/inputcontainer.qc
qcsrc/menu/item/inputcontainer.qh
qcsrc/menu/item/listbox.qc
qcsrc/menu/item/listbox.qh
qcsrc/menu/item/nexposee.qc
qcsrc/menu/item/nexposee.qh
qcsrc/menu/item/slider.qc
qcsrc/menu/item/slider.qh
qcsrc/menu/xonotic/_mod.inc
qcsrc/menu/xonotic/_mod.qh
qcsrc/menu/xonotic/colorpicker.qc
qcsrc/menu/xonotic/colorpicker.qh
qcsrc/menu/xonotic/colorpicker_string.qc
qcsrc/menu/xonotic/colorpicker_string.qh
qcsrc/menu/xonotic/dialog_settings_game.qc
qcsrc/menu/xonotic/dialog_settings_game.qh
qcsrc/menu/xonotic/dialog_settings_misc_reset.qc
qcsrc/menu/xonotic/picker.qc
qcsrc/menu/xonotic/picker.qh
qcsrc/menu/xonotic/screenshotimage.qc
qcsrc/menu/xonotic/screenshotimage.qh
qcsrc/menu/xonotic/scrollpanel.qc [new file with mode: 0644]
qcsrc/menu/xonotic/scrollpanel.qh [new file with mode: 0644]
qcsrc/server/client.qc
qcsrc/server/command/vote.qc
qcsrc/server/compat/quake3.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_models.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/gamemode.qh
qcsrc/server/mutators/mutator/gamemode_ca.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qh
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_domination.qh
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/csqcprojectile.qc
ruleset-XDF.cfg [new file with mode: 0644]
ruleset-XPM.cfg [new file with mode: 0644]
ruleset-overkill.cfg [new file with mode: 0644]
ruleset-xonotic.cfg [new file with mode: 0644]
xonotic-client.cfg [new file with mode: 0644]
xonotic-common.cfg [new file with mode: 0644]
xonotic-server.cfg [new file with mode: 0644]

index 66ca90e2aa25dcb0aab5f659ba07b2c722b2e44b..79366e4b703af1967b2ef20e8a1299536d4d9974 100644 (file)
@@ -302,6 +302,11 @@ set sv_vote_command_restriction_movetoyellow "1;"
 set sv_vote_command_restriction_movetopink "1;"
 set sv_vote_command_restriction_movetospec "1;"
 
+// help messages for votes that aren't implemeneted in the game code
+// examples used here are based on the usage output of implemented votes
+set sv_vote_command_help_restart "\nUsage:^3 vcall restart\n^7  No arguments required."
+set sv_vote_command_help_gotomap "\nUsage:^3 vcall gotomap mapname\n^7  Where 'mapname' is the name of the map to go to.\n  Type ^3lsmaps^7 to get a list of available maps to vote for."
+
 // =================================
 //  voting - server/command/vote.qc
 // =================================
@@ -337,7 +342,7 @@ alias vabstain  "qc_cmd_cmd vote abstain"
 
 // aliases for both client and server
 alias vcall     "qc_cmd_svcmd vote call ${* ?}"
-alias vhelp     "qc_cmd_svcmd vote help"
+alias vhelp     "qc_cmd_svcmd vote help ${* ?}"
 alias vstatus   "qc_cmd_svcmd vote status"
 alias vstop     "qc_cmd_svcmd vote stop"
 
index 86b48082742510298643d3039145c27b34156815..931434697a8604ed527c55a25cb22e2e1f9958fd 100644 (file)
@@ -1 +1 @@
-exec defaultXonotic.cfg
+exec xonotic-common.cfg
diff --git a/defaultClient.cfg b/defaultClient.cfg
deleted file mode 100644 (file)
index eabd94f..0000000
+++ /dev/null
@@ -1,849 +0,0 @@
-// this resets most client cvars and aliases to their defaults
-// if you want to reset your client to defaults, it's probably a better idea to delete (parts of) config.cfg and restart
-
-
-// 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\""
-
-seta cl_firststart "" "how many times the client has been run"
-seta cl_startcount 0 "how many times the client has been run"
-
-// other aliases
-alias +hook +button6
-alias -hook -button6
-alias +jetpack +button10
-alias -jetpack -button10
-alias +dodge +button11
-alias -dodge -button11
-alias use "impulse 21"
-
-// for backwards compatibility
-// TODO Remove after 0.8 release!
-cl_particles_forcetraileffects 1
-
-alias dropweapon "impulse 17"
-alias +show_info +button7
-alias -show_info -button7
-
-// merge lightmaps up to 2048x2048 textures
-mod_q3bsp_lightmapmergepower 4
-
-// player defaults
-_cl_color "112.211" // same effect as 112, but menuqc can detect this as the default and not intentionally set
-_cl_name ""
-seta _cl_gender 0 "storage cvar for current player gender (0 = undisclosed, 1 = male, 2 = female)"
-_cl_playerskin 0
-
-seta cl_reticle 1 "enable zoom reticles"
-seta cl_reticle_stretch 0 "stretch reticles so they fit the screen (breaks image proportions)"
-seta cl_reticle_normal 1 "draw an aiming reticle when zooming with the zoom button"
-seta cl_reticle_normal_alpha 1 "alpha of the normal reticle"
-seta cl_reticle_weapon 1 "draw custom aiming reticle when zooming with certain weapons"
-seta cl_reticle_weapon_alpha 1 "alpha of the custom reticle"
-
-fov 100
-seta cl_velocityzoom_enabled 0 "velocity based zooming of fov"
-seta cl_velocityzoom_factor 0 "factor of fov zooming (negative values zoom out)"
-seta cl_velocityzoom_type 3 "how to factor in speed, 1 = all velocity in all directions, 2 = velocity only in forward direction (can be negative), 3 = velocity only in forward direction (limited to forward only)"
-seta cl_velocityzoom_speed 1000 "target speed for fov factoring"
-seta cl_velocityzoom_time 0.2  "time value for averaging speed values"
-seta cl_spawnzoom 1 "zoom effect immediately when a player spawns"
-seta cl_spawnzoom_speed 1 "speed at which zooming occurs while spawning"
-seta cl_spawnzoom_factor 2 "factor of zoom while spawning"
-seta cl_zoomfactor 5   "how much +zoom will zoom (1-30)"
-seta cl_zoomspeed 8    "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)"
-
-seta cl_unpress_zoom_on_spawn 1 "automatically unpress zoom when you spawn"
-seta cl_unpress_zoom_on_death 1 "automatically unpress zoom when you die (and don't allow zoom again while dead)"
-seta cl_unpress_zoom_on_weapon_switch 1 "automatically unpress zoom when you switch a weapon"
-seta cl_unpress_attack_on_weapon_switch 0 "automatically unpress fire and fire1 attack buttons when you switch a weapon"
-
-seta cl_spawn_event_particles 1 "pointparticles effect whenever a player spawns"
-seta cl_spawn_event_sound 1 "sound effect whenever a player spawns"
-//seta cl_spawn_point_model 0 "place a model at all spawn points" // still needs a model
-seta cl_spawn_point_particles 1 "pointparticles effect at all spawn points" // managed by effects-.cfg files
-seta cl_spawn_point_dist_min 1200
-seta cl_spawn_point_dist_max 1600
-
-freelook 1
-sensitivity 6
-v_gamma 1
-viewsize 100
-bgmvolume 1
-volume 0.5
-// fullscreen 1024x768x32bit
-vid_bitsperpixel 32
-vid_fullscreen 1
-vid_width 1024
-vid_height 768
-vid_pixelheight 1
-vid_resizable 0 // cannot be turned on before it is sure it cannot cause a r_restart
-vid_desktopfullscreen 1
-prvm_language en
-set _menu_prvm_language ""
-set _menu_vid_width "$vid_width"
-set _menu_vid_height "$vid_height"
-set _menu_vid_pixelheight "$vid_pixelheight"
-set _menu_vid_desktopfullscreen "$vid_desktopfullscreen"
-seta menu_vid_scale 0
-seta menu_vid_allowdualscreenresolution 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)
-
-// create a temporary empty alias for menu_sync so that execution of effects-normal.cfg, hud_luma.cfg
-// and sRGB-{disable,enable}.cfg on game start doesn't show an error message in the console
-alias menu_sync "" // will be re-aliased later
-
-// we want to use sRGB for our maps!
-exec sRGB-disable.cfg
-vid_sRGB_fallback 2
-r_hdr_glowintensity 1
-// #define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
-set rpn_sRGB_to_linear "dup 0.055 add 1.055 div 2.4 pow exch 12.92 div dup 0.0031308 gt when"
-// #define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
-set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul dup 0.04045 ge when"
-
-// -nosRGB to -sRGB sky shader conversion:
-//
-// q3map_sunExt 1 0.6875 0.375 340 25 47 0 16
-//                                    ^^ elevation
-//                             ^^^ sunlight
-// q3map_skylight 110 3
-//                ^^^ skylight
-//
-// With that, do (the last parameter is the ratio of skylight you assume hits
-// the surfaces, about 0.25 for inner surfaces near sky, about 1.00 on
-// terrain):
-// ]skybox_nosRGB_to_sRGB 340 47 110 0.25
-// rpn: still on stack: new_sunlight:
-// rpn: still on stack: 380.464142
-// rpn: still on stack: new_skylight:
-// rpn: still on stack: 9.32523632
-//
-// The equivalent -sRGB shader then will have:
-//
-// q3map_sunExt 1 0.6875 0.375 380.464142 25 47 0 16
-// q3map_skylight 9.32523632 3
-alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.123 $4 div mul /new_skylight: $3 402.123 $4 div div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 $4 div div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
-
-set cl_orthoview 0 "enable top-down view of the map- meant to be used for radar map images (note: orthoview sets cvars temporarily, requires restart to return them to normal)"
-set cl_orthoview_nofog 1 "disable fog while in orthoview-- note, should not be enabled on ALL maps, i.e. oilrig works fine with this disabled"
-
-// these settings determine how much the view is affected by movement/damage
-cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
-cl_deathfade 0 // fade screen to dark red when dead, value represents how fast the fade is (higher is faster)
-cl_bobcycle 0.5 // 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 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
-cl_bob2cycle 1 // how long the cycle of left/right view movement takes (only works if cl_bob2 is not 0), default is 0.6
-cl_bob2 0 // how much view moves left/right when moving (does not move if cl_bob2cycle is 0), default is 0.01
-cl_bobfall 0.05 "how much the view swings down when falling (influenced by the speed you hit the ground with)"
-cl_bobfallcycle 3 "speed of the bobfall swing"
-cl_bobfallspeed 200 "necessary amount of speed for bob-falling to occur"
-cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
-cl_bobmodel_side 0.2 // amount the gun sways to the sides
-cl_bobmodel_speed 10 // rate at which the gun sways
-cl_bobmodel_up 0.1 // amount the gun sways up and down
-
-cl_followmodel 1 // enables weapon pushing / pulling effect when walking
-seta cl_followmodel_speed 0.3 "gun following speed"
-seta cl_followmodel_limit 135 "gun following limit"
-seta cl_followmodel_velocity_absolute 0 "make the effect ignore velocity direction changes (side effect: it causes a glitch when teleporting / passing through a warpzone)"
-seta cl_followmodel_velocity_lowpass 0.05 "gun following velocity lowpass averaging time"
-seta cl_followmodel_highpass 0.05 "gun following highpass averaging time"
-seta cl_followmodel_lowpass 0.03 "gun following lowpass averaging time"
-
-cl_leanmodel 1 // enables weapon leaning effect when looking around
-seta cl_leanmodel_speed 0.3 "gun leaning speed"
-seta cl_leanmodel_limit 30 "gun leaning limit"
-seta cl_leanmodel_highpass1 0.2 "gun leaning pre-highpass averaging time"
-seta cl_leanmodel_highpass 0.2 "gun leaning highpass averaging time"
-seta cl_leanmodel_lowpass 0.05 "gun leaning lowpass averaging time"
-
-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 // whether to use screen tints, this has now been replaced by a better system in CSQC
-r_motionblur 0 // motion blur value, default is 0
-r_damageblur 0 // motion blur when damaged, default is 0 (removed in Xonotic)
-
-r_bloom_blur 4
-r_bloom_brighten 2
-r_bloom_colorexponent 1
-r_bloom_colorscale 1
-r_bloom_colorsubtract 0.125
-r_bloom_resolution 320
-r_bloom_scenebrightness 0.85
-
-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 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 heard"
-
-seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy, 1: same pitch 2: increase pitch with more damage 3: decrease pitch with more damage"
-set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
-seta cl_hitsound_min_pitch 0.75 "minimum pitch of hit sound"
-seta cl_hitsound_max_pitch 1.5 "maximum pitch of hit sound"
-seta cl_hitsound_nom_damage 25 "damage amount at which hitsound bases pitch off"
-
-seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
-seta cl_eventchase_frozen 0 "camera goes into 3rd person mode when the player is frozen"
-seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
-seta cl_eventchase_distance 140 "final camera distance"
-seta cl_eventchase_generator_distance 400 "final camera distance while viewing generator explosion"
-seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
-seta cl_eventchase_maxs "12 12 8" "max size of eventchase camera bbox"
-seta cl_eventchase_mins "-12 -12 -8" "min size of eventchase camera bbox"
-seta cl_eventchase_viewoffset "0 0 20" "viewoffset of eventchase camera"
-seta cl_eventchase_generator_viewoffset "0 0 80" "viewoffset of eventchase camera while viewing generator explosion"
-seta cl_eventchase_vehicle 1 "camera goes into 3rd person mode when inside a vehicle"
-seta cl_eventchase_vehicle_viewoffset "0 0 80"
-seta cl_eventchase_vehicle_distance 250
-
-set _vehicles_shownchasemessage 0
-
-seta cl_particles_oldvortexbeam 0 "Uses the old v2.3 Vortex beam instead of the new beam, only works if server allows it (g_allow_oldvortexbeam 1)"
-
-seta cl_damageeffect 1 "enable weapon damage effects: 1 enables the feature on skeletal models, 2 on any model"
-seta cl_damageeffect_ticrate 0.1 "particle spawn rate"
-seta cl_damageeffect_bones 5 "how many damages to allow on a rigged mesh at once (non-skeletal objects are limited to one)"
-seta cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present"
-seta cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, based on damage amount"
-seta cl_damageeffect_lifetime_min 3 "minimum lifetime a damage effect may have"
-seta cl_damageeffect_lifetime_max 6 "maximum lifetime a damage effect may have"
-
-set cl_deathglow 0.8 "number of seconds during which dead bodies glow out"
-
-cl_movement 1
-cl_movement_track_canjump 0
-cl_stairsmoothspeed 200
-
-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"
-
-seta menu_sandbox_spawn_model ""
-seta menu_sandbox_attach_bone ""
-seta menu_sandbox_edit_skin 0
-seta menu_sandbox_edit_alpha 1
-seta menu_sandbox_edit_color_main "1 1 1"
-seta menu_sandbox_edit_color_glow "1 1 1"
-seta menu_sandbox_edit_frame 0
-seta menu_sandbox_edit_scale 1
-seta menu_sandbox_edit_solidity 1
-seta menu_sandbox_edit_physics 1
-seta menu_sandbox_edit_force 1
-seta menu_sandbox_edit_material ""
-
-seta menu_monsters_edit_spawn ""
-seta menu_monsters_edit_skin 0
-seta menu_monsters_edit_movetarget 1
-
-// effects
-r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture
-mod_q3shader_force_terrain_alphaflag 1 // supposedly now required for r_glsl_vertextextureblend_usebothalphas to work
-r_glsl_postprocess 0 // but note, hud_postprocessing enables this
-r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
-r_picmipworld 1
-gl_picmip_world 0
-gl_picmip_sprites 0
-gl_picmip_other 1 // so, picmip -1 is best possible quality
-r_mipsprites 1
-r_mipskins 1
-gl_max_lightmapsize 4096
-r_shadow_realtime_world_lightmaps 1
-r_shadow_realtime_world_importlightentitiesfrommap 0 // Whether build process uses keepLights is nontransparent and may change, so better make keepLights not matter.
-cl_decals_fadetime 5
-cl_decals_time 1
-seta cl_gunalign 3 "Gun alignment; 1 = center, 3 = right, 4 = left; requires reconnect"
-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 2.5 "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 1 "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_gibs_avelocity_scale 1 "how much angular velocity to use on gibs"
-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 1 "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_lod 1
-r_glsl_offsetmapping_reliefmapping 0
-r_glsl_offsetmapping_scale 0.02
-
-scr_conalpha 1
-scr_conbrightness 0.2
-scr_screenshot_jpeg 1
-scr_screenshot_jpeg_quality 0.9
-
-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 ""
-
-seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
-seta cl_announcer_antispam 2 "number of seconds before an announcement of the same sound can be played again"
-seta cl_announcer_maptime 3 "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"
-
-// aliases:
-alias +fire +attack
-alias -fire -attack
-alias +fire2 +button3
-alias -fire2 -button3
-alias +attack2 +button3 // old alias from Nexuiz
-alias -attack2 -button3 // old alias name from Nexuiz
-alias +crouch +button5
-alias -crouch -button5
-alias weapnext "_weapnext_${cl_weaponpriority_useforcycling}"
-alias _weapnext_0 "impulse 18"
-alias _weapnext_1 "impulse 15"
-alias _weapnext_2 "impulse 10"
-alias weaplast "impulse 11"
-alias weapprev "_weapprev_${cl_weaponpriority_useforcycling}"
-alias _weapprev_0 "impulse 19"
-alias _weapprev_1 "impulse 16"
-alias _weapprev_2 "impulse 12"
-alias weapbest "impulse 13"
-
-// experimental zoom toggle (can be in wrong state at start of a game, though)
-set _togglezoom +
-alias +zoom "set _togglezoom -; +button4"
-alias -zoom "set _togglezoom +; -button4"
-alias togglezoom "${_togglezoom}zoom"
-
-alias reload "impulse 20"
-
-// weapons
-alias weapon_group_1 "impulse 1"
-alias weapon_group_2 "impulse 2"
-alias weapon_group_3 "impulse 3"
-alias weapon_group_4 "impulse 4"
-alias weapon_group_5 "impulse 5"
-alias weapon_group_6 "impulse 6"
-alias weapon_group_7 "impulse 7"
-alias weapon_group_8 "impulse 8"
-alias weapon_group_9 "impulse 9"
-alias weapon_group_0 "impulse 14" // cycles the superweapons
-// TODO: remove after 0.8.2. Default impulse commands for 0.8.1 servers
-exec weapons.cfg
-
-cl_curl_enabled 1
-cl_curl_maxdownloads 3
-cl_curl_maxspeed 0
-cl_curl_useragent 1
-cl_curl_useragent_append "$g_xonoticversion"
-
-seta g_waypointsprite_alpha 1 "This allows the client to control transparency of the waypoint"
-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"
-set g_waypointsprite_distancealphaexponent 2
-seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
-seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
-seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
-seta g_waypointsprite_edgeoffset_bottom 0 "offset of how close the waypoint can be to the bottom edge of the screen"
-seta g_waypointsprite_edgeoffset_left 0 "offset of how close the waypoint can be to the left edge of the screen"
-seta g_waypointsprite_edgeoffset_right 0 "offset of how close the waypoint can be to the right edge of the screen"
-seta g_waypointsprite_edgeoffset_top 0 "offset of how close the waypoint can be to the top edge of the screen"
-seta g_waypointsprite_fontsize 12
-seta g_waypointsprite_itemstime 2 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn: 1 when spectating, 2 even playing in warmup stage"
-set g_waypointsprite_minscale 0.5
-set g_waypointsprite_minalpha 0.4
-set g_waypointsprite_normdistance 512
-seta g_waypointsprite_scale 1
-set g_waypointsprite_spam 0 "Debugging feature. Set to 10 and load courtfun in race mode to test."
-set g_waypointsprite_timealphaexponent 1
-seta g_waypointsprite_turrets 1 "disable turret waypoints"
-seta g_waypointsprite_turrets_maxdist 5000 "max distance for turret waypoints"
-seta g_waypointsprite_uppercase 1
-seta g_waypointsprite_text 0 "Always show text instead of icons, setting this to 0 will still use text if the icon is unavailable"
-seta g_waypointsprite_iconsize 32
-seta g_waypointsprite_iconcolor 0 "Show the icon at natural color rather than the waypoint's color"
-
-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"        "toggle cl_hidewaypoints"
-
-seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
-
-seta cl_damagetext "1" "Draw damage dealt where you hit the enemy"
-seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health"
-seta cl_damagetext_format_verbose 0 "{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ"
-seta cl_damagetext_format_hide_redundant 0 "hide {armor} if 0; hide {potential} and {potential_health} when same as actual"
-seta cl_damagetext_color "1 1 0" "Damage text color"
-seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
-seta cl_damagetext_size_min 10 "Damage text font size for small damage"
-seta cl_damagetext_size_min_damage 25 "How much damage is considered small"
-seta cl_damagetext_size_max 16 "Damage text font size for large damage"
-seta cl_damagetext_size_max_damage 140 "How much damage is considered large"
-seta cl_damagetext_alpha_start "1" "Damage text initial alpha"
-seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds"
-seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
-seta cl_damagetext_offset "0 -40 0" "Damage text offset"
-seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
-seta cl_damagetext_accumulate_alpha_rel "0.65" "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha"
-seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too"
-seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire"
-
-seta cl_damagetext_2d_pos "0.47 0.53 0" "2D damage text initial position (X and Y between 0 and 1)"
-seta cl_damagetext_2d_alpha_start 1 "2D damage text initial alpha"
-seta cl_damagetext_2d_alpha_lifetime 1.3 "2D damage text lifetime (alpha fading) in seconds"
-seta cl_damagetext_2d_size_lifetime 3 "2D damage text lifetime (size shrinking) in seconds"
-seta cl_damagetext_2d_velocity "-25 0 0" "2D damage text move direction (screen coordinates)"
-seta cl_damagetext_2d_overlap_offset "0 -15 0" "Offset 2D damage text by this much to prevent overlapping (screen coordinates)"
-seta cl_damagetext_2d_close_range 125 "Always use 2D damagetext for hits closer that this"
-seta cl_damagetext_2d_out_of_view 1 "Always use 2D damagetext for hits that occured off-screen"
-
-seta cl_vehicles_alarm 1 "Play an alarm sound when the vehicle you are driving is heavily damaged"
-seta cl_vehicles_hud_tactical 1
-seta cl_vehicles_hudscale 0.5
-seta cl_vehicles_notify_time 15
-seta cl_vehicles_crosshair_size 0.5
-seta cl_vehicles_crosshair_colorize 1
-
-r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
-
-exec binds-xonotic.cfg
-
-seta menu_skin "luma"
-set menu_slowmo 1
-seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
-seta menu_tooltips 1 "menu tooltips: 0 disabled, 1 enabled, 2 also shows cvar or console command (when available) changed or executed by the item"
-set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
-set menu_showboxes 0 "show item bounding boxes (debug)"
-set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list"
-set menu_force_on_disconnection 1 "force to show the menu this number of seconds after you get disconnected (0 to disable)"
-
-r_textbrightness 0.2
-r_textcontrast 0.8
-r_textshadow 0
-r_font_postprocess_blur 1
-r_font_postprocess_outline 1
-
-// good settings for these fonts
-con_chat 5
-con_chatpos -9
-con_chatsize 10
-con_chatwidth 0.6
-con_notify 0
-con_notifysize 10
-con_notifyalign 0
-con_textsize 10
-
-seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info prints"
-
-// scoreboard
-seta scoreboard_columns default
-
-// keep old scoreboard cvars for compatibility's sake
-// they've been replaced by hud_panel_scoreboard_* cvars
-// TODO remove them after a future release (0.8.2+)
-seta scoreboard_border_thickness 1 "scoreboard border thickness"
-seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
-seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
-seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
-seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
-seta scoreboard_color_bg_r 0.125 "red color component of the scoreboard background"
-seta scoreboard_color_bg_g 0.55 "green color component of the scoreboard background"
-seta scoreboard_color_bg_b 0.875 "blue color component of the scoreboard background"
-seta scoreboard_color_bg_team 0.6 "team color multiplier of the scoreboard background"
-seta scoreboard_alpha_bg 0.7 "scoreboard background alpha"
-seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
-seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
-seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
-seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
-seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
-seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
-seta scoreboard_highlight_alpha 0.08 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
-seta scoreboard_highlight_alpha_self 0.3 "self highlight alpha value"
-seta scoreboard_offset_left 0.15 "how far (by percent) the scoreboard is offset from the left screen edge"
-seta scoreboard_offset_right 0.15 "how far (by percent) the scoreboard is offset from the right screen edge"
-seta scoreboard_offset_vertical 0.05 "how far (by percent) the scoreboard is offset from the top and bottom of the screen"
-seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
-seta scoreboard_respawntime_decimals 1 "decimal places to show for the respawntime countdown display on the scoreboard"
-seta scoreboard_dynamichud 0 "apply the dynamic hud effects to the scoreboard"
-
-seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
-seta accuracy_color0 "1 0 0"
-seta accuracy_color1 "1 1 0"
-seta accuracy_color2 "0 1 0"
-
-// 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"
-seta menu_slist_modfilter "" // set to either: !modname or modname. modname of = means "same as we are running now".
-
-// other serverlist cvars
-seta menu_slist_categories 1
-seta menu_slist_categories_onlyifmultiple 1
-seta menu_slist_purethreshold 0
-seta menu_slist_modimpurity 0
-seta menu_slist_recommendations 3
-seta menu_slist_recommendations_maxping 150
-seta menu_slist_recommendations_minfreeslots 1
-seta menu_slist_recommendations_minhumans 0
-seta menu_slist_recommendations_purethreshold -1
-
-// serverlist category override cvars
-seta menu_slist_categories_CAT_FAVORITED_override ""
-seta menu_slist_categories_CAT_RECOMMENDED_override ""
-seta menu_slist_categories_CAT_NORMAL_override ""
-seta menu_slist_categories_CAT_SERVERS_override "CAT_NORMAL"
-seta menu_slist_categories_CAT_XPM_override ""
-seta menu_slist_categories_CAT_MODIFIED_override ""
-seta menu_slist_categories_CAT_OVERKILL_override ""
-seta menu_slist_categories_CAT_INSTAGIB_override ""
-seta menu_slist_categories_CAT_DEFRAG_override ""
-
-seta menu_weaponarena ""
-
-seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
-
-// useful keybind to maximize the chat area temporarily
-// HUD code takes care of many of these now...
-//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"
-
-set _con_chat_maximized 0
-set _backup_con_chatvars_set 0
-alias _restore_con_chatvars_0 ""
-alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; 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_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 "_con_chat_maximized 1; _backup_con_chatvars; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
-alias -con_chat_maximize "_con_chat_maximized 0; _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_devmap      map
-set con_completion_gotomap     map
-set con_completion_vmap                map
-set con_completion_vnextmap    map
-set con_completion_vdomap      map
-set con_completion_playermodel "models/player/*.iqm"
-
-// helper
-// these non-saved engine cvars shall be saved
-alias makesaved "seta $1 \"${$1 ?}\""
-makesaved cl_maxfps_alwayssleep
-makesaved cl_port
-makesaved gl_finish
-makesaved net_slist_queriespersecond
-makesaved r_ambient
-makesaved r_drawviewmodel
-makesaved r_showsurfaces
-makesaved r_subdivisions_tolerance
-makesaved skill
-makesaved vid_gl13
-makesaved vid_gl20
-makesaved v_idlescale
-makesaved v_kicktime
-makesaved music_playlist_list0
-makesaved music_playlist_random0
-
-cl_netfps 60 // should match or be a multiple of sys_ticrate
-
-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
-
-cl_maxfps 200
-
-seta menu_mouse_absolute 1 "use the OS mouse pointer motion for menu"
-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 $*"
-
-seta cl_weaponpriority "vaporizer hmg rpc oknex vortex fireball mortar okmachinegun machinegun hagar rifle arc electro devastator crylink minelayer okshotgun shotgun shockwave hlac tuba blaster porto seeker hook" "weapon priority list"
-seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
-seta cl_weaponpriority0 "rpc devastator mortar hagar seeker fireball"                   "use weapon_priority_0_prev for prev gun from this list, weapon_priority_0_best for best gun, weapon_priority_0_next for next gun.  Default value: explosives"
-seta cl_weaponpriority1 "vaporizer oknex vortex crylink hlac arc electro blaster shockwave"   "use weapon_priority_1_prev for prev gun from this list, weapon_priority_1_best for best gun, weapon_priority_1_next for next gun.  Default value: energy"
-seta cl_weaponpriority2 "vaporizer oknex vortex rifle"                                        "use weapon_priority_2_prev for prev gun from this list, weapon_priority_2_best for best gun, weapon_priority_2_next for next gun.  Default value: hitscan exact"
-seta cl_weaponpriority3 "vaporizer hmg oknex vortex rifle okmachinegun machinegun okshotgun shotgun shockwave"       "use weapon_priority_3_prev for prev gun from this list, weapon_priority_3_best for best gun, weapon_priority_3_next for next gun.  Default value: hitscan all"
-seta cl_weaponpriority4 "mortar minelayer hlac hagar crylink seeker okshotgun shotgun shockwave"  "use weapon_priority_4_prev for prev gun from this list, weapon_priority_4_best for best gun, weapon_priority_4_next for next gun.  Default value: spam weapons"
-seta cl_weaponpriority5 "blaster shockwave hook porto"                                  "use weapon_priority_5_prev for prev gun from this list, weapon_priority_5_best for best gun, weapon_priority_5_next for next gun.  Default value: weapons for moving"
-seta cl_weaponpriority6 ""                                                              "use weapon_priority_6_prev for prev gun from this list, weapon_priority_6_best for best gun, weapon_priority_6_next for next gun"
-seta cl_weaponpriority7 ""                                                              "use weapon_priority_7_prev for prev gun from this list, weapon_priority_7_best for best gun, weapon_priority_7_next for next gun"
-seta cl_weaponpriority8 ""                                                              "use weapon_priority_8_prev for prev gun from this list, weapon_priority_8_best for best gun, weapon_priority_8_next for next gun"
-seta cl_weaponpriority9 ""                                                              "use weapon_priority_9_prev for prev gun from this list, weapon_priority_9_best for best gun, weapon_priority_9_next for next gun"
-seta cl_weaponimpulsemode 0 "0: only cycle between currently usable weapons in weapon priority order; 1: cycle between all possible weapons on a key in weapon priority order"
-
-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 cl_handicap 1      "multiplies damage received and divides damage dealt NOTE: reconnect or use 'sendcvar cl_handicap' to update the choice."
-
-seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
-
-seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway."
-
-seta cl_jetpack_jump 1 "Activate jetpack by pressing jump in the air. 0 = Disable, 1 = Stop when touching ground, 2 = Enable"
-
-seta cl_race_cptimes_showself 1 "Always show your own times as well as the current best on checkpoints in Race/CTS"
-seta cl_race_cptimes_onlyself 0 "Only show your own times on checkpoints in Race/CTS"
-
-set cl_stripcolorcodes 0       "experimental feature (notes: strips ALL color codes from messages!)"
-
-// 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_threshold     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 cl_gentle 0               "client side gentle mode, master switch for removing both gibs and messages"
-seta cl_gentle_gibs 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_gentle_messages 0      "client side gentle mode (only replaces frag messages/centerprints)"
-seta cl_gentle_damage 0        "client side gentle mode (only replaces damage flash); when set to 1, a white flash replaces the blood image, when set to 2, a randomly colored flash is used instead"
-
-set cl_jetpack_attenuation 2 "jetpack sound attenuation"
-
-set cl_warpzone_usetrace 1 "do not touch"
-
-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 menu_updatecheck 1 "check for updates"
-set menu_updatecheck_getpacks 1 "get update packs from update server"
-
-set cl_loddistance1 1024
-set cl_loddistance2 3072
-seta cl_playerdetailreduction 4        "the higher, the less detailed player models are displayed (LOD)"
-seta cl_modeldetailreduction 1 "the higher, the less detailed certain map models are displayed (LOD)"
-
-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)"
-
-//cl_gunalign calculator
-seta menu_cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only"
-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 _menu_initialized 0 "is 0 on first menu loading, 1 later"
-
-seta cl_noantilag 0 "turn this on if you believe antilag is bad"
-
-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_csqcentities 0 "csqc entity spam"
-
-seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
-seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); set it to 2 to enable it even in teamplay (only when there is exactly one enemy team)"
-seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
-seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
-seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
-seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce perceived lag"
-seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
-
-set debugdraw 0
-set debugdraw_filter ""
-set debugdraw_filterout ""
-set debugtrace 0
-
-// FIXME remove this when the engine feature FINALLY MAYBE works
-r_glsl_skeletal 0
-
-// 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)
-
-// autodemo deleting
-seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos"
-
-// freeze camera
-set cl_lockview 0 "when 1, the camera does not move any more"
-
-// we now use mastervolume
-volume 1
-
-// sucks less than the old one
-cl_decals_newsystem 1
-
-scr_conalpha 1
-scr_conalpha2factor 0.3
-scr_conalpha3factor 1
-scr_conalphafactor 0.8
-scr_conbrightness 0.35
-scr_conforcewhiledisconnected 1
-scr_conscroll2_x 0.11
-scr_conscroll2_y 0.2
-scr_conscroll3_x 0
-scr_conscroll3_y 0
-scr_conscroll_x -0.1
-scr_conscroll_y -0.3
-
-scr_conforcewhiledisconnected 0
-scr_infobar_height 12
-
-// DP cannot properly detect this, so rather turn off the detection
-r_texture_dds_load_alphamode 2
-r_texture_dds_swdecode 1 // SW decode to quarter res if we want to load DDS but don't support the extension for it
-r_texture_dds_load_logfailure 0 // this engine feature SUCKS
-set vid_netwmfullscreen 0 // doesn't support non-native res
-
-// particles optimization
-r_drawparticles_nearclip_min 8
-r_drawparticles_nearclip_max 16
-
-r_cullentities_trace 0
-
-// exact gloss looks better, e.g. on g-23
-r_shadow_glossexact 1
-r_shadow_glossintensity 1
-
-// use fake light if map has no lightmaps
-r_fakelight 1
-
-r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
-r_water_refractdistort 0.019
-
-set cl_rainsnow_maxdrawdist 2048
-
-// equalize looks better than fullbright
-r_equalize_entities_fullbright 1
-
-// safe font defaults
-r_font_hinting 1
-r_font_disable_freetype 0
-r_font_size_snapping 4
-
-// database management
-set cl_db_saveasdump 0 "write client.db in dump format (loads slower, easier to read/parse)"
-
-// uid2name
-seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)"
-seta cl_allow_uidtracking 1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid tracking (allows associating your data with your player ID)"
-// FIXME set to -1 before release, once we have a dialog for this!
-
-// polygonoffset for submodel SUCKS SUCKS SUCKS (only a hack for quake1, we don't need that)
-r_polygonoffset_submodel_offset 0
-r_polygonoffset_submodel_factor 0
-// decals: need a higher polygonoffset than default to not compete with _decal surfaces too much
-r_polygonoffset_decals_offset -28
-r_polygonoffset_decals_factor 0
-
-// loading screen
-scr_loadingscreen_background 0
-scr_loadingscreen_barcolor "0 0.5 1"
-scr_loadingscreen_barheight 12
-scr_loadingscreen_count 1
-scr_loadingscreen_firstforstartup 1
-scr_loadingscreen_scale 999
-scr_loadingscreen_scale_base 1
-scr_loadingscreen_scale_limit 2
-
-// other config files
-exec effects-normal.cfg
-exec crosshairs.cfg
-exec gamemodes-client.cfg
-exec notifications.cfg
-
-seta cl_physics "default" "client selected physics set"
-
-// hud cvar descriptions and common settings
-exec _hud_common.cfg
-exec _hud_descriptions.cfg
-// exec the default skin config
-// please add any new cvars into the hud_save script in qcsrc/client/hud_config.qc for consistency
-exec hud_luma.cfg
-
-// enable menu syncing - must be after files that call menu_sync on startup - see alias menu_sync ""
-alias menu_sync "menu_cmd sync"
-
-seta cl_items_nofade 0
-seta cl_animate_items 1
-seta cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
-seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
-seta cl_simple_items 0 "enable simple items (if server allows)"
-set cl_simpleitems_postfix "_luma" "posfix to add fo model name when simple items are enabled"
-set cl_fullbright_items 0 "enable fullbright items (if server allows, controlled by g_fullbrightitems)"
-set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0"
-set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
-
-seta cl_showspectators 0 "Show who's spectating you if server has sv_showspectators enabled"
-
-// Facility for config.cfg use ONLY.
-// Interpreted in post-config.cfg.
-seta menu_forced_saved_cvars "" "These cvars will always be saved, despite engine/Xonotic cvar saving status"
-set menu_reverted_nonsaved_cvars "" "These cvars are currently marked as saved in the flags, but have been reverted and won't stay saved. INTERNAL USE ONLY."
diff --git a/defaultOverkill.cfg b/defaultOverkill.cfg
deleted file mode 100644 (file)
index f63f689..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// ==============
-//  Overkill Mod
-// ==============
-
-exec defaultServer.cfg
-exec balance-overkill.cfg
-exec physicsOverkill.cfg
-
-// general gameplay
-set g_overkill 1
-
-// hack - eventually, we should be able to choose overkill models in menu like for vanilla
-set sv_defaultcharacter 1
-set sv_defaultplayermodel "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
-set sv_defaultplayermodel_red "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
-set sv_defaultplayermodel_blue "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
-set sv_defaultplayermodel_yellow "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
-set sv_defaultplayermodel_pink "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
-
-set g_respawn_ghosts 0
-
-set g_nades 1
-set g_nades_nade_small 1
-set g_nades_spread 0
-set g_nades_nade_refire 10
-set g_nades_nade_newton_style 2
-
-set g_dodging 1
-set sv_dodging_wall_dodging 1
-
-set g_spawn_near_teammate "!g_assault !g_freezetag"
-set g_spawn_near_teammate_ignore_spawnpoint 1
-set g_spawnshieldtime 0.5
-set g_respawn_delay_forced 2
-
-set g_lms_start_armor 100
diff --git a/defaultServer.cfg b/defaultServer.cfg
deleted file mode 100644 (file)
index 80e4f0d..0000000
+++ /dev/null
@@ -1,553 +0,0 @@
-// this should reset most cvars and aliases affecting gameplay to their defaults
-// note that it doesn't reset all server cvars,
-// some are shared with the client and so are left in defaultXonotic.cfg
-
-
-// taunts and voices
-set sv_taunt 1 "allow taunts on the server"
-set sv_autotaunt 1 "allow autotaunts on the server"
-
-// 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)"
-
-// restart server if all players hit "ready"-button
-set sv_ready_restart 0 "allow a map to be restarted once all players pressed the \"ready\" button"
-set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
-set sv_ready_restart_repeatable 0      "allows the players to restart the game as often as needed"
-
-//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
-set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
-
-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"
-set g_warmup_limit 0   "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
-set g_warmup_allow_timeout 0   "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
-set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
-set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
-
-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     "only players can call a vote (thus spectators and observers can't call a vote): 0 = all people can vote, 1 = spectators can vote in warmup stage, 2 = only players can vote (no exceptions)."
-
-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       "allow 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_oldvortexbeam 0 "If enabled, clients are allowed to use old v2.3 Vortex beam"
-
-set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
-set g_telefrags_teamplay 1 "never telefrag team mates"
-set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
-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"
-
-set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
-set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
-set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
-
-set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
-
-// use default physics
-set sv_friction_on_land 0
-set sv_friction_slick 0.5
-
-set sv_slick_applygravity 0
-
-set sv_aircontrol_backwards 0 "apply forward aircontrol options to backward movement"
-set sv_aircontrol_sidewards 0 "apply forward aircontrol options to sideward movement"
-
-set sv_player_viewoffset "0 0 35" "view offset of the player model"
-set sv_player_mins "-16 -16 -24" "playermodel mins"
-set sv_player_maxs "16 16 45" "playermodel maxs"
-set sv_player_crouch_viewoffset "0 0 20" "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_doublejump 0 "allow Quake 2-style double jumps"
-set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
-set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
-set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
-set sv_track_canjump 0 "track if the player released the jump key between 2 jumps to decide if they are able to jump or not"
-set sv_jumpvelocity_crouch 0 "jump height while crouching, set to 0 to use regular jump height"
-
-set sv_precacheplayermodels 1
-set sv_precacheweapons 0
-set sv_precacheitems 0
-set sv_spectator_speed_multiplier 1.5
-set sv_spectator_speed_multiplier_min 1
-set sv_spectator_speed_multiplier_max 5
-set 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)"
-set 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"
-set sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
-set sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
-set 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; can be overridden by :<skinnumber> suffix in sv_defaultplayermodel"
-set sv_defaultplayermodel_red ""       "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_red 0
-set sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_blue 0
-set sv_defaultplayermodel_yellow "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_yellow 0
-set sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
-set sv_defaultplayerskin_pink 0
-set 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 30
-net_connecttimeout 30
-sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
-
-set sv_shownames_cull_distance 2500 "distance after which to not send origin/health/armor of another player"
-
-set bot_config_file bots.txt "Name and path of the bot configuration file"
-set bot_number 0       "Minimum number of bots"
-set 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"
-set bot_prefix [BOT]   "Prefix in front of the bot names"
-set bot_suffix ""      "Suffix behind the bot names"
-set skill_auto 0       "when 1, \"skill\" gets adjusted to match the best player on the map"
-set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
-set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
-set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
-// general bot AI cvars
-set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 7 "How often a new objective is chosen"
-set bot_ai_strategyinterval_movingtarget 5.5 "How often a new objective is chosen when current objective can move"
-set bot_ai_enemydetectioninterval 2 "How often bots pick a new target"
-set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
-set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
-set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
-set bot_ai_dangerdetectioninterval 0.25 "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 100
-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_threshold 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   "vaporizer oknex vortex rifle electro devastator mortar hagar hlac crylink blaster okmachinegun machinegun fireball seeker okshotgun shotgun shockwave tuba minelayer" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid   "vaporizer devastator oknex vortex fireball seeker mortar electro okmachinegun machinegun arc crylink hlac hagar okshotgun shotgun shockwave blaster rifle tuba minelayer"     "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "vaporizer oknex vortex okshotgun shotgun shockwave okmachinegun machinegun arc hlac tuba seeker hagar crylink mortar electro devastator blaster fireball rifle minelayer"     "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.4  "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 200 "Run to goals located further than this distance"
-set bot_ai_bunnyhop_stopdistance 300 "Stop jumping after reaching this distance to the goal"
-set bot_ai_bunnyhop_firstjumpdelay 0.2 "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 navigate 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 2nd filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_3th 0.01 "Amount of the 3th filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_4th 0.05 "Amount of the 4th filter output to apply to the aiming angle"
-set bot_ai_aimskill_order_mix_5th 0.01 "Amount of the 5th 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"
-set bot_ai_timeitems 1 "allow skilled bots to run to important items a little time before respawning"
-set bot_ai_timeitems_minrespawndelay 25 "bots run to items with this minimum respawn delay before respawning"
-
-// waypoint editor enable
-set g_waypointeditor 0
-set g_waypointeditor_auto 0 "Automatically create waypoints for bots while playing; BEWARE, this currently creates too many of them"
-set g_waypointeditor_symmetrical 0 "Enable symmetrical editing of waypoints on symmetrical CTF maps (NOTE: it assumes that the map is perfectly symmetrical). 1: automatically determine origin of symmetry; -1: use custom origin (g_waypointeditor_symmetrical_origin); 2: automatically determine axis of symmetry; -2: use custom axis (g_waypointeditor_symmetrical_axis)"
-set g_waypointeditor_symmetrical_origin "0 0" "Custom origin of symmetry (x y)"
-set g_waypointeditor_symmetrical_order 0 "if >= 2 apply rotational symmetry (around origin of symmetry) of this order, otherwise apply autodetected order of symmetry"
-set g_waypointeditor_symmetrical_axis "0 0" "Custom axis of symmetry (m q parameters of y = mx + q)"
-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). Changes will be correctly applied only from the next game"
-
-set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
-set g_spawnshield_blockdamage 1 "how much spawn shield protects you from damage (1 = full protection)"
-set 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_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 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
-set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
-set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
-set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
-set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
-set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"
-set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening"
-set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly"
-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_weaponarena_random_with_blaster "1"      "additionally, always provide the blaster in random weapon arena games"
-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"
-set g_maplist_mostrecent_count 3       "number of most recent maps that are blocked from being played again"
-set g_maplist_index 0  "this is used internally for saving position in maplist cycle"
-set g_maplist_selectrandom 0   "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
-set 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 g_items_mindist 4000 "starting distance for the fading of items"
-set g_items_maxdist 4500 "maximum distance at which an item can be viewed, after which it will be invisible"
-
-set g_grab_range 200 "distance at which dragable objects can be grabbed"
-
-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"
-set 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 g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
-
-set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
-set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
-set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
-// respawn delay
-set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
-set g_respawn_delay_small_count 0 "Player count per team for g_respawn_delay_small. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
-set g_respawn_delay_large 2 "large game number of seconds you have to wait before you can respawn again"
-set g_respawn_delay_large_count 8 "Player count per team for g_respawn_delay_large. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
-set g_respawn_delay_max 5 "number of seconds you can wait before you're forced to respawn (only effective with g_forced_respawn 1)"
-set g_respawn_delay_forced 0 "enforce regular respawn delay (prevent gamemode specific respawn delays)"
-set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
-
-// overtime
-set timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
-set timelimit_overtimes 0 "how many overtimes to add at max"
-set 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"
-set g_tdm_on_dm_maps 0 "when this is set, all DM maps automatically support TDM"
-
-set teamplay_mode 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 cvars g_mirrordamage*, g_friendlyfire* and g_teamdamage*"
-set g_mirrordamage 0.7              "for teamplay_mode 4: mirror damage factor"
-set g_mirrordamage_virtual 1        "for teamplay_mode 4: do not actually apply mirror damage, just show graphics effect for it"
-set g_mirrordamage_onlyweapons 0    "for teamplay_mode 4: only apply mirror damage if the attack was from a weapon"
-set g_friendlyfire 0.5              "for teamplay_mode 4: friendly fire factor"
-set g_friendlyfire_virtual 1        "for teamplay_mode 4: do not actually apply friendly fire, just show graphics effect for it"
-set g_friendlyfire_virtual_force 1  "for teamplay_mode 4: apply force even though damage was made virtual only"
-set g_teamdamage_threshold 40       "for teamplay_mode 4: threshold over which to apply mirror damage"
-set g_teamdamage_resetspeed 20      "for teamplay_mode 4: how fast player's teamdamage count decreases"
-
-set g_balance_teams 1  "automatically balance out players entering instead of asking them for their preferred team"
-set g_balance_teams_prevent_imbalance  1       "prevent players from changing to larger teams"
-set g_balance_teams_scorefactor 0.25 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)"
-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"
-
-set g_bloodloss 0   "amount of health below which blood loss occurs"
-
-set g_footsteps 1      "serverside footstep sounds"
-
-set g_throughfloor_debug 0 "enable debugging messages for throughfloor calculations"
-set g_throughfloor_damage_max_stddev 2 "Maximum standard deviation for splash damage"
-set g_throughfloor_force_max_stddev 10 "Maximum standard deviation for splash force"
-set g_throughfloor_min_steps_player 1 "Minimum number of steps for splash damage"
-set g_throughfloor_min_steps_other 1 "Minimum number of steps for splash damage"
-set g_throughfloor_max_steps_player 100 "Maximum number of steps for splash damage"
-set g_throughfloor_max_steps_other 10 "Maximum number of steps for splash damage"
-// note: for damage X, 0.25 * ((1-g_throughfloor_damage)*X / g_throughfloor_damage_max_stddev)^2 steps are used
-// for these numbers:
-//   damage  25: 3
-//   damage  60: 15
-//   damage  80: 25
-//   damage 200: 157
-//   force  250: 10
-//   force  300: 15
-//   force  600: 57
-
-sv_maxvelocity 1000000000
-sv_sound_land ""
-sv_sound_watersplash ""
-
-// startmap_dm is used when running with the -listen or -dedicated commandline options
-set serverconfig server.cfg
-alias loadconfig "cvar_resettodefaults_saveonly; exec ${* !}"
-set _sv_init 0
-alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
-
-// 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
-set 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)"
-set quit_and_redirect_timer 1.5 "set to number of seconds after quit before performing the connect operation of quit_and_redirect"
-
-// Green's fullbright skins, updated by Samual
-alias sv_fbskin_unique "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors \"\""
-alias sv_fbskin_green "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 51"
-alias sv_fbskin_red "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 68"
-alias sv_fbskin_orange "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 238"
-alias sv_fbskin_rainbow "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 95"
-
-alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
-
-set sv_servermodelsonly 1
-
-sv_curl_defaulturl "http://www.xonotic.org/contentdownload/getmap.php?file="
-set sv_curl_serverpackages_auto 1 "automatically add packs with *.serverpackage files to sv_curl_serverpackages"
-
-set sv_motd ""
-
-set g_waypoints_for_items 0    "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
-
-set g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
-set g_maplist_votable_keeptwotime 15 "show only 2 options after this amount of time during map vote screen"
-set g_maplist_votable_timeout 30       "timeout for the map voting; must be below 50 seconds!"
-set g_maplist_votable_suggestions 2
-set g_maplist_votable_suggestions_override_mostrecent 0
-set 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"
-set g_maplist_votable_abstain 0        "when 1, you can abstain from your vote"
-set g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
-
-set sv_vote_gametype 0 "show a vote screen for gametypes before map vote screen"
-set sv_vote_gametype_keeptwotime 10 "show only 2 options after this amount of time during gametype vote screen"
-set sv_vote_gametype_options "dm ctf ca lms tdm ft"
-set sv_vote_gametype_timeout 20
-set sv_vote_gametype_default_current 1 "Keep the current gametype if no one votes"
-
-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_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players."
-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 sv_waypointsprite_deployed_lifetime 10
-set sv_waypointsprite_deadlifetime 1
-set sv_waypointsprite_limitedrange 5120
-
-set sv_itemstime 1 "enable networking of time left until respawn for items such as mega health/armor and powerups"
-
-set g_ban_default_bantime 5400 "90 minutes"
-set g_ban_default_masksize 3   "masksize 0 means banning by UID only, 1 means banning by /8 (IPv6: /32) network, 2 means banning by /16 (IPv6: /48) network, 3 means banning by /24 (IPv6: /56) network, 4 means banning by single IP (IPv6: /64 network)"
-set g_banned_list ""   "format: IP remainingtime IP remainingtime ..."
-set g_banned_list_idmode "1"   "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)"
-
-// useful vote aliases
-set timelimit_increment 5
-set timelimit_decrement 5
-set timelimit_min 5
-set timelimit_max 60
-
-sv_gameplayfix_delayprojectiles 0
-sv_gameplayfix_q2airaccelerate 1
-sv_gameplayfix_stepmultipletimes 1
-
-// delay for "kill" to prevent abuse
-set g_balance_kill_delay 2
-set g_balance_kill_antispam 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
-
-set sv_foginterval 1 "force enable fog in regular intervals"
-
-set sv_maxidle 0 "kick players idle for more than this amount of time in seconds"
-set sv_maxidle_spectatorsareidle 0 "when sv_maxidle is not 0, assume spectators are idle too"
-set sv_maxidle_slots 0 "when not 0, only kick idlers when this many or less player slots are available"
-set sv_maxidle_slots_countbots 1 "count bots as player slots"
-
-sv_allowdownloads_inarchive 1 // for csprogs.dat
-sv_allowdownloads 0 // download protocol is evil
-
-set g_jump_grunt 0     "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
-
-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)"
-
-set sv_clones 0        "number of clones a player may make (reset by the \"kill\" command)"
-
-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 1 "1: display waypoints for weapon spawns found on the map when a weapon key is pressed and the weapon is not owned; 2: for dropped weapons too; 3: for all the weapons sharing the same impulse"
-
-// 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_mindistance 2 // enable ballistics starting from 2 qu
-set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls
-set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls
-set g_ballistics_penetrate_clips 0 "allow ballistics to pass through weapon clips"
-
-sv_status_show_qcstatus 1      "Xonotic uses this field instead of frags"
-set g_full_getstatus_responses 0       "this currently breaks qstat"
-
-// "Gentle mode": show no blood
-set sv_gentle 0                "force gentle mode for everyone, also remove references to acts of killing from the messages"
-
-set g_jetpack 0 "Jetpack mutator"
-
-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"
-set g_hitplots_individuals "" "the individuals, by IP, that should have their hitplots recorded"
-
-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"
-
-set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
-
-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"
-
-set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
-
-set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
-
-set 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"
-set g_mutatormsg "" "mutator message"
-
-set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
-set loddebug 0 "force this LOD level"
-set speedmeter 0 "print landing speeds"
-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"
-
-// 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"
-
-// debug
-set _independent_players 0 "DO NOT TOUCH"
-set _notarget 0 "NO, REALLY, DON'T"
-
-// otherwise, antilag breaks
-sv_gameplayfix_consistentplayerprethink 1
-
-// improve some minor details
-sv_gameplayfix_gravityunaffectedbyticrate 1
-sv_gameplayfix_nogravityonground 1
-
-set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
-
-set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
-
-set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"
-
-// sv_cullentities_trace is 1, so the client doesn't have to
-sv_cullentities_trace 1
-
-// less "lagging" of other players, but also less PL tolerant... let's try this
-sv_clmovement_inputtimeout 0.066 // slightly less than 2 frames, so only one frame can be compensated
-
-// strength sound settings
-set sv_strengthsound_antispam_time 0.1 "minimum distance of strength sounds"
-set sv_strengthsound_antispam_refire_threshold 0.04 "apply minimum distance only if refire of the gun is smaller than this"
-
-// database management
-set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
-
-// allow fullbright
-set sv_allow_fullbright 1 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
-
-// auto-teams (team selection by player ID)
-// any player not listed is forced to spectate
-set g_forced_team_red "" "list of player IDs for red team"
-set g_forced_team_blue "" "list of player IDs for blue team"
-set g_forced_team_yellow "" "list of player IDs for yellow team"
-set g_forced_team_pink "" "list of player IDs for pink team"
-set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
-
-// nice alias to set up a match
-// example: g_forced_team_matchsetup stormkeep "mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM=" "BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ="
-// will set up a match on stormkeep where mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM= and BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ= play against each other
-alias g_forced_team_matchsetup "map $1; settemp g_forced_team_red \"$2\"; settemp g_forced_team_blue \"$3\"; settemp g_forced_team_yellow \"$4\"; settemp g_forced_team_pink \"$5\"; settemp g_forced_team_otherwise spectate"
-
-// frozen
-set g_frozen_revive_falldamage 0 "Enable reviving from this amount of fall damage"
-set g_frozen_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
-set g_frozen_damage_trigger 1 "if 1, frozen players falling into the void will die instead of teleporting to spawn"
-set g_frozen_force 0.6 "How much to multiply the force on a frozen player with"
-
-// player statistics
-set g_playerstats_gamereport_uri "http://stats.xonotic.org/stats/submit" "Output player statistics information to either: URL (with ://), console (with a dash like this: -), or supply a filename to output to data directory."
-set g_playerstats_gamereport_ladder ""
-set g_playerstats_playerbasic_uri "http://stats.xonotic.org"
-set g_playerstats_playerdetail_uri "http://stats.xonotic.org/player/me"
-set g_playerstats_playerdetail_autoupdatetime 1800 // automatically update every 30 minutes anyway
-
-// autoscreenshots
-set g_max_info_autoscreenshot 3 "how many info_autoscreenshot entities are allowed"
-
-// mod names for server browser
-// note: the lowest of these that mismatches default is used
-set g_mod_physics "" "Current physics config name"
-set g_mod_balance "" "Current balance config name"
-set g_mod_config  "" "Current config mod name"
-
-// other config files
-exec balance-xonotic.cfg
-exec physicsX.cfg
-exec turrets.cfg
-exec gamemodes-server.cfg
-exec mutators.cfg
-exec monsters.cfg
-exec minigames.cfg
-exec physics.cfg
-
-set sv_join_notices ""
-set sv_join_notices_time 15
-
-set sv_simple_items 1 "allow or forbid client use of simple items"
-
-set sv_showspectators 1 "Show who's spectating who in the player info panel when client has cl_showspectators on. Shouldn't be used on competitive servers, also disable when watching a suspected cheater"
-
-set sv_damagetext 2 "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage"
diff --git a/defaultXDF.cfg b/defaultXDF.cfg
deleted file mode 100644 (file)
index d504b2a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// ================
-//  Xonotic Defrag
-// ================
-
-exec defaultServer.cfg
-exec balance-xdf.cfg
-exec physicsXDF.cfg
-
-// general gameplay
-set g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
-set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
-set g_balance_kill_antispam 0
-set g_forced_respawn 1
-// g_playerclip_collisions 0 // do not check playerclips
-set g_powerups 0  // set to -1 or patch xonotic
-set g_spawnpoints_auto_move_out_of_solid 1
-set g_start_delay 3
-set g_use_ammunition 0 "if set to 0 all weapons have unlimited ammunition"
-set g_weapon_stay 1 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
-set teamplay_mode 2 // friendly fire and self damage
-set sv_vote_nospectators 1
-set timelimit_override 20
-set g_buffs_cooldown_respawn 0.1
-
-// game mode settings
-set g_cts_finish_kill_delay 2
-set g_cts_respawn_delay 0
-set g_cts_selfdamage 0
diff --git a/defaultXPM.cfg b/defaultXPM.cfg
deleted file mode 100644 (file)
index fd34497..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// ==================
-//  Xonotic Pro-Mode
-// ==================
-
-exec defaultServer.cfg
-exec balance-xpm.cfg
-
-// general gameplay
-set g_norecoil 1
-set g_shootfromeye 1 // hit where you point at with the crosshair (promoders don't care about ugliness)
-set g_balance_kill_antispam 0
-set g_forced_respawn 1
-set teamplay_mode 2 // friendly fire and self damage
-set sv_vote_nospectators 1
-set g_chat_nospectators 2
-set g_warmup 1
-set g_balance_teams 0
-set g_spawnshieldtime 0
-set g_spawn_furthest 1
-set sv_autoscreenshot 1
-set sv_ready_restart 1
-set sv_ready_restart_after_countdown 1
-set g_monsters 0
-set g_turrets 0
-set g_vehicles 0
-set sv_showspectators 0
diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg
deleted file mode 100644 (file)
index bac826e..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-// 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
-set g_xonoticversion git "Xonotic version (formatted for humans)"
-
-gameversion 802 // 0.8.2
-gameversion_min 0 // git builds see all versions
-gameversion_max 65535 // git builds see all versions
-
-// 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"
-// so, for a given gameversion, _min and _max calculate as follows:
-//   gameversion_min = (gameversion / 100) * 100 - 100
-//   gameversion_max = (gameversion / 100) * 100 + 199
-
-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"
-
-exec defaultClient.cfg
-exec defaultServer.cfg
-
-set ekg 0      "Throw huge amounts of gibs"
-
-_cl_playermodel "models/player/erebus.iqm"
-
-locs_enable 0
-pausable 0
-set samelevel 0 "when 1, always play the same level over and over again"
-
-fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
-
-// singleplayer campaign
-set g_campaign 0
-set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
-seta g_campaign_name "xonoticbeta"
-seta g_campaign_skill -1 // -2 easy -1 medium 0 hard
-
-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"
-
-// campaign internal, set when loading a campaign map1G
-set _campaign_index ""
-set _campaign_name ""
-set _campaign_testrun 0 "To verify the campaign file, set this to 1, then start the first campaign level from the menu. If you end up in the menu again, it's good, if you get a QC crash, it's bad."
-
-// used by both server and menu to maintain the available list of maps
-seta g_maplist "" "the list of maps to be cycled among (is autogenerated if empty)"
-
-// we must change its default from 1.0 to 1 to be consistent with menuqc
-set slowmo 1
-
-// ticrate
-//sys_ticrate 0.0166667 // 60fps. This would be ideal, but kills home routers.
-sys_ticrate 0.0333333 // Use 30fps instead.
-
-// Audio track names (for old-style "cd loop NUMBER" usage)
-set _cdtrack_first "1"
-alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\""
-alias _cdtrack_1 "g_cdtracks_remaplist \"$1\"; set _cdtrack_first 0"
-alias _cdtrack "_cdtrack_$_cdtrack_first $2"
-set g_cdtracks_remaplist ""
-exec cdtracks.cfg
-unset _cdtrack_first
-unalias _cdtrack_0
-unalias _cdtrack_1
-unalias _cdtrack
-
-cd remap $g_cdtracks_remaplist
-set sv_intermission_cdtrack ""
-
-set g_cdtracks_dontusebydefault "rising-of-the-phoenix"
-seta menu_cdtrack "rising-of-the-phoenix"
-
-// 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"
-prvm_backtraceforwarnings 1
-
-set _urllib_nextslot 0 "temp variable"
-
-set g_debug_defaultsounds 0 "always use default sounds"
-
-// define some engine cvars that we need even on dedicated server
-set r_showbboxes 0
-
-// support Q1BSP maps
-mod_q1bsp_polygoncollisions 1
-
-// match q3map2
-mod_obj_orientation 0
-
-// UTF-8
-utf8_enable 1
-
-// this is mainly for _decal entities (their shaders should use "polygonoffset" shader parameter) - this is "good enough" as it seems, but smaller than the decals one so these don't zfight decals
-mod_q3shader_default_polygonoffset -14
-mod_q3shader_default_polygonfactor 0
-
-// random charge stuff :P
-set g_weapon_charge_colormod_hdrmultiplier 4 "how much to multiply the colors by in the colormod vector"
-set g_weapon_charge_colormod_red_half 0
-set g_weapon_charge_colormod_green_half 0.5
-set g_weapon_charge_colormod_blue_half 1
-set g_weapon_charge_colormod_red_full 1
-set g_weapon_charge_colormod_green_full -0.5
-set g_weapon_charge_colormod_blue_full -1
-
-// session locking
-locksession 1
-
-// create this cvar in case the engine did not
-set snd_soundradius 1200
-set snd_softclip 1
-set snd_maxchannelvolume 0
-set snd_streaming_length 2
-seta menu_snd_sliderscale 2 "0: decibels; 1: linear percent; 2: 0..10 scale; 3: slider size percent"
-seta menu_snd_attenuation_method 1 "Use exponential instead of linear falloff for sound attenuation"
-alias snd_attenuation_method_0 "set menu_snd_attenuation_method 0; set snd_soundradius 1200; set snd_attenuation_exponent 1; set snd_attenuation_decibel 0" // Quake default
-alias snd_attenuation_method_1 "set menu_snd_attenuation_method 1; set snd_soundradius 2400; set snd_attenuation_exponent 4; set snd_attenuation_decibel 0" // nice approximation for method 2
-alias snd_attenuation_method_2 "set menu_snd_attenuation_method 2; set snd_soundradius 1200; set snd_attenuation_exponent 0; set snd_attenuation_decibel 10" // warning: plays sounds within up to 6000qu
-snd_attenuation_method_1
-
-// declare the channels we use
-seta snd_channel8volume 1 "QuakeC controlled background music volume"
-seta snd_channel9volume 1 "QuakeC controlled ambient sound volume"
-
-// sound randomization
-snd_identicalsoundrandomization_time -0.1
-snd_identicalsoundrandomization_tics    1
-
-// load console command aliases and settings
-exec commands.cfg
-
-// ... and now that everything is configured/aliased, we can do some things:
-
-// Change g_start_delay based upon if the server is local or not.
-if_client set 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      "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
index 2fd56a49cef54d4ae9831436181c2070fe868d3f..51ae3f140fae169c02967a4dc5f6a398c6e381ee 100644 (file)
@@ -54,7 +54,7 @@ set g_instagib_friendlypush 1 "allow pushing teammates with the vaporizer primar
 // ==========
 //  overkill
 // ==========
-set g_overkill 0 "internal cvar, to enable overkill, use  `exec defaultOverkill.cfg`"
+set g_overkill 0 "internal cvar, to enable overkill, use  `exec ruleset-overkill.cfg`"
 
 set g_overkill_powerups_replace 1
 set g_overkill_itemwaypoints 1
index 609e03775ece1454ceaab0db07e21c7d50ad47f9..f0b8aac6c9ee3b69d1c4c51abfde9cf98f7c23ca 100644 (file)
@@ -697,10 +697,7 @@ void Spawn_PreDraw(entity this)
 NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new)
 {
        float teamnum = (ReadByte() - 1);
-       vector spn_origin;
-       spn_origin.x = ReadCoord();
-       spn_origin.y = ReadCoord();
-       spn_origin.z = ReadCoord();
+       vector spn_origin = ReadVector();
 
        this.team = (teamnum + 1);
 
@@ -757,9 +754,7 @@ NET_HANDLE(ENT_CLIENT_SPAWNEVENT, bool is_new)
 
        if(entnum)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
 
                if(is_new)
                {
index 7f1654de0660b3d20890730feb19f0417c3252d6..c5f1c2fb4b1468b1b50bf997f366987ce675c83f 100644 (file)
@@ -187,7 +187,7 @@ void teamradar_loadcvars()
        hud_panel_radar_maximized_zoommode = autocvar_hud_panel_radar_maximized_zoommode;
 
        // others default to 0
-       // match this to defaultXonotic.cfg!
+       // match this to default hud cfg file!
        if(!hud_panel_radar_scale) hud_panel_radar_scale = 4096;
        if(!hud_panel_radar_foreground_alpha) hud_panel_radar_foreground_alpha = 0.8 * panel_fg_alpha;
        if(!hud_panel_radar_size.x) hud_panel_radar_size.x = 128;
@@ -208,17 +208,13 @@ NET_HANDLE(ENT_CLIENT_RADARLINK, bool isnew)
 
        if(sendflags & 1)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
        }
 
        if(sendflags & 2)
        {
-               this.velocity_x = ReadCoord();
-               this.velocity_y = ReadCoord();
-               this.velocity_z = ReadCoord();
+               this.velocity = ReadVector();
        }
 
        if(sendflags & 4)
index a0d66d719e4ab04a201f990fbcb5defd7aa42822..b5728095485406213273f68f387c6096761de206 100644 (file)
@@ -143,9 +143,7 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
 
        if(f & 2)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
        }
 
@@ -181,12 +179,8 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                this.scale = ReadShort() / 256.0;
                if(f & 0x20)
                {
-                       this.mins_x = ReadCoord();
-                       this.mins_y = ReadCoord();
-                       this.mins_z = ReadCoord();
-                       this.maxs_x = ReadCoord();
-                       this.maxs_y = ReadCoord();
-                       this.maxs_z = ReadCoord();
+                       this.mins = ReadVector();
+                       this.maxs = ReadVector();
                }
                else
                        this.mins = this.maxs = '0 0 0';
@@ -211,9 +205,7 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                        this.bgmscriptdecay = ReadByte() / 64.0;
                        this.bgmscriptsustain = ReadByte() / 255.0;
                        this.bgmscriptrelease = ReadByte() / 64.0;
-                       this.movedir_x = ReadCoord();
-                       this.movedir_y = ReadCoord();
-                       this.movedir_z = ReadCoord();
+                       this.movedir = ReadVector();
                        this.lip = ReadByte() / 255.0;
                }
                this.fade_start = ReadByte();
index 3d2d32d9af16bff4eeb0c6ca89d1e7951c71e1c5..089c7df11fd326f0598f0243c59933a50a8a03a5 100644 (file)
@@ -236,15 +236,11 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
 
        if (f & 1)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
                if (this.count & 0x80)
                {
-                       this.velocity_x = ReadCoord();
-                       this.velocity_y = ReadCoord();
-                       this.velocity_z = ReadCoord();
+                       this.velocity = ReadVector();
                        if (f & 0x10)
                                this.gravity = ReadCoord();
                        else
index 0200883b8dbbc89867e6c888b7489889bb606f54..2d0c4e9110d7e5f22f885156721b8150febb3650 100644 (file)
@@ -16,9 +16,7 @@ REGISTER_NET_TEMP(net_debug)
                Net_Accept(net_debug);
                this.sv_entnum = ReadShort();
                if (ReadByte()) make_pure(this);
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
                this.debug = true;  // identify server entities by this
                this.classname = strzone(ReadString());
@@ -40,7 +38,7 @@ REGISTER_NET_TEMP(net_debug)
                        o = (this.absmin + this.absmax) / 2;
                if (this.tag_entity)
                        o += this.tag_entity.origin;
-               WriteCoord(channel, o.x); WriteCoord(channel, o.y); WriteCoord(channel, o.z);
+               WriteVector(channel, o);
                WriteString(channel, this.classname);
                WriteString(channel, this.sourceLoc);
                return true;
index af41054e31c1c40c462ce041a2cc540fa1c570be..252f913379a02be272548bcf60162b693e82e4be 100644 (file)
@@ -11,18 +11,11 @@ NET_HANDLE(net_effect, bool isNew)
        vector vel = '0 0 0';
        int eff_cnt = 1;
        bool eff_trail = eff.eent_eff_trail;
-       vector v;
-       v_x = ReadCoord();
-       v_y = ReadCoord();
-       v_z = ReadCoord();
+       vector v = ReadVector();
 
        bool use_vel = ReadByte();
        if(use_vel)
-       {
-               vel_x = ReadCoord();
-               vel_y = ReadCoord();
-               vel_z = ReadCoord();
-       }
+               vel = ReadVector();
 
        if(!eff_trail)
                eff_cnt = ReadByte();
@@ -44,17 +37,13 @@ bool Net_Write_Effect(entity this, entity client, int sf)
        (Effects_COUNT >= 255)
        ? WriteShort(channel, this.m_id)
        : WriteByte(channel, this.m_id);
-       WriteCoord(channel, this.eent_net_location_x);
-       WriteCoord(channel, this.eent_net_location_y);
-       WriteCoord(channel, this.eent_net_location_z);
+       WriteVector(channel, this.eent_net_location);
 
        // attempt to save a tiny bit more bandwidth by not sending velocity if it isn't set
        if(this.eent_net_velocity)
        {
                WriteByte(channel, true);
-               WriteCoord(channel, this.eent_net_velocity_x);
-               WriteCoord(channel, this.eent_net_velocity_y);
-               WriteCoord(channel, this.eent_net_velocity_z);
+               WriteVector(channel, this.eent_net_velocity);
        }
        else { WriteByte(channel, false); }
 
index 60f9633027eb2125d0278bd6abaaa2cb9ed1505a..2abf2122c26553b86634a85eb7be3bd3ef1a5a3f 100644 (file)
@@ -20,9 +20,7 @@ void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float ran
 
     WriteHeader(MSG_ALL, casings);
     WriteByte(MSG_ALL, casingtype);
-    WriteCoord(MSG_ALL, org.x);
-    WriteCoord(MSG_ALL, org.y);
-    WriteCoord(MSG_ALL, org.z);
+    WriteVector(MSG_ALL, org);
     WriteShort(MSG_ALL, compressShortVector(vel)); // actually compressed velocity
     WriteByte(MSG_ALL, ang.x * 256 / 360);
     WriteByte(MSG_ALL, ang.y * 256 / 360);
@@ -123,10 +121,7 @@ void Casing_Damage(entity this, float thisdmg, int hittype, vector org, vector t
 NET_HANDLE(casings, bool isNew)
 {
     int _state = ReadByte();
-    vector org;
-    org_x = ReadCoord();
-    org_y = ReadCoord();
-    org_z = ReadCoord();
+    vector org = ReadVector();
     vector vel = decompressShortVector(ReadShort());
     vector ang;
     ang_x = ReadByte() * 360 / 256;
index c85d66eeb6686cee70d27d77482757baf0336550..1fc64d1d259697f7fb04c691a1d83ead70ef220f 100644 (file)
@@ -6,11 +6,10 @@ REGISTER_NET_LINKED(ENT_CLIENT_DAMAGEINFO)
 
 bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
 {
+       vector org = vec3(floor(this.origin.x), floor(this.origin.y), floor(this.origin.z));
        WriteHeader(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
        WriteShort(MSG_ENTITY, this.projectiledeathtype);
-       WriteCoord(MSG_ENTITY, floor(this.origin.x));
-       WriteCoord(MSG_ENTITY, floor(this.origin.y));
-       WriteCoord(MSG_ENTITY, floor(this.origin.z));
+       WriteVector(MSG_ENTITY, org);
        WriteByte(MSG_ENTITY, bound(1, this.dmg, 255));
        WriteByte(MSG_ENTITY, bound(0, this.dmg_radius, 255));
        WriteByte(MSG_ENTITY, bound(1, this.dmg_edge, 255));
@@ -187,9 +186,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
        w_issilent = (w_deathtype & 0x8000);
        w_deathtype = (w_deathtype & 0x7FFF);
 
-       w_org.x = ReadCoord();
-       w_org.y = ReadCoord();
-       w_org.z = ReadCoord();
+       w_org = ReadVector();
 
        thedamage = ReadByte();
        rad = ReadByte();
index 874c64d5385755189e04766de0279a726cdbb70d..4875a40ee98c4682b1d7cdf4f4c8818bce87ca39 100644 (file)
@@ -42,9 +42,7 @@
                        WriteByte(channel, floor(_atten * 64));
                        entcs_force_origin(from);
                        vector o = from.origin + 0.5 * (from.mins + from.maxs);
-                       WriteCoord(channel, o.x);
-                       WriteCoord(channel, o.y);
-                       WriteCoord(channel, o.z);
+                       WriteVector(channel, o);
                }
 
                /**
@@ -79,9 +77,7 @@
                        WriteByte(channel, floor(_atten * 64));
                        entcs_force_origin(from);
                        vector o = from.origin + 0.5 * (from.mins + from.maxs);
-                       WriteCoord(channel, o.x);
-                       WriteCoord(channel, o.y);
-                       WriteCoord(channel, o.z);
+                       WriteVector(channel, o);
                }
        #endif
 
                        int chan = ReadSByte();
                        float vol = ReadByte() / 255;
                        float atten = ReadByte() / 64;
-                       vector o;
-                       o.x = ReadCoord();
-                       o.y = ReadCoord();
-                       o.z = ReadCoord();
+                       vector o = ReadVector();
                        // TODO: is this really what we want to be doing? Footsteps that follow the player at head height?
                        if (who == player_currententnum) e = findfloat(NULL, entnum, who);  // play at camera position for full volume
                        else if (e) e.origin = o;
                        int chan = ReadSByte();
                        float vol = ReadByte() / 255;
                        float atten = ReadByte() / 64;
-                       vector o;
-                       o.x = ReadCoord();
-                       o.y = ReadCoord();
-                       o.z = ReadCoord();
+                       vector o = ReadVector();
                        if (who == player_currententnum) e = findfloat(NULL, entnum, who);  // play at camera position for full volume
                        else if (e) e.origin = o;
                        if (e)
index 6388575b72cb09a5baa576a0e8c3882fdeff8ffb..80a1c98a83f69b6904b2bee67c4bffa818863f7e 100644 (file)
@@ -8,12 +8,8 @@ REGISTER_NET_TEMP(TE_CSQC_ARC)
        {
                WriteHeader(MSG_BROADCAST, TE_CSQC_ARC);
 
-               WriteCoord(MSG_BROADCAST, from.x);
-               WriteCoord(MSG_BROADCAST, from.y);
-               WriteCoord(MSG_BROADCAST, from.z);
-               WriteCoord(MSG_BROADCAST, to.x);
-               WriteCoord(MSG_BROADCAST, to.y);
-               WriteCoord(MSG_BROADCAST, to.z);
+               WriteVector(MSG_BROADCAST, from);
+               WriteVector(MSG_BROADCAST, to);
        }
 
 #elif defined(CSQC)
@@ -89,14 +85,8 @@ void b_make(vector s,vector e, string t,float l,float z)
 
        NET_HANDLE(TE_CSQC_ARC, bool isNew)
        {
-               vector from;
-               from.x = ReadCoord();
-               from.y = ReadCoord();
-               from.z = ReadCoord();
-               vector to;
-               to.x = ReadCoord();
-               to.y = ReadCoord();
-               to.z = ReadCoord();
+               vector from = ReadVector();
+               vector to = ReadVector();
                return = true;
 
                if (autocvar_cl_effects_lightningarc_simple)
index 1b70daee2fbbd5621e8e33198ffcec7c7380b2fd..26b3ec9f5285744b9f21d72abd82cab86669c5c0 100644 (file)
@@ -23,14 +23,10 @@ bool modeleffect_SendEntity(entity this, entity to, int sf)
        WriteShort(MSG_ENTITY, this.modelindex);
        WriteByte(MSG_ENTITY, this.skin);
        WriteByte(MSG_ENTITY, this.frame);
-       WriteCoord(MSG_ENTITY, this.origin.x);
-       WriteCoord(MSG_ENTITY, this.origin.y);
-       WriteCoord(MSG_ENTITY, this.origin.z);
+       WriteVector(MSG_ENTITY, this.origin);
        if(f & 1)
        {
-               WriteCoord(MSG_ENTITY, this.velocity.x);
-               WriteCoord(MSG_ENTITY, this.velocity.y);
-               WriteCoord(MSG_ENTITY, this.velocity.z);
+               WriteVector(MSG_ENTITY, this.velocity);
        }
        if(f & 2)
        {
@@ -124,15 +120,11 @@ NET_HANDLE(ENT_CLIENT_MODELEFFECT, bool isnew)
        e.skin = ReadByte();
        e.frame = ReadByte();
        e.frame1time = time;
-       e.origin_x = ReadCoord();
-       e.origin_y = ReadCoord();
-       e.origin_z = ReadCoord();
+       e.origin = ReadVector();
        setorigin(e, e.origin);
        if(f & 1)
        {
-               e.velocity_x = ReadCoord();
-               e.velocity_y = ReadCoord();
-               e.velocity_z = ReadCoord();
+               e.velocity = ReadVector();
        }
        if(f & 2)
        {
index 7eb8ecb4b0bd62a30004870d7c4a869ec87b85da..fa718eb16fe9884a74512688212372359fd026b6 100644 (file)
@@ -13,8 +13,6 @@ MUTATOR_HOOKFUNCTION(cl_nb, WantEventchase)
 }
 #endif
 #ifdef SVQC
-.float metertime = _STAT(NB_METERSTART);
-
 .entity ballcarried;
 
 int autocvar_g_nexball_goalleadlimit;
@@ -154,9 +152,9 @@ void GiveBall(entity plyr, entity ball)
                ownr.effects &= ~autocvar_g_nexball_basketball_effects_default;
                ownr.ballcarried = NULL;
                GameRules_scoring_vip(ownr, false);
-               if(ownr.metertime)
+               if(STAT(NB_METERSTART, ownr))
                {
-                       ownr.metertime = 0;
+                       STAT(NB_METERSTART, ownr) = 0;
                        ownr.(weaponentity).state = WS_READY;
                }
                WaypointSprite_Kill(ownr.waypointsprite_attachedforcarrier);
@@ -223,9 +221,9 @@ void DropBall(entity ball, vector org, vector vel)
        setthink(ball, ResetBall);
        ball.nextthink = min(time + autocvar_g_nexball_delay_idle, ball.teamtime);
 
-       if(ball.owner.metertime)
+       if(STAT(NB_METERSTART, ball.owner))
        {
-               ball.owner.metertime = 0;
+               STAT(NB_METERSTART, ball.owner) = 0;
                .entity weaponentity = ball.weaponentity_fld;
                ball.owner.(weaponentity).state = WS_READY;
        }
@@ -853,14 +851,14 @@ MUTATOR_HOOKFUNCTION(nb, SpectateCopy)
        entity spectatee = M_ARGV(0, entity);
        entity client = M_ARGV(1, entity);
 
-       client.metertime = spectatee.metertime;
+       STAT(NB_METERSTART, client) = STAT(NB_METERSTART, spectatee);
 }
 
 MUTATOR_HOOKFUNCTION(nb, PlayerSpawn)
 {
        entity player = M_ARGV(0, entity);
 
-       player.metertime = 0;
+       STAT(NB_METERSTART, player) = 0;
        for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
                .entity weaponentity = weaponentities[slot];
@@ -875,18 +873,13 @@ MUTATOR_HOOKFUNCTION(nb, PlayerSpawn)
        return false;
 }
 
-.float stat_sv_airspeedlimit_nonqw;
-.float stat_sv_maxspeed;
-
-MUTATOR_HOOKFUNCTION(nb, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(nb, PlayerPhysics_UpdateStats)
 {
        entity player = M_ARGV(0, entity);
+       // these automatically reset, no need to worry
 
        if(player.ballcarried)
-       {
-               player.stat_sv_airspeedlimit_nonqw *= autocvar_g_nexball_basketball_carrier_highspeed;
-               player.stat_sv_maxspeed *= autocvar_g_nexball_basketball_carrier_highspeed;
-       }
+               STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_nexball_basketball_carrier_highspeed;
 }
 
 MUTATOR_HOOKFUNCTION(nb, ForbidThrowCurrentWeapon)
index e26af778015650f241d2cb5afb127de50f565442..838d0dd7e9cf07e0be6fc7e4ebf894613e452f55 100644 (file)
@@ -11,8 +11,8 @@ METHOD(BallStealer, wr_think, void(BallStealer thiswep, entity actor, .entity we
         if(weapon_prepareattack(thiswep, actor, weaponentity, false, autocvar_g_balance_nexball_primary_refire))
             if(autocvar_g_nexball_basketball_meter)
             {
-                if(actor.ballcarried && !actor.metertime)
-                    actor.metertime = time;
+                if(actor.ballcarried && !STAT(NB_METERSTART, actor))
+                    STAT(NB_METERSTART, actor) = time;
                 else
                     weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, autocvar_g_balance_nexball_primary_animtime, w_ready);
             }
@@ -28,9 +28,9 @@ METHOD(BallStealer, wr_think, void(BallStealer thiswep, entity actor, .entity we
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, autocvar_g_balance_nexball_secondary_animtime, w_ready);
         }
 
-    if(!(fire & 1) && actor.metertime && actor.ballcarried)
+    if(!(fire & 1) && STAT(NB_METERSTART, actor) && actor.ballcarried)
     {
-        W_Nexball_Attack(actor, weaponentity, time - actor.metertime);
+        W_Nexball_Attack(actor, weaponentity, time - STAT(NB_METERSTART, actor));
         // DropBall or stealing will set metertime back to 0
         weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, autocvar_g_balance_nexball_primary_animtime, w_ready);
     }
@@ -116,8 +116,8 @@ void W_Nexball_Attack(entity actor, .entity weaponentity, float t)
        tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, NULL);
        if(trace_startsolid)
        {
-               if(actor.metertime)
-                       actor.metertime = 0; // Shot failed, hide the power meter
+               if(STAT(NB_METERSTART, actor))
+                       STAT(NB_METERSTART, actor) = 0; // Shot failed, hide the power meter
                return;
        }
 
index ee348fdbc6244707f53e7b6202aae30cd6392ea7..a03e5b3353f8b6156eac2d8012ff5e0af9d2c96a 100644 (file)
@@ -162,9 +162,7 @@ NET_HANDLE(ENT_CLIENT_CONTROLPOINT_ICON, bool isnew)
 
        if(sf & CPSF_SETUP)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
                this.health = ReadByte();
index ac7a066ab17032c3fb0ae3733bdd8ead99c686c8..a3374bf91e804f4db0ae4993eb107349d3c72411 100644 (file)
@@ -192,9 +192,7 @@ NET_HANDLE(ENT_CLIENT_GENERATOR, bool isnew)
 
        if(sf & GSF_SETUP)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
                this.health = ReadByte();
index ae4d7a4913b3fb8afe2857b2470f179dc9bc0891..80d6a6be29fa146940ccf242cfddb9c90413e2ea 100644 (file)
@@ -9,9 +9,7 @@ REGISTER_NET_LINKED(ENT_ONSCAMERA)
 entity generator_camera;
 NET_HANDLE(ENT_ONSCAMERA, bool isnew)
 {
-       this.origin_x = ReadCoord();
-       this.origin_y = ReadCoord();
-       this.origin_z = ReadCoord();
+       this.origin = ReadVector();
        setorigin(this, this.origin);
 
        this.angles_x = ReadAngle();
index 0941833de8acd7430cc7fb35cef56c104bf405bf..d3b6d5c7f4c09f62d510db50b61c79685f1847b0 100644 (file)
@@ -10,9 +10,7 @@ bool cpicon_send(entity this, entity to, int sf)
        WriteByte(MSG_ENTITY, sf);
        if(sf & CPSF_SETUP)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
 
                WriteByte(MSG_ENTITY, this.health);
                WriteByte(MSG_ENTITY, this.max_health);
index 1b1619bc44f621458c912c56c8f80573ab1f49c6..ac0596f2e2a5abfb3c9c21603b2a29652a31994d 100644 (file)
@@ -6,9 +6,7 @@ bool generator_send(entity this, entity to, int sf)
        WriteByte(MSG_ENTITY, sf);
        if(sf & GSF_SETUP)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
 
                WriteByte(MSG_ENTITY, this.health);
                WriteByte(MSG_ENTITY, this.max_health);
index 0a2aeb11c7145cc274833ba548d55b5ede68511f..2637aeef212b5415a589b42848b99f1b1290fef6 100644 (file)
@@ -38,9 +38,7 @@ bool clientcamera_send(entity this, entity to, int sf)
 {
        WriteHeader(MSG_ENTITY, ENT_ONSCAMERA);
 
-       WriteCoord(MSG_ENTITY, this.origin_x);
-       WriteCoord(MSG_ENTITY, this.origin_y);
-       WriteCoord(MSG_ENTITY, this.origin_z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        WriteAngle(MSG_ENTITY, this.angles_x);
        WriteAngle(MSG_ENTITY, this.angles_y);
@@ -272,15 +270,11 @@ bool ons_Link_Send(entity this, entity to, int sendflags)
        WriteByte(MSG_ENTITY, sendflags);
        if(sendflags & 1)
        {
-               WriteCoord(MSG_ENTITY, this.goalentity.origin_x);
-               WriteCoord(MSG_ENTITY, this.goalentity.origin_y);
-               WriteCoord(MSG_ENTITY, this.goalentity.origin_z);
+               WriteVector(MSG_ENTITY, this.goalentity.origin);
        }
        if(sendflags & 2)
        {
-               WriteCoord(MSG_ENTITY, this.enemy.origin_x);
-               WriteCoord(MSG_ENTITY, this.enemy.origin_y);
-               WriteCoord(MSG_ENTITY, this.enemy.origin_z);
+               WriteVector(MSG_ENTITY, this.enemy.origin);
        }
        if(sendflags & 4)
        {
index 695d1101952e9d3f531aceef9c073324322b1669..1197c261346eae99235f85e5c33580a0f5835f04 100644 (file)
@@ -1151,20 +1151,20 @@ void Monster_Frozen_Think(entity this)
 {
        if(STAT(FROZEN, this) == 2)
        {
-               this.revive_progress = bound(0, this.revive_progress + this.ticrate * this.revive_speed, 1);
-               this.health = max(1, this.revive_progress * this.max_health);
-               this.iceblock.alpha = bound(0.2, 1 - this.revive_progress, 1);
+               STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) + this.ticrate * this.revive_speed, 1);
+               this.health = max(1, STAT(REVIVE_PROGRESS, this) * this.max_health);
+               this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
 
                if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
                        WaypointSprite_UpdateHealth(this.sprite, this.health);
 
-               if(this.revive_progress >= 1)
+               if(STAT(REVIVE_PROGRESS, this) >= 1)
                        Unfreeze(this);
        }
        else if(STAT(FROZEN, this) == 3)
        {
-               this.revive_progress = bound(0, this.revive_progress - this.ticrate * this.revive_speed, 1);
-               this.health = max(0, autocvar_g_nades_ice_health + (this.max_health-autocvar_g_nades_ice_health) * this.revive_progress );
+               STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) - this.ticrate * this.revive_speed, 1);
+               this.health = max(0, autocvar_g_nades_ice_health + (this.max_health-autocvar_g_nades_ice_health) * STAT(REVIVE_PROGRESS, this) );
 
                if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
                        WaypointSprite_UpdateHealth(this.sprite, this.health);
@@ -1177,7 +1177,7 @@ void Monster_Frozen_Think(entity this)
                                this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, DMG_NOWEP, this.origin, '0 0 0');
                }
 
-               else if ( this.revive_progress <= 0 )
+               else if ( STAT(REVIVE_PROGRESS, this) <= 0 )
                        Unfreeze(this);
        }
        // otherwise, no revival!
index 963cf00157404226132bf16e3624951bf5937580..d6cf1ca82e0fa4a4b77b86efe26e77ffdbfebb5a 100644 (file)
@@ -43,11 +43,10 @@ STATIC_INIT(REGISTER_BUFFS) {
 }
 
 #ifdef SVQC
-       // .int buffs = _STAT(BUFFS);
        void buff_Init(entity ent);
        void buff_Init_Compat(entity ent, entity replacement);
        #define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
-               this.buffs = b.m_itemid; \
+               STAT(BUFFS, this) = b.m_itemid; \
                this.team = t; \
                buff_Init(this); \
        }
index 0122502f48f1f358bfa8ccfde9e1f86e6ea3456a..937f4cbde4ba00c19395d58c45dd7e6add6aba03 100644 (file)
@@ -3,7 +3,6 @@
 #include <common/triggers/target/music.qh>
 #include <common/gamemodes/_mod.qh>
 
-.float buff_time = _STAT(BUFF_TIME);
 void buffs_DelayedInit(entity this);
 
 AUTOCVAR(g_buffs, int, -1, "Enable buffs, -1: enabled but no auto location or replacing powerups, 1: enabled and can replace them");
@@ -83,9 +82,9 @@ bool buff_Waypoint_visible_for_player(entity this, entity player, entity view)
        if(!this.owner.buff_active && !this.owner.buff_activetime)
                return false;
 
-       if (view.buffs)
+       if (STAT(BUFFS, view))
        {
-               return CS(view).cvar_cl_buffs_autoreplace == false || view.buffs != this.owner.buffs;
+               return CS(view).cvar_cl_buffs_autoreplace == false || STAT(BUFFS, view) != STAT(BUFFS, this.owner);
        }
 
        return WaypointSprite_visible_for_player(this, player, view);
@@ -93,7 +92,7 @@ bool buff_Waypoint_visible_for_player(entity this, entity player, entity view)
 
 void buff_Waypoint_Spawn(entity e)
 {
-       entity buff = buff_FirstFromFlags(e.buffs);
+       entity buff = buff_FirstFromFlags(STAT(BUFFS, e));
        entity wp = WaypointSprite_Spawn(WP_Buff, 0, autocvar_g_buffs_waypoint_distance, e, '0 0 1' * e.maxs.z, NULL, e.team, e, buff_waypoint, true, RADARICON_Buff);
        wp.wp_extra = buff.m_id;
        WaypointSprite_UpdateTeamRadar(e.buff_waypoint, RADARICON_Buff, e.glowmod);
@@ -177,15 +176,15 @@ void buff_Touch(entity this, entity toucher)
                return;
        }
 
-       if (toucher.buffs)
+       if (STAT(BUFFS, toucher))
        {
-               if (CS(toucher).cvar_cl_buffs_autoreplace && toucher.buffs != this.buffs)
+               if (CS(toucher).cvar_cl_buffs_autoreplace && STAT(BUFFS, toucher) != STAT(BUFFS, this))
                {
-                       int buffid = buff_FirstFromFlags(toucher.buffs).m_id;
-                       //Send_Notification(NOTIF_ONE, toucher, MSG_MULTI, ITEM_BUFF_DROP, toucher.buffs);
+                       int buffid = buff_FirstFromFlags(STAT(BUFFS, toucher)).m_id;
+                       //Send_Notification(NOTIF_ONE, toucher, MSG_MULTI, ITEM_BUFF_DROP, STAT(BUFFS, toucher));
                        Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_ITEM_BUFF_LOST, toucher.netname, buffid);
 
-                       toucher.buffs = 0;
+                       STAT(BUFFS, toucher) = 0;
                        //sound(toucher, CH_TRIGGER, SND_BUFF_LOST, VOL_BASE, ATTN_NORM);
                }
                else { return; } // do nothing
@@ -194,13 +193,13 @@ void buff_Touch(entity this, entity toucher)
        this.owner = toucher;
        this.buff_active = false;
        this.lifetime = 0;
-       int buffid = buff_FirstFromFlags(this.buffs).m_id;
+       int buffid = buff_FirstFromFlags(STAT(BUFFS, this)).m_id;
        Send_Notification(NOTIF_ONE, toucher, MSG_MULTI, ITEM_BUFF_GOT, buffid);
        Send_Notification(NOTIF_ALL_EXCEPT, toucher, MSG_INFO, INFO_ITEM_BUFF, toucher.netname, buffid);
 
        Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
        sound(toucher, CH_TRIGGER, SND_SHIELD_RESPAWN, VOL_BASE, ATTN_NORM);
-       toucher.buffs |= (this.buffs);
+       STAT(BUFFS, toucher) |= (STAT(BUFFS, this));
 }
 
 float buff_Available(entity buff)
@@ -226,14 +225,14 @@ void buff_NewType(entity ent)
        });
        entity newbuff = RandomSelection_chosen_ent;
        newbuff.buff_seencount += 1; // lower chances of seeing this buff again soon
-       ent.buffs = newbuff.m_itemid;
+       STAT(BUFFS, ent) = newbuff.m_itemid;
 }
 
 void buff_Think(entity this)
 {
-       if(this.buffs != this.oldbuffs)
+       if(STAT(BUFFS, this) != this.oldbuffs)
        {
-               entity buff = buff_FirstFromFlags(this.buffs);
+               entity buff = buff_FirstFromFlags(STAT(BUFFS, this));
                this.color = buff.m_color;
                this.glowmod = buff_GlowColor(buff);
                this.skin = buff.m_skin;
@@ -250,7 +249,7 @@ void buff_Think(entity this)
                                WaypointSprite_UpdateBuildFinished(this.buff_waypoint, time + this.buff_activetime - frametime);
                }
 
-               this.oldbuffs = this.buffs;
+               this.oldbuffs = STAT(BUFFS, this);
        }
 
        if(!game_stopped)
@@ -262,7 +261,7 @@ void buff_Think(entity this)
        }
 
        if(!this.buff_active && !this.buff_activetime)
-       if(!this.owner || STAT(FROZEN, this.owner) || IS_DEAD(this.owner) || !this.owner.iscreature || this.owner.vehicle || !(this.owner.buffs & this.buffs) || this.pickup_anyway > 0 || (this.pickup_anyway >= 0 && autocvar_g_buffs_pickup_anyway))
+       if(!this.owner || STAT(FROZEN, this.owner) || IS_DEAD(this.owner) || !this.owner.iscreature || this.owner.vehicle || !(STAT(BUFFS, this.owner) & STAT(BUFFS, this)) || this.pickup_anyway > 0 || (this.pickup_anyway >= 0 && autocvar_g_buffs_pickup_anyway))
        {
                buff_SetCooldown(this, autocvar_g_buffs_cooldown_respawn + frametime);
                this.owner = NULL;
@@ -346,9 +345,9 @@ void buff_Init(entity this)
 
        if(!teamplay && this.team) { this.team = 0; }
 
-       entity buff = buff_FirstFromFlags(this.buffs);
+       entity buff = buff_FirstFromFlags(STAT(BUFFS, this));
 
-       if(!this.buffs || !buff_Available(buff))
+       if(!STAT(BUFFS, this) || !buff_Available(buff))
                buff_NewType(this);
 
        this.classname = "item_buff";
@@ -396,7 +395,7 @@ void buff_Init_Compat(entity ent, entity replacement)
        else if (ent.spawnflags & 4)
                ent.team = NUM_TEAM_2;
 
-       ent.buffs = replacement.m_itemid;
+       STAT(BUFFS, ent) = replacement.m_itemid;
 
        buff_Init(ent);
 }
@@ -454,28 +453,28 @@ MUTATOR_HOOKFUNCTION(buffs, Damage_Calculate)
 
        if(frag_deathtype == DEATH_BUFF.m_id) { return; }
 
-       if(frag_target.buffs & BUFF_RESISTANCE.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_RESISTANCE.m_itemid)
        {
                float reduced = frag_damage * autocvar_g_buffs_resistance_blockpercent;
                frag_damage = bound(0, frag_damage - reduced, frag_damage);
        }
 
-       if(frag_target.buffs & BUFF_SPEED.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_SPEED.m_itemid)
        if(frag_target != frag_attacker)
                frag_damage *= autocvar_g_buffs_speed_damage_take;
 
-       if(frag_target.buffs & BUFF_MEDIC.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_MEDIC.m_itemid)
        if((GetResourceAmount(frag_target, RESOURCE_HEALTH) - frag_damage) <= 0)
        if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
        if(frag_attacker)
        if(random() <= autocvar_g_buffs_medic_survive_chance)
                frag_damage = max(5, GetResourceAmount(frag_target, RESOURCE_HEALTH) - autocvar_g_buffs_medic_survive_health);
 
-       if(frag_target.buffs & BUFF_JUMP.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_JUMP.m_itemid)
        if(frag_deathtype == DEATH_FALL.m_id)
                frag_damage = 0;
 
-       if(frag_target.buffs & BUFF_VENGEANCE.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_VENGEANCE.m_itemid)
        if(frag_attacker)
        if(frag_attacker != frag_target)
        if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
@@ -489,22 +488,22 @@ MUTATOR_HOOKFUNCTION(buffs, Damage_Calculate)
                dmgent.nextthink = time + 0.1;
        }
 
-       if(frag_target.buffs & BUFF_BASH.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_BASH.m_itemid)
        if(frag_attacker != frag_target)
                frag_force = '0 0 0';
 
-       if(frag_attacker.buffs & BUFF_BASH.m_itemid)
+       if(STAT(BUFFS, frag_attacker) & BUFF_BASH.m_itemid)
        if(frag_force)
        if(frag_attacker == frag_target)
                frag_force *= autocvar_g_buffs_bash_force_self;
        else
                frag_force *= autocvar_g_buffs_bash_force;
 
-       if(frag_attacker.buffs & BUFF_DISABILITY.m_itemid)
+       if(STAT(BUFFS, frag_attacker) & BUFF_DISABILITY.m_itemid)
        if(frag_target != frag_attacker)
                frag_target.buff_disability_time = time + autocvar_g_buffs_disability_slowtime;
 
-       if(frag_target.buffs & BUFF_INFERNO.m_itemid)
+       if(STAT(BUFFS, frag_target) & BUFF_INFERNO.m_itemid)
        {
                if(frag_deathtype == DEATH_FIRE.m_id)
                        frag_damage = 0;
@@ -512,13 +511,13 @@ MUTATOR_HOOKFUNCTION(buffs, Damage_Calculate)
                        frag_damage *= 0.5; // TODO: cvarize?
        }
 
-       if(frag_attacker.buffs & BUFF_LUCK.m_itemid)
+       if(STAT(BUFFS, frag_attacker) & BUFF_LUCK.m_itemid)
        if(frag_attacker != frag_target)
        if(autocvar_g_buffs_luck_damagemultiplier > 0)
        if(random() <= autocvar_g_buffs_luck_chance)
                frag_damage *= autocvar_g_buffs_luck_damagemultiplier;
 
-       if(frag_attacker.buffs & BUFF_INFERNO.m_itemid)
+       if(STAT(BUFFS, frag_attacker) & BUFF_INFERNO.m_itemid)
        if(frag_target != frag_attacker) {
                float btime = buff_Inferno_CalculateTime(
                        frag_damage,
@@ -532,7 +531,7 @@ MUTATOR_HOOKFUNCTION(buffs, Damage_Calculate)
        }
 
        // this... is ridiculous (TODO: fix!)
-       if(frag_attacker.buffs & BUFF_VAMPIRE.m_itemid)
+       if(STAT(BUFFS, frag_attacker) & BUFF_VAMPIRE.m_itemid)
        if(!frag_target.vehicle)
        if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
        if(!IS_DEAD(frag_target))
@@ -561,8 +560,8 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerSpawn)
 {
        entity player = M_ARGV(0, entity);
 
-       player.buffs = 0;
-       player.buff_time = 0;
+       STAT(BUFFS, player) = 0;
+       STAT(BUFF_TIME, player) = 0;
        PS(player).buff_shield = time + 0.5; // prevent picking up buffs immediately
        // reset timers here to prevent them continuing after re-spawn
        player.buff_disability_time = 0;
@@ -574,7 +573,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPhysics_UpdateStats)
        entity player = M_ARGV(0, entity);
        // these automatically reset, no need to worry
 
-       if(player.buffs & BUFF_SPEED.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
                STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_buffs_speed_speed;
 
        if(time < player.buff_disability_time)
@@ -586,7 +585,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPhysics)
        entity player = M_ARGV(0, entity);
        // these automatically reset, no need to worry
 
-       if(player.buffs & BUFF_JUMP.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_JUMP.m_itemid)
                STAT(MOVEVARS_JUMPVELOCITY, player) = autocvar_g_buffs_jump_height;
 }
 
@@ -605,11 +604,11 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDies)
 {
        entity frag_target = M_ARGV(2, entity);
 
-       if(frag_target.buffs)
+       if(STAT(BUFFS, frag_target))
        {
-               int buffid = buff_FirstFromFlags(frag_target.buffs).m_id;
+               int buffid = buff_FirstFromFlags(STAT(BUFFS, frag_target)).m_id;
                Send_Notification(NOTIF_ALL_EXCEPT, frag_target, MSG_INFO, INFO_ITEM_BUFF_LOST, frag_target.netname, buffid);
-               frag_target.buffs = 0;
+               STAT(BUFFS, frag_target) = 0;
 
                if(frag_target.buff_model)
                {
@@ -625,15 +624,15 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerUseKey, CBC_ORDER_FIRST)
 
        entity player = M_ARGV(0, entity);
 
-       if(player.buffs)
+       if(STAT(BUFFS, player))
        {
-               int buffid = buff_FirstFromFlags(player.buffs).m_id;
+               int buffid = buff_FirstFromFlags(STAT(BUFFS, player)).m_id;
                Send_Notification(NOTIF_ONE, player, MSG_MULTI, ITEM_BUFF_DROP, buffid);
                Send_Notification(NOTIF_ALL_EXCEPT, player, MSG_INFO, INFO_ITEM_BUFF_LOST, player.netname, buffid);
 
-               player.buffs = 0;
+               STAT(BUFFS, player) = 0;
                PS(player).buff_shield = time + max(0, autocvar_g_buffs_pickup_delay);
-               //player.buff_time = 0; // already notified
+               //STAT(BUFF_TIME, player) = 0; // already notified
                sound(player, CH_TRIGGER, SND_BUFF_LOST, VOL_BASE, ATTN_NORM);
                return true;
        }
@@ -644,7 +643,7 @@ MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
        if(MUTATOR_RETURNVALUE || game_stopped) return;
        entity player = M_ARGV(0, entity);
 
-       if(player.buffs & BUFF_SWAPPER.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_SWAPPER.m_itemid)
        {
                float best_distance = autocvar_g_buffs_swapper_range;
                entity closest = NULL;
@@ -702,7 +701,7 @@ MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
                        sound(closest, CH_TRIGGER, SND_KA_RESPAWN, VOL_BASE, ATTEN_NORM);
 
                        // TODO: add a counter to handle how many times one can teleport, and a delay to prevent spam
-                       player.buffs = 0;
+                       STAT(BUFFS, player) = 0;
                        return true;
                }
        }
@@ -734,7 +733,7 @@ MUTATOR_HOOKFUNCTION(buffs, CustomizeWaypoint)
 
        // if you have the invisibility powerup, sprites ALWAYS are restricted to your team
        // but only apply this to real players, not to spectators
-       if((wp.owner.flags & FL_CLIENT) && (wp.owner.buffs & BUFF_INVISIBLE.m_itemid) && (e == player))
+       if((wp.owner.flags & FL_CLIENT) && (STAT(BUFFS, wp.owner) & BUFF_INVISIBLE.m_itemid) && (e == player))
        if(DIFF_TEAM(wp.owner, e))
                return true;
 }
@@ -767,7 +766,7 @@ MUTATOR_HOOKFUNCTION(buffs, WeaponRateFactor)
 {
        entity player = M_ARGV(1, entity);
 
-       if(player.buffs & BUFF_SPEED.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
                M_ARGV(0, float) *= autocvar_g_buffs_speed_rate;
 
        if(time < player.buff_disability_time)
@@ -778,7 +777,7 @@ MUTATOR_HOOKFUNCTION(buffs, WeaponSpeedFactor)
 {
        entity player = M_ARGV(1, entity);
 
-       if(player.buffs & BUFF_SPEED.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
                M_ARGV(0, float) *= autocvar_g_buffs_speed_weaponspeed;
 
        if(time < player.buff_disability_time)
@@ -793,7 +792,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
 
        if(game_stopped || IS_DEAD(player) || frametime || !IS_PLAYER(player)) return;
 
-       if(player.buffs & BUFF_FLIGHT.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_FLIGHT.m_itemid)
        {
                if(!PHYS_INPUT_BUTTON_CROUCH(player))
                        player.buff_flight_crouchheld = false;
@@ -816,10 +815,10 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
        // 2: notify carrier as well
        int buff_lost = 0;
 
-       if(player.buff_time && player.buffs)
-       if(time >= player.buff_time)
+       if(STAT(BUFF_TIME, player) && STAT(BUFFS, player))
+       if(time >= STAT(BUFF_TIME, player))
        {
-               player.buff_time = 0;
+               STAT(BUFF_TIME, player) = 0;
                buff_lost = 2;
        }
 
@@ -827,9 +826,9 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
 
        if(buff_lost)
        {
-               if(player.buffs)
+               if(STAT(BUFFS, player))
                {
-                       int buffid = buff_FirstFromFlags(player.buffs).m_id;
+                       int buffid = buff_FirstFromFlags(STAT(BUFFS, player)).m_id;
                        if(buff_lost == 2)
                        {
                                Send_Notification(NOTIF_ONE, player, MSG_MULTI, ITEM_BUFF_DROP, buffid); // TODO: special timeout message?
@@ -837,17 +836,17 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
                        }
                        else
                                Send_Notification(NOTIF_ALL_EXCEPT, player, MSG_INFO, INFO_ITEM_BUFF_LOST, player.netname, buffid);
-                       player.buffs = 0;
+                       STAT(BUFFS, player) = 0;
                        PS(player).buff_shield = time + max(0, autocvar_g_buffs_pickup_delay); // always put in a delay, even if small
                }
        }
 
-       if(player.buffs & BUFF_MAGNET.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_MAGNET.m_itemid)
        {
                vector pickup_size;
                IL_EACH(g_items, it.itemdef,
                {
-                       if(it.buffs)
+                       if(STAT(BUFFS, it))
                                pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_buff;
                        else
                                pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_item;
@@ -860,7 +859,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
                });
        }
 
-       if(player.buffs & BUFF_AMMO.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
        {
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
@@ -870,31 +869,31 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
                }
        }
 
-       if((player.buffs & BUFF_INVISIBLE.m_itemid) && (player.oldbuffs & BUFF_INVISIBLE.m_itemid))
+       if((STAT(BUFFS, player) & BUFF_INVISIBLE.m_itemid) && (player.oldbuffs & BUFF_INVISIBLE.m_itemid))
                player.alpha = ((autocvar_g_buffs_invisible_alpha) ? autocvar_g_buffs_invisible_alpha : -1); // powerups reset alpha, so we must enforce this (TODO)
 
-       if(player.buffs & BUFF_MEDIC.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_MEDIC.m_itemid)
        if(time >= player.buff_medic_healtime)
        {
                buff_Medic_Heal(player);
                player.buff_medic_healtime = time + autocvar_g_buffs_medic_heal_delay;
        }
 
-#define BUFF_ONADD(b) if ( (player.buffs & (b).m_itemid) && !(player.oldbuffs & (b).m_itemid))
-#define BUFF_ONREM(b) if (!(player.buffs & (b).m_itemid) &&  (player.oldbuffs & (b).m_itemid))
+#define BUFF_ONADD(b) if ( (STAT(BUFFS, player) & (b).m_itemid) && !(player.oldbuffs & (b).m_itemid))
+#define BUFF_ONREM(b) if (!(STAT(BUFFS, player) & (b).m_itemid) &&  (player.oldbuffs & (b).m_itemid))
 
-       if(player.buffs != player.oldbuffs)
+       if(STAT(BUFFS, player) != player.oldbuffs)
        {
-               entity buff = buff_FirstFromFlags(player.buffs);
+               entity buff = buff_FirstFromFlags(STAT(BUFFS, player));
                float bufftime = buff != BUFF_Null ? buff.m_time(buff) : 0;
-               player.buff_time = (bufftime) ? time + bufftime : 0;
+               STAT(BUFF_TIME, player) = (bufftime) ? time + bufftime : 0;
 
                BUFF_ONADD(BUFF_AMMO)
                {
                        player.buff_ammo_prev_infitems = (player.items & IT_UNLIMITED_WEAPON_AMMO);
                        player.items |= IT_UNLIMITED_WEAPON_AMMO;
 
-                       if(player.buffs & BUFF_AMMO.m_itemid)
+                       if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
                        {
                                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                                {
@@ -914,7 +913,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
                        else
                                player.items &= ~IT_UNLIMITED_WEAPON_AMMO;
 
-                       if(player.buffs & BUFF_AMMO.m_itemid)
+                       if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
                        {
                                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                                {
@@ -952,8 +951,8 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
                BUFF_ONREM(BUFF_FLIGHT)
                        player.gravity = ((player.trigger_gravity_check) ? player.trigger_gravity_check.enemy.gravity : player.buff_flight_oldgravity);
 
-               player.oldbuffs = player.buffs;
-               if(player.buffs)
+               player.oldbuffs = STAT(BUFFS, player);
+               if(STAT(BUFFS, player))
                {
                        if(!player.buff_model)
                                buffs_BuffModel_Spawn(player);
@@ -992,22 +991,22 @@ MUTATOR_HOOKFUNCTION(buffs, SpectateCopy)
        entity spectatee = M_ARGV(0, entity);
        entity client = M_ARGV(1, entity);
 
-       client.buffs = spectatee.buffs;
-       client.buff_time = spectatee.buff_time;
+       STAT(BUFFS, client) = STAT(BUFFS, spectatee);
+       STAT(BUFF_TIME, client) = STAT(BUFF_TIME, spectatee);
 }
 
 MUTATOR_HOOKFUNCTION(buffs, PlayerRegen)
 {
        entity player = M_ARGV(0, entity);
 
-       if(player.buffs & BUFF_MEDIC.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_MEDIC.m_itemid)
        {
                M_ARGV(2, float) = autocvar_g_buffs_medic_rot; // rot_mod
                M_ARGV(4, float) = M_ARGV(1, float) = autocvar_g_buffs_medic_max; // limit_mod = max_mod
                M_ARGV(2, float) = autocvar_g_buffs_medic_regen; // regen_mod
        }
 
-       if(player.buffs & BUFF_SPEED.m_itemid)
+       if(STAT(BUFFS, player) & BUFF_SPEED.m_itemid)
                M_ARGV(2, float) = autocvar_g_buffs_speed_regen; // regen_mod
 }
 
index a3ddf4474df99fb1d5433588fd37f60fc1a3e95c..616a05da3c93e9c77294028f469ae9a1c649a9ce 100644 (file)
@@ -253,14 +253,13 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
        }
 }
 
-.float stat_sv_maxspeed;
-
-MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics_UpdateStats)
 {
        entity player = M_ARGV(0, entity);
+       // these automatically reset, no need to worry
 
        if(player.items & ITEM_Speed.m_itemid)
-               player.stat_sv_maxspeed = player.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed;
+               STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_instagib_speed_highspeed;
 }
 
 MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_SplitHealthArmor)
index 2b63a10e8ba0e0e984b46c05101e3241107e5757..d1acb8b4dcab85789958ae9a05cfe56a0e09d7ba 100644 (file)
@@ -170,7 +170,7 @@ void nade_timer_think(entity this)
 
 void nade_burn_spawn(entity _nade)
 {
-       CSQCProjectile(_nade, true, Nades_from(_nade.nade_type).m_projectile[true], true);
+       CSQCProjectile(_nade, true, Nades_from(STAT(NADE_BONUS_TYPE, _nade)).m_projectile[true], true);
 }
 
 void nade_spawn(entity _nade)
@@ -188,7 +188,7 @@ void nade_spawn(entity _nade)
 
        _nade.effects |= EF_LOWPRECISION;
 
-       CSQCProjectile(_nade, true, Nades_from(_nade.nade_type).m_projectile[false], true);
+       CSQCProjectile(_nade, true, Nades_from(STAT(NADE_BONUS_TYPE, _nade)).m_projectile[false], true);
 }
 
 void napalm_damage(entity this, float dist, float damage, float edgedamage, float burntime)
@@ -645,8 +645,8 @@ void nade_heal_touch(entity this, entity toucher)
        if ( IS_REAL_CLIENT(toucher) || IS_VEHICLE(toucher) )
        {
                entity show_red = (IS_VEHICLE(toucher)) ? toucher.owner : toucher;
-               show_red.stat_healing_orb = time+0.1;
-               show_red.stat_healing_orb_alpha = 0.75 * (this.ltime - time) / this.orb_lifetime;
+               STAT(HEALING_ORB, show_red) = time+0.1;
+               STAT(HEALING_ORB_ALPHA, show_red) = 0.75 * (this.ltime - time) / this.orb_lifetime;
        }
 }
 
@@ -672,7 +672,7 @@ void nade_boom(entity this)
        entity expef = NULL;
        bool nade_blast = true;
 
-       switch ( Nades_from(this.nade_type) )
+       switch ( Nades_from(STAT(NADE_BONUS_TYPE, this)) )
        {
                case NADE_TYPE_NAPALM:
                        nade_blast = autocvar_g_nades_napalm_blast;
@@ -729,7 +729,7 @@ void nade_boom(entity this)
        }
 
        if(this.takedamage)
-       switch ( Nades_from(this.nade_type) )
+       switch ( Nades_from(STAT(NADE_BONUS_TYPE, this)) )
        {
                case NADE_TYPE_NAPALM: nade_napalm_boom(this); break;
                case NADE_TYPE_ICE: nade_ice_boom(this); break;
@@ -751,11 +751,11 @@ void nade_boom(entity this)
 void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, string pntype);
 void nade_pickup(entity this, entity thenade)
 {
-       spawn_held_nade(this, thenade.realowner, autocvar_g_nades_pickup_time, thenade.nade_type, thenade.pokenade_type);
+       spawn_held_nade(this, thenade.realowner, autocvar_g_nades_pickup_time, STAT(NADE_BONUS_TYPE, thenade), thenade.pokenade_type);
 
        // set refire so player can't even
        this.nade_refire = time + autocvar_g_nades_nade_refire;
-       this.nade_timer = 0;
+       STAT(NADE_TIMER, this) = 0;
 
        if(this.nade)
                this.nade.nade_time_primed = thenade.nade_time_primed;
@@ -826,7 +826,7 @@ void nade_damage(entity this, entity inflictor, entity attacker, float damage, i
                return;
        }
 
-       if(this.nade_type == NADE_TYPE_TRANSLOCATE.m_id || this.nade_type == NADE_TYPE_SPAWN.m_id)
+       if(STAT(NADE_BONUS_TYPE, this) == NADE_TYPE_TRANSLOCATE.m_id || STAT(NADE_BONUS_TYPE, this) == NADE_TYPE_SPAWN.m_id)
                return;
 
        if (MUTATOR_CALLHOOK(Nade_Damage, this, DEATH_WEAPONOF(deathtype), force, damage)) {}
@@ -876,7 +876,7 @@ void nade_damage(entity this, entity inflictor, entity attacker, float damage, i
        SetResourceAmount(this, RESOURCE_HEALTH, hp);
 
 
-       if ( this.nade_type != NADE_TYPE_HEAL.m_id || IS_PLAYER(attacker) )
+       if ( STAT(NADE_BONUS_TYPE, this) != NADE_TYPE_HEAL.m_id || IS_PLAYER(attacker) )
                this.realowner = attacker;
 
        if(hp <= 0)
@@ -954,9 +954,9 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time)
        IL_PUSH(g_bot_dodge, _nade);
        _nade.projectiledeathtype = DEATH_NADE.m_id;
        _nade.toss_time = time;
-       _nade.solid = SOLID_CORPSE; //((_nade.nade_type == NADE_TYPE_TRANSLOCATE) ? SOLID_CORPSE : SOLID_BBOX);
+       _nade.solid = SOLID_CORPSE; //((STAT(NADE_BONUS_TYPE, _nade) == NADE_TYPE_TRANSLOCATE) ? SOLID_CORPSE : SOLID_BBOX);
 
-       if(_nade.nade_type == NADE_TYPE_TRANSLOCATE.m_id || _nade.nade_type == NADE_TYPE_SPAWN.m_id)
+       if(STAT(NADE_BONUS_TYPE, _nade) == NADE_TYPE_TRANSLOCATE.m_id || STAT(NADE_BONUS_TYPE, _nade) == NADE_TYPE_SPAWN.m_id)
                _nade.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        else
                _nade.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
@@ -970,7 +970,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time)
        }
 
        e.nade_refire = time + autocvar_g_nades_nade_refire;
-       e.nade_timer = 0;
+       STAT(NADE_TIMER, e) = 0;
 }
 
 void nades_GiveBonus(entity player, float score)
@@ -978,19 +978,19 @@ void nades_GiveBonus(entity player, float score)
        if (autocvar_g_nades)
        if (autocvar_g_nades_bonus)
        if (IS_REAL_CLIENT(player))
-       if (IS_PLAYER(player) && player.bonus_nades < autocvar_g_nades_bonus_max)
+       if (IS_PLAYER(player) && STAT(NADE_BONUS, player) < autocvar_g_nades_bonus_max)
        if (STAT(FROZEN, player) == 0)
        if (!IS_DEAD(player))
        {
-               if ( player.bonus_nade_score < 1 )
-                       player.bonus_nade_score += score/autocvar_g_nades_bonus_score_max;
+               if ( STAT(NADE_BONUS_SCORE, player) < 1 )
+                       STAT(NADE_BONUS_SCORE, player) += score/autocvar_g_nades_bonus_score_max;
 
-               if ( player.bonus_nade_score >= 1 )
+               if ( STAT(NADE_BONUS_SCORE, player) >= 1 )
                {
                        Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_NADE_BONUS);
                        play2(player, SND(KH_ALARM));
-                       player.bonus_nades++;
-                       player.bonus_nade_score -= 1;
+                       STAT(NADE_BONUS, player)++;
+                       STAT(NADE_BONUS_SCORE, player) -= 1;
                }
        }
 }
@@ -998,7 +998,7 @@ void nades_GiveBonus(entity player, float score)
 /** Remove all bonus nades from a player */
 void nades_RemoveBonus(entity player)
 {
-       player.bonus_nades = player.bonus_nade_score = 0;
+       STAT(NADE_BONUS, player) = STAT(NADE_BONUS_SCORE, player) = 0;
 }
 
 MUTATOR_HOOKFUNCTION(nades, PutClientInServer)
@@ -1023,7 +1023,7 @@ bool nade_customize(entity this, entity client)
        {
                //this.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
                if(!this.traileffectnum)
-                       this.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(this.nade_type).m_projectile[false], this.team).eent_eff_name);
+                       this.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(STAT(NADE_BONUS_TYPE, this)).m_projectile[false], this.team).eent_eff_name);
                this.alpha = 1;
        }
 
@@ -1034,11 +1034,11 @@ void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, strin
 {
        entity n = new(nade), fn = new(fake_nade);
 
-       n.nade_type = max(1, ntype);
+       STAT(NADE_BONUS_TYPE, n) = max(1, ntype);
        n.pokenade_type = pntype;
 
-       if(Nades_from(n.nade_type) == NADE_TYPE_Null)
-               n.nade_type = NADE_TYPE_NORMAL.m_id;
+       if(Nades_from(STAT(NADE_BONUS_TYPE, n)) == NADE_TYPE_Null)
+               STAT(NADE_BONUS_TYPE, n) = NADE_TYPE_NORMAL.m_id;
 
        .entity weaponentity = weaponentities[0]; // TODO: unhardcode
 
@@ -1046,8 +1046,8 @@ void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, strin
        //setattachment(n, player, "bip01 l hand");
        n.exteriormodeltoclient = player;
        setcefc(n, nade_customize);
-       n.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(n.nade_type).m_projectile[false], player.team).eent_eff_name);
-       n.colormod = Nades_from(n.nade_type).m_color;
+       n.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(STAT(NADE_BONUS_TYPE, n)).m_projectile[false], player.team).eent_eff_name);
+       n.colormod = Nades_from(STAT(NADE_BONUS_TYPE, n)).m_color;
        n.realowner = nowner;
        n.colormap = player.colormap;
        n.glowmod = player.glowmod;
@@ -1062,7 +1062,7 @@ void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, strin
        setmodel(fn, MDL_NADE_VIEW);
        setattachment(fn, player.(weaponentity), "");
        fn.realowner = fn.owner = player;
-       fn.colormod = Nades_from(n.nade_type).m_color;
+       fn.colormod = Nades_from(STAT(NADE_BONUS_TYPE, n)).m_color;
        fn.colormap = player.colormap;
        fn.glowmod = player.glowmod;
        setthink(fn, SUB_Remove);
@@ -1076,7 +1076,7 @@ void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, strin
 void nade_prime(entity this)
 {
        if(autocvar_g_nades_bonus_only)
-       if(!this.bonus_nades)
+       if(!STAT(NADE_BONUS, this))
                return; // only allow bonus nades
 
        if(this.nade)
@@ -1088,13 +1088,13 @@ void nade_prime(entity this)
        int ntype;
        string pntype = this.pokenade_type;
 
-       if(this.items & ITEM_Strength.m_itemid && autocvar_g_nades_bonus_onstrength)
-               ntype = this.nade_type;
-       else if (this.bonus_nades >= 1)
+       if((this.items & ITEM_Strength.m_itemid) && autocvar_g_nades_bonus_onstrength)
+               ntype = STAT(NADE_BONUS_TYPE, this);
+       else if (STAT(NADE_BONUS, this) >= 1)
        {
-               ntype = this.nade_type;
+               ntype = STAT(NADE_BONUS_TYPE, this);
                pntype = this.pokenade_type;
-               this.bonus_nades -= 1;
+               STAT(NADE_BONUS, this) -= 1;
        }
        else
        {
@@ -1166,7 +1166,7 @@ void nades_Clear(entity player)
                delete(player.fake_nade);
 
        player.nade = player.fake_nade = NULL;
-       player.nade_timer = 0;
+       STAT(NADE_TIMER, player) = 0;
 }
 
 MUTATOR_HOOKFUNCTION(nades, VehicleEnter)
@@ -1225,8 +1225,8 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
        entity held_nade = player.nade;
        if (held_nade)
        {
-               player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / held_nade.nade_lifetime, 1);
-               // LOG_TRACEF("%d %d", player.nade_timer, time - held_nade.nade_time_primed);
+               STAT(NADE_TIMER, player) = bound(0, (time - held_nade.nade_time_primed) / held_nade.nade_lifetime, 1);
+               // LOG_TRACEF("%d %d", STAT(NADE_TIMER, player), time - held_nade.nade_time_primed);
                makevectors(player.angles);
                held_nade.velocity = player.velocity;
                setorigin(held_nade, player.origin + player.view_ofs + v_forward * 8 + v_right * -8 + v_up * 0);
@@ -1255,23 +1255,23 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
 
                        if(autocvar_g_nades_bonus_client_select)
                        {
-                               player.nade_type = CS(player).cvar_cl_nade_type;
+                               STAT(NADE_BONUS_TYPE, player) = CS(player).cvar_cl_nade_type;
                                player.pokenade_type = CS(player).cvar_cl_pokenade_type;
                        }
                        else
                        {
-                               player.nade_type = autocvar_g_nades_bonus_type;
+                               STAT(NADE_BONUS_TYPE, player) = autocvar_g_nades_bonus_type;
                                player.pokenade_type = autocvar_g_nades_pokenade_monster_type;
                        }
 
-                       player.nade_type = bound(1, player.nade_type, Nades_COUNT);
+                       STAT(NADE_BONUS_TYPE, player) = bound(1, STAT(NADE_BONUS_TYPE, player), Nades_COUNT);
 
-                       if(player.bonus_nade_score >= 0 && autocvar_g_nades_bonus_score_max)
+                       if(STAT(NADE_BONUS_SCORE, player) >= 0 && autocvar_g_nades_bonus_score_max)
                                nades_GiveBonus(player, time_score / autocvar_g_nades_bonus_score_max);
                }
                else
                {
-                       player.bonus_nades = player.bonus_nade_score = 0;
+                       STAT(NADE_BONUS, player) = STAT(NADE_BONUS_SCORE, player) = 0;
                }
        }
 
@@ -1297,10 +1297,10 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
 
        if(n > 0 && STAT(FROZEN, player) == 3) // OK, there is at least one teammate reviving us
        {
-               player.revive_progress = bound(0, player.revive_progress + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
-               SetResourceAmount(player, RESOURCE_HEALTH, max(1, player.revive_progress * start_health));
+               STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
+               SetResourceAmount(player, RESOURCE_HEALTH, max(1, STAT(REVIVE_PROGRESS, player) * start_health));
 
-               if(player.revive_progress >= 1)
+               if(STAT(REVIVE_PROGRESS, player) >= 1)
                {
                        Unfreeze(player);
 
@@ -1309,21 +1309,19 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
                }
 
                FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, {
-                       it.revive_progress = player.revive_progress;
+                       STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
                        it.reviving = false;
                });
        }
 }
 
-MUTATOR_HOOKFUNCTION(nades, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(nades, PlayerPhysics_UpdateStats)
 {
        entity player = M_ARGV(0, entity);
+       // these automatically reset, no need to worry
 
-       if (STAT(ENTRAP_ORB, player) > time)
-       {
-               player.stat_sv_maxspeed *= autocvar_g_nades_entrap_speed;
-               player.stat_sv_airspeedlimit_nonqw *= autocvar_g_nades_entrap_speed;
-       }
+       if(STAT(ENTRAP_ORB, player) > time)
+               STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_nades_entrap_speed;
 }
 
 MUTATOR_HOOKFUNCTION(nades, MonsterMove)
@@ -1347,9 +1345,9 @@ MUTATOR_HOOKFUNCTION(nades, PlayerSpawn)
                player.nade_refire  = time + autocvar_g_nades_nade_refire;
 
        if(autocvar_g_nades_bonus_client_select)
-               player.nade_type = CS(player).cvar_cl_nade_type;
+               STAT(NADE_BONUS_TYPE, player) = CS(player).cvar_cl_nade_type;
 
-       player.nade_timer = 0;
+       STAT(NADE_TIMER, player) = 0;
 
        if (!player.offhand) player.offhand = OFFHAND_NADE;
 
@@ -1464,13 +1462,13 @@ MUTATOR_HOOKFUNCTION(nades, SpectateCopy)
        entity spectatee = M_ARGV(0, entity);
        entity client = M_ARGV(1, entity);
 
-       client.nade_timer = spectatee.nade_timer;
-       client.nade_type = spectatee.nade_type;
+       STAT(NADE_TIMER, client) = STAT(NADE_TIMER, spectatee);
+       STAT(NADE_BONUS_TYPE, client) = STAT(NADE_BONUS_TYPE, spectatee);
        client.pokenade_type = spectatee.pokenade_type;
-       client.bonus_nades = spectatee.bonus_nades;
-       client.bonus_nade_score = spectatee.bonus_nade_score;
-       client.stat_healing_orb = spectatee.stat_healing_orb;
-       client.stat_healing_orb_alpha = spectatee.stat_healing_orb_alpha;
+       STAT(NADE_BONUS, client) = STAT(NADE_BONUS, spectatee);
+       STAT(NADE_BONUS_SCORE, client) = STAT(NADE_BONUS_SCORE, spectatee);
+       STAT(HEALING_ORB, client) = STAT(HEALING_ORB, spectatee);
+       STAT(HEALING_ORB_ALPHA, client) = STAT(HEALING_ORB_ALPHA, spectatee);
        STAT(ENTRAP_ORB, client) = STAT(ENTRAP_ORB, spectatee);
        STAT(ENTRAP_ORB_ALPHA, client) = STAT(ENTRAP_ORB_ALPHA, spectatee);
 }
index 3618fd4181c0a4854704905e0e29a7b54ac971fb..c5a1967e0b53ffa14bd4e0e756070cf7fb584802 100644 (file)
@@ -64,19 +64,13 @@ Nade Nade_FromProjectile(int proj)
 
 .entity nade;
 .entity fake_nade;
-.float nade_timer = _STAT(NADE_TIMER);
 .float nade_refire;
-.float bonus_nades = _STAT(NADE_BONUS);
 .float nade_special_time;
-.float bonus_nade_score = _STAT(NADE_BONUS_SCORE);
-.int nade_type = _STAT(NADE_BONUS_TYPE);
 .string pokenade_type;
 .entity nade_damage_target;
 .float cvar_cl_nade_type;
 .string cvar_cl_pokenade_type;
 .float toss_time;
-.float stat_healing_orb = _STAT(HEALING_ORB);
-.float stat_healing_orb_alpha = _STAT(HEALING_ORB_ALPHA);
 .float nade_show_particles;
 
 bool orb_send(entity this, entity to, int sf);
index 498d878d2d272341bd2ba9b04fd8908393a5e713..a691b866f789b448c8cfdf0d699cb2de892e9f85 100644 (file)
@@ -50,13 +50,9 @@ NET_HANDLE(Nade_Orb, bool isNew)
        Net_Accept(Nade_Orb);
        int sf = ReadByte();
        if (sf & 1) {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
-               this.colormod_x = ReadCoord();
-               this.colormod_y = ReadCoord();
-               this.colormod_z = ReadCoord();
+               this.colormod = ReadVector();
                this.orb_lifetime = ReadByte();
                this.orb_radius = ReadShort();
                this.ltime = time + ReadByte()/10.0;
@@ -74,13 +70,9 @@ bool orb_send(entity this, entity to, int sf)
        WriteHeader(channel, Nade_Orb);
        WriteByte(channel, sf);
        if (sf & 1) {
-               WriteCoord(channel, this.origin.x);
-               WriteCoord(channel, this.origin.y);
-               WriteCoord(channel, this.origin.z);
+               WriteVector(channel, this.origin);
 
-               WriteCoord(channel, this.colormod.x);
-               WriteCoord(channel, this.colormod.y);
-               WriteCoord(channel, this.colormod.z);
+               WriteVector(channel, this.colormod);
 
                WriteByte(channel, this.orb_lifetime);
                //WriteByte(MSG_ENTITY, this.ltime - time + 1);
index a4b9b1826b1ce833adf464ea952106bf4f9b6050..b25175aea5ad9055355fd508b0ba238fad97673a 100644 (file)
@@ -1,4 +1,4 @@
-string autocvar_g_offhand_blaster;
+string autocvar_g_offhand_blaster = "0";
 
 REGISTER_MUTATOR(offhand_blaster, expr_evaluate(autocvar_g_offhand_blaster));
 
index 7b3d2abb61287228e15156b129df5cb8f9521153..be5b40c14c40c99301f8e91a7d54e08a017f9f65 100644 (file)
@@ -47,9 +47,7 @@ bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
 
     if (sendflags & 64)
     {
-        WriteCoord(MSG_ENTITY, this.origin.x);
-        WriteCoord(MSG_ENTITY, this.origin.y);
-        WriteCoord(MSG_ENTITY, this.origin.z);
+        WriteVector(MSG_ENTITY, this.origin);
     }
 
     if (sendflags & 1)
@@ -159,9 +157,7 @@ void Ent_WaypointSprite(entity this, bool isnew)
     if (sendflags & 64)
     {
         // unfortunately, this needs to be exact (for the 3D display)
-        this.origin_x = ReadCoord();
-        this.origin_y = ReadCoord();
-        this.origin_z = ReadCoord();
+        this.origin = ReadVector();
         setorigin(this, this.origin);
     }
 
index 0ebea585f80e61071cedd24e4c8e2d22abdec445..4b2ffc55f90595c9eb3efc3cbb65db7a5858da48 100644 (file)
 .float lastflags;
 .float lastground;
 .float wasFlying;
-#ifdef SVQC
-.float spectatorspeed = _STAT(SPECTATORSPEED);
-#elif defined(CSQC)
-.float spectatorspeed;
-#endif
 
 .int buttons_old;
 .vector movement_old;
@@ -260,9 +255,6 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
 
        void PM_UpdateButtons(entity this, entity store);
 
-       .float stat_sv_airspeedlimit_nonqw = _STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW);
-       .float stat_sv_maxspeed = _STAT(MOVEVARS_MAXSPEED);
-
        /** Not real stats */
        .string jumpspeedcap_min;
        .string jumpspeedcap_max;
index b5a939e502125735801ef2f007abc53207bbc3ef..249615d2d392b8b5fe828e531c11586921ca3737 100644 (file)
@@ -158,9 +158,7 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
 
     if(sf & ISF_LOCATION)
     {
-        this.origin_x = ReadCoord();
-        this.origin_y = ReadCoord();
-        this.origin_z = ReadCoord();
+        this.origin = ReadVector();
         setorigin(this, this.origin);
         this.oldorigin = this.origin;
     }
@@ -267,9 +265,7 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew)
         this.pushable = true;
         //this.angles = '0 0 0';
         set_movetype(this, MOVETYPE_TOSS);
-        this.velocity_x = ReadCoord();
-        this.velocity_y = ReadCoord();
-        this.velocity_z = ReadCoord();
+        this.velocity = ReadVector();
         setorigin(this, this.oldorigin);
 
         if(!this.move_time)
@@ -311,9 +307,7 @@ bool ItemSend(entity this, entity to, int sf)
        //WriteByte(MSG_ENTITY, this.cnt);
        if(sf & ISF_LOCATION)
        {
-               WriteCoord(MSG_ENTITY, this.origin.x);
-               WriteCoord(MSG_ENTITY, this.origin.y);
-               WriteCoord(MSG_ENTITY, this.origin.z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
 
        if(sf & ISF_ANGLES)
@@ -356,9 +350,7 @@ bool ItemSend(entity this, entity to, int sf)
 
        if(sf & ISF_DROP)
        {
-               WriteCoord(MSG_ENTITY, this.velocity.x);
-               WriteCoord(MSG_ENTITY, this.velocity.y);
-               WriteCoord(MSG_ENTITY, this.velocity.z);
+               WriteVector(MSG_ENTITY, this.velocity);
        }
 
        return true;
@@ -942,7 +934,7 @@ void Item_Touch(entity this, entity toucher)
 
 LABEL(pickup)
 
-       toucher.last_pickup = time;
+       STAT(LAST_PICKUP, toucher) = time;
 
        Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1);
        _sound (toucher, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
@@ -1519,7 +1511,7 @@ spawnfunc(target_items)
                                        s = Buff_UndeprecateName(argv(j));
                                        if(s == it.m_name)
                                        {
-                                               this.buffs |= (it.m_itemid);
+                                               STAT(BUFFS, this) |= (it.m_itemid);
                                                break;
                                        }
                                });
@@ -1579,7 +1571,7 @@ spawnfunc(target_items)
                if(this.ammo_fuel != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, this.ammo_fuel), "fuel");
                if(this.health != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, this.health), "health");
                if(this.armorvalue != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, this.armorvalue), "armor");
-               FOREACH(Buffs, it != BUFF_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(this.buffs & (it.m_itemid)), it.m_name));
+               FOREACH(Buffs, it != BUFF_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(STAT(BUFFS, this) & (it.m_itemid)), it.m_name));
                FOREACH(Weapons, it != WEP_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(this.weapons & (it.m_wepset)), it.netname));
        }
        this.netname = strzone(this.netname);
@@ -1628,30 +1620,30 @@ float GiveWeapon(entity e, float wpn, float op, float val)
 
 bool GiveBuff(entity e, Buff thebuff, int op, int val)
 {
-       bool had_buff = (e.buffs & thebuff.m_itemid);
+       bool had_buff = (STAT(BUFFS, e) & thebuff.m_itemid);
        switch(op)
        {
                case OP_SET:
                        if(val > 0)
-                               e.buffs |= thebuff.m_itemid;
+                               STAT(BUFFS, e) |= thebuff.m_itemid;
                        else
-                               e.buffs &= ~thebuff.m_itemid;
+                               STAT(BUFFS, e) &= ~thebuff.m_itemid;
                        break;
                case OP_MIN:
                case OP_PLUS:
                        if(val > 0)
-                               e.buffs |= thebuff.m_itemid;
+                               STAT(BUFFS, e) |= thebuff.m_itemid;
                        break;
                case OP_MAX:
                        if(val <= 0)
-                               e.buffs &= ~thebuff.m_itemid;
+                               STAT(BUFFS, e) &= ~thebuff.m_itemid;
                        break;
                case OP_MINUS:
                        if(val > 0)
-                               e.buffs &= ~thebuff.m_itemid;
+                               STAT(BUFFS, e) &= ~thebuff.m_itemid;
                        break;
        }
-       bool have_buff = (e.buffs & thebuff.m_itemid);
+       bool have_buff = (STAT(BUFFS, e) & thebuff.m_itemid);
        return (had_buff != have_buff);
 }
 
index 6adbcc65f4fa4d7dc2564b466f473008f8d90042..1802a75db4a96a74ab2b56eb9531a748923bfa91 100644 (file)
@@ -85,20 +85,12 @@ bool conveyor_send(entity this, entity to, int sf)
        if(sf & 1)
        {
                WriteByte(MSG_ENTITY, this.warpzone_isboxy);
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
 
-               WriteCoord(MSG_ENTITY, this.mins_x);
-               WriteCoord(MSG_ENTITY, this.mins_y);
-               WriteCoord(MSG_ENTITY, this.mins_z);
-               WriteCoord(MSG_ENTITY, this.maxs_x);
-               WriteCoord(MSG_ENTITY, this.maxs_y);
-               WriteCoord(MSG_ENTITY, this.maxs_z);
+               WriteVector(MSG_ENTITY, this.mins);
+               WriteVector(MSG_ENTITY, this.maxs);
 
-               WriteCoord(MSG_ENTITY, this.movedir_x);
-               WriteCoord(MSG_ENTITY, this.movedir_y);
-               WriteCoord(MSG_ENTITY, this.movedir_z);
+               WriteVector(MSG_ENTITY, this.movedir);
 
                WriteByte(MSG_ENTITY, this.speed);
                WriteByte(MSG_ENTITY, this.state);
@@ -174,22 +166,14 @@ NET_HANDLE(ENT_CLIENT_CONVEYOR, bool isnew)
        if(sf & 1)
        {
                this.warpzone_isboxy = ReadByte();
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
-               this.mins_x = ReadCoord();
-               this.mins_y = ReadCoord();
-               this.mins_z = ReadCoord();
-               this.maxs_x = ReadCoord();
-               this.maxs_y = ReadCoord();
-               this.maxs_z = ReadCoord();
+               this.mins = ReadVector();
+               this.maxs = ReadVector();
                setsize(this, this.mins, this.maxs);
 
-               this.movedir_x = ReadCoord();
-               this.movedir_y = ReadCoord();
-               this.movedir_z = ReadCoord();
+               this.movedir = ReadVector();
 
                this.speed = ReadByte();
                this.state = ReadByte();
index 48c91ec973b26a7d292444be4506e7ca561ff7c9..f768717c6bbde4c18c6ba50c6b05a7e773466b3a 100644 (file)
@@ -628,16 +628,10 @@ float door_send(entity this, entity to, float sf)
 
                trigger_common_write(this, true);
 
-               WriteCoord(MSG_ENTITY, this.pos1_x);
-               WriteCoord(MSG_ENTITY, this.pos1_y);
-               WriteCoord(MSG_ENTITY, this.pos1_z);
-               WriteCoord(MSG_ENTITY, this.pos2_x);
-               WriteCoord(MSG_ENTITY, this.pos2_y);
-               WriteCoord(MSG_ENTITY, this.pos2_z);
+               WriteVector(MSG_ENTITY, this.pos1);
+               WriteVector(MSG_ENTITY, this.pos2);
 
-               WriteCoord(MSG_ENTITY, this.size_x);
-               WriteCoord(MSG_ENTITY, this.size_y);
-               WriteCoord(MSG_ENTITY, this.size_z);
+               WriteVector(MSG_ENTITY, this.size);
 
                WriteShort(MSG_ENTITY, this.wait);
                WriteShort(MSG_ENTITY, this.speed);
@@ -653,16 +647,10 @@ float door_send(entity this, entity to, float sf)
 
        if(sf & SF_TRIGGER_UPDATE)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
-
-               WriteCoord(MSG_ENTITY, this.pos1_x);
-               WriteCoord(MSG_ENTITY, this.pos1_y);
-               WriteCoord(MSG_ENTITY, this.pos1_z);
-               WriteCoord(MSG_ENTITY, this.pos2_x);
-               WriteCoord(MSG_ENTITY, this.pos2_y);
-               WriteCoord(MSG_ENTITY, this.pos2_z);
+               WriteVector(MSG_ENTITY, this.origin);
+
+               WriteVector(MSG_ENTITY, this.pos1);
+               WriteVector(MSG_ENTITY, this.pos2);
        }
 
        return true;
@@ -798,22 +786,10 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
 
                trigger_common_read(this, true);
 
-               vector v;
-
-               v.x = ReadCoord();
-               v.y = ReadCoord();
-               v.z = ReadCoord();
-               this.pos1 = v;
-
-               v.x = ReadCoord();
-               v.y = ReadCoord();
-               v.z = ReadCoord();
-               this.pos2 = v;
+               this.pos1 = ReadVector();
+               this.pos2 = ReadVector();
 
-               v.x = ReadCoord();
-               v.y = ReadCoord();
-               v.z = ReadCoord();
-               this.size = v;
+               this.size = ReadVector();
 
                this.wait = ReadShort();
                this.speed = ReadShort();
@@ -841,17 +817,11 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
 
        if(sf & SF_TRIGGER_UPDATE)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
-               this.pos1_x = ReadCoord();
-               this.pos1_y = ReadCoord();
-               this.pos1_z = ReadCoord();
-               this.pos2_x = ReadCoord();
-               this.pos2_y = ReadCoord();
-               this.pos2_z = ReadCoord();
+               this.pos1 = ReadVector();
+               this.pos2 = ReadVector();
        }
        return true;
 }
index 36b4eeffffa1dd1af0d57f66b7207e2fde7c9802..9f97a1cea09b764d2021900fb011be0978254541 100644 (file)
@@ -26,16 +26,10 @@ float plat_send(entity this, entity to, float sf)
 
                trigger_common_write(this, true);
 
-               WriteCoord(MSG_ENTITY, this.pos1_x);
-               WriteCoord(MSG_ENTITY, this.pos1_y);
-               WriteCoord(MSG_ENTITY, this.pos1_z);
-               WriteCoord(MSG_ENTITY, this.pos2_x);
-               WriteCoord(MSG_ENTITY, this.pos2_y);
-               WriteCoord(MSG_ENTITY, this.pos2_z);
+               WriteVector(MSG_ENTITY, this.pos1);
+               WriteVector(MSG_ENTITY, this.pos2);
 
-               WriteCoord(MSG_ENTITY, this.size_x);
-               WriteCoord(MSG_ENTITY, this.size_y);
-               WriteCoord(MSG_ENTITY, this.size_z);
+               WriteVector(MSG_ENTITY, this.size);
 
                WriteAngle(MSG_ENTITY, this.mangle_x);
                WriteAngle(MSG_ENTITY, this.mangle_y);
@@ -138,16 +132,10 @@ NET_HANDLE(ENT_CLIENT_PLAT, bool isnew)
 
                trigger_common_read(this, true);
 
-               this.pos1_x = ReadCoord();
-               this.pos1_y = ReadCoord();
-               this.pos1_z = ReadCoord();
-               this.pos2_x = ReadCoord();
-               this.pos2_y = ReadCoord();
-               this.pos2_z = ReadCoord();
+               this.pos1 = ReadVector();
+               this.pos2 = ReadVector();
 
-               this.size_x = ReadCoord();
-               this.size_y = ReadCoord();
-               this.size_z = ReadCoord();
+               this.size = ReadVector();
 
                this.mangle_x = ReadAngle();
                this.mangle_y = ReadAngle();
index a0773f249a82ccfe6bc52f0fac17cb063381cbd6..54fe212ae23ead1b7f8fce4f2f02c3845083d4c7 100644 (file)
@@ -29,9 +29,7 @@ bool pointparticles_SendEntity(entity this, entity to, float fl)
        }
        if(fl & 4)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
        if(fl & 1)
        {
@@ -40,12 +38,8 @@ bool pointparticles_SendEntity(entity this, entity to, float fl)
                        WriteShort(MSG_ENTITY, this.modelindex);
                        if(fl & 0x80)
                        {
-                               WriteCoord(MSG_ENTITY, this.mins_x);
-                               WriteCoord(MSG_ENTITY, this.mins_y);
-                               WriteCoord(MSG_ENTITY, this.mins_z);
-                               WriteCoord(MSG_ENTITY, this.maxs_x);
-                               WriteCoord(MSG_ENTITY, this.maxs_y);
-                               WriteCoord(MSG_ENTITY, this.maxs_z);
+                               WriteVector(MSG_ENTITY, this.mins);
+                               WriteVector(MSG_ENTITY, this.maxs);
                        }
                }
                else
@@ -53,9 +47,7 @@ bool pointparticles_SendEntity(entity this, entity to, float fl)
                        WriteShort(MSG_ENTITY, 0);
                        if(fl & 0x80)
                        {
-                               WriteCoord(MSG_ENTITY, this.maxs_x);
-                               WriteCoord(MSG_ENTITY, this.maxs_y);
-                               WriteCoord(MSG_ENTITY, this.maxs_z);
+                               WriteVector(MSG_ENTITY, this.maxs);
                        }
                }
                WriteShort(MSG_ENTITY, this.cnt);
@@ -286,9 +278,7 @@ NET_HANDLE(ENT_CLIENT_POINTPARTICLES, bool isnew)
        }
        if(f & 4)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
        }
        if(f & 1)
        {
@@ -297,19 +287,13 @@ NET_HANDLE(ENT_CLIENT_POINTPARTICLES, bool isnew)
                {
                        if(this.modelindex)
                        {
-                               this.mins_x = ReadCoord();
-                               this.mins_y = ReadCoord();
-                               this.mins_z = ReadCoord();
-                               this.maxs_x = ReadCoord();
-                               this.maxs_y = ReadCoord();
-                               this.maxs_z = ReadCoord();
+                               this.mins = ReadVector();
+                               this.maxs = ReadVector();
                        }
                        else
                        {
                                this.mins    = '0 0 0';
-                               this.maxs_x = ReadCoord();
-                               this.maxs_y = ReadCoord();
-                               this.maxs_z = ReadCoord();
+                               this.maxs = ReadVector();
                        }
                }
                else
index c8b4e2924376fb510b27ba4ffb2c6d4dc1cba511..1817a9ce9a1e4d658b0b1f8411bc790734e62721 100644 (file)
@@ -4,14 +4,12 @@ REGISTER_NET_LINKED(ENT_CLIENT_RAINSNOW)
 #ifdef SVQC
 bool rainsnow_SendEntity(entity this, entity to, float sf)
 {
+       vector myorg = this.origin + this.mins;
+       vector mysize = this.maxs - this.mins;
        WriteHeader(MSG_ENTITY, ENT_CLIENT_RAINSNOW);
        WriteByte(MSG_ENTITY, this.state);
-       WriteCoord(MSG_ENTITY, this.origin_x + this.mins_x);
-       WriteCoord(MSG_ENTITY, this.origin_y + this.mins_y);
-       WriteCoord(MSG_ENTITY, this.origin_z + this.mins_z);
-       WriteCoord(MSG_ENTITY, this.maxs_x - this.mins_x);
-       WriteCoord(MSG_ENTITY, this.maxs_y - this.mins_y);
-       WriteCoord(MSG_ENTITY, this.maxs_z - this.mins_z);
+       WriteVector(MSG_ENTITY, myorg);
+       WriteVector(MSG_ENTITY, mysize);
        WriteShort(MSG_ENTITY, compressShortVector(this.dest));
        WriteShort(MSG_ENTITY, this.count);
        WriteByte(MSG_ENTITY, this.cnt);
@@ -116,12 +114,8 @@ void Draw_Snow(entity this)
 NET_HANDLE(ENT_CLIENT_RAINSNOW, bool isnew)
 {
        this.impulse = ReadByte(); // Rain, Snow, or Whatever
-       this.origin_x = ReadCoord();
-       this.origin_y = ReadCoord();
-       this.origin_z = ReadCoord();
-       this.maxs_x = ReadCoord();
-       this.maxs_y = ReadCoord();
-       this.maxs_z = ReadCoord();
+       this.origin = ReadVector();
+       this.maxs = ReadVector();
        this.velocity = decompressShortVector(ReadShort());
        this.count = ReadShort() * 10;
        this.glow_color = ReadByte(); // color
index c5a6e3d0393edebcbfd249296f6ecd8d78eb3dd4..ead086708196889075c18ae958df185dccb02606 100644 (file)
@@ -157,20 +157,12 @@ float train_send(entity this, entity to, float sf)
 
                WriteString(MSG_ENTITY, this.curvetarget);
 
-               WriteCoord(MSG_ENTITY, this.pos1_x);
-               WriteCoord(MSG_ENTITY, this.pos1_y);
-               WriteCoord(MSG_ENTITY, this.pos1_z);
-               WriteCoord(MSG_ENTITY, this.pos2_x);
-               WriteCoord(MSG_ENTITY, this.pos2_y);
-               WriteCoord(MSG_ENTITY, this.pos2_z);
+               WriteVector(MSG_ENTITY, this.pos1);
+               WriteVector(MSG_ENTITY, this.pos2);
 
-               WriteCoord(MSG_ENTITY, this.size_x);
-               WriteCoord(MSG_ENTITY, this.size_y);
-               WriteCoord(MSG_ENTITY, this.size_z);
+               WriteVector(MSG_ENTITY, this.size);
 
-               WriteCoord(MSG_ENTITY, this.view_ofs_x);
-               WriteCoord(MSG_ENTITY, this.view_ofs_y);
-               WriteCoord(MSG_ENTITY, this.view_ofs_z);
+               WriteVector(MSG_ENTITY, this.view_ofs);
 
                WriteAngle(MSG_ENTITY, this.mangle_x);
                WriteAngle(MSG_ENTITY, this.mangle_y);
@@ -304,20 +296,12 @@ NET_HANDLE(ENT_CLIENT_TRAIN, bool isnew)
 
                this.curvetarget = strzone(ReadString());
 
-               this.pos1_x = ReadCoord();
-               this.pos1_y = ReadCoord();
-               this.pos1_z = ReadCoord();
-               this.pos2_x = ReadCoord();
-               this.pos2_y = ReadCoord();
-               this.pos2_z = ReadCoord();
+               this.pos1 = ReadVector();
+               this.pos2 = ReadVector();
 
-               this.size_x = ReadCoord();
-               this.size_y = ReadCoord();
-               this.size_z = ReadCoord();
+               this.size = ReadVector();
 
-               this.view_ofs_x = ReadCoord();
-               this.view_ofs_y = ReadCoord();
-               this.view_ofs_z = ReadCoord();
+               this.view_ofs = ReadVector();
 
                this.mangle_x = ReadAngle();
                this.mangle_y = ReadAngle();
index dcc44710fc4e2fe6f746d3c8fd85b0d8da06f7de..6c9093318f6bf827abfe5caf01b254a2115ee50a 100644 (file)
@@ -8,9 +8,7 @@ bool corner_send(entity this, entity to, int sf)
 
        WriteString(MSG_ENTITY, this.platmovetype);
 
-       WriteCoord(MSG_ENTITY, this.origin_x);
-       WriteCoord(MSG_ENTITY, this.origin_y);
-       WriteCoord(MSG_ENTITY, this.origin_z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        WriteString(MSG_ENTITY, this.target);
        WriteString(MSG_ENTITY, this.target2);
@@ -64,9 +62,7 @@ NET_HANDLE(ENT_CLIENT_CORNER, bool isnew)
 {
        this.platmovetype = strzone(ReadString());
 
-       this.origin_x = ReadCoord();
-       this.origin_y = ReadCoord();
-       this.origin_z = ReadCoord();
+       this.origin = ReadVector();
        setorigin(this, this.origin);
 
        this.target = strzone(ReadString());
index 45bd21fd1b15cd32eda5a9b170fa0732711b7029..3d5ef42d848bd7c745a7316690cb5271436baced 100644 (file)
@@ -137,9 +137,7 @@ bool laser_SendEntity(entity this, entity to, float fl)
        WriteByte(MSG_ENTITY, fl);
        if(fl & 1)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
        if(fl & 8)
        {
@@ -160,9 +158,7 @@ bool laser_SendEntity(entity this, entity to, float fl)
        {
                if(fl & 0x80)
                {
-                       WriteCoord(MSG_ENTITY, this.enemy.origin_x);
-                       WriteCoord(MSG_ENTITY, this.enemy.origin_y);
-                       WriteCoord(MSG_ENTITY, this.enemy.origin_z);
+                       WriteVector(MSG_ENTITY, this.enemy.origin);
                }
                else
                {
@@ -331,9 +327,7 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew)
 
        if(f & 1)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
        }
        if(f & 8)
@@ -361,9 +355,7 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew)
        {
                if(f & 0x80)
                {
-                       this.velocity_x = ReadCoord();
-                       this.velocity_y = ReadCoord();
-                       this.velocity_z = ReadCoord();
+                       this.velocity = ReadVector();
                }
                else
                {
index 3f5203806964b64988426406eef59eda544ec899..40c7d46c42803ce65dc2411a5da2847d190791b0 100644 (file)
@@ -13,9 +13,7 @@ bool teleport_dest_send(entity this, entity to, int sf)
                WriteByte(MSG_ENTITY, this.cnt);
                WriteCoord(MSG_ENTITY, this.speed);
                WriteString(MSG_ENTITY, this.targetname);
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
 
                WriteAngle(MSG_ENTITY, this.mangle_x);
                WriteAngle(MSG_ENTITY, this.mangle_y);
@@ -78,9 +76,7 @@ NET_HANDLE(ENT_CLIENT_TELEPORT_DEST, bool isnew)
                this.cnt = ReadByte();
                this.speed = ReadCoord();
                this.targetname = strzone(ReadString());
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
 
                this.mangle_x = ReadAngle();
                this.mangle_y = ReadAngle();
index 1f8cb00cb553a95623dec5d0eb10f3d0ca3c2e9f..7ec3351381b6265b0d24e4e16c02caa80d32fe2d 100644 (file)
@@ -103,28 +103,20 @@ bool trigger_music_SendEntity(entity this, entity to, float sf)
        WriteByte(MSG_ENTITY, sf);
        if(sf & 4)
        {
-               WriteCoord(MSG_ENTITY, this.origin.x);
-               WriteCoord(MSG_ENTITY, this.origin.y);
-               WriteCoord(MSG_ENTITY, this.origin.z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
        if(sf & 1)
        {
                if(this.model != "null")
                {
                        WriteShort(MSG_ENTITY, this.modelindex);
-                       WriteCoord(MSG_ENTITY, this.mins.x);
-                       WriteCoord(MSG_ENTITY, this.mins.y);
-                       WriteCoord(MSG_ENTITY, this.mins.z);
-                       WriteCoord(MSG_ENTITY, this.maxs.x);
-                       WriteCoord(MSG_ENTITY, this.maxs.y);
-                       WriteCoord(MSG_ENTITY, this.maxs.z);
+                       WriteVector(MSG_ENTITY, this.mins);
+                       WriteVector(MSG_ENTITY, this.maxs);
                }
                else
                {
                        WriteShort(MSG_ENTITY, 0);
-                       WriteCoord(MSG_ENTITY, this.maxs.x);
-                       WriteCoord(MSG_ENTITY, this.maxs.y);
-                       WriteCoord(MSG_ENTITY, this.maxs.z);
+                       WriteVector(MSG_ENTITY, this.maxs);
                }
                WriteByte(MSG_ENTITY, this.volume * 255.0);
                WriteByte(MSG_ENTITY, this.fade_time * 16.0);
@@ -280,28 +272,20 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC, bool isnew)
        int f = ReadByte();
        if(f & 4)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
        }
        if(f & 1)
        {
                this.modelindex = ReadShort();
                if(this.modelindex)
                {
-                       this.mins_x = ReadCoord();
-                       this.mins_y = ReadCoord();
-                       this.mins_z = ReadCoord();
-                       this.maxs_x = ReadCoord();
-                       this.maxs_y = ReadCoord();
-                       this.maxs_z = ReadCoord();
+                       this.mins = ReadVector();
+                       this.maxs = ReadVector();
                }
                else
                {
                        this.mins    = '0 0 0';
-                       this.maxs_x = ReadCoord();
-                       this.maxs_y = ReadCoord();
-                       this.maxs_z = ReadCoord();
+                       this.maxs = ReadVector();
                }
 
                this.volume = ReadByte() / 255.0;
index 9e40cfd40178224fc9c48efe76cece7de982253a..fde6e1fb9d6cf58e091ead371e1705dab06fbf49 100644 (file)
@@ -472,9 +472,7 @@ float trigger_push_send(entity this, entity to, float sf)
        WriteByte(MSG_ENTITY, this.active);
        WriteCoord(MSG_ENTITY, this.height);
 
-       WriteCoord(MSG_ENTITY, this.movedir_x);
-       WriteCoord(MSG_ENTITY, this.movedir_y);
-       WriteCoord(MSG_ENTITY, this.movedir_z);
+       WriteVector(MSG_ENTITY, this.movedir);
 
        trigger_common_write(this, true);
 
@@ -537,9 +535,7 @@ bool target_push_send(entity this, entity to, float sf)
 
        WriteByte(MSG_ENTITY, this.cnt);
        WriteString(MSG_ENTITY, this.targetname);
-       WriteCoord(MSG_ENTITY, this.origin_x);
-       WriteCoord(MSG_ENTITY, this.origin_y);
-       WriteCoord(MSG_ENTITY, this.origin_z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        WriteAngle(MSG_ENTITY, this.angles_x);
        WriteAngle(MSG_ENTITY, this.angles_y);
@@ -595,9 +591,7 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew)
        this.active = ReadByte();
        this.height = ReadCoord();
 
-       this.movedir_x = ReadCoord();
-       this.movedir_y = ReadCoord();
-       this.movedir_z = ReadCoord();
+       this.movedir = ReadVector();
 
        trigger_common_read(this, true);
 
@@ -626,9 +620,7 @@ NET_HANDLE(ENT_CLIENT_TARGET_PUSH, bool isnew)
        this.classname = "push_target";
        this.cnt = ReadByte();
        this.targetname = strzone(ReadString());
-       this.origin_x = ReadCoord();
-       this.origin_y = ReadCoord();
-       this.origin_z = ReadCoord();
+       this.origin = ReadVector();
 
        this.angles_x = ReadAngle();
        this.angles_y = ReadAngle();
index c3c2c7474e6983b071464d04cc59ea45bbb47c1f..9377332e2fb138299e1f3af53b653d57e55163d6 100644 (file)
@@ -10,8 +10,9 @@
 
 void secrets_setstatus(entity this)
 {
-       this.stat_secrets_total = secrets_total;
-       this.stat_secrets_found = secrets_found;
+       // TODO: use global stats!
+       STAT(SECRETS_TOTAL, this) = secrets_total;
+       STAT(SECRETS_FOUND, this) = secrets_found;
 }
 
 /**
index e483316a4086da58721cea32794b1d5f5de3453c..fcc55c39597071e35f1929f5653b21e5650ca53a 100644 (file)
@@ -12,9 +12,6 @@ float secrets_total;
 float secrets_found;
 
 
-.float stat_secrets_total = _STAT(SECRETS_TOTAL);
-.float stat_secrets_found = _STAT(SECRETS_FOUND);
-
 /**
  * update secrets status.
  */
index 50bf3d05ee0b1e597a352f783fe0b376dd9dd2b3..8b985795da8b8701bb69239f52caa7629df156d9 100644 (file)
@@ -76,9 +76,7 @@ bool trigger_viewloc_send(entity this, entity to, int sf)
        WriteEntity(MSG_ENTITY, this.enemy);
        WriteEntity(MSG_ENTITY, this.goalentity);
 
-       WriteCoord(MSG_ENTITY, this.origin_x);
-       WriteCoord(MSG_ENTITY, this.origin_y);
-       WriteCoord(MSG_ENTITY, this.origin_z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        return true;
 }
@@ -125,9 +123,7 @@ bool viewloc_send(entity this, entity to, int sf)
 
        WriteByte(MSG_ENTITY, this.cnt);
 
-       WriteCoord(MSG_ENTITY, this.origin_x);
-       WriteCoord(MSG_ENTITY, this.origin_y);
-       WriteCoord(MSG_ENTITY, this.origin_z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        WriteAngle(MSG_ENTITY, this.angles_x);
        WriteAngle(MSG_ENTITY, this.angles_y);
@@ -178,9 +174,7 @@ NET_HANDLE(ENT_CLIENT_VIEWLOC_TRIGGER, bool isnew)
        this.enemy = findfloat(NULL, entnum, point1);
        this.goalentity = findfloat(NULL, entnum, point2);
 
-       this.origin_x = ReadCoord();
-       this.origin_y = ReadCoord();
-       this.origin_z = ReadCoord();
+       this.origin = ReadVector();
 
        return = true;
 
@@ -200,9 +194,7 @@ NET_HANDLE(ENT_CLIENT_VIEWLOC, bool isnew)
 {
        this.cnt = ReadByte();
 
-       this.origin_x = ReadCoord();
-       this.origin_y = ReadCoord();
-       this.origin_z = ReadCoord();
+       this.origin = ReadVector();
        setorigin(this, this.origin);
 
        this.movedir_x = ReadAngle();
index 6d8c5bb7efe55bafa60de6363a686e01da1aabfe..fbd20c84011596a6bd110e9f96e51f270413e4b8 100644 (file)
@@ -102,12 +102,8 @@ void trigger_common_write(entity this, bool withtarget)
                WriteVector(MSG_ENTITY, this.angles);
 
        WriteShort(MSG_ENTITY, this.modelindex);
-       WriteCoord(MSG_ENTITY, this.mins.x);
-       WriteCoord(MSG_ENTITY, this.mins.y);
-       WriteCoord(MSG_ENTITY, this.mins.z);
-       WriteCoord(MSG_ENTITY, this.maxs.x);
-       WriteCoord(MSG_ENTITY, this.maxs.y);
-       WriteCoord(MSG_ENTITY, this.maxs.z);
+       WriteVector(MSG_ENTITY, this.mins);
+       WriteVector(MSG_ENTITY, this.maxs);
        WriteByte(MSG_ENTITY, bound(1, this.scale * 16, 255));
 }
 
@@ -162,12 +158,8 @@ void trigger_common_read(entity this, bool withtarget)
                this.angles = '0 0 0';
 
        this.modelindex = ReadShort();
-       this.mins_x = ReadCoord();
-       this.mins_y = ReadCoord();
-       this.mins_z = ReadCoord();
-       this.maxs_x = ReadCoord();
-       this.maxs_y = ReadCoord();
-       this.maxs_z = ReadCoord();
+       this.mins = ReadVector();
+       this.maxs = ReadVector();
        this.scale = ReadByte() / 16;
        setsize(this, this.mins, this.maxs);
 }
index a57719b82c070a14870f57fba365c55f7bebf6fa..ba7b5d01bb5ba25c87ce00d1ad83b55b1f81923e 100644 (file)
@@ -361,9 +361,7 @@ NET_HANDLE(ENT_CLIENT_TURRET, bool isnew)
        {
                this.m_id = ReadByte();
 
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
                this.angles_x = ReadAngle();
@@ -397,14 +395,10 @@ NET_HANDLE(ENT_CLIENT_TURRET, bool isnew)
 
        if(sf & TNSF_MOVE)
        {
-               this.origin_x = ReadShort();
-               this.origin_y = ReadShort();
-               this.origin_z = ReadShort();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
-               this.velocity_x = ReadShort();
-               this.velocity_y = ReadShort();
-               this.velocity_z = ReadShort();
+               this.velocity = ReadVector();
 
                this.angles_y = ReadShort();
 
index 21da98a48e2a5e0086368fd620d6cd4328bfd5cc..2a7c41c98c9a8a7175a5b9b5af8acc07d31f6cff 100644 (file)
@@ -313,9 +313,7 @@ bool turret_send(entity this, entity to, float sf)
        {
                WriteByte(MSG_ENTITY, this.m_id);
 
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
 
                WriteAngle(MSG_ENTITY, this.angles_x);
                WriteAngle(MSG_ENTITY, this.angles_y);
@@ -335,13 +333,9 @@ bool turret_send(entity this, entity to, float sf)
 
        if(sf & TNSF_MOVE)
        {
-               WriteShort(MSG_ENTITY, rint(this.origin_x));
-               WriteShort(MSG_ENTITY, rint(this.origin_y));
-               WriteShort(MSG_ENTITY, rint(this.origin_z));
+               WriteVector(MSG_ENTITY, this.origin);
 
-               WriteShort(MSG_ENTITY, rint(this.velocity_x));
-               WriteShort(MSG_ENTITY, rint(this.velocity_y));
-               WriteShort(MSG_ENTITY, rint(this.velocity_z));
+               WriteVector(MSG_ENTITY, this.velocity);
 
                WriteShort(MSG_ENTITY, rint(this.angles_y));
        }
index b2f87821eea414ca4b6eb764663571d4d1826c4c..51ac4bee45f3e035b19fc9895abfbce066e639e6 100644 (file)
@@ -70,9 +70,7 @@ NET_HANDLE(ENT_CLIENT_AUXILIARYXHAIR, bool isnew)
 
        if(sf & 2)
        {
-               axh.origin_x = ReadCoord();
-               axh.origin_y = ReadCoord();
-               axh.origin_z = ReadCoord();
+               axh.origin = ReadVector();
        }
 
        if(sf & 4)
index 63d662923a75d60310848c39415dab54d3a1a910..0eaf69eac6eab5ffbbf057538603fb3a2d406d84 100644 (file)
@@ -9,9 +9,7 @@ bool SendAuxiliaryXhair(entity this, entity to, int sf)
 
        if(sf & 2)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
 
        if(sf & 4)
@@ -369,7 +367,7 @@ bool vehicle_addplayerslot( entity _owner,
        _slot.PlayerPhysplug = _framefunc;
        _slot.vehicle_exit = _exitfunc;
        _slot.vehicle_enter = _enterfunc;
-       _slot.hud = _hud;
+       STAT(HUD, _slot) = _hud;
        _slot.vehicle_flags = VHF_PLAYERSLOT;
        _slot.vehicle_viewport = spawn();
        _slot.vehicle_hudmodel = spawn();
@@ -827,13 +825,13 @@ void vehicles_exit(entity vehic, bool eject)
                player.solid                    = SOLID_SLIDEBOX;
                set_movetype(player, MOVETYPE_WALK);
                player.effects             &= ~EF_NODRAW;
-               player.teleportable     = TELEPORT_NORMAL;
+               player.teleportable             = TELEPORT_NORMAL;
                player.alpha                    = 1;
                player.PlayerPhysplug   = func_null;
                player.vehicle                  = NULL;
-               player.view_ofs         = STAT(PL_VIEW_OFS, player);
-               player.event_damage     = PlayerDamage;
-               player.hud                              = HUD_NORMAL;
+               player.view_ofs                 = STAT(PL_VIEW_OFS, player);
+               player.event_damage             = PlayerDamage;
+               STAT(HUD, player)               = HUD_NORMAL;
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++ slot)
                {
                        .entity weaponentity = weaponentities[slot];
@@ -1027,7 +1025,7 @@ void vehicles_enter(entity pl, entity veh)
                veh.(weaponentity) = new(temp_wepent);
                veh.(weaponentity).m_switchweapon = pl.(weaponentity).m_switchweapon;
        }
-       pl.hud = veh.vehicleid;
+       STAT(HUD, pl) = veh.vehicleid;
        pl.PlayerPhysplug = veh.PlayerPhysplug;
 
        pl.vehicle_ammo1 = veh.vehicle_ammo1;
@@ -1088,7 +1086,7 @@ void vehicles_think(entity this)
        this.nextthink = time + autocvar_g_vehicles_thinkrate;
 
        if(this.owner)
-               this.owner.vehicle_weapon2mode = this.vehicle_weapon2mode;
+               STAT(VEHICLESTAT_W2MODE, this.owner) = STAT(VEHICLESTAT_W2MODE, this);
 
        Vehicle info = Vehicles_from(this.vehicleid);
        info.vr_think(info, this);
index 22e2e4859dd170c94f3bf03c571822bb9c496052..0ddd02aa7e0ce77125b2a9dc835df604c54d8cf0 100644 (file)
@@ -64,7 +64,6 @@ const float SVC_UPDATEENTITY  = 128; // Net.Protocol 0x80
 const float VHSF_NORMAL = 0;
 const float VHSF_FACTORY = 2;
 
-.int hud = _STAT(HUD);
 .float dmg_time;
 
 .float play_time;
@@ -85,7 +84,6 @@ const float   DAMAGE_TARGETDRONE = 10;
 // vehicle functions
 .void(int _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
 .bool(entity this, int _imp) vehicles_impulse;
-.int vehicle_weapon2mode = _STAT(VEHICLESTAT_W2MODE);
 .void(entity this, int exit_flags) vehicle_exit;
 .bool(entity this, entity player) vehicle_enter;
 const int VHEF_NORMAL = 0;  /// User pressed exit key
index f0519aa21573de0b151537b042b5d1cb82e278ba..4e842a865c76b31f91eea2b698da3930ea6d8e85 100644 (file)
@@ -233,7 +233,7 @@ void bumblebee_gunner_exit(entity this, int _exitflag)
        player.PlayerPhysplug = func_null;
        player.view_ofs       = STAT(PL_VIEW_OFS, player);
        player.event_damage   = PlayerDamage;
-       player.hud            = HUD_NORMAL;
+       STAT(HUD, player)     = HUD_NORMAL;
        player.teleportable       = TELEPORT_NORMAL;
        for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        {
@@ -298,7 +298,7 @@ bool bumblebee_gunner_enter(entity this, entity player)
        set_movetype(player, MOVETYPE_NOCLIP);
        player.event_damage     = func_null;
        player.view_ofs                 = '0 0 0';
-       player.hud                              = gunner.hud;
+       STAT(HUD, player)               = STAT(HUD, gunner);
        player.teleportable     = false;
        player.PlayerPhysplug   = gunner.PlayerPhysplug;
        player.vehicle_ammo1    = vehic.vehicle_ammo1;
@@ -332,7 +332,7 @@ bool bumblebee_gunner_enter(entity this, entity player)
                WriteAngle(MSG_ONE,     0); // roll
        }
 
-       CSQCVehicleSetup(player, player.hud);
+       CSQCVehicleSetup(player, STAT(HUD, player));
 
        MUTATOR_CALLHOOK(VehicleEnter, player, gunner);
 
index fa05c6a6f12dbd46343c941148c46b4c14db0366..5f4068a7d281ff3269d4cef825fbb3d333ed5765 100644 (file)
@@ -27,16 +27,12 @@ bool bumble_raygun_send(entity this, entity to, float sf)
 
     if(sf & BRG_START)
     {
-        WriteCoord(MSG_ENTITY, this.hook_start_x);
-        WriteCoord(MSG_ENTITY, this.hook_start_y);
-        WriteCoord(MSG_ENTITY, this.hook_start_z);
+        WriteVector(MSG_ENTITY, this.hook_start);
     }
 
     if(sf & BRG_END)
     {
-        WriteCoord(MSG_ENTITY, this.hook_end_x);
-        WriteCoord(MSG_ENTITY, this.hook_end_y);
-        WriteCoord(MSG_ENTITY, this.hook_end_z);
+        WriteVector(MSG_ENTITY, this.hook_end);
     }
 
     return true;
@@ -75,17 +71,13 @@ NET_HANDLE(ENT_CLIENT_BUMBLE_RAYGUN, bool isnew)
 
     if(sf & BRG_START)
     {
-        this.origin_x = ReadCoord();
-        this.origin_y = ReadCoord();
-        this.origin_z = ReadCoord();
+        this.origin = ReadVector();
         setorigin(this, this.origin);
     }
 
     if(sf & BRG_END)
     {
-        this.bumble_origin_x = ReadCoord();
-        this.bumble_origin_y = ReadCoord();
-        this.bumble_origin_z = ReadCoord();
+        this.bumble_origin = ReadVector();
     }
     return true;
 }
index a80efdab3242f5b751e718778a6cd9a121cd1de2..bf3e4436205c22d91ee0c7a17a25faaf1108a034 100644 (file)
@@ -254,7 +254,7 @@ bool raptor_frame(entity this, float dt)
        setorigin(this, vehic.origin + '0 0 32');
        this.oldorigin = this.origin; // negate fall damage
 
-       this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+       STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
 
        vector vf, ad;
        // Target lock & predict
@@ -376,7 +376,7 @@ bool raptor_frame(entity this, float dt)
 
        Weapon wep2a = WEP_RAPTOR_BOMB;
        if(!forbidWeaponUse(this))
-       if(vehic.vehicle_weapon2mode == RSM_BOMB)
+       if(STAT(VEHICLESTAT_W2MODE, vehic) == RSM_BOMB)
        {
                if(time > vehic.lip + autocvar_g_vehicle_raptor_bombs_refire)
                if(PHYS_INPUT_BUTTON_ATCK2(this))
@@ -465,7 +465,7 @@ bool raptor_takeoff(entity this, float dt)
        else
                this.PlayerPhysplug = raptor_frame;
 
-       this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+       STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
 
        if(vehic.vehicle_flags  & VHF_SHIELDREGEN)
                vehicles_regen(vehic, vehic.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, dt, true);
@@ -539,20 +539,20 @@ bool raptor_impulse(entity this, int _imp)
        switch(_imp)
        {
                case IMP_weapon_group_1.impulse:
-                       this.vehicle.vehicle_weapon2mode = RSM_BOMB;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_BOMB;
                        CSQCVehicleSetup(this, 0);
                        return true;
                case IMP_weapon_group_2.impulse:
-                       this.vehicle.vehicle_weapon2mode = RSM_FLARE;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_FLARE;
                        CSQCVehicleSetup(this, 0);
                        return true;
 
                case IMP_weapon_next_byid.impulse:
                case IMP_weapon_next_bypriority.impulse:
                case IMP_weapon_next_bygroup.impulse:
-                       this.vehicle.vehicle_weapon2mode += 1;
-                       if(this.vehicle.vehicle_weapon2mode > RSM_LAST)
-                               this.vehicle.vehicle_weapon2mode = RSM_FIRST;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) += 1;
+                       if(STAT(VEHICLESTAT_W2MODE, this.vehicle) > RSM_LAST)
+                               STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_FIRST;
 
                        CSQCVehicleSetup(this, 0);
                        return true;
@@ -560,9 +560,9 @@ bool raptor_impulse(entity this, int _imp)
                case IMP_weapon_prev_byid.impulse:
                case IMP_weapon_prev_bypriority.impulse:
                case IMP_weapon_prev_bygroup.impulse:
-                       this.vehicle.vehicle_weapon2mode -= 1;
-                       if(this.vehicle.vehicle_weapon2mode < RSM_FIRST)
-                               this.vehicle.vehicle_weapon2mode = RSM_LAST;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) -= 1;
+                       if(STAT(VEHICLESTAT_W2MODE, this.vehicle) < RSM_FIRST)
+                               STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_LAST;
 
                        CSQCVehicleSetup(this, 0);
                        return true;
@@ -590,7 +590,7 @@ METHOD(Raptor, vr_impact, void(Raptor thisveh, entity instance))
 }
 METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
 {
-    instance.vehicle_weapon2mode = RSM_BOMB;
+    STAT(VEHICLESTAT_W2MODE, instance) = RSM_BOMB;
     instance.owner.PlayerPhysplug = raptor_takeoff;
     set_movetype(instance, MOVETYPE_BOUNCEMISSILE);
     instance.solid               = SOLID_SLIDEBOX;
index a0954b5013078f6ec3e552b5ca923efc7f20a730..994a642d73ebac110dd657f7eba910d32aa28fa8 100644 (file)
@@ -63,7 +63,7 @@ bool spiderbot_frame(entity this, float dt)
                .entity weaponentity = weaponentities[slot];
                this.(weaponentity).m_switchweapon = WEP_Null;
        }
-       this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+       STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
 
 
 #if 1 // 0 to enable per-gun impact aux crosshairs
@@ -464,37 +464,37 @@ bool spiderbot_impulse(entity this, int _imp)
        switch(_imp)
        {
                case IMP_weapon_group_1.impulse:
-                       this.vehicle.vehicle_weapon2mode = SBRM_VOLLY;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_VOLLY;
                        CSQCVehicleSetup(this, 0);
                        return true;
                case IMP_weapon_group_2.impulse:
-                       this.vehicle.vehicle_weapon2mode = SBRM_GUIDE;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_GUIDE;
                        CSQCVehicleSetup(this, 0);
                        return true;
                case IMP_weapon_group_3.impulse:
-                       this.vehicle.vehicle_weapon2mode = SBRM_ARTILLERY;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_ARTILLERY;
                        CSQCVehicleSetup(this, 0);
                        return true;
 
                case IMP_weapon_next_byid.impulse:
                case IMP_weapon_next_bypriority.impulse:
                case IMP_weapon_next_bygroup.impulse:
-                       this.vehicle.vehicle_weapon2mode += 1;
-                       if(this.vehicle.vehicle_weapon2mode > SBRM_LAST)
-                               this.vehicle.vehicle_weapon2mode = SBRM_FIRST;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) += 1;
+                       if(STAT(VEHICLESTAT_W2MODE, this.vehicle) > SBRM_LAST)
+                               STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_FIRST;
 
-                       //centerprint(this, strcat("Rocket mode is ", ftos(this.vehicle.vehicle_weapon2mode)));
+                       //centerprint(this, strcat("Rocket mode is ", ftos(STAT(VEHICLESTAT_W2MODE, this.vehicle))));
                        CSQCVehicleSetup(this, 0);
                        return true;
                case IMP_weapon_last.impulse:
                case IMP_weapon_prev_byid.impulse:
                case IMP_weapon_prev_bypriority.impulse:
                case IMP_weapon_prev_bygroup.impulse:
-                       this.vehicle.vehicle_weapon2mode -= 1;
-                       if(this.vehicle.vehicle_weapon2mode < SBRM_FIRST)
-                               this.vehicle.vehicle_weapon2mode = SBRM_LAST;
+                       STAT(VEHICLESTAT_W2MODE, this.vehicle) -= 1;
+                       if(STAT(VEHICLESTAT_W2MODE, this.vehicle) < SBRM_FIRST)
+                               STAT(VEHICLESTAT_W2MODE, this.vehicle) = SBRM_LAST;
 
-                       //centerprint(this, strcat("Rocket mode is ", ftos(this.vehicle.vehicle_weapon2mode)));
+                       //centerprint(this, strcat("Rocket mode is ", ftos(STAT(VEHICLESTAT_W2MODE, this.vehicle))));
                        CSQCVehicleSetup(this, 0);
                        return true;
 
@@ -521,7 +521,7 @@ METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh, entity instance))
 }
 METHOD(Spiderbot, vr_enter, void(Spiderbot thisveh, entity instance))
 {
-    instance.vehicle_weapon2mode = SBRM_GUIDE;
+    STAT(VEHICLESTAT_W2MODE, instance) = SBRM_GUIDE;
     set_movetype(instance, MOVETYPE_WALK);
     CSQCVehicleSetup(instance.owner, 0);
     instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_spiderbot_health) * 100;
index 7887781ed7a74f3b5c3850dfad0cfdd64a48e398..a18d0321356f0bb4311abbf12997a9f2681296fa 100644 (file)
@@ -141,7 +141,7 @@ void spiderbot_rocket_do(entity this)
 
     if (this.wait != -10)
     {
-        if (PHYS_INPUT_BUTTON_ATCK2(this.owner) && this.vehicle_weapon2mode == SBRM_GUIDE)
+        if (PHYS_INPUT_BUTTON_ATCK2(this.owner) && STAT(VEHICLESTAT_W2MODE, this) == SBRM_GUIDE)
         {
             if (this.wait == 1)
             if (this.tur_head.frame == 9 || this.tur_head.frame == 1)
@@ -180,7 +180,7 @@ void spiderbot_rocket_do(entity this)
 
     v = gettaginfo(this.tur_head,gettagindex(this.tur_head,"tag_fire"));
 
-    switch(this.vehicle_weapon2mode)
+    switch(STAT(VEHICLESTAT_W2MODE, this))
     {
         case SBRM_VOLLY:
             rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, SND_ROCKET_FIRE,
@@ -240,7 +240,7 @@ void spiderbot_rocket_do(entity this)
     if (this.tur_head.frame == 9)
         this.attack_finished_single[0] = autocvar_g_vehicle_spiderbot_rocket_reload;
     else
-        this.attack_finished_single[0] = ((this.vehicle_weapon2mode ==  SBRM_VOLLY) ? autocvar_g_vehicle_spiderbot_rocket_refire2 : autocvar_g_vehicle_spiderbot_rocket_refire);
+        this.attack_finished_single[0] = ((STAT(VEHICLESTAT_W2MODE, this) ==  SBRM_VOLLY) ? autocvar_g_vehicle_spiderbot_rocket_refire2 : autocvar_g_vehicle_spiderbot_rocket_refire);
 
     this.gun2.cnt = time + this.attack_finished_single[0];
 }
index e430ec2e78c252dea99cfc5c8fdfcc1a874bce8a..5c51c2d87b4da7071b8dcde95671038f3618e630 100644 (file)
@@ -531,7 +531,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim)
        // make them match perfectly
 #ifdef SVQC
     // null during init
-    if (this.owner) this.owner.stat_shotorg = compressed_shotorg;
+    if (this.owner) STAT(SHOTORG, this.owner) = compressed_shotorg;
        this.movedir = decompressShotOrigin(compressed_shotorg);
 #else
        this.movedir = decompressShotOrigin(compressed_shotorg);
@@ -554,10 +554,7 @@ REGISTER_NET_TEMP(wframe)
 #ifdef CSQC
 NET_HANDLE(wframe, bool isNew)
 {
-       vector a;
-       a.x = ReadCoord();
-    a.y = ReadCoord();
-    a.z = ReadCoord();
+       vector a = ReadVector();
     int slot = ReadByte();
        bool restartanim = ReadByte();
        entity wepent = viewmodels[slot];
@@ -590,9 +587,7 @@ void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim)
        int channel = MSG_ONE;
        msg_entity = actor;
        WriteHeader(channel, wframe);
-       WriteCoord(channel, a.x);
-       WriteCoord(channel, a.y);
-       WriteCoord(channel, a.z);
+       WriteVector(channel, a);
        WriteByte(channel, weaponslot(weaponentity.weaponentity_fld));
        WriteByte(channel, restartanim);
        WriteByte(channel, weaponentity.state);
index 87cb11429f6ecae52d3ea30dd9a081fc0fead5f2..460d95af65e685253865e8cdd65d1abc35fd6ece 100644 (file)
@@ -195,10 +195,10 @@ const int WEP_FLAG_RELOADABLE     =  BIT(6); // can has reload
 const int WEP_FLAG_SUPERWEAPON    =  BIT(7); // powerup timer
 const int WEP_FLAG_MUTATORBLOCKED =  BIT(8); // hides from impulse 99 etc. (mutators are allowed to clear this flag)
 const int WEP_TYPE_MELEE_PRI      =  BIT(9); // primary attack is melee swing (for animation)
-const int WEP_TYPE_MELEE_SEC      =  BIT(12); // secondary attack is melee swing (for animation)
-const int WEP_FLAG_DUALWIELD      =  BIT(13); // weapon can be dual wielded
-const int WEP_FLAG_NODUAL         =  BIT(14); // weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything
-const int WEP_FLAG_PENETRATEWALLS =  BIT(15); // weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
+const int WEP_TYPE_MELEE_SEC      =  BIT(10); // secondary attack is melee swing (for animation)
+const int WEP_FLAG_DUALWIELD      =  BIT(11); // weapon can be dual wielded
+const int WEP_FLAG_NODUAL         =  BIT(12); // weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything
+const int WEP_FLAG_PENETRATEWALLS =  BIT(13); // weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
 
 // variables:
 string weaponorder_byid;
index 7169fae4270c82a632ba48e9e312c7f4daa27ad9..21ca117f4c4ec89980bbb60f9e34e3c4b88a549c 100644 (file)
@@ -30,21 +30,17 @@ bool W_Arc_Beam_Send(entity this, entity to, int sf)
        }
        if(sf & ARC_SF_START) // starting location
        {
-               WriteCoord(MSG_ENTITY, this.beam_start.x);
-               WriteCoord(MSG_ENTITY, this.beam_start.y);
-               WriteCoord(MSG_ENTITY, this.beam_start.z);
+               WriteVector(MSG_ENTITY, this.beam_start);
        }
        if(sf & ARC_SF_WANTDIR) // want/aim direction
        {
-               WriteCoord(MSG_ENTITY, this.beam_wantdir.x);
-               WriteCoord(MSG_ENTITY, this.beam_wantdir.y);
-               WriteCoord(MSG_ENTITY, this.beam_wantdir.z);
+               WriteVector(MSG_ENTITY, this.beam_wantdir);
        }
        if(sf & ARC_SF_BEAMDIR) // beam direction
        {
-               WriteCoord(MSG_ENTITY, this.beam_dir.x);
-               WriteCoord(MSG_ENTITY, this.beam_dir.y);
-               WriteCoord(MSG_ENTITY, this.beam_dir.z);
+               WriteAngle(MSG_ENTITY, this.beam_dir.x);
+               WriteAngle(MSG_ENTITY, this.beam_dir.y);
+               WriteAngle(MSG_ENTITY, this.beam_dir.z);
        }
        if(sf & ARC_SF_BEAMTYPE) // beam type
        {
@@ -1227,9 +1223,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
 
        if(sf & ARC_SF_START) // starting location
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
        }
        else if(this.beam_usevieworigin) // infer the location from player location
        {
@@ -1249,16 +1243,14 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
 
        if(sf & ARC_SF_WANTDIR) // want/aim direction
        {
-               this.v_angle_x = ReadCoord();
-               this.v_angle_y = ReadCoord();
-               this.v_angle_z = ReadCoord();
+               this.v_angle = ReadVector();
        }
 
        if(sf & ARC_SF_BEAMDIR) // beam direction
        {
-               this.angles_x = ReadCoord();
-               this.angles_y = ReadCoord();
-               this.angles_z = ReadCoord();
+               this.angles_x = ReadAngle();
+               this.angles_y = ReadAngle();
+               this.angles_z = ReadAngle();
        }
 
        if(sf & ARC_SF_BEAMTYPE) // beam type
@@ -1284,6 +1276,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
                                this.beam_muzzlelight[1] = 1;
                                this.beam_muzzlelight[2] = 1;
                                this.beam_muzzlelight[3] = 1;
+                               this.beam_image = "particles/lgbeam";
                                if(this.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
index e04376b2f4fee279a289c1bb7bb8fcb4de320e36..8d569d04e253f798debe0b17747233432166bf92 100644 (file)
@@ -466,16 +466,12 @@ NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)
        }
        if(sf & 2)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
        }
        if(sf & 4)
        {
-               this.velocity_x = ReadCoord();
-               this.velocity_y = ReadCoord();
-               this.velocity_z = ReadCoord();
+               this.velocity = ReadVector();
        }
 
        InterpolateOrigin_Note(this);
index 7c775be2fdc39431ba18bdbb3188b4d513bc2c86..e9d55b24232353c0a5f086f5b40373f60b17f0c3 100644 (file)
@@ -257,12 +257,8 @@ float W_Shockwave_Attack_CheckHit(
 void W_Shockwave_Send(entity actor)
 {
        WriteHeader(MSG_BROADCAST, TE_CSQC_SHOCKWAVEPARTICLE);
-       WriteCoord(MSG_BROADCAST, w_shotorg.x);
-       WriteCoord(MSG_BROADCAST, w_shotorg.y);
-       WriteCoord(MSG_BROADCAST, w_shotorg.z);
-       WriteCoord(MSG_BROADCAST, w_shotdir.x);
-       WriteCoord(MSG_BROADCAST, w_shotdir.y);
-       WriteCoord(MSG_BROADCAST, w_shotdir.z);
+       WriteVector(MSG_BROADCAST, w_shotorg);
+       WriteVector(MSG_BROADCAST, w_shotdir);
        WriteShort(MSG_BROADCAST, WEP_CVAR(shockwave, blast_distance));
        WriteByte(MSG_BROADCAST, bound(0, WEP_CVAR(shockwave, blast_spread_max), 255));
        WriteByte(MSG_BROADCAST, bound(0, WEP_CVAR(shockwave, blast_spread_min), 255));
@@ -766,8 +762,8 @@ void Net_ReadShockwaveParticle()
        shockwave.draw = Draw_Shockwave;
        IL_PUSH(g_drawables, shockwave);
 
-       shockwave.sw_shotorg_x = ReadCoord(); shockwave.sw_shotorg_y = ReadCoord(); shockwave.sw_shotorg_z = ReadCoord();
-       shockwave.sw_shotdir_x = ReadCoord(); shockwave.sw_shotdir_y = ReadCoord(); shockwave.sw_shotdir_z = ReadCoord();
+       shockwave.sw_shotorg = ReadVector();
+       shockwave.sw_shotdir = ReadVector();
 
        shockwave.sw_distance = ReadShort();
        shockwave.sw_spread_max = ReadByte();
index 5d9abce339ef5b5b909831f3de44defb55c974ab..eb780808932fcd471d96d4727f6aa9cf6aae87a0 100644 (file)
@@ -223,9 +223,7 @@ bool W_Tuba_NoteSendEntity(entity this, entity to, int sf)
        }
        if (sf & 2)
        {
-               WriteCoord(MSG_ENTITY, this.origin.x);
-               WriteCoord(MSG_ENTITY, this.origin.y);
-               WriteCoord(MSG_ENTITY, this.origin.z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
        return true;
 }
@@ -553,9 +551,7 @@ NET_HANDLE(ENT_CLIENT_TUBANOTE, bool isNew)
        }
 
        if (f & 2) {
-               this.enemy.origin_x = ReadCoord();
-               this.enemy.origin_y = ReadCoord();
-               this.enemy.origin_z = ReadCoord();
+               this.enemy.origin = ReadVector();
                setorigin(this.enemy, this.enemy.origin);
                if (this.enemy.enemy) {
                        setorigin(this.enemy.enemy, this.enemy.origin);
index 7dae1b3f731d2a3cf479a8a71ddd733ea1ed2afe..06562f68a8c5c5e071096d8490347449458ba47b 100644 (file)
@@ -7,12 +7,8 @@ void SendCSQCVaporizerBeamParticle(entity player, int hit) {
        vector v;
        v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
        WriteHeader(MSG_BROADCAST, TE_CSQC_VAPORBEAMPARTICLE);
-       WriteCoord(MSG_BROADCAST, w_shotorg.x);
-       WriteCoord(MSG_BROADCAST, w_shotorg.y);
-       WriteCoord(MSG_BROADCAST, w_shotorg.z);
-       WriteCoord(MSG_BROADCAST, v.x);
-       WriteCoord(MSG_BROADCAST, v.y);
-       WriteCoord(MSG_BROADCAST, v.z);
+       WriteVector(MSG_BROADCAST, w_shotorg);
+       WriteVector(MSG_BROADCAST, v);
        WriteByte(MSG_BROADCAST, hit);
        WriteByte(MSG_BROADCAST, etof(player));
        WriteByte(MSG_BROADCAST, player.team);
@@ -82,8 +78,8 @@ NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, bool isNew)
        if (isNew) IL_PUSH(g_drawables, this);
        this.drawmask = MASK_NORMAL;
 
-       this.vorg1_x = ReadCoord(); this.vorg1_y = ReadCoord(); this.vorg1_z = ReadCoord();
-       this.vorg2_x = ReadCoord(); this.vorg2_y = ReadCoord(); this.vorg2_z = ReadCoord();
+       this.vorg1 = ReadVector();
+       this.vorg2 = ReadVector();
        this.cnt = ReadByte();
        int myowner = ReadByte();
        this.owner = playerslots[myowner - 1];
index 7e5da5c5ac0ca1195fece8cab027fd1da2ecb202..8c590bf6e2c6841f56c2a5b978123f5fad64d3f4 100644 (file)
@@ -38,21 +38,16 @@ void SendCSQCVortexBeamParticle(float charge) {
        vector v;
        v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
        WriteHeader(MSG_BROADCAST, TE_CSQC_VORTEXBEAMPARTICLE);
-       WriteCoord(MSG_BROADCAST, w_shotorg.x);
-       WriteCoord(MSG_BROADCAST, w_shotorg.y);
-       WriteCoord(MSG_BROADCAST, w_shotorg.z);
-       WriteCoord(MSG_BROADCAST, v.x);
-       WriteCoord(MSG_BROADCAST, v.y);
-       WriteCoord(MSG_BROADCAST, v.z);
+       WriteVector(MSG_BROADCAST, w_shotorg);
+       WriteVector(MSG_BROADCAST, v);
        WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
 }
 #elif defined(CSQC)
 NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
 {
-       vector shotorg, endpos;
        float charge;
-       shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
-       endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
+    vector shotorg = ReadVector();
+    vector endpos = ReadVector();
        charge = ReadByte() / 255.0;
 
        pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
index f74e9c2d5526c895fd8b28c1bdd9bb7a884faef0..fa087b5eb48bbb29c78bee163e703ee7e9e60a3a 100644 (file)
@@ -6,7 +6,6 @@ void sys_phys_fix(entity this, float dt)
        PHYS_WATERJUMP_TIME(this) -= dt;
        this.movement = PHYS_INPUT_MOVEVALUES(this);
        this.items = STAT(ITEMS, this);
-       this.spectatorspeed = STAT(SPECTATORSPEED, this);
        if (!(PHYS_INPUT_BUTTON_JUMP(this))) // !jump
                UNSET_JUMP_HELD(this);           // canjump = true
        PM_ClientMovement_UpdateStatus(this);
index ec97bb2a15734f9bbc7c6f3b700e752a1527f8dc..c8b459962eb0102247c4f308459d680e2965cf76 100644 (file)
@@ -48,7 +48,7 @@ void sys_phys_update(entity this, float dt)
 
        if (!IS_PLAYER(this)) {
                sys_phys_spectator_control(this);
-               maxspeed_mod = this.spectatorspeed;
+               maxspeed_mod = STAT(SPECTATORSPEED, this);
        }
        sys_phys_fixspeed(this, maxspeed_mod);
 
index 6677d1782fe0c17720c8ef7d4a6f45c092419ce9..5ae47c394da75d90665680af45cb8fccbfa9f71a 100644 (file)
@@ -54,7 +54,7 @@ void sys_phys_pregame_hold(entity this)
 void sys_phys_spectator_control(entity this)
 {
        float maxspeed_mod = autocvar_sv_spectator_speed_multiplier;
-       if (!this.spectatorspeed) { this.spectatorspeed = maxspeed_mod; }
+       if (!STAT(SPECTATORSPEED, this)) { STAT(SPECTATORSPEED, this) = maxspeed_mod; }
        if ((CS(this).impulse >= 1 && CS(this).impulse <= 19)
            || (CS(this).impulse >= 200 && CS(this).impulse <= 209)
            || (CS(this).impulse >= 220 && CS(this).impulse <= 229)
@@ -65,17 +65,17 @@ void sys_phys_spectator_control(entity this)
                            || CS(this).impulse == 18
                            || (CS(this).impulse >= 200 && CS(this).impulse <= 209)
                           ) {
-                               this.spectatorspeed = bound(autocvar_sv_spectator_speed_multiplier_min, this.spectatorspeed + 0.5, autocvar_sv_spectator_speed_multiplier_max);
+                               STAT(SPECTATORSPEED, this) = bound(autocvar_sv_spectator_speed_multiplier_min, STAT(SPECTATORSPEED, this) + 0.5, autocvar_sv_spectator_speed_multiplier_max);
                        } else if (CS(this).impulse == 11) {
-                               this.spectatorspeed = maxspeed_mod;
+                               STAT(SPECTATORSPEED, this) = maxspeed_mod;
                        } else if (CS(this).impulse == 12
                            || CS(this).impulse == 16
                            || CS(this).impulse == 19
                            || (CS(this).impulse >= 220 && CS(this).impulse <= 229)
                                  ) {
-                               this.spectatorspeed = bound(autocvar_sv_spectator_speed_multiplier_min, this.spectatorspeed - 0.5, autocvar_sv_spectator_speed_multiplier_max);
+                               STAT(SPECTATORSPEED, this) = bound(autocvar_sv_spectator_speed_multiplier_min, STAT(SPECTATORSPEED, this) - 0.5, autocvar_sv_spectator_speed_multiplier_max);
                        } else if (CS(this).impulse >= 1 && CS(this).impulse <= 9) {
-                               this.spectatorspeed = 1 + 0.5 * (CS(this).impulse - 1);
+                               STAT(SPECTATORSPEED, this) = 1 + 0.5 * (CS(this).impulse - 1);
                        }
                }  // otherwise just clear
                CS(this).impulse = 0;
index 37b88997ef84bf7d456e34575fc0859d79f01442..f8375d09e8202de55cdda5a61dcc6de4d85b9912 100644 (file)
@@ -66,15 +66,9 @@ const int CSQCMODEL_PROPERTY_SIZE = BIT(15);
 #define ALLPROPERTIES_COMMON \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, int, ReadByte, WriteByte, frame) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, int, ReadShort, WriteShort, modelindex) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_x) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_y) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_z) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_x) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_y) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, mins_z) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_x) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_y) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, float, ReadShort, WriteShort, maxs_z) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, vector, ReadVector, WriteVector, origin) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, mins) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_SIZE, vector, ReadVector, WriteVector, maxs) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_x) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_YAW, float, ReadAngle, WriteAngle, angles_y) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, float, ReadAngle, WriteAngle, angles_z) \
index 15a3ca4c3ccc6e90870c72ab7bc74251777dd397..3a6765e9d46fbfc7ed9025238cfe8017a1fc5bde 100644 (file)
@@ -42,32 +42,18 @@ NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew)
        this.warpzone_isboxy = (f & 1);
        if(f & 4)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
        }
        else
                this.origin = '0 0 0';
        this.modelindex = ReadShort();
-       this.mins_x = ReadCoord();
-       this.mins_y = ReadCoord();
-       this.mins_z = ReadCoord();
-       this.maxs_x = ReadCoord();
-       this.maxs_y = ReadCoord();
-       this.maxs_z = ReadCoord();
+       this.mins = ReadVector();
+       this.maxs = ReadVector();
        this.scale = ReadByte() / 16;
-       this.enemy.oldorigin_x = ReadCoord();
-       this.enemy.oldorigin_y = ReadCoord();
-       this.enemy.oldorigin_z = ReadCoord();
-       this.enemy.avelocity_x = ReadCoord();
-       this.enemy.avelocity_y = ReadCoord();
-       this.enemy.avelocity_z = ReadCoord();
-       this.oldorigin_x = ReadCoord();
-       this.oldorigin_y = ReadCoord();
-       this.oldorigin_z = ReadCoord();
-       this.avelocity_x = ReadCoord();
-       this.avelocity_y = ReadCoord();
-       this.avelocity_z = ReadCoord();
+       this.enemy.oldorigin = ReadVector();
+       this.enemy.avelocity = ReadVector();
+       this.oldorigin = ReadVector();
+       this.avelocity = ReadVector();
 
        if(f & 2)
        {
@@ -104,26 +90,16 @@ NET_HANDLE(ENT_CLIENT_WARPZONE_CAMERA, bool isnew)
        int f = ReadByte();
        if(f & 4)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
        }
        else
                this.origin = '0 0 0';
        this.modelindex = ReadShort();
-       this.mins_x = ReadCoord();
-       this.mins_y = ReadCoord();
-       this.mins_z = ReadCoord();
-       this.maxs_x = ReadCoord();
-       this.maxs_y = ReadCoord();
-       this.maxs_z = ReadCoord();
+       this.mins = ReadVector();
+       this.maxs = ReadVector();
        this.scale = ReadByte() / 16;
-       this.oldorigin_x = ReadCoord();
-       this.oldorigin_y = ReadCoord();
-       this.oldorigin_z = ReadCoord();
-       this.avelocity_x = ReadCoord();
-       this.avelocity_y = ReadCoord();
-       this.avelocity_z = ReadCoord();
+       this.oldorigin = ReadVector();
+       this.avelocity = ReadVector();
 
        if(f & 2)
        {
@@ -157,10 +133,7 @@ void CL_RotateMoves(vector ang) = #638;
 NET_HANDLE(ENT_CLIENT_WARPZONE_TELEPORTED, bool isnew)
 {
        this.classname = "warpzone_teleported";
-       vector v;
-       v.x = ReadCoord();
-       v.y = ReadCoord();
-       v.z = ReadCoord();
+       vector v = ReadVector();
        return = true;
        if (!isnew) return;
        this.warpzone_transform = v;
index 936d075da8f69e2b3057d965dc35029b57b1cf23..8246e106de54165f014b548b50adb247009a7a91 100644 (file)
@@ -61,9 +61,7 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector
 bool WarpZone_Teleported_Send(entity this, entity to, int sf)
 {
        WriteHeader(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
-       WriteCoord(MSG_ENTITY, this.angles.x);
-       WriteCoord(MSG_ENTITY, this.angles.y);
-       WriteCoord(MSG_ENTITY, this.angles.z);
+       WriteVector(MSG_ENTITY, this.angles);
        return true;
 }
 #endif
index 18e5ae08123ff999f479c896f2eadc79de4972d6..e727b39e6446acbb10e8745c5b0a5bb93d3fcdea 100644 (file)
@@ -48,6 +48,7 @@ void GameCommand(string theCommand)
                LOG_INFO(_("Usage: menu_cmd command..., where possible commands are:"));
                LOG_INFO(_("  sync - reloads all cvars on the current menu page"));
                LOG_INFO(_("  directmenu ITEM - select a menu item as main item"));
+               LOG_INFO(_("  dumptree - dump the state of the menu as a tree to the console"));
 
                LOG_INFO("Generic commands shared by all programs:");
                GenericCommand_macro_help();
index 01184a4bf5d026e2c5c0580c8ef625e07610772a..ae6967e367565fc02c38f08f57c77ac0ccca706d 100644 (file)
@@ -312,32 +312,55 @@ float draw_CondensedFontFactor(string theText, float ICanHasKallerz, vector Size
        return 1.0;
 }
 
-float draw_clipSet;
+IntrusiveList draw_clip;
+STATIC_INIT(draw_clip) { draw_clip = IL_NEW(); }
+CLASS(ClipFrame, Object)
+       ATTRIB(ClipFrame, clip_shift, vector, '0 0 0');
+       ATTRIB(ClipFrame, clip_scale, vector, '0 0 0');
+ENDCLASS(ClipFrame)
+
+void _draw_SetClip(vector o, vector s)
+{
+       ClipFrame prev = IL_PEEK(draw_clip);
+       if (prev) {
+               o.x = bound(prev.clip_shift.x, o.x, prev.clip_shift.x + prev.clip_scale.x);
+               o.y = bound(prev.clip_shift.y, o.y, prev.clip_shift.y + prev.clip_scale.y);
+               s.x = bound(0, s.x, prev.clip_scale.x - (o.x - prev.clip_shift.x));
+               s.y = bound(0, s.y, prev.clip_scale.y - (o.y - prev.clip_shift.y));
+       }
+       ClipFrame e = NEW(ClipFrame);
+       e.clip_shift = o;
+       e.clip_scale = s;
+       IL_PUSH(draw_clip, e);
+       drawsetcliparea(o.x, o.y, s.x, s.y);
+}
+
 void draw_SetClip()
 {
-       if(draw_clipSet)
-               error("Already clipping, no stack implemented here, sorry");
-       drawsetcliparea(draw_shift.x, draw_shift.y, draw_scale.x, draw_scale.y);
-       draw_clipSet = 1;
+       _draw_SetClip(draw_shift, draw_scale);
 }
 
 void draw_SetClipRect(vector theOrigin, vector theScale)
 {
-       vector o, s;
-       if(draw_clipSet)
-               error("Already clipping, no stack implemented here, sorry");
-       o = boxToGlobal(theOrigin, draw_shift, draw_scale);
-       s = boxToGlobalSize(theScale, draw_scale);
-       drawsetcliparea(o.x, o.y, s.x, s.y);
-       draw_clipSet = 1;
+       _draw_SetClip(
+               boxToGlobal(theOrigin, draw_shift, draw_scale),
+               boxToGlobalSize(theScale, draw_scale)
+       );
 }
 
 void draw_ClearClip()
 {
-       if(!draw_clipSet)
-               error("Not clipping, can't clear it then");
+       if (IL_EMPTY(draw_clip)) {
+               LOG_FATAL("Not clipping, can't clear it then");
+       }
+       entity currentSettings = IL_PEEK(draw_clip);
+       IL_REMOVE(draw_clip, currentSettings);
+       delete(currentSettings);
        drawresetcliparea();
-       draw_clipSet = 0;
+       ClipFrame e = IL_PEEK(draw_clip);
+       if (e) {
+               drawsetcliparea(e.clip_shift.x, e.clip_shift.y, e.clip_scale.x, e.clip_scale.y);
+       }
 }
 
 string draw_TextShortenToWidth(string theText, float maxWidth, float ICanHasKallerz, vector SizeThxBye)
index 1d31e95a9c7d5c513ea9f2766da4c574a1d7eca3..a5c7cfa8544c70219099a4a12079b7a87dd5a408 100644 (file)
@@ -74,9 +74,9 @@
                return 0;  // unhandled
        }
 
-       METHOD(Item, mousePress, float(Item this, vector pos))
+       METHOD(Item, mousePress, bool(Item this, vector pos))
        {
-               return 0;  // unhandled
+               return false;  // unhandled
        }
 
        METHOD(Item, mouseDrag, float(Item this, vector pos))
index a5df526806e851e7777f0e6792de627881a46145..6cee17b3fdd5f9ccd24a66d078f040aaee9110a2 100644 (file)
@@ -10,7 +10,7 @@ CLASS(Item, Object)
        METHOD(Item, keyDown, float(Item, float, float, float));
        METHOD(Item, keyUp, float(Item, float, float, float));
        METHOD(Item, mouseMove, float(Item, vector));
-       METHOD(Item, mousePress, float(Item, vector));
+       METHOD(Item, mousePress, bool(Item this, vector pos));
        METHOD(Item, mouseDrag, float(Item, vector));
        METHOD(Item, mouseRelease, float(Item, vector));
        METHOD(Item, focusEnter, void(Item));
index 8299a6859f539c097404e15184437e0903b44c4f..77e4ccad264fee8f912abdb8573ba154af71289c 100644 (file)
                if (pos.y >= 1) me.pressed = 0;
                return 1;
        }
-       float Button_mousePress(entity me, vector pos)
+       METHOD(Button, mousePress, bool(Button this, vector pos))
        {
-               me.mouseDrag(me, pos);  // verify coordinates
-               return 1;
+               this.mouseDrag(this, pos);  // verify coordinates
+               return true;
        }
        float Button_mouseRelease(entity me, vector pos)
        {
index 1a164245c8f269368067b3b43c4ae6f92fd9066f..2077da70071c5b680c55e6ac83b10838b83bf2a4 100644 (file)
@@ -9,7 +9,7 @@ CLASS(Button, Label)
        METHOD(Button, showNotify, void(entity));
        METHOD(Button, resizeNotify, void(entity, vector, vector, vector, vector));
        METHOD(Button, keyDown, float(entity, float, float, float));
-       METHOD(Button, mousePress, float(entity, vector));
+       METHOD(Button, mousePress, bool(Button this, vector pos));
        METHOD(Button, mouseDrag, float(entity, vector));
        METHOD(Button, mouseRelease, float(entity, vector));
        METHOD(Button, playClickSound, void(entity));
index 56535bf71c18f5ddd24202dc534642568948c1c2..329ddf0f6e201c880a09883f0fdc3af296e78dce 100644 (file)
                }
                return 0;
        }
-       float Container_mousePress(entity me, vector pos)
+       METHOD(Container, mousePress, bool(Container this, vector pos))
        {
-               entity f;
-               float r;
-               f = me.focusedChild;
+               entity f = this.focusedChild;
                if (f)
                {
-                       me.enterSubitem(me, f);
-                       r = f.mousePress(f, globalToBox(pos, f.Container_origin, f.Container_size));
-                       me.leaveSubitem(me);
+                       this.enterSubitem(this, f);
+                       bool r = f.mousePress(f, globalToBox(pos, f.Container_origin, f.Container_size));
+                       this.leaveSubitem(this);
                        return r;
                }
-               return 0;
+               return false;
        }
        float Container_mouseDrag(entity me, vector pos)
        {
                                me.focusedChild.focused = 1;
                                me.focusedChild.focusEnter(me.focusedChild);
 
-                               if (me.focusedChild.instanceOfContainer) me.focusedChild.setFocus(me.focusedChild, me.focusedChild.savedFocus);
+                               if (me.focusedChild.instanceOfContainer)
+                                       me.focusedChild.setFocus(me.focusedChild, me.focusedChild.savedFocus);
                        }
                        else
                        {
index 8273f5ddde38a43ec3e153d3a5f02247f452a775..b73752685030a8ef57277ddaf3a3b7b7279f26f1 100644 (file)
@@ -7,7 +7,7 @@ CLASS(Container, Item)
        METHOD(Container, keyUp, float(entity, float, float, float));
        METHOD(Container, keyDown, float(entity, float, float, float));
        METHOD(Container, mouseMove, float(entity, vector));
-       METHOD(Container, mousePress, float(entity, vector));
+       METHOD(Container, mousePress, bool(Container this, vector pos));
        METHOD(Container, mouseDrag, float(entity, vector));
        METHOD(Container, mouseRelease, float(entity, vector));
        METHOD(Container, focusLeave, void(entity));
index 59405ec169f15448df4e7f028c67b8e43ef56c0b..73b302c4a7716a6e7f7b363b030a3d46ff7058a8 100644 (file)
 
        void Image_draw(entity me)
        {
-               if (me.imgSize.x > 1 || me.imgSize.y > 1) draw_SetClip();
+               bool willClip = me.imgSize.x > 1 || me.imgSize.y > 1;
+               if (willClip) draw_SetClip();
                draw_Picture(me.imgOrigin, me.src, me.imgSize, me.color, 1);
-               if (me.imgSize.x > 1 || me.imgSize.y > 1) draw_ClearClip();
+               if (willClip) draw_ClearClip();
                SUPER(Image).draw(me);
        }
        void Image_updateAspect(entity me)
index 6f7ed9f24309b7d7556d5d594144acf642198a83..a418dc2ce0fffa7b761fff860ebe8f950dbb09bf 100644 (file)
                return 1;
        }
 
-       float InputBox_mousePress(entity me, vector pos)
+       METHOD(InputBox, mousePress, bool(InputBox this, vector pos))
        {
-               if (me.enableClearButton)
-                       if (over_ClearButton(me, pos))
+               if (this.enableClearButton)
+                       if (over_ClearButton(this, pos))
                        {
-                               me.cb_pressed = 1;
-                               return 1;
+                               this.cb_pressed = 1;
+                               return true;
                        }
-               me.dragScrollTimer = time;
-               me.pressed = 1;
-               return InputBox_mouseDrag(me, pos);
+               this.dragScrollTimer = time;
+               this.pressed = 1;
+               return InputBox_mouseDrag(this, pos);
        }
 
        float InputBox_mouseRelease(entity me, vector pos)
index e3eede653b9c0c297bf698b36ed1b4108ae5035b..5b0c28f9e454d49eb6990e9cd694abe845f8e4dd 100644 (file)
@@ -9,7 +9,7 @@ CLASS(InputBox, Label)
        METHOD(InputBox, keyDown, float(entity, float, float, float));
        METHOD(InputBox, mouseMove, float(entity, vector));
        METHOD(InputBox, mouseRelease, float(entity, vector));
-       METHOD(InputBox, mousePress, float(entity, vector));
+       METHOD(InputBox, mousePress, bool(InputBox this, vector pos));
        METHOD(InputBox, mouseDrag, float(entity, vector));
        METHOD(InputBox, showNotify, void(entity));
        METHOD(InputBox, resizeNotify, void(entity, vector, vector, vector, vector));
index 37c46240f77fdcd8bf704b1b6d999aaa3de5e254..cda342677262206dd8afb2bcdb011f136ed2edc9 100644 (file)
                if (e && !e.focusable) e = NULL;
                entity prev = this.mouseFocusedChild;
                this.mouseFocusedChild = e;
-               if (!e) return false;  // keep focus when hovering over non-focusable elements
                if (e != prev)
                {
                        this.setFocus(this, e);
-                       if (e.instanceOfInputContainer)
+                       if (e && e.instanceOfInputContainer)
                        {
                                e.focusedChild = NULL;
                                e._changeFocusXY(e, globalToBox(pos, e.Container_origin, e.Container_size));
                if (pos.x >= 0 && pos.y >= 0 && pos.x < 1 && pos.y < 1) return 1;
                return 0;
        }
-       float InputContainer_mousePress(entity me, vector pos)
+       METHOD(InputContainer, mousePress, bool(InputContainer this, vector pos))
        {
-               me.mouseFocusedChild = NULL;  // force focusing
-               if (me._changeFocusXY(me, pos))
-                       if (SUPER(InputContainer).mousePress(me, pos)) return 1;
-               if (pos.x >= 0 && pos.y >= 0 && pos.x < 1 && pos.y < 1) return 1;
-               return 0;
+               this.mouseFocusedChild = NULL;  // force focusing
+               if (this._changeFocusXY(this, pos))
+                       if (SUPER(InputContainer).mousePress(this, pos)) return true;
+               if (pos.x >= 0 && pos.y >= 0 && pos.x < 1 && pos.y < 1) return true;
+               return false;
        }
        float InputContainer_mouseRelease(entity me, vector pos)
        {
index 9ae4a537506bcad1a54fb7721b7816dd74685d35..8ded2e657bcba13f3a7f594c078d6dafceee4043 100644 (file)
@@ -4,7 +4,7 @@
 CLASS(InputContainer, Container)
        METHOD(InputContainer, keyDown, float(entity, float, float, float));
        METHOD(InputContainer, mouseMove, float(entity, vector));
-       METHOD(InputContainer, mousePress, float(entity, vector));
+       METHOD(InputContainer, mousePress, bool(InputContainer this, vector pos));
        METHOD(InputContainer, mouseRelease, float(entity, vector));
        METHOD(InputContainer, mouseDrag, float(entity, vector));
        METHOD(InputContainer, focusLeave, void(entity));
index aa10c20b3b0f6d04bac8d5810e8b53b74bb799f2..07385e91e68ac0dde198ac54ce2377ecbadaf6b6 100644 (file)
                }
                return 1;
        }
-       float ListBox_mousePress(entity me, vector pos)
+       METHOD(ListBox, mousePress, bool(ListBox this, vector pos))
        {
-               if (pos.x < 0) return 0;
-               if (pos.y < 0) return 0;
-               if (pos.x >= 1) return 0;
-               if (pos.y >= 1) return 0;
-               me.dragScrollPos = pos;
-               me.updateControlTopBottom(me);
-               if (pos.x >= 1 - me.controlWidth)
+               if (pos.x < 0) return false;
+               if (pos.y < 0) return false;
+               if (pos.x >= 1) return false;
+               if (pos.y >= 1) return false;
+               this.dragScrollPos = pos;
+               this.updateControlTopBottom(this);
+               if (pos.x >= 1 - this.controlWidth)
                {
-                       // if hit, set me.pressed, otherwise scroll by one page
-                       if (pos.y < me.controlTop)
+                       // if hit, set this.pressed, otherwise scroll by one page
+                       if (pos.y < this.controlTop)
                        {
                                // page up
-                               me.scrollPosTarget = max(me.scrollPosTarget - 1, 0);
+                               this.scrollPosTarget = max(this.scrollPosTarget - 1, 0);
                        }
-                       else if (pos.y > me.controlBottom)
+                       else if (pos.y > this.controlBottom)
                        {
                                // page down
-                               me.scrollPosTarget = min(me.scrollPosTarget + 1, me.getTotalHeight(me) - 1);
+                               this.scrollPosTarget = min(this.scrollPosTarget + 1, this.getTotalHeight(this) - 1);
                        }
                        else
                        {
-                               me.pressed = 1;
-                               me.pressOffset = pos.y;
-                               me.previousValue = me.scrollPos;
+                               this.pressed = 1;
+                               this.pressOffset = pos.y;
+                               this.previousValue = this.scrollPos;
                        }
                }
                else
                {
                        // continue doing that while dragging (even when dragging outside). When releasing, forward the click to the then selected item.
-                       me.pressed = 2;
+                       this.pressed = 2;
                        // an item has been clicked. Select it, ...
-                       me.setSelected(me, me.getItemAtPos(me, me.scrollPos + pos.y));
-                       me.setFocusedItem(me, me.selectedItem);
+                       this.setSelected(this, this.getItemAtPos(this, this.scrollPos + pos.y));
+                       this.setFocusedItem(this, this.selectedItem);
                }
-               return 1;
+               return true;
        }
        void ListBox_setFocusedItem(entity me, int item)
        {
        AUTOCVAR(menu_scroll_averaging_time_pressed, float, 0.06, "smooth scroll averaging time when dragging the scrollbar");
        void ListBox_draw(entity me)
        {
-               float i;
-               vector absSize, fillSize = '0 0 0';
-               vector oldshift, oldscale;
+               vector fillSize = '0 0 0';
 
                // we can't do this in mouseMove as the list can scroll without moving the cursor
                if (me.mouseMoveOffset != -1) me.setFocusedItem(me, me.getItemAtPos(me, me.scrollPos + me.mouseMoveOffset));
                        }
                }
                draw_SetClip();
-               oldshift = draw_shift;
-               oldscale = draw_scale;
+               vector oldshift = draw_shift;
+               vector oldscale = draw_scale;
 
-               i = me.getItemAtPos(me, me.scrollPos);
-               float j = me.getItemStart(me, i) - me.scrollPos;
-               for ( ; i < me.nItems && j < 1; ++i)
+               int i = me.getItemAtPos(me, me.scrollPos);
+               float y = me.getItemStart(me, i) - me.scrollPos;
+               for ( ; i < me.nItems && y < 1; ++i)
                {
-                       draw_shift = boxToGlobal(eY * j, oldshift, oldscale);
+                       draw_shift = boxToGlobal(eY * y, oldshift, oldscale);
                        vector relSize = eX * (1 - me.controlWidth) + eY * me.getItemHeight(me, i);
-                       absSize = boxToGlobalSize(relSize, me.size);
+                       vector absSize = boxToGlobalSize(relSize, me.size);
                        draw_scale = boxToGlobalSize(relSize, oldscale);
                        me.drawListBoxItem(me, i, absSize, (me.selectedItem == i), (me.focusedItem == i));
-                       j += relSize.y;
+                       y += relSize.y;
                }
                draw_ClearClip();
 
index 56fda91cc15d82e163e362e9a250c38a8c1bb525..b3f5164a4d0937f769a55c68fb9cfbf474b07a99 100644 (file)
@@ -7,7 +7,7 @@ CLASS(ListBox, Item)
        METHOD(ListBox, draw, void(entity));
        METHOD(ListBox, keyDown, float(entity, float, float, float));
        METHOD(ListBox, mouseMove, float(entity, vector));
-       METHOD(ListBox, mousePress, float(entity, vector));
+       METHOD(ListBox, mousePress, bool(ListBox this, vector pos));
        METHOD(ListBox, mouseDrag, float(entity, vector));
        METHOD(ListBox, mouseRelease, float(entity, vector));
        METHOD(ListBox, focusLeave, void(entity));
index c0f18cf859476eff528f0f9a9ebb10a1eee3acdd..d42fceb533a787a35a340eaa517aa964e1843247 100644 (file)
@@ -154,35 +154,35 @@ LABEL(have_overlap)
                SUPER(Nexposee).draw(me);
        }
 
-       float Nexposee_mousePress(entity me, vector pos)
+       METHOD(Nexposee, mousePress, bool(Nexposee this, vector pos))
        {
-               if (me.animationState == 0)
+               if (this.animationState == 0)
                {
-                       me.mouseFocusedChild = NULL;
-                       Nexposee_mouseMove(me, pos);
-                       if (me.mouseFocusedChild)
+                       this.mouseFocusedChild = NULL;
+                       Nexposee_mouseMove(this, pos);
+                       if (this.mouseFocusedChild)
                        {
                                m_play_click_sound(MENU_SOUND_OPEN);
-                               me.animationState = 1;
-                               SUPER(Nexposee).setFocus(me, NULL);
+                               this.animationState = 1;
+                               SUPER(Nexposee).setFocus(this, NULL);
                        }
                        else
                        {
-                               me.close(me);
+                               this.close(this);
                        }
-                       return 1;
+                       return true;
                }
-               else if (me.animationState == 2)
+               else if (this.animationState == 2)
                {
-                       if (!(SUPER(Nexposee).mousePress(me, pos)))
+                       if (!(SUPER(Nexposee).mousePress(this, pos)))
                        {
                                m_play_click_sound(MENU_SOUND_CLOSE);
-                               me.animationState = 3;
-                               SUPER(Nexposee).setFocus(me, NULL);
+                               this.animationState = 3;
+                               SUPER(Nexposee).setFocus(this, NULL);
                        }
-                       return 1;
+                       return true;
                }
-               return 0;
+               return false;
        }
 
        float Nexposee_mouseRelease(entity me, vector pos)
index 4159648f974207260d502ab8efb4ad90907258f4..440413b5e59616332194103a7c6f1b30cb8f0649 100644 (file)
@@ -5,7 +5,7 @@ CLASS(Nexposee, Container)
        METHOD(Nexposee, draw, void(entity));
        METHOD(Nexposee, keyDown, float(entity, float, float, float));
        METHOD(Nexposee, keyUp, float(entity, float, float, float));
-       METHOD(Nexposee, mousePress, float(entity, vector));
+       METHOD(Nexposee, mousePress, bool(Nexposee this, vector pos));
        METHOD(Nexposee, mouseMove, float(entity, vector));
        METHOD(Nexposee, mouseRelease, float(entity, vector));
        METHOD(Nexposee, mouseDrag, float(entity, vector));
index 2e89bb68ee21e7356dcc906653a73c9a35b385c1..b569c3b0c4c228bec7d158f558129e21fded4f7c 100644 (file)
 
                return 1;
        }
-       float Slider_mousePress(entity me, vector pos)
+       METHOD(Slider, mousePress, bool(Slider this, vector pos))
        {
                float controlCenter;
-               if (me.disabled) return 0;
-               if (pos.x < 0) return 0;
-               if (pos.y < 0) return 0;
-               if (pos.x >= 1 - me.textSpace) return 0;
-               if (pos.y >= 1) return 0;
-               controlCenter = (me.value - me.valueMin) / (me.valueMax - me.valueMin) * (1 - me.textSpace - me.controlWidth) + 0.5 * me.controlWidth;
-               if (fabs(pos.x - controlCenter) <= 0.5 * me.controlWidth)
+               if (this.disabled) return false;
+               if (pos.x < 0) return false;
+               if (pos.y < 0) return false;
+               if (pos.x >= 1 - this.textSpace) return false;
+               if (pos.y >= 1) return false;
+               controlCenter = (this.value - this.valueMin) / (this.valueMax - this.valueMin) * (1 - this.textSpace - this.controlWidth) + 0.5 * this.controlWidth;
+               if (fabs(pos.x - controlCenter) <= 0.5 * this.controlWidth)
                {
-                       me.pressed = 1;
-                       me.pressOffset = pos.x - controlCenter;
-                       me.previousValue = me.value;
-                       // me.mouseDrag(me, pos);
+                       this.pressed = 1;
+                       this.pressOffset = pos.x - controlCenter;
+                       this.previousValue = this.value;
+                       // this.mouseDrag(this, pos);
                }
                else
                {
                        float clickValue, pageValue, inRange;
-                       clickValue = median(0, (pos.x - me.pressOffset - 0.5 * me.controlWidth) / (1 - me.textSpace - me.controlWidth), 1) * (me.valueMax - me.valueMin) + me.valueMin;
-                       inRange = (almost_in_bounds(me.valueMin, me.value, me.valueMax));
+                       clickValue = median(0, (pos.x - this.pressOffset - 0.5 * this.controlWidth) / (1 - this.textSpace - this.controlWidth), 1) * (this.valueMax - this.valueMin) + this.valueMin;
+                       inRange = (almost_in_bounds(this.valueMin, this.value, this.valueMax));
                        if (pos.x < controlCenter)
                        {
-                               pageValue = me.value - me.valuePageStep;
-                               if (me.valueStep) clickValue = floor(clickValue / me.valueStep) * me.valueStep;
+                               pageValue = this.value - this.valuePageStep;
+                               if (this.valueStep) clickValue = floor(clickValue / this.valueStep) * this.valueStep;
                                pageValue = max(pageValue, clickValue);
                        }
                        else
                        {
-                               pageValue = me.value + me.valuePageStep;
-                               if (me.valueStep) clickValue = ceil(clickValue / me.valueStep) * me.valueStep;
+                               pageValue = this.value + this.valuePageStep;
+                               if (this.valueStep) clickValue = ceil(clickValue / this.valueStep) * this.valueStep;
                                pageValue = min(pageValue, clickValue);
                        }
-                       if (inRange) me.setValue(me, median(me.valueMin, pageValue, me.valueMax));
-                       else me.setValue(me, me.valueMax);
-                       if(me.applyButton)
-                               me.applyButton.disabled = false;
+                       if (inRange) this.setValue(this, median(this.valueMin, pageValue, this.valueMax));
+                       else this.setValue(this, this.valueMax);
+                       if(this.applyButton)
+                               this.applyButton.disabled = false;
                        if (pageValue == clickValue)
                        {
-                               controlCenter = (me.value - me.valueMin) / (me.valueMax - me.valueMin) * (1 - me.textSpace - me.controlWidth) + 0.5 * me.controlWidth;
-                               me.pressed = 1;
-                               me.pressOffset = pos.x - controlCenter;
-                               me.previousValue = me.value;
-                               // me.mouseDrag(me, pos);
+                               controlCenter = (this.value - this.valueMin) / (this.valueMax - this.valueMin) * (1 - this.textSpace - this.controlWidth) + 0.5 * this.controlWidth;
+                               this.pressed = 1;
+                               this.pressOffset = pos.x - controlCenter;
+                               this.previousValue = this.value;
+                               // this.mouseDrag(this, pos);
                        }
                }
-               return 1;
+               return true;
        }
        float Slider_mouseRelease(entity me, vector pos)
        {
index 3b7327788c0d130afb230471b076b8b8262587e9..c798aae338dcc5771ca8edcc51cfa9401e66522b 100644 (file)
@@ -10,7 +10,7 @@ CLASS(Slider, Label)
        METHOD(Slider, draw, void(entity));
        METHOD(Slider, keyDown, float(entity, float, float, float));
        METHOD(Slider, keyUp, float(entity, float, float, float));
-       METHOD(Slider, mousePress, float(entity, vector));
+       METHOD(Slider, mousePress, bool(Slider this, vector pos));
        METHOD(Slider, mouseDrag, float(entity, vector));
        METHOD(Slider, mouseRelease, float(entity, vector));
        METHOD(Slider, valueToText, string(entity, float));
index 577c8225803461225c818ce07f6cf396d1806f10..fd83718283928e45f0c77ad9d3af81cc62ad88d1 100644 (file)
@@ -98,6 +98,7 @@
 #include <menu/xonotic/rootdialog.qc>
 #include <menu/xonotic/screenshotimage.qc>
 #include <menu/xonotic/screenshotlist.qc>
+#include <menu/xonotic/scrollpanel.qc>
 #include <menu/xonotic/serverlist.qc>
 #include <menu/xonotic/skinlist.qc>
 #include <menu/xonotic/slider.qc>
index b6e34eff247606d774eb1d321fe9f7539071d3ff..f1644a2f5cfc0bb76657141f15d34dea80b340a8 100644 (file)
@@ -98,6 +98,7 @@
 #include <menu/xonotic/rootdialog.qh>
 #include <menu/xonotic/screenshotimage.qh>
 #include <menu/xonotic/screenshotlist.qh>
+#include <menu/xonotic/scrollpanel.qh>
 #include <menu/xonotic/serverlist.qh>
 #include <menu/xonotic/skinlist.qh>
 #include <menu/xonotic/slider.qh>
index 357276e16adf3794334eb7d640089b78350504ca..d8aedf69512a7349910fb0a0c6ba06e0009b6059 100644 (file)
@@ -16,10 +16,10 @@ void XonoticColorpicker_configureXonoticColorpicker(entity me, entity theTextbox
        me.configureImage(me, me.image);
 }
 
-float XonoticColorpicker_mousePress(entity me, vector coords)
+METHOD(XonoticColorpicker, mousePress, bool(XonoticColorpicker this, vector pos))
 {
-       me.mouseDrag(me, coords);
-       return 1;
+       this.mouseDrag(this, pos);
+       return true;
 }
 
 // must match hslimage.c
index b1c9d1e80ae566dd5a5dcddc8fb569f46bb3f3b3..149357dd9f2695065045d97edd6fb27be5b0d2ff 100644 (file)
@@ -3,7 +3,7 @@
 #include "../item/image.qh"
 CLASS(XonoticColorpicker, Image)
        METHOD(XonoticColorpicker, configureXonoticColorpicker, void(entity, entity));
-       METHOD(XonoticColorpicker, mousePress, float(entity, vector));
+       METHOD(XonoticColorpicker, mousePress, bool(XonoticColorpicker this, vector pos));
        METHOD(XonoticColorpicker, mouseRelease, float(entity, vector));
        METHOD(XonoticColorpicker, mouseDrag, float(entity, vector));
        ATTRIB(XonoticColorpicker, controlledTextbox, entity);
index 200204c00d131cc9fb3e62615215fd74a6577b1f..5a44e58830862c9e668185b3f21bda1bffadd076 100644 (file)
@@ -50,10 +50,10 @@ void XonoticColorpickerString_saveCvars(entity me)
                cvar_set(me.cvarName, sprintf("%v", hslimage_color(me.prevcoords, me.imagemargin)));
 }
 
-float XonoticColorpickerString_mousePress(entity me, vector coords)
+METHOD(XonoticColorpickerString, mousePress, bool(XonoticColorpickerString this, vector pos))
 {
-       me.mouseDrag(me, coords);
-       return 1;
+       this.mouseDrag(this, pos);
+       return true;
 }
 
 float XonoticColorpickerString_mouseDrag(entity me, vector coords)
index e990234b3f0a24779b9e3b40da6850b31299cd82..aa4a10c93a7d45a9583f4c8b57f671d135f20b81 100644 (file)
@@ -5,7 +5,7 @@
 #include "../item/image.qh"
 CLASS(XonoticColorpickerString, Image)
        METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string, string));
-       METHOD(XonoticColorpickerString, mousePress, float(entity, vector));
+       METHOD(XonoticColorpickerString, mousePress, bool(XonoticColorpickerString this, vector pos));
        METHOD(XonoticColorpickerString, mouseRelease, float(entity, vector));
        METHOD(XonoticColorpickerString, mouseDrag, float(entity, vector));
 
index d2ce368d1d0b225452230bfef96ff4770f540890..87134cb7812c15635247ec2799c21abf88c8a27e 100644 (file)
@@ -94,7 +94,9 @@ CONSTRUCTOR(XonoticRegisteredSettingsList, DataSource _source) {
 
 METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this))
 {
-    entity c = this.currentPanel;
+    entity s = this.currentPanel;
+    s.viewportHeight = 15.5;
+    entity c = s.currentPanel;
     entity removing = this.currentItem;
     DataSource data = this.topicList.source;
     entity adding = data.getEntry(data, this.topicList.selectedItem, func_null);
@@ -107,6 +109,7 @@ METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this))
         this.currentItem = adding;
         adding.resizeNotify(adding, '0 0 0', c.size, '0 0 0', c.size);
         c.addItem(c, adding, '0 0 0', '1 1 0', 1);
+               s.resizeNotify(s, '0 0 0', s.size, '0 0 0', s.size);
     }
 }
 METHOD(XonoticGameSettingsTab, fill, void(entity this))
index b9231642b18e9b016afb5277531a6e15fe1bea84..c9617f582f55fa01e9caefeb624cdbc54e9ae180 100644 (file)
@@ -32,13 +32,14 @@ CLASS(XonoticRegisteredSettingsList, XonoticListBox)
 ENDCLASS(XonoticRegisteredSettingsList)
 
 #include "tab.qh"
+#include "scrollpanel.qh"
 CLASS(XonoticGameSettingsTab, XonoticTab)
        ATTRIB(XonoticGameSettingsTab, intendedWidth, float, 0.9);
        ATTRIB(XonoticGameSettingsTab, rows, float, 15.5);
        ATTRIB(XonoticGameSettingsTab, columns, float, 6.5);
        ATTRIB(XonoticGameSettingsTab, source, DataSource, NEW(SettingSource));
        ATTRIB(XonoticGameSettingsTab, topicList, entity, NEW(XonoticRegisteredSettingsList, this.source));
-       ATTRIB(XonoticGameSettingsTab, currentPanel, entity, NEW(XonoticTab));
+       ATTRIB(XonoticGameSettingsTab, currentPanel, entity, NEW(XonoticScrollPanel));
        ATTRIB(XonoticGameSettingsTab, currentItem, entity);
        METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this));
        METHOD(XonoticGameSettingsTab, fill, void(entity this));
index d3ba0e4206f92cc453f4ec32b9aad91123a6f43f..c0d064a7daf865256118cd52311fa3b75033cdf6 100644 (file)
@@ -13,7 +13,7 @@ void XonoticResetDialog_fill(entity me)
                me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("This will create a backup config in your data directory")));
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "saveconfig backup.cfg\n;\n exec defaultXonotic.cfg\n", 0));
+               me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "saveconfig backup.cfg\n;\n exec default.cfg\n", 0));
                me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
                        e.onClick = Dialog_Close;
                        e.onClickEntity = me;
index db302e9a8ca11b435bd9e6b2e7c006fcc05268b8..527697683218d87a2550f862ddd36b2a3dd67299 100644 (file)
@@ -39,17 +39,17 @@ float XonoticPicker_mouseDrag(entity me, vector coords)
        return me.mouseMove(me, coords);
 }
 
-float XonoticPicker_mousePress(entity me, vector coords)
+METHOD(XonoticPicker, mousePress, bool(XonoticPicker this, vector pos))
 {
-       me.mouseMove(me, coords);
+       this.mouseMove(this, pos);
 
-       if(me.focusedCell.x >= 0)
+       if(this.focusedCell.x >= 0)
        {
-               me.pressed = 1;
-               me.pressedCell = me.focusedCell;
+               this.pressed = 1;
+               this.pressedCell = this.focusedCell;
        }
 
-       return 1;
+       return true;
 }
 
 float XonoticPicker_mouseRelease(entity me, vector coords)
index b8e19cf19ebaedf19a3fcb0f440f877ae3006012..c98e9fc9b6fa8f082a3bd346dad51c48edd36048 100644 (file)
@@ -3,7 +3,7 @@
 #include "../item.qh"
 CLASS(XonoticPicker, Item)
        METHOD(XonoticPicker, configureXonoticPicker, void(entity));
-       METHOD(XonoticPicker, mousePress, float(entity, vector));
+       METHOD(XonoticPicker, mousePress, bool(XonoticPicker this, vector pos));
        METHOD(XonoticPicker, mouseRelease, float(entity, vector));
        METHOD(XonoticPicker, mouseMove, float(entity, vector));
        METHOD(XonoticPicker, mouseDrag, float(entity, vector));
index 42e168b4b58b2617d5978b7bce289bd8ac4a8131..8e8f3ccf738bd4f32de72be843b87510b558d8d8 100644 (file)
@@ -27,9 +27,9 @@ void XonoticScreenshotImage_load(entity me, string theImage)
        me.setZoom(me, 0, 0);
 }
 
-float XonoticScreenshotImage_mousePress(entity me, vector coords)
+METHOD(XonoticScreenshotImage, mousePress, bool(XonoticScreenshotImage this, vector pos))
 {
-       return me.drag_setStartPos(me, coords);
+       return this.drag_setStartPos(this, pos);
 }
 
 float XonoticScreenshotImage_mouseDrag(entity me, vector coords)
index 8920bed287f50fceed2527f56646d36a8599f812..c27a853377ce51eb18270adb6c7197e4811fb2e9 100644 (file)
@@ -6,7 +6,7 @@ CLASS(XonoticScreenshotImage, XonoticImage)
        METHOD(XonoticScreenshotImage, load, void(entity, string));
        METHOD(XonoticScreenshotImage, draw, void(entity));
        ATTRIB(XonoticScreenshotImage, focusable, float, 1);  // mousePress and mouseDrag work only if focusable is set
-       METHOD(XonoticScreenshotImage, mousePress, float(entity, vector));
+       METHOD(XonoticScreenshotImage, mousePress, bool(XonoticScreenshotImage this, vector pos));
        METHOD(XonoticScreenshotImage, mouseDrag, float(entity, vector));
        METHOD(XonoticScreenshotImage, mouseMove, float(entity, vector));
        METHOD(XonoticScreenshotImage, resizeNotify, void(entity, vector, vector, vector, vector));
diff --git a/qcsrc/menu/xonotic/scrollpanel.qc b/qcsrc/menu/xonotic/scrollpanel.qc
new file mode 100644 (file)
index 0000000..4543f0b
--- /dev/null
@@ -0,0 +1,46 @@
+#include "scrollpanel.qh"
+
+METHOD(XonoticScrollPanel, drawListBoxItem, void(XonoticScrollPanel this, int i, vector absSize, bool isSelected, bool isFocused))
+{
+       XonoticTab p = this.currentPanel;
+       p.draw(p);
+}
+
+METHOD(XonoticScrollPanel, resizeNotify, void(XonoticScrollPanel this, vector relOrigin, vector relSize, vector absOrigin, vector absSize))
+{
+       SUPER(XonoticScrollPanel).resizeNotify(this, relOrigin, relSize, absOrigin, absSize);
+       this.scrollToItem(this, 0);
+       XonoticTab p = this.currentPanel;
+       float m = p.firstChild.rows / this.viewportHeight;
+       this.itemHeight = m;
+       relSize.y *= m;
+       absSize.y *= m;
+       p.resizeNotify(p, relOrigin, relSize, absOrigin, absSize);
+}
+
+#define X(mouseFunc) \
+METHOD(XonoticScrollPanel, mouseFunc, bool(XonoticScrollPanel this, vector pos)) \
+{ \
+       SUPER(XonoticScrollPanel).mouseFunc(this, pos); \
+       XonoticTab p = this.currentPanel; \
+       this.setFocus(this, p); \
+       \
+       vector o = -eY * this.scrollPos; \
+       vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; \
+       return p.mouseFunc(p, globalToBox(pos, o, s)); \
+}
+X(mouseMove)
+X(mousePress)
+X(mouseDrag)
+X(mouseRelease)
+#undef X
+
+#define X(keyFunc) \
+METHOD(XonoticScrollPanel, keyFunc, bool(XonoticScrollPanel this, int key, int ascii, bool shift)) \
+{ \
+       XonoticTab p = this.currentPanel; \
+       return p.keyFunc(p, key, ascii, shift) || SUPER(XonoticScrollPanel).keyFunc(this, key, ascii, shift); \
+}
+X(keyDown)
+X(keyUp)
+#undef X
diff --git a/qcsrc/menu/xonotic/scrollpanel.qh b/qcsrc/menu/xonotic/scrollpanel.qh
new file mode 100644 (file)
index 0000000..f675e86
--- /dev/null
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "listbox.qh"
+#include "tab.qh"
+CLASS(XonoticScrollPanel, XonoticListBox)
+       /** container for single child panel */
+       ATTRIB(XonoticScrollPanel, currentPanel, entity, NEW(XonoticTab));
+       ATTRIB(XonoticScrollPanel, nItems, int, 1);
+       ATTRIB(XonoticScrollPanel, selectionDoesntMatter, bool, true);
+       ATTRIB(XonoticScrollPanel, itemHeight, float, 1);
+       /** number of rows to show at once */
+       ATTRIB(XonoticScrollPanel, viewportHeight, float, 12);
+       ATTRIB(XonoticScrollPanel, alphaBG, float, 0);
+
+       METHOD(XonoticScrollPanel, getItemAtPos, float(XonoticScrollPanel this, float pos)) { return 0; }
+       METHOD(XonoticScrollPanel, getItemHeight, float(XonoticScrollPanel this, int i)) { return this.itemHeight; }
+       METHOD(XonoticScrollPanel, getItemStart, float(XonoticScrollPanel this, int i)) { return 0; }
+       METHOD(XonoticScrollPanel, getTotalHeight, float(XonoticScrollPanel this)) { return this.itemHeight; }
+       METHOD(XonoticScrollPanel, setFocus, void(XonoticScrollPanel this, entity other)) { Container_setFocus(this, other); }
+       METHOD(XonoticScrollPanel, setSelected, void(XonoticScrollPanel this, int i)) { }
+
+       METHOD(XonoticScrollPanel, drawListBoxItem, void(XonoticScrollPanel this, int i, vector absSize, bool isSelected, bool isFocused));
+       METHOD(XonoticScrollPanel, resizeNotify, void(XonoticScrollPanel this, vector relOrigin, vector relSize, vector absOrigin, vector absSize));
+ENDCLASS(XonoticScrollPanel)
index 8493bf380774cdcc142eaad5ce26d605e4969784..e69d41e9e1c1e1eec4142f0b441292be81cf6d01 100644 (file)
@@ -310,7 +310,7 @@ void PutObserverInServer(entity this)
        if(this.bot_attack)
                IL_REMOVE(g_bot_targets, this);
        this.bot_attack = false;
-    this.hud = HUD_NORMAL;
+    STAT(HUD, this) = HUD_NORMAL;
        TRANSMUTE(Observer, this);
        this.iscreature = false;
        this.teleportable = TELEPORT_SIMPLE;
@@ -333,7 +333,7 @@ void PutObserverInServer(entity this)
        this.death_time = 0;
        this.respawn_flags = 0;
        this.respawn_time = 0;
-       this.stat_respawn_time = 0;
+       STAT(RESPAWN_TIME, this) = 0;
        this.alpha = 0;
        this.scale = 0;
        this.fade_time = 0;
@@ -348,7 +348,7 @@ void PutObserverInServer(entity this)
        this.nextthink = 0;
        this.deadflag = DEAD_NO;
        this.crouch = false;
-       this.revive_progress = 0;
+       STAT(REVIVE_PROGRESS, this) = 0;
        this.revival_time = 0;
 
        this.items = 0;
@@ -597,7 +597,7 @@ void PutPlayerInServer(entity this)
        this.death_time = 0;
        this.respawn_flags = 0;
        this.respawn_time = 0;
-       this.stat_respawn_time = 0;
+       STAT(RESPAWN_TIME, this) = 0;
        this.scale = autocvar_sv_player_scale;
        this.fade_time = 0;
        this.pain_frame = 0;
@@ -623,7 +623,7 @@ void PutPlayerInServer(entity this)
        this.strength_finished = 0;
        this.invincible_finished = 0;
        this.fire_endtime = -1;
-       this.revive_progress = 0;
+       STAT(REVIVE_PROGRESS, this) = 0;
        this.revival_time = 0;
 
        this.air_finished = time + 12;
@@ -664,7 +664,7 @@ void PutPlayerInServer(entity this)
        if(this.conveyor)
                IL_REMOVE(g_conveyed, this);
        this.conveyor = NULL; // prevent conveyors at the previous location from moving a freshly spawned player
-       this.hud = HUD_NORMAL;
+       STAT(HUD, this) = HUD_NORMAL;
 
        this.event_damage = PlayerDamage;
 
@@ -1769,8 +1769,8 @@ void SpectateCopy(entity this, entity spectatee)
        this.health = spectatee.health;
        CS(this).impulse = 0;
        this.items = spectatee.items;
-       this.last_pickup = spectatee.last_pickup;
-       this.hit_time = spectatee.hit_time;
+       STAT(LAST_PICKUP, this) = STAT(LAST_PICKUP, spectatee);
+       STAT(HIT_TIME, this) = STAT(HIT_TIME, spectatee);
        this.strength_finished = spectatee.strength_finished;
        this.invincible_finished = spectatee.invincible_finished;
        this.superweapons_finished = spectatee.superweapons_finished;
@@ -1785,7 +1785,7 @@ void SpectateCopy(entity this, entity spectatee)
        this.v_angle = spectatee.v_angle;
        this.angles = spectatee.v_angle;
        STAT(FROZEN, this) = STAT(FROZEN, spectatee);
-       this.revive_progress = spectatee.revive_progress;
+       STAT(REVIVE_PROGRESS, this) = STAT(REVIVE_PROGRESS, spectatee);
        this.viewloc = spectatee.viewloc;
        if(!PHYS_INPUT_BUTTON_USE(this) && STAT(CAMERA_SPECTATOR, this) != 2)
                this.fixangle = true;
@@ -1794,7 +1794,7 @@ void SpectateCopy(entity this, entity spectatee)
        SetZoomState(this, CS(spectatee).zoomstate);
 
     anticheat_spectatecopy(this, spectatee);
-       this.hud = spectatee.hud;
+       STAT(HUD, this) = STAT(HUD, spectatee);
        if(spectatee.vehicle)
     {
        this.angles = spectatee.v_angle;
@@ -2541,17 +2541,17 @@ void PlayerPreThink (entity this)
        {
                if (STAT(FROZEN, this) == 2)
                {
-                       this.revive_progress = bound(0, this.revive_progress + frametime * this.revive_speed, 1);
-                       this.health = max(1, this.revive_progress * start_health);
-                       this.iceblock.alpha = bound(0.2, 1 - this.revive_progress, 1);
+                       STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) + frametime * this.revive_speed, 1);
+                       this.health = max(1, STAT(REVIVE_PROGRESS, this) * start_health);
+                       this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
 
-                       if (this.revive_progress >= 1)
+                       if (STAT(REVIVE_PROGRESS, this) >= 1)
                                Unfreeze(this);
                }
                else if (STAT(FROZEN, this) == 3)
                {
-                       this.revive_progress = bound(0, this.revive_progress - frametime * this.revive_speed, 1);
-                       this.health = max(0, autocvar_g_nades_ice_health + (start_health-autocvar_g_nades_ice_health) * this.revive_progress );
+                       STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) - frametime * this.revive_speed, 1);
+                       this.health = max(0, autocvar_g_nades_ice_health + (start_health-autocvar_g_nades_ice_health) * STAT(REVIVE_PROGRESS, this) );
 
                        if (this.health < 1)
                        {
@@ -2560,7 +2560,7 @@ void PlayerPreThink (entity this)
                                if(this.event_damage)
                                        this.event_damage(this, this, this.frozen_by, 1, DEATH_NADE_ICE_FREEZE.m_id, DMG_NOWEP, this.origin, '0 0 0');
                        }
-                       else if (this.revive_progress <= 0)
+                       else if (STAT(REVIVE_PROGRESS, this) <= 0)
                                Unfreeze(this);
                }
        }
index 7ed7d6b4eae3435478c111dde86799b25afdf77a..6d037473dd39907726f7eca7615610838f6b4f19 100644 (file)
@@ -1138,6 +1138,12 @@ void VoteCommand_macro_help(entity caller, float argc)
 
                VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "");
 #undef VOTE_COMMAND
+
+               string cvarname = strcat("sv_vote_command_help_", argv(2));
+               if(cvar_type(cvarname) & CVAR_TYPEFLAG_EXISTS)
+                       wordwrap_sprint(caller, cvar_string(cvarname), 1000);
+               else
+                       print_to(caller, "No documentation exists for this vote");
        }
 }
 
index 6a7f21aa674d319bad7ece6abeb908b28b764d60..a1e1294027e5adb10ba52117a407ff95983cfa67 100644 (file)
@@ -3,6 +3,7 @@
 #include <server/defs.qh>
 #include <server/miscfunctions.qh>
 #include <server/items.qh>
+#include <server/resources.qh>
 #include <common/weapons/_all.qh>
 
 spawnfunc(target_items);
@@ -82,11 +83,55 @@ void target_init_verify(entity this)
                        }
 }
 
+void target_init_use(entity this, entity actor, entity trigger)
+{
+       if (!(this.spawnflags & 1))
+       {
+               SetResourceAmount(actor, RESOURCE_ARMOR, start_armorvalue);
+               actor.pauserotarmor_finished = time + autocvar_g_balance_pause_armor_rot;
+       }
+
+       if (!(this.spawnflags & 2))
+       {
+               SetResourceAmount(actor, RESOURCE_HEALTH, start_health);
+               actor.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot;
+               actor.pauseregen_finished = time + autocvar_g_balance_pause_health_regen;
+       }
+
+       if (!(this.spawnflags & 4))
+       {
+               SetResourceAmount(actor, RESOURCE_SHELLS, start_ammo_shells);
+               SetResourceAmount(actor, RESOURCE_BULLETS, start_ammo_nails);
+               SetResourceAmount(actor, RESOURCE_ROCKETS, start_ammo_rockets);
+               SetResourceAmount(actor, RESOURCE_CELLS, start_ammo_cells);
+               SetResourceAmount(actor, RESOURCE_PLASMA, start_ammo_plasma);
+               SetResourceAmount(actor, RESOURCE_FUEL, start_ammo_fuel);
+
+               actor.weapons = start_weapons;
+               if (this.spawnflags & 32)
+               {
+                       // TODO
+               }
+       }
+
+       if (!(this.spawnflags & 8))
+       {
+               actor.strength_finished = 0;
+               actor.invincible_finished = 0;
+               STAT(BUFFS, actor) = 0;
+       }
+
+       if (!(this.spawnflags & 16))
+       {
+               // We don't have holdables.
+       }
+
+       SUB_UseTargets(this, actor, trigger);
+}
+
 spawnfunc(target_init)
 {
-       this.spawnflags = 0; // remove all weapons except the ones listed below
-       this.netname = "shotgun"; // keep these weapons through the remove trigger
-       spawnfunc_target_items(this);
+       this.use = target_init_use;
        InitializeEntity(this, target_init_verify, INITPRIO_FINDTARGET);
 }
 
index 69dac94a81ecc5d695aea52fbcddb25cce09632a..80164b4d3ab86b26c3256f7645f6d763c0366332 100644 (file)
@@ -306,18 +306,8 @@ float servertime, serverprevtime, serverframetime;
 .float floodcontrol_voice;
 .float floodcontrol_voiceteam;
 
-.float stat_shotorg = _STAT(SHOTORG); // networked stat for trueaim HUD
-
 string matchid;
 
-.float last_pickup = _STAT(LAST_PICKUP);
-
-.float hit_time = _STAT(HIT_TIME);
-.float typehit_time = _STAT(TYPEHIT_TIME);
-.float kill_time = _STAT(KILL_TIME);
-
-.float damage_dealt_total = _STAT(DAMAGE_DEALT_TOTAL);
-
 bool radar_showennemies;
 
 #ifdef PROFILING
@@ -377,7 +367,6 @@ const float ACTIVE_TOGGLE   = 3;
 
 .float player_blocked;
 
-.float revive_progress = _STAT(REVIVE_PROGRESS);
 .float revival_time; // time at which player was last revived
 .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
 .entity iceblock;
@@ -386,8 +375,6 @@ const float ACTIVE_TOGGLE   = 3;
 .entity muzzle_flash;
 .float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
 
-.float stat_respawn_time = _STAT(RESPAWN_TIME); // shows respawn time, and is negative when awaiting respawn
-
 .int killindicator_teamchange;
 
 void PlayerUseKey(entity this);
index 44774a1d666779a16e3e43e8ecca63f69e548474..804d9fd713d8bae506df76f137b2fe546af58892 100644 (file)
@@ -262,7 +262,6 @@ bool frag_centermessage_override(entity attacker, entity targ, int deathtype, in
        return MUTATOR_CALLHOOK(FragCenterMessage, attacker, targ, deathtype, kill_count_to_attacker, kill_count_to_target);
 }
 
-.int buffs = _STAT(BUFFS); // TODO: remove
 entity buff_FirstFromFlags(int _buffs);
 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity)
 {
@@ -443,7 +442,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en
 
                        int f3 = 0;
                        if(deathtype == DEATH_BUFF.m_id)
-                               f3 = buff_FirstFromFlags(attacker.buffs).m_id;
+                               f3 = buff_FirstFromFlags(STAT(BUFFS, attacker)).m_id;
 
                        if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker))
                                Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
@@ -530,7 +529,7 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo
        float targ_maxhealth = ((IS_MONSTER(targ)) ? targ.max_health : start_health);
 
        STAT(FROZEN, targ) = frozen_type;
-       targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
+       STAT(REVIVE_PROGRESS, targ) = ((frozen_type == 3) ? 1 : 0);
        SetResourceAmount(targ, RESOURCE_HEALTH, ((frozen_type == 3) ? targ_maxhealth : 1));
        targ.revive_speed = freeze_time;
        if(targ.bot_attack)
@@ -581,7 +580,7 @@ void Unfreeze (entity targ)
        }
 
        STAT(FROZEN, targ) = 0;
-       targ.revive_progress = 0;
+       STAT(REVIVE_PROGRESS, targ) = 0;
        targ.revival_time = time;
        if(!targ.bot_attack)
                IL_PUSH(g_bot_targets, targ);
index 7c21c45dd463aa42add4fe110329523a97c68a27..0d732e0ca4b6daba40fc5b33db54ade2db1c7501 100644 (file)
@@ -140,15 +140,11 @@ bool GrapplingHookSend(entity this, entity to, int sf)
        }
        if(sf & 2)
        {
-               WriteCoord(MSG_ENTITY, this.hook_start.x);
-               WriteCoord(MSG_ENTITY, this.hook_start.y);
-               WriteCoord(MSG_ENTITY, this.hook_start.z);
+               WriteVector(MSG_ENTITY, this.hook_start);
        }
        if(sf & 4)
        {
-               WriteCoord(MSG_ENTITY, this.hook_end.x);
-               WriteCoord(MSG_ENTITY, this.hook_end.y);
-               WriteCoord(MSG_ENTITY, this.hook_end.z);
+               WriteVector(MSG_ENTITY, this.hook_end);
        }
        return true;
 }
index 539522f2dce7f61ca49d840f6040439450916e8c..1026e3aa7a2dfaa6b0a139c3ad75eca12e141f94 100644 (file)
@@ -106,9 +106,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 
        if(sf & BIT(1))
        {
-               WriteCoord(MSG_ENTITY, this.origin.x);
-               WriteCoord(MSG_ENTITY, this.origin.y);
-               WriteCoord(MSG_ENTITY, this.origin.z);
+               WriteVector(MSG_ENTITY, this.origin);
        }
 
        if(sf & BIT(2))
@@ -137,12 +135,8 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
                WriteShort(MSG_ENTITY, floor(this.scale * 256));
                if(sf & 0x20)
                {
-                       WriteCoord(MSG_ENTITY, this.mins.x);
-                       WriteCoord(MSG_ENTITY, this.mins.y);
-                       WriteCoord(MSG_ENTITY, this.mins.z);
-                       WriteCoord(MSG_ENTITY, this.maxs.x);
-                       WriteCoord(MSG_ENTITY, this.maxs.y);
-                       WriteCoord(MSG_ENTITY, this.maxs.z);
+                       WriteVector(MSG_ENTITY, this.mins);
+                       WriteVector(MSG_ENTITY, this.maxs);
                }
                WriteString(MSG_ENTITY, this.bgmscript);
                if(this.bgmscript != "")
@@ -151,9 +145,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
                        WriteByte(MSG_ENTITY, floor(this.bgmscriptdecay * 64));
                        WriteByte(MSG_ENTITY, floor(this.bgmscriptsustain * 255));
                        WriteByte(MSG_ENTITY, floor(this.bgmscriptrelease * 64));
-                       WriteCoord(MSG_ENTITY, this.movedir.x);
-                       WriteCoord(MSG_ENTITY, this.movedir.y);
-                       WriteCoord(MSG_ENTITY, this.movedir.z);
+                       WriteVector(MSG_ENTITY, this.movedir);
                        WriteByte(MSG_ENTITY, floor(this.lip * 255));
                }
                WriteByte(MSG_ENTITY, this.fade_start);
index 2eda8584ef5d82eeb9f346cb131aa9a049a58488..a3bb6eb216e8677b4ae7add94f76dbee46188034 100644 (file)
@@ -990,45 +990,43 @@ float GetMaplistPosition()
        return idx;
 }
 
-float MapHasRightSize(string map)
+bool MapHasRightSize(string map)
 {
-       float fh;
        if(currentbots || autocvar_bot_number || player_count < autocvar_minplayers)
        if(autocvar_g_maplist_check_waypoints)
        {
-               LOG_TRACE("checkwp "); LOG_TRACE(map);
+               string checkwp_msg = strcat("checkwp ", map);
                if(!fexists(strcat("maps/", map, ".waypoints")))
                {
-                       LOG_TRACE(": no waypoints");
+                       LOG_TRACE(checkwp_msg, ": no waypoints");
                        return false;
                }
-               LOG_TRACE(": has waypoints");
+               LOG_TRACE(checkwp_msg, ": has waypoints");
        }
 
        // open map size restriction file
-       LOG_TRACE("opensize "); LOG_TRACE(map);
-       fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
+       string opensize_msg = strcat("opensize ", map);
+       float fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
        if(fh >= 0)
        {
-               float mapmin, mapmax;
-               LOG_TRACE(": ok, ");
-               mapmin = stof(fgets(fh));
-               mapmax = stof(fgets(fh));
+               opensize_msg = strcat(opensize_msg, ": ok, ");
+               int mapmin = stoi(fgets(fh));
+               int mapmax = stoi(fgets(fh));
                fclose(fh);
                if(player_count < mapmin)
                {
-                       LOG_TRACE("not enough");
+                       LOG_TRACE(opensize_msg, "not enough");
                        return false;
                }
-               if(player_count > mapmax)
+               if(mapmax && player_count > mapmax)
                {
-                       LOG_TRACE("too many");
+                       LOG_TRACE(opensize_msg, "too many");
                        return false;
                }
-               LOG_TRACE("right size");
+               LOG_TRACE(opensize_msg, "right size");
                return true;
        }
-       LOG_TRACE(": not found");
+       LOG_TRACE(opensize_msg, ": not found");
        return true;
 }
 
@@ -2069,12 +2067,12 @@ void EndFrame()
        FOREACH_CLIENT(IS_REAL_CLIENT(it), {
                entity e = IS_SPEC(it) ? it.enemy : it;
                if (e.typehitsound) {
-                       it.typehit_time = time;
+                       STAT(TYPEHIT_TIME, it) = time;
                } else if (e.killsound) {
-                       it.kill_time = time;
+                       STAT(KILL_TIME, it) = time;
                } else if (e.damage_dealt) {
-                       it.hit_time = time;
-                       it.damage_dealt_total += ceil(e.damage_dealt);
+                       STAT(HIT_TIME, it) = time;
+                       STAT(DAMAGE_DEALT_TOTAL, it) += ceil(e.damage_dealt);
                }
        });
        // add 1 frametime because after this, engine SV_Physics
index 5de2a656a927b299c8c691a46b872fbabb74af71..b0f42f59e51abee2687f81cfcc63d33d304b2d51 100644 (file)
 .float lastground;
 float total_players;
 float redalive, bluealive, yellowalive, pinkalive;
-.float redalive_stat = _STAT(REDALIVE);
-.float bluealive_stat = _STAT(BLUEALIVE);
-.float yellowalive_stat = _STAT(YELLOWALIVE);
-.float pinkalive_stat = _STAT(PINKALIVE);
index 919df49013dd5f53cc1c5c2f819cf11c2ee38d41..67b999e61171b1748313eea22e1bee37b5fad9a8 100644 (file)
@@ -16,10 +16,10 @@ void CA_count_alive_players()
                }
        });
        FOREACH_CLIENT(IS_REAL_CLIENT(it), {
-               it.redalive_stat = redalive;
-               it.bluealive_stat = bluealive;
-               it.yellowalive_stat = yellowalive;
-               it.pinkalive_stat = pinkalive;
+               STAT(REDALIVE, it) = redalive;
+               STAT(BLUEALIVE, it) = bluealive;
+               STAT(YELLOWALIVE, it) = yellowalive;
+               STAT(PINKALIVE, it) = pinkalive;
        });
 }
 
index cdda907245d86e742112566bd762e843daf316e9..b34e3f59f51fe58ac3f5cccb5828b68fae45f242 100644 (file)
@@ -2085,7 +2085,7 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink)
        bool b1 = false, b2 = false, b3 = false, b4 = false, b5 = false; // TODO: kill this, we WANT to show the other flags, somehow! (note: also means you don't see if you're FC)
 
        // initially clear items so they can be set as necessary later.
-       player.ctf_flagstatus &= ~(CTF_RED_FLAG_CARRYING                | CTF_RED_FLAG_TAKEN            | CTF_RED_FLAG_LOST
+       STAT(CTF_FLAGSTATUS, player) &= ~(CTF_RED_FLAG_CARRYING         | CTF_RED_FLAG_TAKEN            | CTF_RED_FLAG_LOST
                                                   | CTF_BLUE_FLAG_CARRYING             | CTF_BLUE_FLAG_TAKEN           | CTF_BLUE_FLAG_LOST
                                                   | CTF_YELLOW_FLAG_CARRYING   | CTF_YELLOW_FLAG_TAKEN         | CTF_YELLOW_FLAG_LOST
                                                   | CTF_PINK_FLAG_CARRYING     | CTF_PINK_FLAG_TAKEN           | CTF_PINK_FLAG_LOST
@@ -2099,7 +2099,7 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink)
                if(flag.team == NUM_TEAM_2 && !b2) { b2 = true; t = CTF_BLUE_FLAG_CARRYING;             t2 = CTF_BLUE_FLAG_TAKEN;               t3 = CTF_BLUE_FLAG_LOST; }
                if(flag.team == NUM_TEAM_3 && !b3) { b3 = true; t = CTF_YELLOW_FLAG_CARRYING;   t2 = CTF_YELLOW_FLAG_TAKEN;             t3 = CTF_YELLOW_FLAG_LOST; }
                if(flag.team == NUM_TEAM_4 && !b4) { b4 = true; t = CTF_PINK_FLAG_CARRYING;             t2 = CTF_PINK_FLAG_TAKEN;               t3 = CTF_PINK_FLAG_LOST; }
-               if(flag.team == 0 && !b5)                  { b5 = true; t = CTF_NEUTRAL_FLAG_CARRYING;  t2 = CTF_NEUTRAL_FLAG_TAKEN;    t3 = CTF_NEUTRAL_FLAG_LOST; player.ctf_flagstatus |= CTF_FLAG_NEUTRAL; }
+               if(flag.team == 0 && !b5)                  { b5 = true; t = CTF_NEUTRAL_FLAG_CARRYING;  t2 = CTF_NEUTRAL_FLAG_TAKEN;    t3 = CTF_NEUTRAL_FLAG_LOST; STAT(CTF_FLAGSTATUS, player) |= CTF_FLAG_NEUTRAL; }
 
                switch(flag.ctf_status)
                {
@@ -2107,14 +2107,14 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink)
                        case FLAG_CARRY:
                        {
                                if((flag.owner == player) || (flag.pass_sender == player))
-                                       player.ctf_flagstatus |= t; // carrying: player is currently carrying the flag
+                                       STAT(CTF_FLAGSTATUS, player) |= t; // carrying: player is currently carrying the flag
                                else
-                                       player.ctf_flagstatus |= t2; // taken: someone else is carrying the flag
+                                       STAT(CTF_FLAGSTATUS, player) |= t2; // taken: someone else is carrying the flag
                                break;
                        }
                        case FLAG_DROPPED:
                        {
-                               player.ctf_flagstatus |= t3; // lost: the flag is dropped somewhere on the map
+                               STAT(CTF_FLAGSTATUS, player) |= t3; // lost: the flag is dropped somewhere on the map
                                break;
                        }
                }
@@ -2122,10 +2122,10 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink)
 
        // item for stopping players from capturing the flag too often
        if(player.ctf_captureshielded)
-               player.ctf_flagstatus |= CTF_SHIELDED;
+               STAT(CTF_FLAGSTATUS, player) |= CTF_SHIELDED;
 
        if(ctf_stalemate)
-               player.ctf_flagstatus |= CTF_STALEMATE;
+               STAT(CTF_FLAGSTATUS, player) |= CTF_STALEMATE;
 
        // update the health of the flag carrier waypointsprite
        if(player.wps_flagcarrier)
@@ -2475,7 +2475,7 @@ MUTATOR_HOOKFUNCTION(ctf, SpectateCopy)
        entity spectatee = M_ARGV(0, entity);
        entity client = M_ARGV(1, entity);
 
-       client.ctf_flagstatus = spectatee.ctf_flagstatus;
+       STAT(CTF_FLAGSTATUS, client) = STAT(CTF_FLAGSTATUS, spectatee);
 }
 
 MUTATOR_HOOKFUNCTION(ctf, GetRecords)
index 33d64a074a290610fdb43a45dbfa7f08a996ede4..14bf281e7106f355cb74102e49ea209cd312e790 100644 (file)
@@ -168,9 +168,6 @@ void havocbot_role_ctf_setrole(entity bot, int role);
 // team checking
 #define CTF_SAMETEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b))
 #define CTF_DIFFTEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b))
-
-// networked flag statuses
-.int ctf_flagstatus = _STAT(CTF_FLAGSTATUS);
 #endif
 
 const int CTF_RED_FLAG_TAKEN                   = 1;
index 0d302d0f6194e3d1352488c1cbe06af48e47ae21..38ef58b6c5c33dd43ae6b7fd174c64e2af745fe4 100644 (file)
@@ -21,13 +21,13 @@ void dom_EventLog(string mode, float team_before, entity actor) // use an alias
 
 void set_dom_state(entity e)
 {
-       e.dom_total_pps = total_pps;
-       e.dom_pps_red = pps_red;
-       e.dom_pps_blue = pps_blue;
+       STAT(DOM_TOTAL_PPS, e) = total_pps;
+       STAT(DOM_PPS_RED, e) = pps_red;
+       STAT(DOM_PPS_BLUE, e) = pps_blue;
        if(domination_teams >= 3)
-               e.dom_pps_yellow = pps_yellow;
+               STAT(DOM_PPS_YELLOW, e) = pps_yellow;
        if(domination_teams >= 4)
-               e.dom_pps_pink = pps_pink;
+               STAT(DOM_PPS_PINK, e) = pps_pink;
 }
 
 void dompoint_captured(entity this)
index cf5e54f6d53d00946779e981aee6db592cc83c0e..95311c98a36cef9e6183cb63cfc4c341f1fd2ecb 100644 (file)
@@ -32,11 +32,6 @@ const float ST_DOM_TICKS = 1;
 const float ST_DOM_CAPS = 1;
 
 // pps: points per second
-.float dom_total_pps = _STAT(DOM_TOTAL_PPS);
-.float dom_pps_red = _STAT(DOM_PPS_RED);
-.float dom_pps_blue = _STAT(DOM_PPS_BLUE);
-.float dom_pps_yellow = _STAT(DOM_PPS_YELLOW);
-.float dom_pps_pink = _STAT(DOM_PPS_PINK);
 float total_pps;
 float pps_red;
 float pps_blue;
index 2ea70c1f1ac16971c6af11a3aa33a4b3f3b0f9d5..36546c43a03bebc34c5875416e7b26473a5a364d 100644 (file)
@@ -20,10 +20,10 @@ void freezetag_count_alive_players()
                }
        });
        FOREACH_CLIENT(IS_REAL_CLIENT(it), {
-               it.redalive_stat = redalive;
-               it.bluealive_stat = bluealive;
-               it.yellowalive_stat = yellowalive;
-               it.pinkalive_stat = pinkalive;
+               STAT(REDALIVE, it) = redalive;
+               STAT(BLUEALIVE, it) = bluealive;
+               STAT(YELLOWALIVE, it) = yellowalive;
+               STAT(PINKALIVE, it) = pinkalive;
        });
 
        eliminatedPlayers.SendFlags |= 1;
@@ -465,10 +465,10 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
 
        if(n && STAT(FROZEN, player) == 1) // OK, there is at least one teammate reviving us
        {
-               player.revive_progress = bound(0, player.revive_progress + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
-               player.health = max(1, player.revive_progress * ((warmup_stage) ? warmup_start_health : start_health));
+               STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
+               player.health = max(1, STAT(REVIVE_PROGRESS, player) * ((warmup_stage) ? warmup_start_health : start_health));
 
-               if(player.revive_progress >= 1)
+               if(STAT(REVIVE_PROGRESS, player) >= 1)
                {
                        freezetag_Unfreeze(player);
                        freezetag_count_alive_players();
@@ -493,18 +493,18 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
                }
 
                FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, {
-                       it.revive_progress = player.revive_progress;
+                       STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
                        it.reviving = false;
                });
        }
        else if(!n && STAT(FROZEN, player) == 1) // only if no teammate is nearby will we reset
        {
-               player.revive_progress = bound(0, player.revive_progress - frametime * autocvar_g_freezetag_revive_clearspeed, 1);
-               player.health = max(1, player.revive_progress * ((warmup_stage) ? warmup_start_health : start_health));
+               STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) - frametime * autocvar_g_freezetag_revive_clearspeed, 1);
+               player.health = max(1, STAT(REVIVE_PROGRESS, player) * ((warmup_stage) ? warmup_start_health : start_health));
        }
        else if(!n && !STAT(FROZEN, player))
        {
-               player.revive_progress = 0; // thawing nobody
+               STAT(REVIVE_PROGRESS, player) = 0; // thawing nobody
        }
 
        return true;
index badae12c2d4897090aaec805bc594d4f1cc9de76..567f24b478a47d1e536f731db06af69b190ace97 100644 (file)
@@ -396,18 +396,14 @@ MUTATOR_HOOKFUNCTION(ka, PlayerPowerups)
                player.effects |= autocvar_g_keepaway_ballcarrier_effects;
 }
 
-.float stat_sv_airspeedlimit_nonqw;
-.float stat_sv_maxspeed;
 
-MUTATOR_HOOKFUNCTION(ka, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(ka, PlayerPhysics_UpdateStats)
 {
        entity player = M_ARGV(0, entity);
+       // these automatically reset, no need to worry
 
        if(player.ballcarried)
-       {
-               player.stat_sv_airspeedlimit_nonqw *= autocvar_g_keepaway_ballcarrier_highspeed;
-               player.stat_sv_maxspeed *= autocvar_g_keepaway_ballcarrier_highspeed;
-       }
+               STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_keepaway_ballcarrier_highspeed;
 }
 
 MUTATOR_HOOKFUNCTION(ka, BotShouldAttack)
index 0610faabbf5e02c308396f4f8aeed8d566978512..04576486b71bacd743304e7a5de42b709d3b95d7 100644 (file)
@@ -49,7 +49,6 @@ bool kh_no_radar_circles;
 //     bits  5- 9: team of key 2, or 0 for no such key, or 30 for dropped, or 31 for self
 //     bits 10-14: team of key 3, or 0 for no such key, or 30 for dropped, or 31 for self
 //     bits 15-19: team of key 4, or 0 for no such key, or 30 for dropped, or 31 for self
-.int kh_state = _STAT(KH_KEYS);
 .float siren_time;  //  time delay the siren
 //.float stuff_time;  //  time delay to stuffcmd a cvar
 
@@ -133,12 +132,12 @@ void kh_update_state()
                s |= (32 ** key.count) * f;
        }
 
-       FOREACH_CLIENT(true, { it.kh_state = s; });
+       FOREACH_CLIENT(true, { STAT(KH_KEYS, it) = s; });
 
        FOR_EACH_KH_KEY(key)
        {
                if(key.owner)
-                       key.owner.kh_state |= (32 ** key.count) * 31;
+                       STAT(KH_KEYS, key.owner) |= (32 ** key.count) * 31;
        }
        //print(ftos((nextent(NULL)).kh_state), "\n");
 }
@@ -1273,7 +1272,7 @@ MUTATOR_HOOKFUNCTION(kh, SpectateCopy)
        entity spectatee = M_ARGV(0, entity);
        entity client = M_ARGV(1, entity);
 
-       client.kh_state = spectatee.kh_state;
+       STAT(KH_KEYS, client) = STAT(KH_KEYS, spectatee);
 }
 
 MUTATOR_HOOKFUNCTION(kh, PlayerUseKey)
index 9f91739c19ffb2143123f28635afee326d677e49..9164b4febec31eb8c7056662c89bb3bbc4920821 100644 (file)
@@ -17,9 +17,7 @@ bool SpawnPoint_Send(entity this, entity to, int sf)
        WriteHeader(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
 
        WriteByte(MSG_ENTITY, this.team);
-       WriteCoord(MSG_ENTITY, this.origin.x);
-       WriteCoord(MSG_ENTITY, this.origin.y);
-       WriteCoord(MSG_ENTITY, this.origin.z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        return true;
 }
@@ -33,9 +31,7 @@ bool SpawnEvent_Send(entity this, entity to, int sf)
        if(autocvar_g_spawn_alloweffects)
        {
                WriteByte(MSG_ENTITY, etof(this.owner));
-               WriteCoord(MSG_ENTITY, this.owner.origin.x);
-               WriteCoord(MSG_ENTITY, this.owner.origin.y);
-               WriteCoord(MSG_ENTITY, this.owner.origin.z);
+               WriteVector(MSG_ENTITY, this.owner.origin);
                send = true;
        }
        else if((to == this.owner) || (IS_SPEC(to) && (to.enemy == this.owner)) )
index 0d6ecf066f70637deeb0f94ef64e47c079204427..f1800ae00eeda41b69bf8f8d1cbc24fbb90f002b 100644 (file)
@@ -72,9 +72,9 @@ void accuracy_add(entity this, int w, int fired, int hit)
        if (hit)    a.accuracy_hit  [w] += hit;
        if (fired)  a.accuracy_fired[w] += fired;
 
-    if (hit && a.hit_time != time) { // only run this once per frame
+    if (hit && STAT(HIT_TIME, a) != time) { // only run this once per frame
         a.accuracy_cnt_hit[w] += 1;
-        a.hit_time = time;
+        STAT(HIT_TIME, a) = time;
     }
 
     if (fired && a.fired_time != time) { // only run this once per frame
index d426e2f610d3000c69c2b16cba9defb350adfb9f..5352b40cde1a8fa1afb3b6058d36a48a3ea0b6cf 100644 (file)
@@ -42,15 +42,11 @@ bool CSQCProjectile_SendEntity(entity this, entity to, int sf)
 
        if(sf & 1)
        {
-               WriteCoord(MSG_ENTITY, this.origin.x);
-               WriteCoord(MSG_ENTITY, this.origin.y);
-               WriteCoord(MSG_ENTITY, this.origin.z);
+               WriteVector(MSG_ENTITY, this.origin);
 
                if(sf & 0x80)
                {
-                       WriteCoord(MSG_ENTITY, this.velocity.x);
-                       WriteCoord(MSG_ENTITY, this.velocity.y);
-                       WriteCoord(MSG_ENTITY, this.velocity.z);
+                       WriteVector(MSG_ENTITY, this.velocity);
                        if(sf & 0x10)
                                WriteCoord(MSG_ENTITY, this.gravity);
                }
diff --git a/ruleset-XDF.cfg b/ruleset-XDF.cfg
new file mode 100644 (file)
index 0000000..b37f01d
--- /dev/null
@@ -0,0 +1,28 @@
+// ================
+//  Xonotic Defrag
+// ================
+
+exec xonotic-server.cfg
+exec balance-xdf.cfg
+exec physicsXDF.cfg
+
+// general gameplay
+set g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
+set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
+set g_balance_kill_antispam 0
+set g_forced_respawn 1
+// g_playerclip_collisions 0 // do not check playerclips
+set g_powerups 0  // set to -1 or patch xonotic
+set g_spawnpoints_auto_move_out_of_solid 1
+set g_start_delay 3
+set g_use_ammunition 0 "if set to 0 all weapons have unlimited ammunition"
+set g_weapon_stay 1 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
+set teamplay_mode 2 // friendly fire and self damage
+set sv_vote_nospectators 1
+set timelimit_override 20
+set g_buffs_cooldown_respawn 0.1
+
+// game mode settings
+set g_cts_finish_kill_delay 2
+set g_cts_respawn_delay 0
+set g_cts_selfdamage 0
diff --git a/ruleset-XPM.cfg b/ruleset-XPM.cfg
new file mode 100644 (file)
index 0000000..f3607bb
--- /dev/null
@@ -0,0 +1,26 @@
+// ==================
+//  Xonotic Pro-Mode
+// ==================
+
+exec xonotic-server.cfg
+exec balance-xpm.cfg
+
+// general gameplay
+set g_norecoil 1
+set g_shootfromeye 1 // hit where you point at with the crosshair (promoders don't care about ugliness)
+set g_balance_kill_antispam 0
+set g_forced_respawn 1
+set teamplay_mode 2 // friendly fire and self damage
+set sv_vote_nospectators 1
+set g_chat_nospectators 2
+set g_warmup 1
+set g_balance_teams 0
+set g_spawnshieldtime 0
+set g_spawn_furthest 1
+set sv_autoscreenshot 1
+set sv_ready_restart 1
+set sv_ready_restart_after_countdown 1
+set g_monsters 0
+set g_turrets 0
+set g_vehicles 0
+set sv_showspectators 0
diff --git a/ruleset-overkill.cfg b/ruleset-overkill.cfg
new file mode 100644 (file)
index 0000000..49eb730
--- /dev/null
@@ -0,0 +1,36 @@
+// ==============
+//  Overkill Mod
+// ==============
+
+exec xonotic-server.cfg
+exec balance-overkill.cfg
+exec physicsOverkill.cfg
+
+// general gameplay
+set g_overkill 1
+
+// hack - eventually, we should be able to choose overkill models in menu like for vanilla
+set sv_defaultcharacter 1
+set sv_defaultplayermodel "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+set sv_defaultplayermodel_red "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
+set sv_defaultplayermodel_blue "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+set sv_defaultplayermodel_yellow "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm"
+set sv_defaultplayermodel_pink "models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
+
+set g_respawn_ghosts 0
+
+set g_nades 1
+set g_nades_nade_small 1
+set g_nades_spread 0
+set g_nades_nade_refire 10
+set g_nades_nade_newton_style 2
+
+set g_dodging 1
+set sv_dodging_wall_dodging 1
+
+set g_spawn_near_teammate "!g_assault !g_freezetag"
+set g_spawn_near_teammate_ignore_spawnpoint 1
+set g_spawnshieldtime 0.5
+set g_respawn_delay_forced 2
+
+set g_lms_start_armor 100
diff --git a/ruleset-xonotic.cfg b/ruleset-xonotic.cfg
new file mode 100644 (file)
index 0000000..7915766
--- /dev/null
@@ -0,0 +1 @@
+exec xonotic-server.cfg
diff --git a/xonotic-client.cfg b/xonotic-client.cfg
new file mode 100644 (file)
index 0000000..eabd94f
--- /dev/null
@@ -0,0 +1,849 @@
+// this resets most client cvars and aliases to their defaults
+// if you want to reset your client to defaults, it's probably a better idea to delete (parts of) config.cfg and restart
+
+
+// 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\""
+
+seta cl_firststart "" "how many times the client has been run"
+seta cl_startcount 0 "how many times the client has been run"
+
+// other aliases
+alias +hook +button6
+alias -hook -button6
+alias +jetpack +button10
+alias -jetpack -button10
+alias +dodge +button11
+alias -dodge -button11
+alias use "impulse 21"
+
+// for backwards compatibility
+// TODO Remove after 0.8 release!
+cl_particles_forcetraileffects 1
+
+alias dropweapon "impulse 17"
+alias +show_info +button7
+alias -show_info -button7
+
+// merge lightmaps up to 2048x2048 textures
+mod_q3bsp_lightmapmergepower 4
+
+// player defaults
+_cl_color "112.211" // same effect as 112, but menuqc can detect this as the default and not intentionally set
+_cl_name ""
+seta _cl_gender 0 "storage cvar for current player gender (0 = undisclosed, 1 = male, 2 = female)"
+_cl_playerskin 0
+
+seta cl_reticle 1 "enable zoom reticles"
+seta cl_reticle_stretch 0 "stretch reticles so they fit the screen (breaks image proportions)"
+seta cl_reticle_normal 1 "draw an aiming reticle when zooming with the zoom button"
+seta cl_reticle_normal_alpha 1 "alpha of the normal reticle"
+seta cl_reticle_weapon 1 "draw custom aiming reticle when zooming with certain weapons"
+seta cl_reticle_weapon_alpha 1 "alpha of the custom reticle"
+
+fov 100
+seta cl_velocityzoom_enabled 0 "velocity based zooming of fov"
+seta cl_velocityzoom_factor 0 "factor of fov zooming (negative values zoom out)"
+seta cl_velocityzoom_type 3 "how to factor in speed, 1 = all velocity in all directions, 2 = velocity only in forward direction (can be negative), 3 = velocity only in forward direction (limited to forward only)"
+seta cl_velocityzoom_speed 1000 "target speed for fov factoring"
+seta cl_velocityzoom_time 0.2  "time value for averaging speed values"
+seta cl_spawnzoom 1 "zoom effect immediately when a player spawns"
+seta cl_spawnzoom_speed 1 "speed at which zooming occurs while spawning"
+seta cl_spawnzoom_factor 2 "factor of zoom while spawning"
+seta cl_zoomfactor 5   "how much +zoom will zoom (1-30)"
+seta cl_zoomspeed 8    "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)"
+
+seta cl_unpress_zoom_on_spawn 1 "automatically unpress zoom when you spawn"
+seta cl_unpress_zoom_on_death 1 "automatically unpress zoom when you die (and don't allow zoom again while dead)"
+seta cl_unpress_zoom_on_weapon_switch 1 "automatically unpress zoom when you switch a weapon"
+seta cl_unpress_attack_on_weapon_switch 0 "automatically unpress fire and fire1 attack buttons when you switch a weapon"
+
+seta cl_spawn_event_particles 1 "pointparticles effect whenever a player spawns"
+seta cl_spawn_event_sound 1 "sound effect whenever a player spawns"
+//seta cl_spawn_point_model 0 "place a model at all spawn points" // still needs a model
+seta cl_spawn_point_particles 1 "pointparticles effect at all spawn points" // managed by effects-.cfg files
+seta cl_spawn_point_dist_min 1200
+seta cl_spawn_point_dist_max 1600
+
+freelook 1
+sensitivity 6
+v_gamma 1
+viewsize 100
+bgmvolume 1
+volume 0.5
+// fullscreen 1024x768x32bit
+vid_bitsperpixel 32
+vid_fullscreen 1
+vid_width 1024
+vid_height 768
+vid_pixelheight 1
+vid_resizable 0 // cannot be turned on before it is sure it cannot cause a r_restart
+vid_desktopfullscreen 1
+prvm_language en
+set _menu_prvm_language ""
+set _menu_vid_width "$vid_width"
+set _menu_vid_height "$vid_height"
+set _menu_vid_pixelheight "$vid_pixelheight"
+set _menu_vid_desktopfullscreen "$vid_desktopfullscreen"
+seta menu_vid_scale 0
+seta menu_vid_allowdualscreenresolution 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)
+
+// create a temporary empty alias for menu_sync so that execution of effects-normal.cfg, hud_luma.cfg
+// and sRGB-{disable,enable}.cfg on game start doesn't show an error message in the console
+alias menu_sync "" // will be re-aliased later
+
+// we want to use sRGB for our maps!
+exec sRGB-disable.cfg
+vid_sRGB_fallback 2
+r_hdr_glowintensity 1
+// #define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
+set rpn_sRGB_to_linear "dup 0.055 add 1.055 div 2.4 pow exch 12.92 div dup 0.0031308 gt when"
+// #define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
+set rpn_linear_to_sRGB "dup 1.0 2.4 div pow 1.055 mul 0.055 sub exch 12.92 mul dup 0.04045 ge when"
+
+// -nosRGB to -sRGB sky shader conversion:
+//
+// q3map_sunExt 1 0.6875 0.375 340 25 47 0 16
+//                                    ^^ elevation
+//                             ^^^ sunlight
+// q3map_skylight 110 3
+//                ^^^ skylight
+//
+// With that, do (the last parameter is the ratio of skylight you assume hits
+// the surfaces, about 0.25 for inner surfaces near sky, about 1.00 on
+// terrain):
+// ]skybox_nosRGB_to_sRGB 340 47 110 0.25
+// rpn: still on stack: new_sunlight:
+// rpn: still on stack: 380.464142
+// rpn: still on stack: new_skylight:
+// rpn: still on stack: 9.32523632
+//
+// The equivalent -sRGB shader then will have:
+//
+// q3map_sunExt 1 0.6875 0.375 380.464142 25 47 0 16
+// q3map_skylight 9.32523632 3
+alias skybox_nosRGB_to_sRGB "rpn $3 402.123 $4 div div $rpn_sRGB_to_linear 402.123 $4 div mul /new_skylight: $3 402.123 $4 div div $1 256 div $2 0.017453 mul sin mul add $rpn_sRGB_to_linear $3 402.123 $4 div div $rpn_sRGB_to_linear sub 256 mul $2 0.017453 mul sin div /new_sunlight:"
+
+set cl_orthoview 0 "enable top-down view of the map- meant to be used for radar map images (note: orthoview sets cvars temporarily, requires restart to return them to normal)"
+set cl_orthoview_nofog 1 "disable fog while in orthoview-- note, should not be enabled on ALL maps, i.e. oilrig works fine with this disabled"
+
+// these settings determine how much the view is affected by movement/damage
+cl_smoothviewheight 0.05 // time of the averaging to the viewheight value so that it creates a smooth transition for crouching and such. 0 for instant transition
+cl_deathfade 0 // fade screen to dark red when dead, value represents how fast the fade is (higher is faster)
+cl_bobcycle 0.5 // 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 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02
+cl_bob2cycle 1 // how long the cycle of left/right view movement takes (only works if cl_bob2 is not 0), default is 0.6
+cl_bob2 0 // how much view moves left/right when moving (does not move if cl_bob2cycle is 0), default is 0.01
+cl_bobfall 0.05 "how much the view swings down when falling (influenced by the speed you hit the ground with)"
+cl_bobfallcycle 3 "speed of the bobfall swing"
+cl_bobfallspeed 200 "necessary amount of speed for bob-falling to occur"
+cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1
+cl_bobmodel_side 0.2 // amount the gun sways to the sides
+cl_bobmodel_speed 10 // rate at which the gun sways
+cl_bobmodel_up 0.1 // amount the gun sways up and down
+
+cl_followmodel 1 // enables weapon pushing / pulling effect when walking
+seta cl_followmodel_speed 0.3 "gun following speed"
+seta cl_followmodel_limit 135 "gun following limit"
+seta cl_followmodel_velocity_absolute 0 "make the effect ignore velocity direction changes (side effect: it causes a glitch when teleporting / passing through a warpzone)"
+seta cl_followmodel_velocity_lowpass 0.05 "gun following velocity lowpass averaging time"
+seta cl_followmodel_highpass 0.05 "gun following highpass averaging time"
+seta cl_followmodel_lowpass 0.03 "gun following lowpass averaging time"
+
+cl_leanmodel 1 // enables weapon leaning effect when looking around
+seta cl_leanmodel_speed 0.3 "gun leaning speed"
+seta cl_leanmodel_limit 30 "gun leaning limit"
+seta cl_leanmodel_highpass1 0.2 "gun leaning pre-highpass averaging time"
+seta cl_leanmodel_highpass 0.2 "gun leaning highpass averaging time"
+seta cl_leanmodel_lowpass 0.05 "gun leaning lowpass averaging time"
+
+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 // whether to use screen tints, this has now been replaced by a better system in CSQC
+r_motionblur 0 // motion blur value, default is 0
+r_damageblur 0 // motion blur when damaged, default is 0 (removed in Xonotic)
+
+r_bloom_blur 4
+r_bloom_brighten 2
+r_bloom_colorexponent 1
+r_bloom_colorscale 1
+r_bloom_colorsubtract 0.125
+r_bloom_resolution 320
+r_bloom_scenebrightness 0.85
+
+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 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 heard"
+
+seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy, 1: same pitch 2: increase pitch with more damage 3: decrease pitch with more damage"
+set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
+seta cl_hitsound_min_pitch 0.75 "minimum pitch of hit sound"
+seta cl_hitsound_max_pitch 1.5 "maximum pitch of hit sound"
+seta cl_hitsound_nom_damage 25 "damage amount at which hitsound bases pitch off"
+
+seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
+seta cl_eventchase_frozen 0 "camera goes into 3rd person mode when the player is frozen"
+seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
+seta cl_eventchase_distance 140 "final camera distance"
+seta cl_eventchase_generator_distance 400 "final camera distance while viewing generator explosion"
+seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
+seta cl_eventchase_maxs "12 12 8" "max size of eventchase camera bbox"
+seta cl_eventchase_mins "-12 -12 -8" "min size of eventchase camera bbox"
+seta cl_eventchase_viewoffset "0 0 20" "viewoffset of eventchase camera"
+seta cl_eventchase_generator_viewoffset "0 0 80" "viewoffset of eventchase camera while viewing generator explosion"
+seta cl_eventchase_vehicle 1 "camera goes into 3rd person mode when inside a vehicle"
+seta cl_eventchase_vehicle_viewoffset "0 0 80"
+seta cl_eventchase_vehicle_distance 250
+
+set _vehicles_shownchasemessage 0
+
+seta cl_particles_oldvortexbeam 0 "Uses the old v2.3 Vortex beam instead of the new beam, only works if server allows it (g_allow_oldvortexbeam 1)"
+
+seta cl_damageeffect 1 "enable weapon damage effects: 1 enables the feature on skeletal models, 2 on any model"
+seta cl_damageeffect_ticrate 0.1 "particle spawn rate"
+seta cl_damageeffect_bones 5 "how many damages to allow on a rigged mesh at once (non-skeletal objects are limited to one)"
+seta cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present"
+seta cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, based on damage amount"
+seta cl_damageeffect_lifetime_min 3 "minimum lifetime a damage effect may have"
+seta cl_damageeffect_lifetime_max 6 "maximum lifetime a damage effect may have"
+
+set cl_deathglow 0.8 "number of seconds during which dead bodies glow out"
+
+cl_movement 1
+cl_movement_track_canjump 0
+cl_stairsmoothspeed 200
+
+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"
+
+seta menu_sandbox_spawn_model ""
+seta menu_sandbox_attach_bone ""
+seta menu_sandbox_edit_skin 0
+seta menu_sandbox_edit_alpha 1
+seta menu_sandbox_edit_color_main "1 1 1"
+seta menu_sandbox_edit_color_glow "1 1 1"
+seta menu_sandbox_edit_frame 0
+seta menu_sandbox_edit_scale 1
+seta menu_sandbox_edit_solidity 1
+seta menu_sandbox_edit_physics 1
+seta menu_sandbox_edit_force 1
+seta menu_sandbox_edit_material ""
+
+seta menu_monsters_edit_spawn ""
+seta menu_monsters_edit_skin 0
+seta menu_monsters_edit_movetarget 1
+
+// effects
+r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture
+mod_q3shader_force_terrain_alphaflag 1 // supposedly now required for r_glsl_vertextextureblend_usebothalphas to work
+r_glsl_postprocess 0 // but note, hud_postprocessing enables this
+r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
+r_picmipworld 1
+gl_picmip_world 0
+gl_picmip_sprites 0
+gl_picmip_other 1 // so, picmip -1 is best possible quality
+r_mipsprites 1
+r_mipskins 1
+gl_max_lightmapsize 4096
+r_shadow_realtime_world_lightmaps 1
+r_shadow_realtime_world_importlightentitiesfrommap 0 // Whether build process uses keepLights is nontransparent and may change, so better make keepLights not matter.
+cl_decals_fadetime 5
+cl_decals_time 1
+seta cl_gunalign 3 "Gun alignment; 1 = center, 3 = right, 4 = left; requires reconnect"
+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 2.5 "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 1 "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_gibs_avelocity_scale 1 "how much angular velocity to use on gibs"
+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 1 "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_lod 1
+r_glsl_offsetmapping_reliefmapping 0
+r_glsl_offsetmapping_scale 0.02
+
+scr_conalpha 1
+scr_conbrightness 0.2
+scr_screenshot_jpeg 1
+scr_screenshot_jpeg_quality 0.9
+
+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 ""
+
+seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
+seta cl_announcer_antispam 2 "number of seconds before an announcement of the same sound can be played again"
+seta cl_announcer_maptime 3 "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"
+
+// aliases:
+alias +fire +attack
+alias -fire -attack
+alias +fire2 +button3
+alias -fire2 -button3
+alias +attack2 +button3 // old alias from Nexuiz
+alias -attack2 -button3 // old alias name from Nexuiz
+alias +crouch +button5
+alias -crouch -button5
+alias weapnext "_weapnext_${cl_weaponpriority_useforcycling}"
+alias _weapnext_0 "impulse 18"
+alias _weapnext_1 "impulse 15"
+alias _weapnext_2 "impulse 10"
+alias weaplast "impulse 11"
+alias weapprev "_weapprev_${cl_weaponpriority_useforcycling}"
+alias _weapprev_0 "impulse 19"
+alias _weapprev_1 "impulse 16"
+alias _weapprev_2 "impulse 12"
+alias weapbest "impulse 13"
+
+// experimental zoom toggle (can be in wrong state at start of a game, though)
+set _togglezoom +
+alias +zoom "set _togglezoom -; +button4"
+alias -zoom "set _togglezoom +; -button4"
+alias togglezoom "${_togglezoom}zoom"
+
+alias reload "impulse 20"
+
+// weapons
+alias weapon_group_1 "impulse 1"
+alias weapon_group_2 "impulse 2"
+alias weapon_group_3 "impulse 3"
+alias weapon_group_4 "impulse 4"
+alias weapon_group_5 "impulse 5"
+alias weapon_group_6 "impulse 6"
+alias weapon_group_7 "impulse 7"
+alias weapon_group_8 "impulse 8"
+alias weapon_group_9 "impulse 9"
+alias weapon_group_0 "impulse 14" // cycles the superweapons
+// TODO: remove after 0.8.2. Default impulse commands for 0.8.1 servers
+exec weapons.cfg
+
+cl_curl_enabled 1
+cl_curl_maxdownloads 3
+cl_curl_maxspeed 0
+cl_curl_useragent 1
+cl_curl_useragent_append "$g_xonoticversion"
+
+seta g_waypointsprite_alpha 1 "This allows the client to control transparency of the waypoint"
+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"
+set g_waypointsprite_distancealphaexponent 2
+seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
+seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
+seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
+seta g_waypointsprite_edgeoffset_bottom 0 "offset of how close the waypoint can be to the bottom edge of the screen"
+seta g_waypointsprite_edgeoffset_left 0 "offset of how close the waypoint can be to the left edge of the screen"
+seta g_waypointsprite_edgeoffset_right 0 "offset of how close the waypoint can be to the right edge of the screen"
+seta g_waypointsprite_edgeoffset_top 0 "offset of how close the waypoint can be to the top edge of the screen"
+seta g_waypointsprite_fontsize 12
+seta g_waypointsprite_itemstime 2 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn: 1 when spectating, 2 even playing in warmup stage"
+set g_waypointsprite_minscale 0.5
+set g_waypointsprite_minalpha 0.4
+set g_waypointsprite_normdistance 512
+seta g_waypointsprite_scale 1
+set g_waypointsprite_spam 0 "Debugging feature. Set to 10 and load courtfun in race mode to test."
+set g_waypointsprite_timealphaexponent 1
+seta g_waypointsprite_turrets 1 "disable turret waypoints"
+seta g_waypointsprite_turrets_maxdist 5000 "max distance for turret waypoints"
+seta g_waypointsprite_uppercase 1
+seta g_waypointsprite_text 0 "Always show text instead of icons, setting this to 0 will still use text if the icon is unavailable"
+seta g_waypointsprite_iconsize 32
+seta g_waypointsprite_iconcolor 0 "Show the icon at natural color rather than the waypoint's color"
+
+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"        "toggle cl_hidewaypoints"
+
+seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
+
+seta cl_damagetext "1" "Draw damage dealt where you hit the enemy"
+seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health"
+seta cl_damagetext_format_verbose 0 "{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ"
+seta cl_damagetext_format_hide_redundant 0 "hide {armor} if 0; hide {potential} and {potential_health} when same as actual"
+seta cl_damagetext_color "1 1 0" "Damage text color"
+seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
+seta cl_damagetext_size_min 10 "Damage text font size for small damage"
+seta cl_damagetext_size_min_damage 25 "How much damage is considered small"
+seta cl_damagetext_size_max 16 "Damage text font size for large damage"
+seta cl_damagetext_size_max_damage 140 "How much damage is considered large"
+seta cl_damagetext_alpha_start "1" "Damage text initial alpha"
+seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds"
+seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
+seta cl_damagetext_offset "0 -40 0" "Damage text offset"
+seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
+seta cl_damagetext_accumulate_alpha_rel "0.65" "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha"
+seta cl_damagetext_friendlyfire "1" "Show damage text for friendlyfire too"
+seta cl_damagetext_friendlyfire_color "1 0 0" "Damage text color for friendlyfire"
+
+seta cl_damagetext_2d_pos "0.47 0.53 0" "2D damage text initial position (X and Y between 0 and 1)"
+seta cl_damagetext_2d_alpha_start 1 "2D damage text initial alpha"
+seta cl_damagetext_2d_alpha_lifetime 1.3 "2D damage text lifetime (alpha fading) in seconds"
+seta cl_damagetext_2d_size_lifetime 3 "2D damage text lifetime (size shrinking) in seconds"
+seta cl_damagetext_2d_velocity "-25 0 0" "2D damage text move direction (screen coordinates)"
+seta cl_damagetext_2d_overlap_offset "0 -15 0" "Offset 2D damage text by this much to prevent overlapping (screen coordinates)"
+seta cl_damagetext_2d_close_range 125 "Always use 2D damagetext for hits closer that this"
+seta cl_damagetext_2d_out_of_view 1 "Always use 2D damagetext for hits that occured off-screen"
+
+seta cl_vehicles_alarm 1 "Play an alarm sound when the vehicle you are driving is heavily damaged"
+seta cl_vehicles_hud_tactical 1
+seta cl_vehicles_hudscale 0.5
+seta cl_vehicles_notify_time 15
+seta cl_vehicles_crosshair_size 0.5
+seta cl_vehicles_crosshair_colorize 1
+
+r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
+
+exec binds-xonotic.cfg
+
+seta menu_skin "luma"
+set menu_slowmo 1
+seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
+seta menu_tooltips 1 "menu tooltips: 0 disabled, 1 enabled, 2 also shows cvar or console command (when available) changed or executed by the item"
+set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
+set menu_showboxes 0 "show item bounding boxes (debug)"
+set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list"
+set menu_force_on_disconnection 1 "force to show the menu this number of seconds after you get disconnected (0 to disable)"
+
+r_textbrightness 0.2
+r_textcontrast 0.8
+r_textshadow 0
+r_font_postprocess_blur 1
+r_font_postprocess_outline 1
+
+// good settings for these fonts
+con_chat 5
+con_chatpos -9
+con_chatsize 10
+con_chatwidth 0.6
+con_notify 0
+con_notifysize 10
+con_notifyalign 0
+con_textsize 10
+
+seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info prints"
+
+// scoreboard
+seta scoreboard_columns default
+
+// keep old scoreboard cvars for compatibility's sake
+// they've been replaced by hud_panel_scoreboard_* cvars
+// TODO remove them after a future release (0.8.2+)
+seta scoreboard_border_thickness 1 "scoreboard border thickness"
+seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
+seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
+seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
+seta scoreboard_color_bg_r 0.125 "red color component of the scoreboard background"
+seta scoreboard_color_bg_g 0.55 "green color component of the scoreboard background"
+seta scoreboard_color_bg_b 0.875 "blue color component of the scoreboard background"
+seta scoreboard_color_bg_team 0.6 "team color multiplier of the scoreboard background"
+seta scoreboard_alpha_bg 0.7 "scoreboard background alpha"
+seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
+seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
+seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
+seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
+seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
+seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
+seta scoreboard_highlight_alpha 0.08 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
+seta scoreboard_highlight_alpha_self 0.3 "self highlight alpha value"
+seta scoreboard_offset_left 0.15 "how far (by percent) the scoreboard is offset from the left screen edge"
+seta scoreboard_offset_right 0.15 "how far (by percent) the scoreboard is offset from the right screen edge"
+seta scoreboard_offset_vertical 0.05 "how far (by percent) the scoreboard is offset from the top and bottom of the screen"
+seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
+seta scoreboard_respawntime_decimals 1 "decimal places to show for the respawntime countdown display on the scoreboard"
+seta scoreboard_dynamichud 0 "apply the dynamic hud effects to the scoreboard"
+
+seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta accuracy_color0 "1 0 0"
+seta accuracy_color1 "1 1 0"
+seta accuracy_color2 "0 1 0"
+
+// 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"
+seta menu_slist_modfilter "" // set to either: !modname or modname. modname of = means "same as we are running now".
+
+// other serverlist cvars
+seta menu_slist_categories 1
+seta menu_slist_categories_onlyifmultiple 1
+seta menu_slist_purethreshold 0
+seta menu_slist_modimpurity 0
+seta menu_slist_recommendations 3
+seta menu_slist_recommendations_maxping 150
+seta menu_slist_recommendations_minfreeslots 1
+seta menu_slist_recommendations_minhumans 0
+seta menu_slist_recommendations_purethreshold -1
+
+// serverlist category override cvars
+seta menu_slist_categories_CAT_FAVORITED_override ""
+seta menu_slist_categories_CAT_RECOMMENDED_override ""
+seta menu_slist_categories_CAT_NORMAL_override ""
+seta menu_slist_categories_CAT_SERVERS_override "CAT_NORMAL"
+seta menu_slist_categories_CAT_XPM_override ""
+seta menu_slist_categories_CAT_MODIFIED_override ""
+seta menu_slist_categories_CAT_OVERKILL_override ""
+seta menu_slist_categories_CAT_INSTAGIB_override ""
+seta menu_slist_categories_CAT_DEFRAG_override ""
+
+seta menu_weaponarena ""
+
+seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
+
+// useful keybind to maximize the chat area temporarily
+// HUD code takes care of many of these now...
+//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"
+
+set _con_chat_maximized 0
+set _backup_con_chatvars_set 0
+alias _restore_con_chatvars_0 ""
+alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; 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_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 "_con_chat_maximized 1; _backup_con_chatvars; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0"
+alias -con_chat_maximize "_con_chat_maximized 0; _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_devmap      map
+set con_completion_gotomap     map
+set con_completion_vmap                map
+set con_completion_vnextmap    map
+set con_completion_vdomap      map
+set con_completion_playermodel "models/player/*.iqm"
+
+// helper
+// these non-saved engine cvars shall be saved
+alias makesaved "seta $1 \"${$1 ?}\""
+makesaved cl_maxfps_alwayssleep
+makesaved cl_port
+makesaved gl_finish
+makesaved net_slist_queriespersecond
+makesaved r_ambient
+makesaved r_drawviewmodel
+makesaved r_showsurfaces
+makesaved r_subdivisions_tolerance
+makesaved skill
+makesaved vid_gl13
+makesaved vid_gl20
+makesaved v_idlescale
+makesaved v_kicktime
+makesaved music_playlist_list0
+makesaved music_playlist_random0
+
+cl_netfps 60 // should match or be a multiple of sys_ticrate
+
+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
+
+cl_maxfps 200
+
+seta menu_mouse_absolute 1 "use the OS mouse pointer motion for menu"
+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 $*"
+
+seta cl_weaponpriority "vaporizer hmg rpc oknex vortex fireball mortar okmachinegun machinegun hagar rifle arc electro devastator crylink minelayer okshotgun shotgun shockwave hlac tuba blaster porto seeker hook" "weapon priority list"
+seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
+seta cl_weaponpriority0 "rpc devastator mortar hagar seeker fireball"                   "use weapon_priority_0_prev for prev gun from this list, weapon_priority_0_best for best gun, weapon_priority_0_next for next gun.  Default value: explosives"
+seta cl_weaponpriority1 "vaporizer oknex vortex crylink hlac arc electro blaster shockwave"   "use weapon_priority_1_prev for prev gun from this list, weapon_priority_1_best for best gun, weapon_priority_1_next for next gun.  Default value: energy"
+seta cl_weaponpriority2 "vaporizer oknex vortex rifle"                                        "use weapon_priority_2_prev for prev gun from this list, weapon_priority_2_best for best gun, weapon_priority_2_next for next gun.  Default value: hitscan exact"
+seta cl_weaponpriority3 "vaporizer hmg oknex vortex rifle okmachinegun machinegun okshotgun shotgun shockwave"       "use weapon_priority_3_prev for prev gun from this list, weapon_priority_3_best for best gun, weapon_priority_3_next for next gun.  Default value: hitscan all"
+seta cl_weaponpriority4 "mortar minelayer hlac hagar crylink seeker okshotgun shotgun shockwave"  "use weapon_priority_4_prev for prev gun from this list, weapon_priority_4_best for best gun, weapon_priority_4_next for next gun.  Default value: spam weapons"
+seta cl_weaponpriority5 "blaster shockwave hook porto"                                  "use weapon_priority_5_prev for prev gun from this list, weapon_priority_5_best for best gun, weapon_priority_5_next for next gun.  Default value: weapons for moving"
+seta cl_weaponpriority6 ""                                                              "use weapon_priority_6_prev for prev gun from this list, weapon_priority_6_best for best gun, weapon_priority_6_next for next gun"
+seta cl_weaponpriority7 ""                                                              "use weapon_priority_7_prev for prev gun from this list, weapon_priority_7_best for best gun, weapon_priority_7_next for next gun"
+seta cl_weaponpriority8 ""                                                              "use weapon_priority_8_prev for prev gun from this list, weapon_priority_8_best for best gun, weapon_priority_8_next for next gun"
+seta cl_weaponpriority9 ""                                                              "use weapon_priority_9_prev for prev gun from this list, weapon_priority_9_best for best gun, weapon_priority_9_next for next gun"
+seta cl_weaponimpulsemode 0 "0: only cycle between currently usable weapons in weapon priority order; 1: cycle between all possible weapons on a key in weapon priority order"
+
+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 cl_handicap 1      "multiplies damage received and divides damage dealt NOTE: reconnect or use 'sendcvar cl_handicap' to update the choice."
+
+seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
+
+seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway."
+
+seta cl_jetpack_jump 1 "Activate jetpack by pressing jump in the air. 0 = Disable, 1 = Stop when touching ground, 2 = Enable"
+
+seta cl_race_cptimes_showself 1 "Always show your own times as well as the current best on checkpoints in Race/CTS"
+seta cl_race_cptimes_onlyself 0 "Only show your own times on checkpoints in Race/CTS"
+
+set cl_stripcolorcodes 0       "experimental feature (notes: strips ALL color codes from messages!)"
+
+// 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_threshold     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 cl_gentle 0               "client side gentle mode, master switch for removing both gibs and messages"
+seta cl_gentle_gibs 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_gentle_messages 0      "client side gentle mode (only replaces frag messages/centerprints)"
+seta cl_gentle_damage 0        "client side gentle mode (only replaces damage flash); when set to 1, a white flash replaces the blood image, when set to 2, a randomly colored flash is used instead"
+
+set cl_jetpack_attenuation 2 "jetpack sound attenuation"
+
+set cl_warpzone_usetrace 1 "do not touch"
+
+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 menu_updatecheck 1 "check for updates"
+set menu_updatecheck_getpacks 1 "get update packs from update server"
+
+set cl_loddistance1 1024
+set cl_loddistance2 3072
+seta cl_playerdetailreduction 4        "the higher, the less detailed player models are displayed (LOD)"
+seta cl_modeldetailreduction 1 "the higher, the less detailed certain map models are displayed (LOD)"
+
+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)"
+
+//cl_gunalign calculator
+seta menu_cl_gunalign 3 "Gun alignment; 1 = center (if allowed by g_shootfromclient) or right, 2 = center (if allowed by g_shootfromclient) or left, 3 = right only, 4 = left only"
+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 _menu_initialized 0 "is 0 on first menu loading, 1 later"
+
+seta cl_noantilag 0 "turn this on if you believe antilag is bad"
+
+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_csqcentities 0 "csqc entity spam"
+
+seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
+seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); set it to 2 to enable it even in teamplay (only when there is exactly one enemy team)"
+seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
+seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
+seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
+seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce perceived lag"
+seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
+
+set debugdraw 0
+set debugdraw_filter ""
+set debugdraw_filterout ""
+set debugtrace 0
+
+// FIXME remove this when the engine feature FINALLY MAYBE works
+r_glsl_skeletal 0
+
+// 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)
+
+// autodemo deleting
+seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos"
+
+// freeze camera
+set cl_lockview 0 "when 1, the camera does not move any more"
+
+// we now use mastervolume
+volume 1
+
+// sucks less than the old one
+cl_decals_newsystem 1
+
+scr_conalpha 1
+scr_conalpha2factor 0.3
+scr_conalpha3factor 1
+scr_conalphafactor 0.8
+scr_conbrightness 0.35
+scr_conforcewhiledisconnected 1
+scr_conscroll2_x 0.11
+scr_conscroll2_y 0.2
+scr_conscroll3_x 0
+scr_conscroll3_y 0
+scr_conscroll_x -0.1
+scr_conscroll_y -0.3
+
+scr_conforcewhiledisconnected 0
+scr_infobar_height 12
+
+// DP cannot properly detect this, so rather turn off the detection
+r_texture_dds_load_alphamode 2
+r_texture_dds_swdecode 1 // SW decode to quarter res if we want to load DDS but don't support the extension for it
+r_texture_dds_load_logfailure 0 // this engine feature SUCKS
+set vid_netwmfullscreen 0 // doesn't support non-native res
+
+// particles optimization
+r_drawparticles_nearclip_min 8
+r_drawparticles_nearclip_max 16
+
+r_cullentities_trace 0
+
+// exact gloss looks better, e.g. on g-23
+r_shadow_glossexact 1
+r_shadow_glossintensity 1
+
+// use fake light if map has no lightmaps
+r_fakelight 1
+
+r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
+r_water_refractdistort 0.019
+
+set cl_rainsnow_maxdrawdist 2048
+
+// equalize looks better than fullbright
+r_equalize_entities_fullbright 1
+
+// safe font defaults
+r_font_hinting 1
+r_font_disable_freetype 0
+r_font_size_snapping 4
+
+// database management
+set cl_db_saveasdump 0 "write client.db in dump format (loads slower, easier to read/parse)"
+
+// uid2name
+seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)"
+seta cl_allow_uidtracking 1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid tracking (allows associating your data with your player ID)"
+// FIXME set to -1 before release, once we have a dialog for this!
+
+// polygonoffset for submodel SUCKS SUCKS SUCKS (only a hack for quake1, we don't need that)
+r_polygonoffset_submodel_offset 0
+r_polygonoffset_submodel_factor 0
+// decals: need a higher polygonoffset than default to not compete with _decal surfaces too much
+r_polygonoffset_decals_offset -28
+r_polygonoffset_decals_factor 0
+
+// loading screen
+scr_loadingscreen_background 0
+scr_loadingscreen_barcolor "0 0.5 1"
+scr_loadingscreen_barheight 12
+scr_loadingscreen_count 1
+scr_loadingscreen_firstforstartup 1
+scr_loadingscreen_scale 999
+scr_loadingscreen_scale_base 1
+scr_loadingscreen_scale_limit 2
+
+// other config files
+exec effects-normal.cfg
+exec crosshairs.cfg
+exec gamemodes-client.cfg
+exec notifications.cfg
+
+seta cl_physics "default" "client selected physics set"
+
+// hud cvar descriptions and common settings
+exec _hud_common.cfg
+exec _hud_descriptions.cfg
+// exec the default skin config
+// please add any new cvars into the hud_save script in qcsrc/client/hud_config.qc for consistency
+exec hud_luma.cfg
+
+// enable menu syncing - must be after files that call menu_sync on startup - see alias menu_sync ""
+alias menu_sync "menu_cmd sync"
+
+seta cl_items_nofade 0
+seta cl_animate_items 1
+seta cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
+seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
+seta cl_simple_items 0 "enable simple items (if server allows)"
+set cl_simpleitems_postfix "_luma" "posfix to add fo model name when simple items are enabled"
+set cl_fullbright_items 0 "enable fullbright items (if server allows, controlled by g_fullbrightitems)"
+set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0"
+set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
+
+seta cl_showspectators 0 "Show who's spectating you if server has sv_showspectators enabled"
+
+// Facility for config.cfg use ONLY.
+// Interpreted in post-config.cfg.
+seta menu_forced_saved_cvars "" "These cvars will always be saved, despite engine/Xonotic cvar saving status"
+set menu_reverted_nonsaved_cvars "" "These cvars are currently marked as saved in the flags, but have been reverted and won't stay saved. INTERNAL USE ONLY."
diff --git a/xonotic-common.cfg b/xonotic-common.cfg
new file mode 100644 (file)
index 0000000..078fbed
--- /dev/null
@@ -0,0 +1,147 @@
+// 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
+set g_xonoticversion git "Xonotic version (formatted for humans)"
+
+gameversion 802 // 0.8.2
+gameversion_min 0 // git builds see all versions
+gameversion_max 65535 // git builds see all versions
+
+// 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"
+// so, for a given gameversion, _min and _max calculate as follows:
+//   gameversion_min = (gameversion / 100) * 100 - 100
+//   gameversion_max = (gameversion / 100) * 100 + 199
+
+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"
+
+exec xonotic-client.cfg
+exec xonotic-server.cfg
+
+set ekg 0      "Throw huge amounts of gibs"
+
+_cl_playermodel "models/player/erebus.iqm"
+
+locs_enable 0
+pausable 0
+set samelevel 0 "when 1, always play the same level over and over again"
+
+fs_empty_files_in_pack_mark_deletions 1 // makes patches able to delete files
+
+// singleplayer campaign
+set g_campaign 0
+set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
+seta g_campaign_name "xonoticbeta"
+seta g_campaign_skill -1 // -2 easy -1 medium 0 hard
+
+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"
+
+// campaign internal, set when loading a campaign map1G
+set _campaign_index ""
+set _campaign_name ""
+set _campaign_testrun 0 "To verify the campaign file, set this to 1, then start the first campaign level from the menu. If you end up in the menu again, it's good, if you get a QC crash, it's bad."
+
+// used by both server and menu to maintain the available list of maps
+seta g_maplist "" "the list of maps to be cycled among (is autogenerated if empty)"
+
+// we must change its default from 1.0 to 1 to be consistent with menuqc
+set slowmo 1
+
+// ticrate
+//sys_ticrate 0.0166667 // 60fps. This would be ideal, but kills home routers.
+sys_ticrate 0.0333333 // Use 30fps instead.
+
+// Audio track names (for old-style "cd loop NUMBER" usage)
+set _cdtrack_first "1"
+alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\""
+alias _cdtrack_1 "g_cdtracks_remaplist \"$1\"; set _cdtrack_first 0"
+alias _cdtrack "_cdtrack_$_cdtrack_first $2"
+set g_cdtracks_remaplist ""
+exec cdtracks.cfg
+unset _cdtrack_first
+unalias _cdtrack_0
+unalias _cdtrack_1
+unalias _cdtrack
+
+cd remap $g_cdtracks_remaplist
+set sv_intermission_cdtrack ""
+
+set g_cdtracks_dontusebydefault "rising-of-the-phoenix"
+seta menu_cdtrack "rising-of-the-phoenix"
+
+// 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"
+prvm_backtraceforwarnings 1
+
+set _urllib_nextslot 0 "temp variable"
+
+set g_debug_defaultsounds 0 "always use default sounds"
+
+// define some engine cvars that we need even on dedicated server
+set r_showbboxes 0
+
+// support Q1BSP maps
+mod_q1bsp_polygoncollisions 1
+
+// match q3map2
+mod_obj_orientation 0
+
+// UTF-8
+utf8_enable 1
+
+// this is mainly for _decal entities (their shaders should use "polygonoffset" shader parameter) - this is "good enough" as it seems, but smaller than the decals one so these don't zfight decals
+mod_q3shader_default_polygonoffset -14
+mod_q3shader_default_polygonfactor 0
+
+// random charge stuff :P
+set g_weapon_charge_colormod_hdrmultiplier 4 "how much to multiply the colors by in the colormod vector"
+set g_weapon_charge_colormod_red_half 0
+set g_weapon_charge_colormod_green_half 0.5
+set g_weapon_charge_colormod_blue_half 1
+set g_weapon_charge_colormod_red_full 1
+set g_weapon_charge_colormod_green_full -0.5
+set g_weapon_charge_colormod_blue_full -1
+
+// session locking
+locksession 1
+
+// create this cvar in case the engine did not
+set snd_soundradius 1200
+set snd_softclip 1
+set snd_maxchannelvolume 0
+set snd_streaming_length 2
+seta menu_snd_sliderscale 2 "0: decibels; 1: linear percent; 2: 0..10 scale; 3: slider size percent"
+seta menu_snd_attenuation_method 1 "Use exponential instead of linear falloff for sound attenuation"
+alias snd_attenuation_method_0 "set menu_snd_attenuation_method 0; set snd_soundradius 1200; set snd_attenuation_exponent 1; set snd_attenuation_decibel 0" // Quake default
+alias snd_attenuation_method_1 "set menu_snd_attenuation_method 1; set snd_soundradius 2400; set snd_attenuation_exponent 4; set snd_attenuation_decibel 0" // nice approximation for method 2
+alias snd_attenuation_method_2 "set menu_snd_attenuation_method 2; set snd_soundradius 1200; set snd_attenuation_exponent 0; set snd_attenuation_decibel 10" // warning: plays sounds within up to 6000qu
+snd_attenuation_method_1
+
+// declare the channels we use
+seta snd_channel8volume 1 "QuakeC controlled background music volume"
+seta snd_channel9volume 1 "QuakeC controlled ambient sound volume"
+
+// sound randomization
+snd_identicalsoundrandomization_time -0.1
+snd_identicalsoundrandomization_tics    1
+
+// load console command aliases and settings
+exec commands.cfg
+
+// ... and now that everything is configured/aliased, we can do some things:
+
+// Change g_start_delay based upon if the server is local or not.
+if_client set 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      "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
diff --git a/xonotic-server.cfg b/xonotic-server.cfg
new file mode 100644 (file)
index 0000000..403814a
--- /dev/null
@@ -0,0 +1,553 @@
+// this should reset most cvars and aliases affecting gameplay to their defaults
+// note that it doesn't reset all server cvars,
+// some are shared with the client and so are left in xonotic-common.cfg
+
+
+// taunts and voices
+set sv_taunt 1 "allow taunts on the server"
+set sv_autotaunt 1 "allow autotaunts on the server"
+
+// 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)"
+
+// restart server if all players hit "ready"-button
+set sv_ready_restart 0 "allow a map to be restarted once all players pressed the \"ready\" button"
+set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
+set sv_ready_restart_repeatable 0      "allows the players to restart the game as often as needed"
+
+//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
+set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
+
+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"
+set g_warmup_limit 0   "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
+set g_warmup_allow_timeout 0   "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
+set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
+set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
+
+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     "only players can call a vote (thus spectators and observers can't call a vote): 0 = all people can vote, 1 = spectators can vote in warmup stage, 2 = only players can vote (no exceptions)."
+
+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       "allow 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_oldvortexbeam 0 "If enabled, clients are allowed to use old v2.3 Vortex beam"
+
+set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
+set g_telefrags_teamplay 1 "never telefrag team mates"
+set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
+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"
+
+set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
+set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
+set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
+
+set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
+
+// use default physics
+set sv_friction_on_land 0
+set sv_friction_slick 0.5
+
+set sv_slick_applygravity 0
+
+set sv_aircontrol_backwards 0 "apply forward aircontrol options to backward movement"
+set sv_aircontrol_sidewards 0 "apply forward aircontrol options to sideward movement"
+
+set sv_player_viewoffset "0 0 35" "view offset of the player model"
+set sv_player_mins "-16 -16 -24" "playermodel mins"
+set sv_player_maxs "16 16 45" "playermodel maxs"
+set sv_player_crouch_viewoffset "0 0 20" "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_doublejump 0 "allow Quake 2-style double jumps"
+set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)"
+set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)"
+set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style"
+set sv_track_canjump 0 "track if the player released the jump key between 2 jumps to decide if they are able to jump or not"
+set sv_jumpvelocity_crouch 0 "jump height while crouching, set to 0 to use regular jump height"
+
+set sv_precacheplayermodels 1
+set sv_precacheweapons 0
+set sv_precacheitems 0
+set sv_spectator_speed_multiplier 1.5
+set sv_spectator_speed_multiplier_min 1
+set sv_spectator_speed_multiplier_max 5
+set 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)"
+set 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"
+set sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
+set sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
+set 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; can be overridden by :<skinnumber> suffix in sv_defaultplayermodel"
+set sv_defaultplayermodel_red ""       "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_red 0
+set sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_blue 0
+set sv_defaultplayermodel_yellow "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_yellow 0
+set sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayerskin_pink 0
+set 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 30
+net_connecttimeout 30
+sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
+
+set sv_shownames_cull_distance 2500 "distance after which to not send origin/health/armor of another player"
+
+set bot_config_file bots.txt "Name and path of the bot configuration file"
+set bot_number 0       "Minimum number of bots"
+set 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"
+set bot_prefix [BOT]   "Prefix in front of the bot names"
+set bot_suffix ""      "Suffix behind the bot names"
+set skill_auto 0       "when 1, \"skill\" gets adjusted to match the best player on the map"
+set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
+set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
+set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
+// general bot AI cvars
+set bot_ai_thinkinterval 0.05
+set bot_ai_strategyinterval 7 "How often a new objective is chosen"
+set bot_ai_strategyinterval_movingtarget 5.5 "How often a new objective is chosen when current objective can move"
+set bot_ai_enemydetectioninterval 2 "How often bots pick a new target"
+set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
+set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
+set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
+set bot_ai_dangerdetectioninterval 0.25 "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 100
+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_threshold 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   "vaporizer oknex vortex rifle electro devastator mortar hagar hlac crylink blaster okmachinegun machinegun fireball seeker okshotgun shotgun shockwave tuba minelayer" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid   "vaporizer devastator oknex vortex fireball seeker mortar electro okmachinegun machinegun arc crylink hlac hagar okshotgun shotgun shockwave blaster rifle tuba minelayer"     "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "vaporizer oknex vortex okshotgun shotgun shockwave okmachinegun machinegun arc hlac tuba seeker hagar crylink mortar electro devastator blaster fireball rifle minelayer"     "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.4  "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 200 "Run to goals located further than this distance"
+set bot_ai_bunnyhop_stopdistance 300 "Stop jumping after reaching this distance to the goal"
+set bot_ai_bunnyhop_firstjumpdelay 0.2 "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 navigate 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 2nd filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_3th 0.01 "Amount of the 3th filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_4th 0.05 "Amount of the 4th filter output to apply to the aiming angle"
+set bot_ai_aimskill_order_mix_5th 0.01 "Amount of the 5th 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"
+set bot_ai_timeitems 1 "allow skilled bots to run to important items a little time before respawning"
+set bot_ai_timeitems_minrespawndelay 25 "bots run to items with this minimum respawn delay before respawning"
+
+// waypoint editor enable
+set g_waypointeditor 0
+set g_waypointeditor_auto 0 "Automatically create waypoints for bots while playing; BEWARE, this currently creates too many of them"
+set g_waypointeditor_symmetrical 0 "Enable symmetrical editing of waypoints on symmetrical CTF maps (NOTE: it assumes that the map is perfectly symmetrical). 1: automatically determine origin of symmetry; -1: use custom origin (g_waypointeditor_symmetrical_origin); 2: automatically determine axis of symmetry; -2: use custom axis (g_waypointeditor_symmetrical_axis)"
+set g_waypointeditor_symmetrical_origin "0 0" "Custom origin of symmetry (x y)"
+set g_waypointeditor_symmetrical_order 0 "if >= 2 apply rotational symmetry (around origin of symmetry) of this order, otherwise apply autodetected order of symmetry"
+set g_waypointeditor_symmetrical_axis "0 0" "Custom axis of symmetry (m q parameters of y = mx + q)"
+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). Changes will be correctly applied only from the next game"
+
+set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
+set g_spawnshield_blockdamage 1 "how much spawn shield protects you from damage (1 = full protection)"
+set 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_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 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
+set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
+set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
+set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
+set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
+set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"
+set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening"
+set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly"
+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_weaponarena_random_with_blaster "1"      "additionally, always provide the blaster in random weapon arena games"
+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"
+set g_maplist_mostrecent_count 3       "number of most recent maps that are blocked from being played again"
+set g_maplist_index 0  "this is used internally for saving position in maplist cycle"
+set g_maplist_selectrandom 0   "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
+set 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 g_items_mindist 4000 "starting distance for the fading of items"
+set g_items_maxdist 4500 "maximum distance at which an item can be viewed, after which it will be invisible"
+
+set g_grab_range 200 "distance at which dragable objects can be grabbed"
+
+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"
+set 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 g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
+
+set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
+set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
+set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
+// respawn delay
+set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
+set g_respawn_delay_small_count 0 "Player count per team for g_respawn_delay_small. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
+set g_respawn_delay_large 2 "large game number of seconds you have to wait before you can respawn again"
+set g_respawn_delay_large_count 8 "Player count per team for g_respawn_delay_large. <=0 values mean the minimum amount of players to have gameplay (typically 2 in FFA, 1 in teamplay)."
+set g_respawn_delay_max 5 "number of seconds you can wait before you're forced to respawn (only effective with g_forced_respawn 1)"
+set g_respawn_delay_forced 0 "enforce regular respawn delay (prevent gamemode specific respawn delays)"
+set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
+
+// overtime
+set timelimit_overtime 2 "duration in minutes of one added overtime, added to the timelimit"
+set timelimit_overtimes 0 "how many overtimes to add at max"
+set 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"
+set g_tdm_on_dm_maps 0 "when this is set, all DM maps automatically support TDM"
+
+set teamplay_mode 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 cvars g_mirrordamage*, g_friendlyfire* and g_teamdamage*"
+set g_mirrordamage 0.7              "for teamplay_mode 4: mirror damage factor"
+set g_mirrordamage_virtual 1        "for teamplay_mode 4: do not actually apply mirror damage, just show graphics effect for it"
+set g_mirrordamage_onlyweapons 0    "for teamplay_mode 4: only apply mirror damage if the attack was from a weapon"
+set g_friendlyfire 0.5              "for teamplay_mode 4: friendly fire factor"
+set g_friendlyfire_virtual 1        "for teamplay_mode 4: do not actually apply friendly fire, just show graphics effect for it"
+set g_friendlyfire_virtual_force 1  "for teamplay_mode 4: apply force even though damage was made virtual only"
+set g_teamdamage_threshold 40       "for teamplay_mode 4: threshold over which to apply mirror damage"
+set g_teamdamage_resetspeed 20      "for teamplay_mode 4: how fast player's teamdamage count decreases"
+
+set g_balance_teams 1  "automatically balance out players entering instead of asking them for their preferred team"
+set g_balance_teams_prevent_imbalance  1       "prevent players from changing to larger teams"
+set g_balance_teams_scorefactor 0.25 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)"
+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"
+
+set g_bloodloss 0   "amount of health below which blood loss occurs"
+
+set g_footsteps 1      "serverside footstep sounds"
+
+set g_throughfloor_debug 0 "enable debugging messages for throughfloor calculations"
+set g_throughfloor_damage_max_stddev 2 "Maximum standard deviation for splash damage"
+set g_throughfloor_force_max_stddev 10 "Maximum standard deviation for splash force"
+set g_throughfloor_min_steps_player 1 "Minimum number of steps for splash damage"
+set g_throughfloor_min_steps_other 1 "Minimum number of steps for splash damage"
+set g_throughfloor_max_steps_player 100 "Maximum number of steps for splash damage"
+set g_throughfloor_max_steps_other 10 "Maximum number of steps for splash damage"
+// note: for damage X, 0.25 * ((1-g_throughfloor_damage)*X / g_throughfloor_damage_max_stddev)^2 steps are used
+// for these numbers:
+//   damage  25: 3
+//   damage  60: 15
+//   damage  80: 25
+//   damage 200: 157
+//   force  250: 10
+//   force  300: 15
+//   force  600: 57
+
+sv_maxvelocity 1000000000
+sv_sound_land ""
+sv_sound_watersplash ""
+
+// startmap_dm is used when running with the -listen or -dedicated commandline options
+set serverconfig server.cfg
+alias loadconfig "cvar_resettodefaults_saveonly; exec ${* !}"
+set _sv_init 0
+alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
+
+// 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
+set 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)"
+set quit_and_redirect_timer 1.5 "set to number of seconds after quit before performing the connect operation of quit_and_redirect"
+
+// Green's fullbright skins, updated by Samual
+alias sv_fbskin_unique "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors \"\""
+alias sv_fbskin_green "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 51"
+alias sv_fbskin_red "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 68"
+alias sv_fbskin_orange "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 238"
+alias sv_fbskin_rainbow "sv_defaultcharacter 1; sv_defaultplayermodel models/player/megaerebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 95"
+
+alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
+
+set sv_servermodelsonly 1
+
+sv_curl_defaulturl "http://www.xonotic.org/contentdownload/getmap.php?file="
+set sv_curl_serverpackages_auto 1 "automatically add packs with *.serverpackage files to sv_curl_serverpackages"
+
+set sv_motd ""
+
+set g_waypoints_for_items 0    "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
+
+set g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
+set g_maplist_votable_keeptwotime 15 "show only 2 options after this amount of time during map vote screen"
+set g_maplist_votable_timeout 30       "timeout for the map voting; must be below 50 seconds!"
+set g_maplist_votable_suggestions 2
+set g_maplist_votable_suggestions_override_mostrecent 0
+set 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"
+set g_maplist_votable_abstain 0        "when 1, you can abstain from your vote"
+set g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
+
+set sv_vote_gametype 0 "show a vote screen for gametypes before map vote screen"
+set sv_vote_gametype_keeptwotime 10 "show only 2 options after this amount of time during gametype vote screen"
+set sv_vote_gametype_options "dm ctf ca lms tdm ft"
+set sv_vote_gametype_timeout 20
+set sv_vote_gametype_default_current 1 "Keep the current gametype if no one votes"
+
+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_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players."
+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 sv_waypointsprite_deployed_lifetime 10
+set sv_waypointsprite_deadlifetime 1
+set sv_waypointsprite_limitedrange 5120
+
+set sv_itemstime 1 "enable networking of time left until respawn for items such as mega health/armor and powerups"
+
+set g_ban_default_bantime 5400 "90 minutes"
+set g_ban_default_masksize 3   "masksize 0 means banning by UID only, 1 means banning by /8 (IPv6: /32) network, 2 means banning by /16 (IPv6: /48) network, 3 means banning by /24 (IPv6: /56) network, 4 means banning by single IP (IPv6: /64 network)"
+set g_banned_list ""   "format: IP remainingtime IP remainingtime ..."
+set g_banned_list_idmode "1"   "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)"
+
+// useful vote aliases
+set timelimit_increment 5
+set timelimit_decrement 5
+set timelimit_min 5
+set timelimit_max 60
+
+sv_gameplayfix_delayprojectiles 0
+sv_gameplayfix_q2airaccelerate 1
+sv_gameplayfix_stepmultipletimes 1
+
+// delay for "kill" to prevent abuse
+set g_balance_kill_delay 2
+set g_balance_kill_antispam 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
+
+set sv_foginterval 1 "force enable fog in regular intervals"
+
+set sv_maxidle 0 "kick players idle for more than this amount of time in seconds"
+set sv_maxidle_spectatorsareidle 0 "when sv_maxidle is not 0, assume spectators are idle too"
+set sv_maxidle_slots 0 "when not 0, only kick idlers when this many or less player slots are available"
+set sv_maxidle_slots_countbots 1 "count bots as player slots"
+
+sv_allowdownloads_inarchive 1 // for csprogs.dat
+sv_allowdownloads 0 // download protocol is evil
+
+set g_jump_grunt 0     "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
+
+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)"
+
+set sv_clones 0        "number of clones a player may make (reset by the \"kill\" command)"
+
+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 1 "1: display waypoints for weapon spawns found on the map when a weapon key is pressed and the weapon is not owned; 2: for dropped weapons too; 3: for all the weapons sharing the same impulse"
+
+// 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_mindistance 2 // enable ballistics starting from 2 qu
+set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls
+set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls
+set g_ballistics_penetrate_clips 0 "allow ballistics to pass through weapon clips"
+
+sv_status_show_qcstatus 1      "Xonotic uses this field instead of frags"
+set g_full_getstatus_responses 0       "this currently breaks qstat"
+
+// "Gentle mode": show no blood
+set sv_gentle 0                "force gentle mode for everyone, also remove references to acts of killing from the messages"
+
+set g_jetpack 0 "Jetpack mutator"
+
+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"
+set g_hitplots_individuals "" "the individuals, by IP, that should have their hitplots recorded"
+
+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"
+
+set g_mapinfo_settemp_acl "+*" "ACL for mapinfo setting cvars"
+
+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"
+
+set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
+
+set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
+
+set 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"
+set g_mutatormsg "" "mutator message"
+
+set spawn_debug 0 "use all spawns one by one, then abort, to verify all spawnpoints"
+set loddebug 0 "force this LOD level"
+set speedmeter 0 "print landing speeds"
+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"
+
+// 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"
+
+// debug
+set _independent_players 0 "DO NOT TOUCH"
+set _notarget 0 "NO, REALLY, DON'T"
+
+// otherwise, antilag breaks
+sv_gameplayfix_consistentplayerprethink 1
+
+// improve some minor details
+sv_gameplayfix_gravityunaffectedbyticrate 1
+sv_gameplayfix_nogravityonground 1
+
+set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
+
+set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
+
+set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"
+
+// sv_cullentities_trace is 1, so the client doesn't have to
+sv_cullentities_trace 1
+
+// less "lagging" of other players, but also less PL tolerant... let's try this
+sv_clmovement_inputtimeout 0.066 // slightly less than 2 frames, so only one frame can be compensated
+
+// strength sound settings
+set sv_strengthsound_antispam_time 0.1 "minimum distance of strength sounds"
+set sv_strengthsound_antispam_refire_threshold 0.04 "apply minimum distance only if refire of the gun is smaller than this"
+
+// database management
+set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
+
+// allow fullbright
+set sv_allow_fullbright 1 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
+
+// auto-teams (team selection by player ID)
+// any player not listed is forced to spectate
+set g_forced_team_red "" "list of player IDs for red team"
+set g_forced_team_blue "" "list of player IDs for blue team"
+set g_forced_team_yellow "" "list of player IDs for yellow team"
+set g_forced_team_pink "" "list of player IDs for pink team"
+set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
+
+// nice alias to set up a match
+// example: g_forced_team_matchsetup stormkeep "mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM=" "BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ="
+// will set up a match on stormkeep where mzDo0nO2y3XpFPNbQAyeUucyaejZ9xpiXLYMGU2x3qM= and BRLOGENSHFEGLE/+Mq3x2UGMYLXipx9ZjeaycuUeyAQ= play against each other
+alias g_forced_team_matchsetup "map $1; settemp g_forced_team_red \"$2\"; settemp g_forced_team_blue \"$3\"; settemp g_forced_team_yellow \"$4\"; settemp g_forced_team_pink \"$5\"; settemp g_forced_team_otherwise spectate"
+
+// frozen
+set g_frozen_revive_falldamage 0 "Enable reviving from this amount of fall damage"
+set g_frozen_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
+set g_frozen_damage_trigger 1 "if 1, frozen players falling into the void will die instead of teleporting to spawn"
+set g_frozen_force 0.6 "How much to multiply the force on a frozen player with"
+
+// player statistics
+set g_playerstats_gamereport_uri "http://stats.xonotic.org/stats/submit" "Output player statistics information to either: URL (with ://), console (with a dash like this: -), or supply a filename to output to data directory."
+set g_playerstats_gamereport_ladder ""
+set g_playerstats_playerbasic_uri "http://stats.xonotic.org"
+set g_playerstats_playerdetail_uri "http://stats.xonotic.org/player/me"
+set g_playerstats_playerdetail_autoupdatetime 1800 // automatically update every 30 minutes anyway
+
+// autoscreenshots
+set g_max_info_autoscreenshot 3 "how many info_autoscreenshot entities are allowed"
+
+// mod names for server browser
+// note: the lowest of these that mismatches default is used
+set g_mod_physics "" "Current physics config name"
+set g_mod_balance "" "Current balance config name"
+set g_mod_config  "" "Current config mod name"
+
+// other config files
+exec balance-xonotic.cfg
+exec physicsX.cfg
+exec turrets.cfg
+exec gamemodes-server.cfg
+exec mutators.cfg
+exec monsters.cfg
+exec minigames.cfg
+exec physics.cfg
+
+set sv_join_notices ""
+set sv_join_notices_time 15
+
+set sv_simple_items 1 "allow or forbid client use of simple items"
+
+set sv_showspectators 1 "Show who's spectating who in the player info panel when client has cl_showspectators on. Shouldn't be used on competitive servers, also disable when watching a suspected cheater"
+
+set sv_damagetext 2 "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage"