]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into mirceakitsune/damage_effects
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Jan 2012 19:20:46 +0000 (21:20 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Jan 2012 19:20:46 +0000 (21:20 +0200)
Conflicts:
effectinfo.txt
qcsrc/client/Main.qc
qcsrc/client/autocvars.qh
qcsrc/common/constants.qh
qcsrc/server/cl_player.qc

1  2 
defaultXonotic.cfg
effectinfo.txt
qcsrc/client/Main.qc
qcsrc/client/autocvars.qh
qcsrc/client/gibs.qc
qcsrc/common/constants.qh
qcsrc/server/cl_player.qc
qcsrc/server/g_damage.qc

diff --combined defaultXonotic.cfg
index bcab7c195f6958f802f24178f4bf7078ff6bdee0,5dcfb3f7c3e94a55cc73fe74cdeb2860c4146a25..c9e968c31f12d4817d973cf6ce3136d306fbee1c
@@@ -38,6 -38,16 +38,16 @@@ alias if_dedicated "${* asis}
  _if_dedicated alias if_client ""
  if_client alias if_dedicated ""
  
+ if_dedicated "alias" qc_cmd_svmenu "sv_cmd $$*"
+ if_client    "alias" qc_cmd_svmenu "menu_cmd $$*"
+ if_dedicated "alias" qc_cmd_svcl   "sv_cmd $$*"
+ if_client    "alias" qc_cmd_svcl   "cl_cmd $$*"
+ if_dedicated "alias" qc_cmd_svcmd  "sv_cmd $$*"
+ if_client    "alias" qc_cmd_svcmd  "cmd $$*"
+ // shorthand for the most usual case
+ alias qc_cmd "qc_cmd_svmenu $*"
  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"
  
  // say aliases
@@@ -53,8 -63,6 +63,6 @@@ alias asay_drop "say_team (%l) dropped 
  alias +hook +button6
  alias -hook -button6
  alias use "impulse 21"
- alias +use use // always send that impulse AND press the key (+use is engine internal command and executes anyway)
- set cl_newusekeysupported 1 // indicates that we always send the use impulse too, so they do not need to be synthesized
  alias ready "cmd ready"
  alias lockteams "sv_cmd lockteams"
  alias unlockteams "sv_cmd unlockteams"
@@@ -215,12 -223,15 +223,15 @@@ seta crosshair_ring_reload 1 "main cva
  seta crosshair_ring_reload_size 2.5   "reload ring size"
  seta crosshair_ring_reload_alpha 0.2  "reload ring alpha"
  
+ seta cl_reticle 1 "control for toggling whether ANY zoom reticles are shown"
  seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
  seta cl_reticle_item_nex 1 "draw aiming reticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
  seta cl_reticle_item_normal 1 "draw reticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
  fov 90
  seta cl_velocityzoom 0        "velocity based zooming of fov, negative values zoom out"
- seta cl_velocityzoomtime 0.3  "time value for averaging speed values"
+ seta cl_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_zoomfactor 5  "how much +zoom will zoom (1-16)"
  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)"
@@@ -246,6 -257,11 +257,11 @@@ vid_conheight 60
  // menu_conwidth, menu_conheight are set inside quake.rc
  v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
  
+ // we want to use sRGB for our maps!
+ exec sRGB-disable.cfg
+ vid_sRGB_fallback 2
+ r_hdr_glowintensity 1
  // 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)
@@@ -286,14 -302,6 +302,6 @@@ gl_polyblend 0 // whether to use scree
  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 16
- r_bloom_brighten 2.5
- r_bloom_colorexponent 1
- r_bloom_colorscale 1
- r_bloom_colorsubtract 0.15
- r_bloom_resolution 320
- r_hdr_range 4
  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
@@@ -334,9 -342,9 +342,9 @@@ set g_maxplayers_spectator_blocktime 5     
  
  //tournament mod
  set g_warmup 0        "split the game into a warmup- and match-stage when set to 1"
- set g_warmup_limit 60 "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)"
+ set g_warmup_limit  "if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage, otherwise warmup will be limited to this time in SECONDS (useful for public matches)"
  set g_warmup_allow_timeout 0  "if set to 1 timeouts can also be called in the warmup-stage, when sv_timeout is set to 1"
- set g_warmup_allguns 0        "if set players start with all guns in warmup mode"
+ set g_warmup_allguns 1        "if set players start with all guns in warmup mode"
  
  set g_chat_nospectators 0     "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
  set sv_vote_nospectators 0    "if set only players can call a vote (thus spectators and observers can't call a vote)"
@@@ -359,12 -367,6 +367,12 @@@ set g_telefrags_teamplay 1 "never telef
  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 cl_damageeffect_player 0.05 "enable weapon damage effects on players, value specifies how often to show the effect"
 +set cl_damageeffect_gibs 0.125 "enable weapon damage effects on gibs, value specifies how often to show the effect"
 +set cl_damageeffect_gibs_randomize 0.5 "probability for effects to show on gibs each tick, used so gibs don't generate particles at the same time and look ugly"
 +set cl_damageeffect_lifetime 0.04 "how much a damage effect lasts, multiplied by damage amount"
 +set cl_damageeffect_lifetime_max 5 "maximum amount of lifetime a damage effect may have at a time"
 +
  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"
  
  // fragmessage: This allows extra information to be displayed with the frag centerprints. 
- set sv_fragmessage_information_ping 1 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
- set sv_fragmessage_information_handicap 1 "Enable handicap display information, 0 = Never display; 1 = Only when the player has handicap on; 2 = Always display (Displays Off if off)"
- set sv_fragmessage_information_stats 1 "Enable statistics (health/armor) display information, 0 = Never display; 1 = Always display (Only available for the person who was killed)"
- set sv_fragmessage_information_typefrag 1 "Enable typefrag display information, 0 = Never display; 1 = Always display"
+ set sv_fraginfo_ping 1 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
+ set sv_fraginfo_handicap 1 "Enable handicap display information, 0 = Never display; 1 = Only when the player has handicap on; 2 = Always display (Displays Off if off)"
+ set sv_fraginfo_stats 1 "Enable statistics (health/armor) display information, 0 = Never display; 1 = Always display (Only available for the person who was killed)"
+ set sv_fraginfo_typefrag 1 "Enable typefrag display information, 0 = Never display; 1 = Always display"
  
  // use default physics
  set sv_friction_on_land 0
@@@ -400,8 -402,8 +408,8 @@@ seta sv_precacheitems 
  set sv_spectator_speed_multiplier 1.5
  seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
  seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
- seta sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1"
- seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1"
+ seta sv_defaultplayermodel "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"
+ seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overriden by :<skinnumber> suffix in sv_defaultplayermodel"
  seta sv_defaultplayermodel_red ""     "\"\" means see sv_defaultplayermodel"
  seta sv_defaultplayerskin_red 0
  seta sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
@@@ -506,14 -508,11 +514,11 @@@ set g_shootfromeye 0 "shots are fired f
  set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
  set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
  set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
- set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)"
+ set g_weapon_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_powerup_superhealth 1 "if set to 0 the mega health powerup will not spawn on the map"
- set g_powerup_strength 1 "if set to 0 the strength powerup will not spawn on the map"
- set g_powerup_shield 1 "if set to 0 the shield (invincibility) powerup will not spawn on the map"
- set g_balance_powerup_timer 1 "if set to 0 the powerups dont wear off"
+ set g_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"
+ 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_minstagib 0     "enable minstagib"
  set g_minstagib_extralives 2  "how many extra lives you will get per powerup"
  set g_minstagib_ammo_start 10 "starting ammo"
@@@ -544,11 -543,46 +549,46 @@@ seta g_maplist_shuffle 1        "new randomiza
  set g_maplist_check_waypoints 0       "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
  set samelevel 0 "when 1, always play the same level over and over again"
  
+ set g_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"
  seta g_balance_cloaked_alpha 0.25
  
+ set g_sandbox 0 "allow players to spawn and edit objects around the map"
+ set g_sandbox_info 1 "print object information to the server. 1 prints info about spawned / removed objects, 2 also prints info about edited objects"
+ set g_sandbox_readonly 0 "when this mode is active, players cannot modify objects or use any sandbox commands"
+ set g_sandbox_storage_name default "name of the selected storage to use"
+ set g_sandbox_storage_autosave 5 "storage is automatically saved every specified number of seconds"
+ set g_sandbox_storage_autoload 1 "if a storage file exists for the given map, automatically load it at startup"
+ set g_sandbox_editor_flood 1 "players must wait this many seconds between spawning objects"
+ set g_sandbox_editor_maxobjects 1000 "maximum number of objects that may exist at a time"
+ set g_sandbox_editor_free 1 "0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object"
+ set g_sandbox_editor_distance_spawn 200 "distance at which objects spawn in front of the player"
+ set g_sandbox_editor_distance_edit 300 "distance at which players can edit or remove objects they are looking at"
+ set g_sandbox_object_scale_min 0.1 "minimum scale that objects can be set to"
+ set g_sandbox_object_scale_max 2 "maximum scale that objects can be set to"
+ set g_sandbox_object_material_velocity_min 100 "velocity objects must have while colliding for material effects to be applied"
+ set g_sandbox_object_material_velocity_factor 0.002 "velocity range which decides the intensity of material effects"
+ set cl_sandbox_clipboard ""
+ 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 ""
+ alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
+ bind f7 menu_showsandboxtools
  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"
  
@@@ -582,8 -616,6 +622,6 @@@ seta fraglimit_override -1 "Frag limit 
  seta leadlimit_override -1    "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  seta capturelimit_override -1 "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  seta captureleadlimit_override -1     "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
- seta g_ctf_capture_limit -1   "CTF capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
- seta g_ctf_capture_leadlimit -1       "CTF capture lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  seta g_arena_point_limit -1   "Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  seta g_arena_point_leadlimit -1       "Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  seta g_domination_point_limit -1      "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
@@@ -596,7 -628,6 +634,6 @@@ seta g_race_laps_limit -1  "Race laps li
  seta g_nexball_goallimit -1 "Nexball goal limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  seta g_nexball_goalleadlimit -1 "Nexball goal lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
  
- seta g_ctf_win_mode 0 "0: captures only, 1: captures, then points, 2: points only"
  seta g_ctf_ignore_frags 0     "1: regular frags give no points"
  
  set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze teammates by standing next to them"
@@@ -608,8 -639,10 +645,10 @@@ seta g_freezetag_revive_clearspeed 1.6 
  seta g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
  seta g_freezetag_frozen_force 0.6 "How much to multiply the force on a frozen player with"
  
- // 50% of the spawns shall be far away from any players
- set g_spawn_furthest 0.5
+ 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"
+ set g_spawn_near_teammate 0 "if set, players prefer spawns near a team mate"
+ set g_spawn_near_teammate_distance 640 "max distance to consider a spawn to be near a team mate"
  // respawn delay
  set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
  set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
@@@ -660,7 -693,7 +699,7 @@@ set g_cts_respawn_waves 
  set g_cts_respawn_delay 0
  set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
  set g_cts_finish_kill_delay 10 "prevent cheating by running back to the start line, and starting out with more speed than otherwise possible"
- set g_cts_weapon_stay 1
+ set g_cts_weapon_stay 2
  set g_freezetag_respawn_waves 0
  set g_freezetag_respawn_delay 0
  set g_freezetag_weapon_stay 0
@@@ -675,6 -708,7 +714,7 @@@ seta timelimit_suddendeath 5 "number o
  
  // 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"
  
  seta 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 following four cvars"
  seta g_mirrordamage 0.700000  "for teamplay 4: mirror damage factor"
@@@ -685,7 -719,6 +725,6 @@@ seta g_friendlyfire_virtual_force 1        "fo
  seta g_teamdamage_threshold 40        "for teamplay 4: threshold over which to apply mirror damage"
  seta g_teamdamage_resetspeed 20       "for teamplay 4: how fast player's teamdamage count decreases"
  
- set deathmatch_force_teamplay 0       "Always play TDM instead of DM"
  seta g_balance_teams 0        "automatically balance out players entering instead of asking them for their preferred team"
  seta g_balance_teams_force 0  "automatically balance out teams when players move or disconnect"
  seta g_balance_teams_prevent_imbalance        0       "prevent players from changing to larger teams"
@@@ -809,7 -842,6 +848,6 @@@ set g_arena 0 "Arena: many one-on-one r
  set g_arena_maxspawned 2      "maximum number of players to spawn at once (the rest is spectating, waiting for their turn)"
  set g_arena_roundbased 1      "if disabled, the next player will spawn as soon as someone dies"
  set g_arena_warmup 5  "time, newly spawned players have to prepare themselves in round based matches"
- set g_arena_powerups 0        "enables powerups (superhealth, strength and shield), which are removed by default"
  
  // ca
  set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round."
@@@ -917,7 -949,6 +955,6 @@@ gl_picmip_other 1 // so, picmip -1 is b
  r_mipsprites 1
  r_mipskins 1
  r_shadow_realtime_world_lightmaps 1
- seta r_ambient 4
  cl_decals_fadetime 5
  cl_decals_time 2
  seta 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"
@@@ -930,6 -961,7 +967,7 @@@ seta cl_gibs_velocity_random 1 "gib thr
  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"
@@@ -962,14 -994,16 +1000,16 @@@ cl_sound_ric3 weapons/ric3.wa
  cl_sound_r_exp3 ""
  sv_sound_land ""
  sv_sound_watersplash ""
- seta cl_sound_maptime_warning "1" "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
- seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
  
  seta cl_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"
+ seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
  
  // startmap_dm is used when running with the -listen or -dedicated commandline options
  set serverconfig server.cfg
- alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1; map _init/_init"
+ set _sv_init 0
+ alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
  alias sv_loadconfig "exec $serverconfig"
  alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. $* \"; quit_and_redirect self"
  
@@@ -1001,6 -1035,8 +1041,8 @@@ alias togglezoom "${_togglezoom}zoom
  
  alias reload "impulse 20"
  
+ alias sandbox "cmd g_sandbox $*"
  // movement
  bind w +forward
  bind a +moveleft
@@@ -1025,6 -1061,7 +1067,7 @@@ 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
+ exec weapons.cfg
  bind 0 weapon_group_0
  bind 1 weapon_group_1
  bind 2 weapon_group_2
@@@ -1046,7 -1083,8 +1089,8 @@@ bind MWHEELDOWN weappre
  bind r reload
  bind BACKSPACE dropweapon
  bind g dropweapon
- bind f use
+ bind f +use
+ bind v +button8 // drag object
  
  // misc
  bind e +hook
@@@ -1213,7 -1251,10 +1257,10 @@@ alias sv_fbskin_off "sv_defaultcharacte
  seta sv_servermodelsonly 1
  
  cl_curl_enabled 1
- cl_curl_maxspeed 400
+ cl_curl_maxspeed 500
+ cl_curl_useragent 1
+ cl_curl_useragent_append "$g_xonoticversion"
  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"
  
@@@ -1291,8 -1332,10 +1338,10 @@@ alias "g_waypointsprite_toggle"       "toggl
  // key for that?
  seta cl_hidewaypoints 0 "disable static waypoints, only show team waypoints"
  
+ seta g_waypointsprites_turrets 1 "disable turret waypoints"
+ seta g_waypointsprites_turrets_maxdist 4000 "max distace for turret sprites"
  // command extension
- alias qc_cmd  "sv_cmd $*" // menu QC will override this to menu_cmd
  alias adminmsg        "sv_cmd adminmsg $*"
  alias teamstatus      "cmd teamstatus; sv_cmd teamstatus" // yes, it is broken on listen servers that way, but well, who cares :P
  alias printstats      "sv_cmd printstats" // print status on demand
@@@ -1366,14 -1409,8 +1415,8 @@@ alias unban "sv_cmd unban $*"     // us
  r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
  
  // settemp subsystem. Do not touch. Usage: settemp variable value, next map resets it.
- set settemp_list 0
- set settemp_idx 0
- set _settemp_var UNUSED
- alias settemp "_settemp_var \"_settemp_x$settemp_idx\"; qc_cmd rpn /settemp_idx settemp_idx 1 add def; _settemp \"$1\" \"$2\""
- alias _settemp "settemp_list \"1 $1 $_settemp_var $settemp_list\"; set $_settemp_var \"${$1}\"; $1 \"$2\""
- alias settemp_restore "_settemp_restore_${settemp_list asis}"
- alias _settemp_restore_0 "set settemp_var 0; set settemp_list 0"
- alias _settemp_restore_1 "$1 \"${$2}\"; _settemp_restore_${3- asis}"
+ alias settemp "qc_cmd_svcl settemp $$*"
+ alias settemp_restore "qc_cmd_svcl settemp_restore"
  
  // usercommands. These can be edited and bound by the menu.
  seta "userbind1_press" "say_team quad soon";  seta "userbind1_release" "";  seta "userbind1_description" "team: quad soon"
@@@ -1436,126 -1473,8 +1479,8 @@@ con_chatwidth 0.
  con_notifysize 10
  con_notifyalign 0
  
- // hud variables
- set _hud_configure 0 "1 = configure the HUD"
- seta hud_configure_teamcolorforced 0 "1 = force display of team colors in configure mode"
- seta hud_configure_checkcollisions 1 "check for collisions against other panels when in hud configure mode"
- seta hud_configure_bg_minalpha 0.25 "minimum panel background alpha when in hud configure mode"
- seta hud_configure_grid_alpha 0.15 "alpha for visible grid when in configure mode"
  seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info prints"
  
- // user preference cvars (i.e. shouldn't be adjusted by a skin config)
- seta hud_panel_weapons_label 1 "1 = show number of weapon, 2 = show bound key of weapon"
- seta hud_panel_weapons_complainbubble_time 1 "time that a new entry stays until it fades out"
- seta hud_panel_weapons_complainbubble_fadetime 0.25 "fade out time"
- seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
- seta hud_panel_weapons_ammo 1 "show ammo as a status bar"
- seta hud_panel_weapons_ammo_full_shells 50 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_cells 80 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_rockets 80 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_onlyowned 1 "show only owned weapons"
- seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
- seta hud_panel_healtharmor_maxhealth "200" "when you have this much health, the health status bar is full"
- seta hud_panel_healtharmor_maxarmor "200" "when you have this much armor, the armor status bar is full"
- seta hud_panel_healtharmor_progressbar_gfx 1 "enable graphic effects on the progressbars"
- seta hud_panel_healtharmor_progressbar_gfx_damage 5 "show damage effect when damaged at least by this amount; 0 disables the effect"
- seta hud_panel_healtharmor_progressbar_gfx_lowhealth 40 "health progressbar blinks when health is lower than this amount"
- seta hud_panel_healtharmor_progressbar_gfx_smooth 2 "smooth changes of the progressbar when health/armor change at least by this amount; 0 disables the effect"
- seta hud_panel_notify_time 10 "time that a new entry stays until it fades out"
- seta hud_panel_notify_fadetime 3 "fade out time"
- seta hud_panel_modicons_dom_layout 1 "3 possible layouts: 0) only icons; 1) icons and percentage of average pps (points per second); 2) icons and average pps"
- seta hud_panel_timer_increment 0 "show elapsed time instead of remaining time"
- seta hud_panel_radar_scale 4096 "distance you can see on the team radar"
- seta hud_panel_radar_rotation 0       "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north"
- seta hud_panel_radar_zoommode 0       "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
- alias hud_panel_radar_rotate "toggle hud_panel_radar_rotation 0 1 2 3 4"
- seta hud_panel_radar_maximized_scale 8192 "distance you can see on the radar when maximized"
- seta hud_panel_radar_maximized_size "0.5 0.5" "size of the radar when maximized"
- alias +hud_panel_radar_maximized "cl_cmd hud_panel_radar_maximized 1"
- alias -hud_panel_radar_maximized "cl_cmd hud_panel_radar_maximized 0"
- alias hud_panel_radar_maximized "cl_cmd hud_panel_radar_maximized"
- seta hud_panel_score_rankings 0 "show rankings: 1 always show my own score; 2 pure rankings"
- seta hud_panel_engineinfo_framecounter_time 0.1 "time between framerate display updates"
- seta hud_panel_engineinfo_framecounter_decimals 0 "amount of decimals to show"
- seta hud_panel_engineinfo_framecounter_exponentialmovingaverage 1 "use an averaging method for calculating fps instead of counting frametime like engine does"
- seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight 0.1 "weight of latest data point"
- seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_change_threshold 0.5 "threshold for fps change when to update instantly, to make big fps changes update faster"
- seta hud_panel_physics_speed_unit 3 "speed unit (1 = qu/s, 2 = m/s, 3 = km/h, 4 = mph, 5 = knots)"
- seta hud_panel_physics_speed_unit_show 1 "also show speed unit"
- seta hud_panel_physics_speed_max 1800 "speed progressbar gets filled up completely by this value (in qu/s)"
- seta hud_panel_physics_speed_vertical 0 "include the speed on the Z-axis"
- seta hud_panel_physics_topspeed 1 "also show top speed"
- seta hud_panel_physics_topspeed_time 4 "how many seconds the top speed takes to fade out"
- seta hud_panel_physics_acceleration_max 1.5 "acceleration progressbar gets completely filled up by this value (in g)"
- seta hud_panel_physics_acceleration_vertical 0 "include the acceleration on the Z-axis"
- seta hud_showbinds 1  "what to show in the HUD to indicate certain keys to press: 0 display commands, 1 bound keys, 2 both"
- seta hud_showbinds_limit 2    "maximum number of bound keys to show for a command. 0 for unlimited"
- seta hud_colorflash_alpha 0.5 "starting alpha of the color flash"
- seta hud_damage 0.55 "an improved version of gl_polyblend for damage, draw an image instead when hurt"
- seta hud_damage_blur 10 "Use postprocessing to blur the screen when you have taken damage. This can be paired with current hud damage or just used alone. Higher values = more blur"
- seta hud_damage_blur_alpha 0.5 "Amount of alpha to use when merging the blurred layers back into the render. Turning this up higher will remove bloom, so it's best to find a balance"
- seta hud_damage_gentle_alpha_multiplier 0.10 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
- seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version"
- seta hud_damage_color "1 0 0" "color of flash"
- seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
- seta hud_damage_fade_rate 0.75 "how much to subtract from the alpha value each second"
- seta hud_damage_maxalpha 1.5 "how much to limit the alpha value to"
- seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
- seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
- seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
- seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"
- seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"
- seta hud_powerup 0 "power of the sharpen effect when owning the shield or strength powerups, default is 0.5"
- seta hud_postprocessing 1 "enables the ability for effects such as hud_damage_blur and hud_contents to apply a postprocessing method upon the screen - enabling this disables manual editing of the postprocess cvars"
- seta hud_postprocessing_maxbluralpha 0 "maximum alpha which the blur postprocess can be, default is 0.5"
- seta hud_postprocessing_maxblurradius 8 "maximum radius which the blur postprocess can be, default is 8"
- seta hud_contents 1 "an improved version of gl_polyblend for liquids such as water/lava/slime, draw a filler when inside the liquid"
- seta hud_contents_blur 10 "Use postprocessing to blur the screen when you are inside a liquid. Higher values = more blur"
- seta hud_contents_blur_alpha 0.5 "Amount of alpha to use when merging the blurred layers back into the render. Turning this up higher will remove bloom, so it's best to find a balance"
- seta hud_contents_factor 1 "factor at which to multiply the current faded value."
- seta hud_contents_fadeintime 0.02 "factor of time it takes for the alpha level to reach normal value when entering the liquid"
- seta hud_contents_fadeouttime 0.1 "factor of time it takes for the alpha level to reach normal value when leaving the liquid"
- seta hud_contents_lava_alpha 0.7 "alpha of the lava color blend when inside it"
- seta hud_contents_lava_color "0.8 0.1 0" 
- seta hud_contents_slime_alpha 0.7 "alpha of the slime color blend when inside it"
- seta hud_contents_slime_color "0 0.4 0.1"
- seta hud_contents_water_alpha 0.5 "alpha of the water color blend when inside it"
- seta hud_contents_water_color "0.4 0.3 0.3"
- seta hud_shownames 1 "draw names and health/armor of nearby players"
- seta hud_shownames_enemies 2 "1 = draw names of enemies you point at (TODO), 2 = draw names of all enemies in view"
- seta hud_shownames_self 0 "also include your own name to be shown when third person camera mode is on (chase_active/cl_eventchase)"
- seta hud_shownames_status 1 "1 = draw health/armor status of teammates"
- seta hud_shownames_statusbar_height 4 "height of status bar"
- seta hud_shownames_aspect 8 "aspect ratio of total drawing area per name"
- seta hud_shownames_fontsize 12 "font size"
- seta hud_shownames_decolorize 1 "1 = decolorize name in team games, 2 = decolorize always"
- seta hud_shownames_alpha 0.7 "alpha"
- seta hud_shownames_resize 1 "enable resizing of the names, then the size cvars will correspond to the maximum size"
- seta hud_shownames_mindistance 1000 "start fading alpha/size at this distance"
- seta hud_shownames_maxdistance 2500 "alpha/size is 0 at this distance"
- seta hud_shownames_antioverlap 1 "if two tags get too close to each other, fade out the one further away from you"
- seta hud_shownames_antioverlap_distance 125 "2d distance to other tag after which to fade out"
- seta hud_shownames_offset 52 "offset (along z-axis) tag from player origin by this many units"
  // scoreboard
  seta scoreboard_columns default
  seta scoreboard_border_thickness 1 "scoreboard border thickness"
@@@ -1575,8 -1494,9 +1500,9 @@@ seta scoreboard_fadeoutspeed 5 "speed a
  seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
  seta scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
  seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
- seta scoreboard_offset_left 0.15 "how many pixels the scoreboard is offset from the left screen edge"
- seta scoreboard_offset_right 0.15 "how many pixels the scoreboard is offset from the right screen edge"
+ 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 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"
@@@ -1652,6 -1572,8 +1578,8 @@@ seta skill 
  seta gl_finish $gl_finish
  seta v_kicktime $v_kicktime
  seta r_subdivisions_tolerance $r_subdivisions_tolerance
+ seta vid_gl20 $vid_gl20
+ seta vid_gl13 $vid_gl13
  
  // ticrate
  //sys_ticrate 0.0166667
@@@ -1709,21 -1631,19 +1637,19 @@@ set sv_maxidle_spectatorsareidle 
  // CTF capture limit placeholder cvar
  set capturelimit 0
  
- // hud: font size
- seta hud_fontsize 11
- seta hud_width 560
  // 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
  
  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?"
  
  alias allready "sv_cmd allready"
  
- seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher minelayer fireball hlac hagar seeker crylink rifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
+ seta cl_weaponpriority "minstanex nex fireball grenadelauncher uzi hagar rifle electro rocketlauncher crylink minelayer shotgun hlac tuba laser 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 "rocketlauncher grenadelauncher hagar seeker fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun.  Default value: explosives"
  seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser"             "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun.  Default value: energy"
@@@ -1745,8 -1665,7 +1671,7 @@@ set g_maplist_allow_frustrating 0       "allo
  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"
  
- alias ons_map           "cl_cmd radar" // legacy alias
- alias radar             "cl_cmd radar"
+ alias radar "cl_cmd hud_panel_radar_maximized"
  alias scoreboard_columns_set  "" // aliased later
  alias scoreboard_columns_help "cl_cmd scoreboard_columns_help $*"
  
@@@ -1762,6 -1681,8 +1687,8 @@@ set cl_handicap 1       "the higher, the mor
  
  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 0 "client option to automatically take a screenshot once the map has ended (see also sv_autoscreenshot)"
  // must be at the bottom of this file:
  // alias for switching the teamselect menu
  alias menu_showteamselect "menu_cmd directmenu TeamSelect"
@@@ -1864,6 -1785,11 +1791,11 @@@ seta cl_gentle_damage 0               "client side g
  set g_jetpack 0 "Jetpack mutator (uses the hook's button, can't coexist with the offhand hook, but only with the onhand one)"
  
  set g_running_guns 0 "... or wonder, till it drives you mad, what would have followed if you had."
+ set g_bastet 0 "don't try"
+ set g_loituma 0 "no, really"
+ set _urllib_nextslot 0 "temp variable"
+ set cl_warpzone_usetrace 1 "do not touch"
  
  set cl_effects_lightningarc_simple 0
  set cl_effects_lightningarc_segmentlength 64
@@@ -1887,11 -1813,6 +1819,6 @@@ set menu_updatecheck 
  set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
  set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
  
- // broken, sorry (cannot handle weapon attachment properly)
- //seta cl_forceplayermodels 0 "force all players to look like you; WARNING: animations can look very bad with this"
- //seta cl_forceplayermodelsfromxonotic 0 "force models coming from xonotic; WARNING: animations can look very bad with this"
- //set sv_clforceplayermodels 1 "allow clients to use cl_forcemodels"
  set sv_loddistance1 1024
  set sv_loddistance2 4096
  seta cl_playerdetailreduction 0       "the higher, the less detailed player models are displayed (LOD)"
@@@ -1969,8 -1890,8 +1896,8 @@@ set g_triggerimpulse_directional_multip
  set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
  set the_goggles "they do nothing" "but the googles, they do"
  
- seta g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
- seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
+ set g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
+ set g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
  
  set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
  
@@@ -1982,7 -1903,7 +1909,7 @@@ set sv_pitch_fixyaw 0 "workaround to fi
  
  set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match"
  
- seta g_mapinfo_allow_unsupported_modes_and_let_stuff_break "0" "set to 1 to be able to force game types using g_ cvars even if the map does not support them"
+ 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"
  
  // weapon accuracy stats
  set sv_accuracy_data_share 1 "1 send weapon accuracy data statistics to spectating clients, depends on cl_accuracy_data_share"
@@@ -2001,6 -1922,13 +1928,13 @@@ set developer_shtest 0 "experimental sp
  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"
  set g_debug_defaultsounds 0 "always use default sounds"
+ set sv_use_csqc_players 1 "set to 0 to disable CSQC players for better Xonotic 0.5 compat"
+ set cl_precacheplayermodels 0 "TODO please check if this needs to be 1 or if precaching a model the server already requested is fast enough to do it at runtime"
+ seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0)"
+ seta cl_forceplayercolors 0 "make everyone look like your own color (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0, and is ignored in teamplay)"
+ seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)"
+ seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (requires server to have sv_use_csqc_players 1; 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 (requires server to have sv_use_csqc_players 1, and is ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
  
  // debug cvars for keyhunt attaching
  set _angles "0 0 0"
@@@ -2012,6 -1940,7 +1946,7 @@@ set _campaign_name "
  
  // debug
  set _independent_players 0 "DO NOT TOUCH"
+ set _notarget 0 "NO, REALLY, DON'T"
  
  // define some engine cvars that we need even on dedicated server
  set r_showbboxes 0
@@@ -2029,6 -1958,9 +1964,9 @@@ sv_gameplayfix_consistentplayerprethin
  // support Q1BSP maps
  mod_q1bsp_polygoncollisions 1
  
+ // match q3map2
+ mod_obj_orientation 0
  // improve some minor details
  sv_gameplayfix_gravityunaffectedbyticrate 1
  sv_gameplayfix_nogravityonground 1
@@@ -2158,6 -2090,11 +2096,11 @@@ set g_forced_team_yellow "" "list of pl
  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"
  // 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
@@@ -2171,6 -2108,9 +2114,9 @@@ set g_weapon_charge_colormod_blue_full 
  set g_playerstats_uri ""
  set g_playerstats_debug 0 "when 1, player stats are dumped to the console too"
  
+ // session locking
+ locksession 1
  // create this cvar in case the engine did not
  set snd_soundradius 1200
  set snd_softclip 1
@@@ -2199,10 -2139,6 +2145,6 @@@ scr_loadingscreen_scale 99
  scr_loadingscreen_scale_base 1
  scr_loadingscreen_scale_limit 2
  
- // sRGB configuration (EXPERIMENTAL, needs maps to be relit)
- alias sRGBcorrect_on  "r_texture_sRGB_skin_diffuse 1;r_texture_sRGB_skin_gloss 1;r_texture_sRGB_skin_glow 1;r_texture_sRGB_reflect 1;r_texture_sRGB_skybox 1;v_gamma 2.2;r_restart"
- alias sRGBcorrect_off "r_texture_sRGB_skin_diffuse 0;r_texture_sRGB_skin_gloss 0;r_texture_sRGB_skin_glow 0;r_texture_sRGB_reflect 0;r_texture_sRGB_skybox 0;v_gamma 1.0;r_restart"
  // other config files
  exec balanceXonotic.cfg
  exec ctfscoring-ai.cfg
@@@ -2211,10 -2147,11 +2153,11 @@@ exec physicsX.cf
  exec turrets.cfg
  exec vehicles.cfg
  
- // hud cvar descriptions
+ // 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.qc for consistency
+ // please add any new cvars into the hud_save script in qcsrc/client/hud_config.qc for consistency
  exec hud_luminos.cfg
  
  // enable menu syncing
diff --combined effectinfo.txt
index b90186feca2b2bc060a8857a0c4b7893a7bed2e4,0d464f5f7740d4dc7e9d26e4242fb4b7cd974182..8459e4bd64e6610487fd496349e2fcd2c5c95f18
@@@ -739,25 -739,30 +739,30 @@@ velocityjitter 512 512 51
  // used in qcsrc/client/gibs.qc:      pointparticles(particleeffectnum("blood"), self.origin + '0 0 1', '0 0 30', 10)
  // used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum("blood"), org, vel, amount * 16)
  effect blood
- count 0.167
- type blood
+ count 0.4
+ type spark
+ blend invmod
  tex 24 32
- size 3 8
- alpha 256 256 64
+ size 5 11
+ alpha 1560 2560 7000
  color 0xA8FFFF 0xA8FFFFF
  bounce -1
- airfriction 1
- liquidfriction 4
- velocityjitter 64 64 64
- velocitymultiplier 5
+ airfriction 0.4
+ velocityjitter 99 99 55
+ //velocitymultiplier 2
  staincolor 0x808080 0x808080
  staintex 16 24
+ stainsize 1 2
+ stretchfactor 20
+ sizeincrease 20
  //blood mist
  effect blood
  countabsolute 1
  type alphastatic
- tex 0 8
+ blend invmod
+ tex 24 32
  size 25 30
+ sizeincrease 20
  alpha 100 256 400
  color 0x000000 0x420000
  originjitter 11 11 11
@@@ -795,21 -800,33 +800,33 @@@ color 0xff8400 0xff2a0
  // normal super gory blood trail (used by gibs)
  // used in qcsrc/client/gibs.qc:              trailparticles(self, particleeffectnum("TR_BLOOD"), oldorg, self.origin)
  effect TR_BLOOD
- trailspacing 32
- type blood
+ trailspacing 20
+ type spark
+ blend invmod
  color 0xA8FFFF 0xA8FFFF
  tex 24 32
- size 8 8
- alpha 384 384 192
+ size 4 19
+ alpha 384 984 1492
  bounce -1
- airfriction 1
- liquidfriction 4
+ gravity 0.4
+ airfriction -2
+ liquidfriction 1
  velocityjitter 64 64 64
- velocitymultiplier 0.5
+ velocitymultiplier -0.1
  staincolor 0x808080 0x808080
  staintex 16 24
+ stainsize 1 2
+ stretchfactor 7
+ sizeincrease -5
+ // splash around gib
+ effect TR_BLOOD
+ trailspacing 42
+ type blood
+ color 0xA8FFFF 0xA8FFFF
+ tex 24 32
+ size 4 6
+ alpha 684 684 7492
+ sizeincrease 500
  
  // thinner blood trail (used by quake zombies)
  // used in qcsrc/client/gibs.qc:              trailparticles(self, particleeffectnum("TR_SLIGHTBLOOD"), oldorg, self.origin)
@@@ -1079,15 -1096,16 +1096,16 @@@ lightradiusfade 200
  lightcolor 2 1.5 0.2
  gravity -0.1
  effect uzi_muzzleflash
- count 10
+ count 3
  type spark
  tex 40 40
- color 0xFFFDD9 0xFFFDD9
- size 2 2
- alpha 0 128 1024
+ color 0xff9c00 0xffd200
+ size 0.3 0.4
+ alpha 0 256 6000
  originjitter 1 1 1
- velocityjitter 300 300 300
- velocitymultiplier 0.5
+ velocityjitter 555 555 555
+ velocitymultiplier 3
+ stretchfactor 0.15
  airfriction 12
  
  
@@@ -1201,7 -1219,7 +1219,7 @@@ stretchfactor 2.
  
  
  
- // hagar trail
+ // mortar trail
  // smoke
  // used in qcsrc/client/projectile.qc:                        trailparticles(self, particleeffectnum("TR_GRENADE"), from, to)
  // used in qcsrc/client/projectile.qc:                        trailparticles(self, particleeffectnum("TR_GRENADE"), from, to)
@@@ -1247,7 -1265,7 +1265,7 @@@ velocityjitter 16 16 1
  
  
  
- // mortar trail
+ // hookbomb trail
  // smoke
  // used in qcsrc/client/projectile.qc:                        trailparticles(self, particleeffectnum("TR_KNIGHTSPIKE"), from, to)
  // used in qcsrc/client/projectile.qc:                        trailparticles(self, particleeffectnum("TR_KNIGHTSPIKE"), from, to)
@@@ -3384,13 -3402,14 +3402,14 @@@ velocityjitter 256 256 25
  // used in qcsrc/server/w_common.qc:                          zcurveparticles_from_tracetoss(particleeffectnum("tr_bullet"), self.origin, trace_endpos, self.velocity)
  // used in qcsrc/client/projectile.qc:                        trailparticles(self, particleeffectnum("tr_bullet"), from, to)
  effect tr_bullet
- trailspacing 256
+ trailspacing 750
  type spark
- color 0x800000 0xFF8020
+ tex 70 70
+ color 0xff8960 0xff8533
  alpha 256 256 2560
- size 1.5 1.5
- stretchfactor 1
- velocitymultiplier 0.7
+ size 4 4
+ stretchfactor 0.2
+ velocitymultiplier 3
  
  // smoke emitter for small pipes
  // used nowhere in code
@@@ -3455,83 -3474,144 +3474,144 @@@ tex 40 4
  //lighttime 0
  
  effect alien_blood
- count 0.167
- type blood
+ count 0.4
+ type spark
+ blend invmod
  tex 24 32
- size 3 8
- alpha 256 256 64
+ size 5 11
+ alpha 1560 2560 7000
  color 0xDC9BCD 0xDC9BCD
  bounce -1
- airfriction 1
- liquidfriction 4
- velocityjitter 64 64 64
- velocitymultiplier 5
- staincolor 0x808080 0x808080
+ airfriction 0.4
+ velocityjitter 99 99 55
+ //velocitymultiplier 2
+ staincolor 0xDC9BCD 0xDC9BCD
  staintex 16 24
+ stainsize 1 2
+ stretchfactor 25
+ sizeincrease 20
  //blood mist
  effect alien_blood
  countabsolute 1
- type alphastatic
- tex 0 8
+ type smoke
+ blend invmod
+ tex 24 32
  size 25 30
- alpha 100 256 400
- color 0x000000 0x204010
+ sizeincrease 20
+ alpha 3000 5560 12000
+ color 0xDC9BCD 0xDC9BCD
  originjitter 11 11 11
  
  effect robot_blood
  count 0.167
- type blood
- tex 24 32
- size 3 8
+ type spark
+ tex 70 70
+ size 1 2
  alpha 256 256 64
- color 0xC0D890 0xC0D890
+ color 0xff3000 0xff7373
  bounce -1
+ gravity 1
  airfriction 1
  liquidfriction 4
- velocityjitter 64 64 64
- velocitymultiplier 5
- staincolor 0x808080 0x808080
- staintex 16 24
- //blood mist
+ velocityjitter 264 264 264
+ velocityoffset 0 0 100
+ //shockwave
  effect robot_blood
  countabsolute 1
- type alphastatic
- tex 0 8
- size 25 30
- alpha 100 256 400
- color 0x000000 0x301860
+ type smoke
+ tex 74 74
+ size 2 2
+ alpha 0 90 1000
+ color 0xff8400 0xffbb72
  originjitter 11 11 11
+ sizeincrease 800
+ // electo sparcks
+ effect robot_blood
+ count 0.1
+ type smoke
+ tex 71 73
+ size 20 40
+ alpha 256 256 5120
+ color 0xff3000 0xff8585
+ originjitter 41 41 21
+ rotate -180 180 4000 -4000
  
  
  effect alien_TR_BLOOD
- trailspacing 32
- type blood
+ trailspacing 20
+ type spark
+ blend invmod
  color 0xC080B0 0xC080B0
  tex 24 32
- size 8 8
- alpha 384 384 192
+ size 4 19
+ alpha 384 984 1492
  bounce -1
- airfriction 1
- liquidfriction 4
+ gravity 0.4
+ airfriction -2
+ liquidfriction 1
  velocityjitter 64 64 64
- velocitymultiplier 0.5
- staincolor 0x808080 0x808080
+ velocitymultiplier -0.1
+ staincolor 0xC080B0 0xC080B0
  staintex 16 24
+ stainsize 1 2
+ stretchfactor 7
+ sizeincrease -5
+ // splash around gib
+ effect TR_BLOOD
+ trailspacing 42
+ type blood
+ color 0xA8FFFF 0xA8FFFF
+ tex 24 32
+ size 4 6
+ alpha 684 684 7492
+ sizeincrease 500
  
  effect robot_TR_BLOOD
- trailspacing 32
- type blood
+ trailspacing 16
+ type spark
+ blend invmod
  color 0xC0D890 0xC0D890
  tex 24 32
- size 8 8
- alpha 384 384 192
+ size 4 13
+ alpha 384 984 1892
  bounce -1
- airfriction 1
- liquidfriction 4
+ gravity 0.4
+ airfriction -2
+ liquidfriction 1
  velocityjitter 64 64 64
- velocitymultiplier 0.5
+ velocitymultiplier -0.3
  staincolor 0x808080 0x808080
  staintex 16 24
+ stainsize 1 3
+ stretchfactor 6
+ sizeincrease -6
+ // fire
+ effect robot_TR_BLOOD
+ notunderwater
+ trailspacing 16
+ type spark
+ tex 48 55
+ color 0x902010 0xff3600
+ size 5 20
+ alpha 128 256 900
+ gravity -1
+ airfriction 4
+ liquidfriction 4
+ stretchfactor 5
+ sizeincrease 10
+ velocityjitter 44 44 44
+ // arcs
+ effect robot_TR_BLOOD
+ trailspacing 128
+ type smoke
+ tex 71 73
+ color 0xff3000 0xff8585
+ size 25 30
+ alpha 1128 1256 44900
+ rotate -180 180 4000 -4000
+ velocityjitter 44 44 44
  
  effect alien_TR_SLIGHTBLOOD
  trailspacing 64
@@@ -3583,50 -3663,101 +3663,101 @@@ alpha 256 256 128
  velocityjitter 256 256 256
  
  effect bloodshower
- countabsolute 1
- type blood
+ count 125
+ type spark
+ blend invmod
  tex 24 32
- size 8 8
+ size 8 28
  color 0xA8FFFF 0xA8FFFFF
- alpha 256 256 64
+ alpha 156 656 1664
  bounce -1
- airfriction 1
+ gravity 1
+ stretchfactor 3
  liquidfriction 4
- velocityjitter 64 64 64
- velocitymultiplier 1
+ velocityjitter 764 764 764
// velocitymultiplier 1
  staincolor 0x808080 0x808080
  staintex 16 24
+ stainsize 1 2
+ // center blood
+ effect bloodshower
+ countabsolute 0.1
+ type smoke
+ blend invmod
+ tex 24 32
+ size 1 28
+ sizeincrease 300
+ originjitter 50 50 50
+ color 0xA8FFFF 0xA8FFFFF
+ alpha 156 656 1664
  
  effect alien_bloodshower
- countabsolute 1
- type blood
+ count 125
+ type spark
+ blend invmod
  tex 24 32
- size 8 8
+ size 8 28
  color 0xC080B0 0xC080B0
- alpha 256 256 64
+ alpha 156 656 1664
  bounce -1
- airfriction 1
+ gravity 1
+ stretchfactor 3
  liquidfriction 4
- velocityjitter 64 64 64
- velocitymultiplier 1
- staincolor 0x808080 0x808080
+ velocityjitter 764 764 764
// velocitymultiplier 1
+ staincolor 0xC080B0 0xC080B0
  staintex 16 24
+ stainsize 1 2
+ // center blood
+ effect bloodshower
+ countabsolute 0.1
+ type smoke
+ blend invmod
+ tex 24 32
+ size 1 28
+ sizeincrease 300
+ originjitter 50 50 50
+ color 0xA8FFFF 0xA8FFFFF
+ alpha 156 656 1664
  
  effect robot_bloodshower
- countabsolute 1
- type blood
+ count 100
+ type spark
+ blend invmod
  tex 24 32
- size 8 8
+ size 8 28
  color 0xC0D890 0xC0D890
- alpha 256 256 64
+ alpha 156 656 1664
  bounce -1
- airfriction 1
+ gravity 1
+ stretchfactor 3
  liquidfriction 4
- velocityjitter 64 64 64
- velocitymultiplier 1
- staincolor 0x808080 0x808080
+ velocityjitter 764 764 764
// velocitymultiplier 1
+ staincolor 0xC0D890 0xC0D890
  staintex 16 24
+ stainsize 1 2
+ // arc
+ effect robot_bloodshower
+ count 2.5
+ type smoke
+ tex 71 73
+ color 0xff3000 0xff8585
+ size 25 40
+ alpha 1128 1256 4200
+ rotate -180 180 99 -99
+ velocityjitter 44 44 44
+ originjitter 150 150 150
+ // shockwave
+ effect robot_bloodshower
+ count 2.5
+ type smoke
+ tex 74 74
+ color 0xff3000 0xff8585
+ size 5 50
+ sizeincrease 3000
+ alpha 11 125 990
  
  //red_ground_quake
  //smoke
@@@ -6408,646 -6539,150 +6539,794 @@@ airfriction 
  color 0x4F4B46 0x000000
  rotate -180 180 -20 20
  
 +// tuba does not use the weapon damage effect
 +
 +// laser damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_laser
 +count 3
 +type smoke
 +tex 0 8
 +color 0x880000 0xff4400
 +size 8 16
 +sizeincrease 10
 +alpha 128 16 128
 +gravity 0
 +originjitter 4 4 16
 +velocityjitter 0.4 0.4 0.6
 +velocitymultiplier 0
 +airfriction -0.35
 +rotate 0 180 -30 30
 +
 +// shotgun damage effect, normal blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_shotgun
 +count 0.5
 +type blood
 +tex 24 32
 +size 4 9
 +alpha 256 256 64
 +color 0xA8FFFF 0xA8FFFFF
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_shotgun
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 8 16
 +alpha 100 256 400
 +color 0x000000 0x420000
 +originjitter 11 11 11
 +
 +// shotgun damage effect, alien blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_shotgun_alien
 +count 0.5
 +type blood
 +tex 24 32
 +size 4 9
 +alpha 256 256 64
 +color 0xDC9BCD 0xDC9BCD
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_shotgun_alien
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 8 16
 +alpha 100 256 400
 +color 0x000000 0x204010
 +originjitter 11 11 11
 +
 +// shotgun damage effect, robot blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_shotgun_robot
 +count 0.5
 +type blood
 +tex 24 32
 +size 4 9
 +alpha 256 256 64
 +color 0xC0D890 0xC0D890
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_shotgun_robot
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 8 16
 +alpha 100 256 400
 +color 0x000000 0x301860
 +originjitter 11 11 11
 +
 +// uzi damage effect, normal blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_uzi
 +count 0.25
 +type blood
 +tex 24 32
 +size 3 8
 +alpha 256 256 64
 +color 0xA8FFFF 0xA8FFFFF
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_uzi
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 6 12
 +alpha 100 256 400
 +color 0x000000 0x420000
 +originjitter 11 11 11
 +
 +// uzi damage effect, alien blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_uzi_alien
 +count 0.25
 +type blood
 +tex 24 32
 +size 3 8
 +alpha 256 256 64
 +color 0xDC9BCD 0xDC9BCD
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_uzi_alien
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 6 12
 +alpha 100 256 400
 +color 0x000000 0x204010
 +originjitter 11 11 11
 +
 +// uzi damage effect, robot blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_uzi_robot
 +count 0.25
 +type blood
 +tex 24 32
 +size 3 8
 +alpha 256 256 64
 +color 0xC0D890 0xC0D890
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_uzi_robot
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 6 12
 +alpha 100 256 400
 +color 0x000000 0x301860
 +originjitter 11 11 11
 +
 +// minelayer damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_minelayer
 +//notunderwater
 +count 2
 +type smoke
 +tex 48 55
 +size 6 12
 +alpha 256 16 256
 +gravity -0.5
 +color 0x8f0d00 0xff5a00
 +sizeincrease -10
 +originoffset 0 0 10
 +originjitter 6 6 8
 +velocityjitter 22 22 50
 +// smoke
 +effect weapondamage_minelayer
 +type alphastatic
 +count 2
 +tex 0 8
 +size 4 8
 +sizeincrease 5
 +alpha 128 32 128
 +color 0x000000 0x111111
 +gravity -0.3
 +originoffset 0 0 10
 +originjitter 6 6 8
 +velocityjitter 11 11 50
 +// light
 +effect weapondamage_minelayer
 +trailspacing 8
 +lightradius 60
 +lightradiusfade 280
 +lightcolor 0.9 0.6 0.2
 +
 +// grenadelauncher damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_grenadelauncher
 +//notunderwater
 +count 2
 +type smoke
 +tex 48 55
 +size 6 12
 +alpha 256 16 256
 +gravity -0.5
 +color 0x8f0d00 0xff5a00
 +sizeincrease -10
 +originoffset 0 0 10
 +originjitter 6 6 8
 +velocityjitter 22 22 50
 +// smoke
 +effect weapondamage_grenadelauncher
 +type alphastatic
 +count 2
 +tex 0 8
 +size 4 8
 +sizeincrease 5
 +alpha 128 32 128
 +color 0x000000 0x111111
 +gravity -0.3
 +originoffset 0 0 10
 +originjitter 6 6 8
 +velocityjitter 11 11 50
 +// light
 +effect weapondamage_grenadelauncher
 +trailspacing 8
 +lightradius 60
 +lightradiusfade 280
 +lightcolor 0.9 0.6 0.2
 +
 +// electro damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_electro
 +count 2
 +type static
 +tex 47 47
 +color 0x66ffff 0x2288ff
 +size 10 20
 +sizeincrease -16
 +alpha 48 8 48
 +gravity -0.0001
 +airfriction 0.2
 +liquidfriction 0.8
 +originjitter 16 16 32
 +velocityjitter 8 8 16
 +velocitymultiplier 0
 +airfriction -0.5
 +rotate 180 360 -30 30
 +// plasma smoke
 +effect weapondamage_electro
 +count 4
 +type smoke
 +tex 0 8
 +color 0x2244ff 0x002266
 +size 8 16
 +sizeincrease 10
 +alpha 64 16 64
 +gravity 0
 +originjitter 4 4 16
 +velocityjitter 0.4 0.4 0.6
 +velocitymultiplier 0
 +airfriction -0.35
 +rotate 0 180 -30 30
 +// light
 +effect weapondamage_electro
 +trailspacing 8
 +lightradius 50
 +lightradiusfade 220
 +lightcolor 0.2 0.8 1.0
 +
 +// crylink damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_crylink
 +count 2
 +type static
 +tex 38 38
 +color 0xff44ff 0x9966ff
 +size 8 16
 +sizeincrease -8
 +alpha 48 16 48
 +gravity -0.0001
 +airfriction 0.6
 +liquidfriction 0.8
 +originjitter 8 8 16
 +velocityjitter 10 10 20
 +velocitymultiplier 0
 +airfriction -0.5
 +rotate 180 360 -30 30
 +// plasma smoke
 +effect weapondamage_crylink
 +count 4
 +type smoke
 +tex 0 8
 +color 0x8844ff 0x662244
 +size 10 20
 +sizeincrease 6
 +alpha 64 16 64
 +gravity 0.001
 +originjitter 6 6 12
 +velocityjitter 0.4 0.4 0.6
 +velocitymultiplier 0
 +airfriction -0.35
 +rotate 0 180 -30 30
 +// light
 +effect weapondamage_crylink
 +trailspacing 8
 +lightradius 50
 +lightradiusfade 240
 +lightcolor 0.8 0.2 1.0
 +
 +// hlac damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_hlac
 +count 3
 +type smoke
 +tex 0 8
 +color 0x880000 0xff4400
 +size 8 16
 +sizeincrease 10
 +alpha 128 16 128
 +gravity 0
 +originjitter 4 4 16
 +velocityjitter 0.4 0.4 0.6
 +velocitymultiplier 0
 +airfriction -0.35
 +rotate 0 180 -30 30
 +
 +// nex damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_nex
 +count 1
 +type static
 +tex 47 47
 +color 0xffffff 0x88ffff
 +size 7 14
 +sizeincrease -14
 +alpha 64 8 64
 +gravity -0.0001
 +airfriction 0.1
 +liquidfriction 0.6
 +originjitter 4 4 8
 +velocityjitter 8 8 16
 +velocitymultiplier 0
 +airfriction -0.5
 +rotate 180 360 -30 30
 +// plasma smoke
 +effect weapondamage_nex
 +count 2
 +type smoke
 +tex 0 8
 +color 0x6688ff 0x226688
 +size 5 10
 +sizeincrease 8
 +alpha 64 16 64
 +gravity 0
 +originjitter 6 6 12
 +velocityjitter 0.5 0.5 0.8
 +velocitymultiplier 0
 +airfriction -0.35
 +rotate 0 180 -30 30
 +// light
 +effect weapondamage_nex
 +trailspacing 8
 +lightradius 60
 +lightradiusfade 280
 +lightcolor 0.8 1.0 1.0
 +
 +// minstanex damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_minstanex
 +count 2
 +type static
 +tex 47 47
 +color 0xffffff 0x88ffff
 +size 10 20
 +sizeincrease -14
 +alpha 64 8 64
 +gravity -0.0001
 +airfriction 0.1
 +liquidfriction 0.6
 +originjitter 4 4 8
 +velocityjitter 8 8 16
 +velocitymultiplier 0
 +airfriction -0.5
 +rotate 180 360 -30 30
 +// plasma smoke
 +effect weapondamage_minstanex
 +count 4
 +type smoke
 +tex 0 8
 +color 0x6688ff 0x226688
 +size 8 16
 +sizeincrease 8
 +alpha 64 16 64
 +gravity 0
 +originjitter 6 6 12
 +velocityjitter 0.5 0.5 0.8
 +velocitymultiplier 0
 +airfriction -0.35
 +rotate 0 180 -30 30
 +// light
 +effect weapondamage_minstanex
 +trailspacing 8
 +lightradius 60
 +lightradiusfade 240
 +lightcolor 0.8 1.0 1.0
 +
 +// sniperrifle damage effect, normal blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_sniperrifle
 +count 0.25
 +type blood
 +tex 24 32
 +size 3 8
 +alpha 256 256 64
 +color 0xA8FFFF 0xA8FFFFF
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_sniperrifle
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 6 12
 +alpha 100 256 400
 +color 0x000000 0x420000
 +originjitter 11 11 11
 +
 +// sniperrifle damage effect, alien blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_sniperrifle_alien
 +count 0.25
 +type blood
 +tex 24 32
 +size 3 8
 +alpha 256 256 64
 +color 0xDC9BCD 0xDC9BCD
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_sniperrifle_alien
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 6 12
 +alpha 100 256 400
 +color 0x000000 0x204010
 +originjitter 11 11 11
 +
 +// sniperrifle damage effect, robot blood
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_sniperrifle_robot
 +count 0.25
 +type blood
 +tex 24 32
 +size 3 8
 +alpha 256 256 64
 +color 0xC0D890 0xC0D890
 +bounce -1
 +airfriction 1
 +liquidfriction 4
 +velocityjitter 64 64 64
 +velocitymultiplier 5
 +staincolor 0x808080 0x808080
 +staintex 16 24
 +//blood mist
 +effect weapondamage_sniperrifle_robot
 +countabsolute 1
 +type alphastatic
 +tex 0 8
 +size 6 12
 +alpha 100 256 400
 +color 0x000000 0x301860
 +originjitter 11 11 11
 +
 +// seeker damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_seeker
 +//notunderwater
 +count 2
 +type smoke
 +tex 48 55
 +size 5 10
 +alpha 256 16 256
 +gravity -0.5
 +color 0x8f0d00 0xff5a00
 +sizeincrease -10
 +originoffset 0 0 10
 +originjitter 5 5 7
 +velocityjitter 22 22 50
 +// smoke
 +effect weapondamage_seeker
 +type alphastatic
 +count 2
 +tex 0 8
 +size 3 6
 +sizeincrease 5
 +alpha 128 32 128
 +color 0x000000 0x111111
 +gravity -0.3
 +originoffset 0 0 10
 +originjitter 5 5 7
 +velocityjitter 11 11 50
 +// light
 +effect weapondamage_seeker
 +trailspacing 8
 +lightradius 65
 +lightradiusfade 280
 +lightcolor 0.9 0.7 0.2
 +
 +// hagar damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_hagar
 +//notunderwater
 +count 2
 +type smoke
 +tex 48 55
 +size 5 10
 +alpha 256 16 256
 +gravity -0.5
 +color 0x8f0d00 0xff5a00
 +sizeincrease -10
 +originoffset 0 0 10
 +originjitter 5 5 7
 +velocityjitter 22 22 50
 +// smoke
 +effect weapondamage_hagar
 +type alphastatic
 +count 2
 +tex 0 8
 +size 3 6
 +sizeincrease 5
 +alpha 128 32 128
 +color 0x000000 0x111111
 +gravity -0.3
 +originoffset 0 0 10
 +originjitter 5 5 7
 +velocityjitter 11 11 50
 +// light
 +effect weapondamage_hagar
 +trailspacing 8
 +lightradius 65
 +lightradiusfade 280
 +lightcolor 0.9 0.7 0.2
 +
 +// fireball damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_fireball
 +//notunderwater
 +count 4
 +type smoke
 +tex 48 55
 +size 10 20
 +alpha 192 16 192
 +gravity -0.5
 +color 0x8f0d00 0xff5a00
 +sizeincrease -10
 +originoffset 0 0 10
 +originjitter 8 8 24
 +velocityjitter 22 22 50
 +// smoke
 +effect weapondamage_fireball
 +type alphastatic
 +count 4
 +tex 0 8
 +size 8 16
 +sizeincrease 5
 +alpha 128 32 128
 +color 0x000000 0x111111
 +gravity -0.3
 +originoffset 0 0 10
 +originjitter 8 8 24
 +velocityjitter 11 11 50
 +// light
 +effect weapondamage_fireball
 +trailspacing 8
 +lightradius 65
 +lightradiusfade 280
 +lightcolor 0.9 0.6 0.2
 +
 +// rocketlauncher damage effect
 +// used in qcsrc/client/gibs.qc:                      pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 +effect weapondamage_rocketlauncher
 +//notunderwater
 +count 3
 +type smoke
 +tex 48 55
 +size 7 14
 +alpha 256 16 256
 +gravity -0.5
 +color 0x8f0d00 0xff5a00
 +sizeincrease -10
 +originoffset 0 0 10
 +originjitter 6 6 8
 +velocityjitter 22 22 50
 +// smoke
 +effect weapondamage_rocketlauncher
 +type alphastatic
 +count 3
 +tex 0 8
 +size 5 10
 +sizeincrease 5
 +alpha 128 32 128
 +color 0x000000 0x111111
 +gravity -0.3
 +originoffset 0 0 10
 +originjitter 6 6 8
 +velocityjitter 11 11 50
 +// light
 +effect weapondamage_rocketlauncher
 +trailspacing 8
 +lightradius 60
 +lightradiusfade 280
 +lightcolor 0.9 0.6 0.2
 +
 +// porto does not use the weapon damage effect
 +
 +// hook does not use the weapon damage effect
++
+ // metal impact effect
+ // used in qcsrc/server/mutators/sandbox.qc:  pointparticles(particleeffectnum("impact_metal"), self.origin, '0 0 0', 1);
+ effect impact_metal
+ count 1
+ type alphastatic
+ tex 0 8
+ size 3 6
+ sizeincrease 10
+ alpha 25 64 50
+ gravity -0.01
+ color 0x000000 0x886666
+ originjitter 20 20 5
+ // sparks
+ effect impact_metal
+ count 2
+ type spark
+ tex 41 41
+ color 0xFFCC22 0xFF4422
+ size 2 2
+ alpha 255 255 112
+ bounce 1.8
+ stretchfactor 0.5
+ velocityjitter 200 200 300
+ velocitymultiplier 2
+ airfriction 2
+ gravity 1
+ // stone impact effect
+ // used in qcsrc/server/mutators/sandbox.qc:  pointparticles(particleeffectnum("impact_stone"), self.origin, '0 0 0', 1);
+ effect impact_stone
+ count 1
+ type alphastatic
+ tex 0 8
+ size 3 6
+ sizeincrease 15
+ alpha 50 128 75
+ gravity -0.01
+ color 0x000000 0xcc9966
+ originjitter 20 20 5
+ // debris
+ effect impact_stone
+ notunderwater
+ count 1
+ type alphastatic
+ tex 66 68
+ color 0x000000 0x886644
+ size 1 2
+ alpha 450 750 300
+ gravity 1.3
+ airfriction 0.5
+ bounce 1.2
+ velocityjitter 124 124 324
+ rotate -180 180 -1000 1000
+ // wood impact effect
+ // used in qcsrc/server/mutators/sandbox.qc:  pointparticles(particleeffectnum("impact_wood"), self.origin, '0 0 0', 1);
+ effect impact_wood
+ count 1
+ type alphastatic
+ tex 0 8
+ size 3 6
+ sizeincrease 10
+ alpha 50 128 75
+ gravity -0.01
+ color 0x000000 0xcc9966
+ originjitter 20 20 5
+ // sparks
+ effect impact_wood
+ count 2
+ type spark
+ tex 41 41
+ color 0x221100 0x221100
+ size 1 8
+ alpha 255 255 75
+ bounce 1.5
+ velocityjitter 180 180 260
+ velocitymultiplier 2
+ airfriction 2
+ gravity 1
+ // flesh impact effect
+ // used in qcsrc/server/mutators/sandbox.qc:  pointparticles(particleeffectnum("impact_flesh"), self.origin, '0 0 0', 1);
+ effect impact_flesh
+ count 0.5
+ type alphastatic
+ tex 0 8
+ size 8 12
+ alpha 100 256 400
+ color 0x000000 0x420000
+ originjitter 11 11 11
+ // blood splash
+ effect impact_flesh
+ count 0.3
+ type blood
+ tex 24 32
+ size 2 6
+ alpha 256 256 64
+ color 0xA8FFFF 0xA8FFFFF
+ bounce -1
+ airfriction 1
+ liquidfriction 4
+ velocityjitter 96 96 96
+ velocitymultiplier 5
+ staincolor 0x808080 0x808080
+ staintex 16 24
+ // hagar trail
+ // smoke
+ effect tr_hagar
+ trailspacing 4
+ type smoke
+ color 0x101010 0x000000
+ tex 0 8
+ size 3 2
+ bounce 1
+ sizeincrease 10
+ alpha 300 400 780
+ originjitter 1 1 1
+ velocityjitter 1 1 1
+ velocitymultiplier -0.02
+ //gravity -0.11
+ // fire
+ effect tr_hagar
+ notunderwater
+ trailspacing 4
+ type static
+ color 0xffdf72 0x811200
+ tex 48 55
+ size 5 2
+ sizeincrease -15
+ alpha 100 144 988
+ airfriction 8
+ velocityjitter 32 32 32
+ velocitymultiplier -1.0
+ // bubbles
+ effect tr_hagar
+ underwater
+ trailspacing 16
+ type bubble
+ tex 62 62
+ color 0x404040 0x808080
+ size 1 1
+ alpha 256 256 256
+ gravity -0.125
+ bounce 1.5
+ liquidfriction 4
+ velocityjitter 16 16 16
diff --combined qcsrc/client/Main.qc
index 7e480ada3bf179bdfc20ed86dad45c958a40ab34,fd8afe117c49d2354e0768f3406eabd67b49fdf0..b2a21706a0861795444631c5f415c175900811a7
@@@ -4,27 -4,6 +4,6 @@@
  
  #define DP_CSQC_ENTITY_REMOVE_IS_B0RKED
  
- void cvar_clientsettemp(string cv, string val)
- {
-       entity e;
-       for(e = world; (e = find(e, classname, "saved_cvar_value")); )
-               if(e.netname == cv)
-                       goto saved;
-       e = spawn();
-       e.classname = "saved_cvar_value";
-       e.netname = strzone(cv);
-       e.message = strzone(cvar_string(cv));
- :saved
-       cvar_set(cv, val);
- }
- void cvar_clientsettemp_restore()
- {
-       entity e;
-       for(e = world; (e = find(e, classname, "saved_cvar_value")); )
-                       cvar_set(e.netname, e.message);
- }
  void menu_show_error()
  {
        drawstring('0 200 0', _("ERROR - MENU IS VISIBLE BUT NO MENU WAS DEFINED!"), '8 8 0', '1 0 0', 1, 0);
@@@ -41,8 -20,56 +20,56 @@@ void menu_sub_null(
  float __engine_check;
  #endif
  
+ void precache_playermodel(string m)
+ {
+       string f;
+       if(substring(m, -9,5) == "_lod1")
+               return;
+       if(substring(m, -9,5) == "_lod2")
+               return;
+       precache_model(m);
+       f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1));
+       if(fexists(f))
+               precache_model(f);
+       f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1));
+       if(fexists(f))
+               precache_model(f);
+       /*
+       float globhandle, i, n;
+       globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE);
+       if (globhandle < 0)
+               return;
+       n = search_getsize(globhandle);
+       for (i = 0; i < n; ++i)
+       {
+               //print(search_getfilename(globhandle, i), "\n");
+               f = search_getfilename(globhandle, i);
+               PrecachePlayerSounds(f);
+       }
+       search_end(globhandle);
+       */
+ }
+ void precache_all_playermodels(string pattern)
+ {
+       float globhandle, i, n;
+       string f;
+       globhandle = search_begin(pattern, TRUE, FALSE);
+       if (globhandle < 0)
+               return;
+       n = search_getsize(globhandle);
+       for (i = 0; i < n; ++i)
+       {
+               //print(search_getfilename(globhandle, i), "\n");
+               f = search_getfilename(globhandle, i);
+               precache_playermodel(f);
+       }
+       search_end(globhandle);
+ }
  string forcefog;
- string cl_announcer_prev;
  void WaypointSprite_Load();
  void CSQC_Init(void)
  {
  
        float i;
  
+ #ifdef COMPAT_XON050_ENGINE
+       // old engine lacks implementation of player_localnum
+       player_localnum = player_localentnum - 1;
+ #endif
        binddb = db_create();
        tempdb = db_create();
        ClientProgsDB = db_load("client.db");
        menu_action = menu_sub_null;
  
        for(i = 0; i < 255; ++i)
-               if(getplayerkey(i, "viewentity") == "")
+               if(getplayerkeyvalue(i, "viewentity") == "")
                        break;
        maxclients = i;
  
-       //ctf_temp_1 = "";
-       // localcmd("alias order \"cmd order $*\""); enable if ctf-command thingy is used
-       //registercmd("ctf_menu");
-       registercmd("ons_map");
-       registercmd("hud_configure");
-       registercmd("hud_save");
-       //registercmd("menu_action");
+       registercommand("hud_configure");
+       registercommand("hud_save");
+       //registercommand("menu_action");
  
-       registercmd("+showscores");registercmd("-showscores");
-       registercmd("+showaccuracy");registercmd("-showaccuracy");
+       registercommand("+showscores");registercommand("-showscores");
+       registercommand("+showaccuracy");registercommand("-showaccuracy");
  
  #ifndef CAMERATEST
        if(isdemo())
        {
  #endif
-               registercmd("+forward");registercmd("-forward");
-               registercmd("+back");registercmd("-back");
-               registercmd("+moveup");registercmd("-moveup");
-               registercmd("+movedown");registercmd("-movedown");
-               registercmd("+moveright");registercmd("-moveright");
-               registercmd("+moveleft");registercmd("-moveleft");
-               registercmd("+roll_right");registercmd("-roll_right");
-               registercmd("+roll_left");registercmd("-roll_left");
+               registercommand("+forward");registercommand("-forward");
+               registercommand("+back");registercommand("-back");
+               registercommand("+moveup");registercommand("-moveup");
+               registercommand("+movedown");registercommand("-movedown");
+               registercommand("+moveright");registercommand("-moveright");
+               registercommand("+moveleft");registercommand("-moveleft");
+               registercommand("+roll_right");registercommand("-roll_right");
+               registercommand("+roll_left");registercommand("-roll_left");
  #ifndef CAMERATEST
        }
  #endif
        registercvar("hud_usecsqc", "1");
-       registercvar("scoreboard_columns", "default", CVAR_SAVE);
+       registercvar("scoreboard_columns", "default");
  
        gametype = 0;
  
  
        GetTeam(COLOR_SPECTATOR, true); // add specs first
  
+       // needs to be done so early because of the constants they create
        RegisterWeapons();
+       RegisterGametypes();
  
        WaypointSprite_Load();
  
        // precaches
+       precache_model("null");
        precache_sound("misc/hit.wav");
        precache_sound("misc/typehit.wav");
+       if (autocvar_cl_precacheplayermodels)
+       {
+               precache_all_playermodels("models/player/*.zym");
+               precache_all_playermodels("models/player/*.dpm");
+               precache_all_playermodels("models/player/*.md3");
+               precache_all_playermodels("models/player/*.psk");
+               precache_all_playermodels("models/player/*.iqm");
+       }
        Projectile_Precache();
        Hook_Precache();
        GibSplash_Precache();
        DamageInfo_Precache();
        Vehicles_Precache();
        turrets_precache();
-       if(autocvar_cl_announcer != cl_announcer_prev) {
-               Announcer_Precache();
-               if(cl_announcer_prev)
-                       strunzone(cl_announcer_prev);
-               cl_announcer_prev = strzone(autocvar_cl_announcer);
-       }
+   Announcer_Precache();
        Tuba_Precache();
-       if(autocvar_cl_reticle_item_normal) precache_pic("gfx/reticle_normal");
-       if(autocvar_cl_reticle_item_nex) precache_pic("gfx/reticle_nex");
+       
+       if(autocvar_cl_reticle)
+       {
+               if(autocvar_cl_reticle_item_normal) { precache_pic("gfx/reticle_normal"); }
+               if(autocvar_cl_reticle_item_nex) { precache_pic("gfx/reticle_nex"); }
+       }
+       
        get_mi_min_max_texcoords(1); // try the CLEVER way first
        minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
        shortmapname = mi_shortname;
  }
  
  // CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc)
- void CSQC_Shutdown(void)
+ void Shutdown(void)
  {
  #ifdef USE_FTE
  #pragma TARGET id
                db_save(ClientProgsDB, "client.db");
        db_close(ClientProgsDB);
  
-       cvar_clientsettemp_restore();
        if(camera_active)
                cvar_set("chase_active",ftos(chase_active_backup));
  
@@@ -232,7 -267,7 +267,7 @@@ float SetTeam(entity o, float Team
                        case COLOR_TEAM4:
                                break;
                        default:
-                               if(GetTeam(Team, false) == NULL)
+                               if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
                                        Team = COLOR_SPECTATOR;
                        case 0:
                                break;
                        default:
-                               if(GetTeam(Team, false) == NULL)
+                               if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
                                        Team = COLOR_SPECTATOR;
@@@ -345,7 -380,7 +380,7 @@@ void PostInit(void
        postinit = true;
  }
  
- // CSQC_ConsoleCommand : Used to parse commands in the console that have been registered with the "registercmd" function
+ // CSQC_ConsoleCommand : Used to parse commands in the console that have been registered with the "registercommand" function
  // Return value should be 1 if CSQC handled the command, otherwise return 0 to have the engine handle it.
  float button_zoom;
  void Cmd_HUD_SetFields(float);
@@@ -354,7 -389,6 +389,6 @@@ float CSQC_ConsoleCommand(string strMes
  {
        float argc;
        // Tokenize String
-       //argc = tokenize(strMessage);
        argc = tokenize_console(strMessage);
  
        // Acquire Command
@@@ -492,7 -526,6 +526,6 @@@ void GameCommand(string msg
        if(argv(0) == "help" || argc == 0)
        {
                print(_("Usage: cl_cmd COMMAND..., where possible commands are:\n"));
-               print(_("  settemp cvar value\n"));
                print(_("  scoreboard_columns_set ...\n"));
                print(_("  scoreboard_columns_help\n"));
                GameCommand_Generic("help");
                else
                        hud_panel_radar_maximized = (stof(argv(1)) != 0);
        }
-       else if(cmd == "settemp") {
-               cvar_clientsettemp(argv(1), argv(2));
-       }
        else if(cmd == "scoreboard_columns_set") {
                Cmd_HUD_SetFields(argc);
        }
@@@ -814,7 -844,7 +844,7 @@@ void Ent_ClientData(
        if(f & 2)
        {
                newspectatee_status = ReadByte();
-               if(newspectatee_status == player_localentnum)
+               if(newspectatee_status == player_localnum + 1)
                        newspectatee_status = -1; // observing
        }
        else
                        prev_health = -1;
        }
        spectatee_status = newspectatee_status;
+       // non-COMPAT_XON050_ENGINE: we could get rid of spectatee_status, and derive it from player_localentnum and player_localnum
  }
  
  void Ent_Nagger()
@@@ -965,13 -997,23 +997,23 @@@ void CSQC_Ent_Update(float bIsNewEntity
  
  #ifdef DP_CSQC_ENTITY_REMOVE_IS_B0RKED
        if(self.enttype)
-               if(t != self.enttype)
+       {
+               if(t != self.enttype || bIsNewEntity)
                {
                        //print(_("A CSQC entity changed its type!\n"));
-                       print(sprintf(_("A CSQC entity changed its type! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname));
+                       print(sprintf(_("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n"), num_for_edict(self), self.entnum, self.enttype, t));
                        Ent_Remove();
                        bIsNewEntity = 1;
                }
+       }
+       else
+       {
+               if(!bIsNewEntity)
+               {
+                       print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n"), num_for_edict(self), self.entnum, t));
+                       bIsNewEntity = 1;
+               }
+       }
  #endif
        self.enttype = t;
        switch(t)
                case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
                case ENT_CLIENT_TURRET: ent_turret(); break; 
 +              case ENT_CLIENT_DAMAGEEFFECT: Ent_DamageEffect(); break;
+               case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break; 
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
                        error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
@@@ -1042,7 -1084,7 +1085,7 @@@ void Gamemode_Init(
  {
        if not(isdemo())
        {
-               localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), "\n");
+               localcmd("\n_cl_hook_gamestart ", MapInfo_Type_ToString(gametype), "\n");
                calledhooks |= HOOK_START;
        }
  }
@@@ -1057,10 -1099,10 +1100,10 @@@ void CSQC_Parse_Print(string strMessage
        print(ColorTranslateRGB(strMessage));
  }
  
- // CSQC_Parse_CenterPrint : Provides the centerprint string in the first parameter that the server provided.
+ // CSQC_Parse_CenterPrint : Provides the centerprint_hud string in the first parameter that the server provided.
  void CSQC_Parse_CenterPrint(string strMessage)
  {
-       centerprint(strMessage);
+       centerprint_hud(strMessage);
  }
  
  string notranslate_fogcmd1 = "\nfog ";
@@@ -1078,7 -1120,7 +1121,7 @@@ void Ent_ScoresInfo(
  {
        float i;
        self.classname = "ent_client_scores_info";
-       gametype = ReadByte();
+       gametype = ReadInt24_t();
        for(i = 0; i < MAX_SCORE; ++i)
        {
                scores_label[i] = strzone(ReadString());
@@@ -1285,7 -1327,7 +1328,7 @@@ void Net_ReadRace(
                                strunzone(grecordholder[pos-1]);
                        grecordholder[pos-1] = strzone(ReadString());
                        grecordtime[pos-1] = ReadInt24_t();
-                       if(grecordholder[pos-1] == GetPlayerName(player_localentnum -1))
+                       if(grecordholder[pos-1] == GetPlayerName(player_localnum))
                                race_myrank = pos;
                        break;
                case RACE_NET_SERVER_STATUS:
@@@ -1385,7 -1427,7 +1428,7 @@@ float CSQC_Parse_TempEntity(
                        bHandled = true;
                        break;
                case TE_CSQC_ANNOUNCE:
-                       announce_snd = strzone(ReadString());
+                       Announcer_Play(ReadString());
                        bHandled = true;
                        break;
                case TE_CSQC_KILLNOTIFY:
                        Net_WeaponComplain();
                        bHandled = true;
                        break;
-         case TE_CSQC_VEHICLESETUP:
-             Net_VehicleSetup();
-             bHandled = true;
-             break;
+               case TE_CSQC_VEHICLESETUP:
+                       Net_VehicleSetup();
+                       bHandled = true;
+                       break;
                default:
                        // No special logic for this temporary entity; return 0 so the engine can handle it
                        bHandled = false;
@@@ -1435,7 -1477,7 +1478,7 @@@ string getcommandkey(string text, strin
        keys = db_get(binddb, command);
        if (!keys)
        {
-               n = tokenize(findkeysforcommand(command)); // uses '...' strings
+               n = tokenize(findkeysforcommand(command, 0)); // uses '...' strings
                for(j = 0; j < n; ++j)
                {
                        k = stof(argv(j));
index 308f0f4adfbb99e048ddb7c02e9ffe93842f0e14,31fe318458f3af5a07e5114d6108b4094292c34f..17c01b576c4b6d9637d141ca6099dd9379bce711
@@@ -19,6 -19,8 +19,8 @@@ float autocvar_camera_speed_roll
  float autocvar_chase_active;
  float autocvar_cl_allow_uid2name;
  string autocvar_cl_announcer;
+ var float autocvar_cl_announcer_antispam = 2;
+ var float autocvar_cl_announcer_maptime = 3;
  float autocvar_cl_autodemo_delete;
  float autocvar_cl_autodemo_delete_keeprecords;
  float autocvar_cl_casings;
@@@ -46,6 -48,7 +48,7 @@@ var float autocvar_cl_gibs_sloppy = 1
  var float autocvar_cl_gibs_ticrate = 0.1;
  var float autocvar_cl_gibs_velocity_random = 1;
  var float autocvar_cl_gibs_velocity_scale = 1;
+ var float autocvar_cl_gibs_avelocity_scale = 1;
  float autocvar_cl_gibs_velocity_up;
  float autocvar_cl_gunalign;
  float autocvar_cl_hidewaypoints;
@@@ -57,15 -60,17 +60,17 @@@ float autocvar_cl_particles_oldnexbeam
  float autocvar_cl_particles_quality;
  float autocvar_cl_projectiles_sloppy;
  float autocvar_cl_readpicture_force;
+ var float autocvar_cl_reticle = 1;
  float autocvar_cl_reticle_item_nex;
  float autocvar_cl_reticle_item_normal;
  float autocvar_cl_reticle_stretch;
- float autocvar_cl_sound_maptime_warning;
  float autocvar_cl_stripcolorcodes;
  var float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6;
  var float autocvar_cl_vehicle_spiderbot_cross_size = 1;
  float autocvar_cl_velocityzoom;
- var float autocvar_cl_velocityzoomtime = 0.3;
+ float autocvar_cl_velocityzoom_type;
+ float autocvar_cl_velocityzoom_speed;
+ float autocvar_cl_velocityzoom_time;
  string autocvar_cl_weaponpriority;
  float autocvar_cl_zoomfactor;
  float autocvar_cl_zoomsensitivity;
@@@ -123,41 -128,40 +128,40 @@@ float autocvar_g_balance_tuba_fadetime
  float autocvar_g_balance_tuba_volume;
  float autocvar_g_balance_tuba_pitchstep;
  float autocvar_g_warmup_limit;
var float autocvar_g_waypointsprite_uppercase = 1;
var float autocvar_g_waypointsprite_alpha = 1;
var float autocvar_g_waypointsprite_crosshairfadealpha = 1;
float autocvar_g_waypointsprite_uppercase;
float autocvar_g_waypointsprite_alpha;
float autocvar_g_waypointsprite_crosshairfadealpha;
  float autocvar_g_waypointsprite_crosshairfadedistance;
var float autocvar_g_waypointsprite_crosshairfadescale = 1;
float autocvar_g_waypointsprite_crosshairfadescale;
  float autocvar_g_waypointsprite_distancealphaexponent;
var float autocvar_g_waypointsprite_distancefadealpha = 1;
var float autocvar_g_waypointsprite_distancefadedistancemultiplier = 1;
var float autocvar_g_waypointsprite_distancefadescale = 1;
var float autocvar_g_waypointsprite_edgefadealpha = 1;
float autocvar_g_waypointsprite_distancefadealpha;
float autocvar_g_waypointsprite_distancefadedistancemultiplier;
float autocvar_g_waypointsprite_distancefadescale;
float autocvar_g_waypointsprite_edgefadealpha;
  float autocvar_g_waypointsprite_edgefadedistance;
var float autocvar_g_waypointsprite_edgefadescale = 1;
var float autocvar_g_waypointsprite_edgeoffset_bottom = 0;
var float autocvar_g_waypointsprite_edgeoffset_left = 0;
var float autocvar_g_waypointsprite_edgeoffset_right = 0;
var float autocvar_g_waypointsprite_edgeoffset_top = 0;
var float autocvar_g_waypointsprite_fontsize = 12;
float autocvar_g_waypointsprite_edgefadescale;
float autocvar_g_waypointsprite_edgeoffset_bottom;
float autocvar_g_waypointsprite_edgeoffset_left;
float autocvar_g_waypointsprite_edgeoffset_right;
float autocvar_g_waypointsprite_edgeoffset_top;
float autocvar_g_waypointsprite_fontsize;
  float autocvar_g_waypointsprite_minalpha;
  float autocvar_g_waypointsprite_minscale;
  float autocvar_g_waypointsprite_normdistance;
var float autocvar_g_waypointsprite_scale = 1;
float autocvar_g_waypointsprite_scale;
  float autocvar_g_waypointsprite_spam;
  float autocvar_g_waypointsprite_timealphaexponent;
- var float autocvar_hud_colorflash_alpha = 0.5;
- float autocvar_hud_configure_bg_minalpha;
+ float autocvar_g_waypointsprites_turrets;
+ float autocvar_g_waypointsprites_turrets_maxdist;
+ float autocvar_hud_colorflash_alpha;
  float autocvar_hud_configure_checkcollisions;
  float autocvar_hud_configure_grid;
  float autocvar_hud_configure_grid_alpha;
- float autocvar_hud_configure_grid_xsize;
- float autocvar_hud_configure_grid_ysize;
  float autocvar_hud_configure_teamcolorforced;
  float autocvar_hud_contents;
  float autocvar_hud_contents_blur;
  float autocvar_hud_contents_blur_alpha;
- float autocvar_hud_contents_factor;
  float autocvar_hud_contents_fadeintime;
  float autocvar_hud_contents_fadeouttime;
  float autocvar_hud_contents_lava_alpha;
@@@ -202,6 -206,20 +206,20 @@@ float autocvar_hud_panel_bg_border
  vector autocvar_hud_panel_bg_color;
  float autocvar_hud_panel_bg_color_team;
  float autocvar_hud_panel_bg_padding;
+ float autocvar_hud_panel_centerprint;
+ float autocvar_hud_panel_centerprint_align;
+ var float autocvar_hud_panel_centerprint_fade_in = 0.2;
+ var float autocvar_hud_panel_centerprint_fade_out = 0.5;
+ var float autocvar_hud_panel_centerprint_fade_subsequent = 1;
+ var float autocvar_hud_panel_centerprint_fade_subsequent_passone = 3;
+ var float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha = 0.5;
+ var float autocvar_hud_panel_centerprint_fade_subsequent_passtwo = 10;
+ var float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha = 0.5;
+ var float autocvar_hud_panel_centerprint_fade_subsequent_minfontsize = 0.75;
+ var float autocvar_hud_panel_centerprint_fade_minfontsize = 0;
+ float autocvar_hud_panel_centerprint_flip;
+ float autocvar_hud_panel_centerprint_fontscale;
+ float autocvar_hud_panel_centerprint_time;
  float autocvar_hud_panel_chat;
  float autocvar_hud_panel_engineinfo;
  float autocvar_hud_panel_engineinfo_framecounter_decimals;
@@@ -220,22 -238,6 +238,6 @@@ float autocvar_hud_panel_healtharmor_pr
  float autocvar_hud_panel_healtharmor_progressbar_gfx_damage;
  float autocvar_hud_panel_healtharmor_progressbar_gfx_lowhealth;
  float autocvar_hud_panel_healtharmor_progressbar_gfx_smooth;
- // TEMPORARY hard coded default for compatibility - remove after 0.2 release
- var float autocvar_hud_panel_centerprint = 1;
- noref var string autocvar_hud_panel_centerprint_pos = "0.180000 0.260000";
- noref var string autocvar_hud_panel_centerprint_size = "0.650000 0.210000";
- noref var string autocvar_hud_panel_centerprint_bg = "";
- noref var string autocvar_hud_panel_centerprint_bg_color = "";
- noref var string autocvar_hud_panel_centerprint_bg_color_team = "";
- noref var string autocvar_hud_panel_centerprint_bg_alpha = "";
- noref var string autocvar_hud_panel_centerprint_bg_border = "";
- noref var string autocvar_hud_panel_centerprint_bg_padding = "";
- var float autocvar_hud_panel_centerprint_align = 0.5;
- var float autocvar_hud_panel_centerprint_fadetime = 0.25;
- var float autocvar_hud_panel_centerprint_flip = 1;
- var float autocvar_hud_panel_centerprint_fontscale = 1;
- var float autocvar_hud_panel_centerprint_time = 3;
  float autocvar_hud_panel_healtharmor_text;
  float autocvar_hud_panel_infomessages;
  float autocvar_hud_panel_infomessages_flip;
@@@ -248,7 -250,7 +250,7 @@@ float autocvar_hud_panel_notify_fontsiz
  float autocvar_hud_panel_notify_print;
  float autocvar_hud_panel_notify_time;
  float autocvar_hud_panel_physics;
- float autocvar_hud_panel_physics_acceleration_progressbar_mode;
+ float autocvar_hud_panel_physics_acceleration_mode;
  float autocvar_hud_panel_physics_acceleration_max;
  float autocvar_hud_panel_physics_progressbar;
  float autocvar_hud_panel_physics_acceleration_vertical;
@@@ -314,6 -316,9 +316,9 @@@ float autocvar_hud_showbinds
  float autocvar_hud_showbinds_limit;
  float autocvar_hud_shownames;
  float autocvar_hud_shownames_enemies;
+ float autocvar_hud_shownames_crosshairdistance;
+ float autocvar_hud_shownames_crosshairdistance_time;
+ float autocvar_hud_shownames_crosshairdistance_antioverlap;
  float autocvar_hud_shownames_self;
  float autocvar_hud_shownames_status;
  float autocvar_hud_shownames_statusbar_height;
@@@ -354,6 -359,7 +359,7 @@@ var float autocvar_scoreboard_highlight
  var float autocvar_scoreboard_highlight_alpha_self = 0.25;
  float autocvar_scoreboard_offset_left;
  float autocvar_scoreboard_offset_right;
+ float autocvar_scoreboard_offset_vertical;
  float autocvar_v_flipped;
  float autocvar_vid_conheight;
  float autocvar_vid_conwidth;
@@@ -367,8 -373,14 +373,19 @@@ var float autocvar_cl_eventchase_distan
  var float autocvar_cl_eventchase_speed = 1.3;
  float autocvar_cl_lerpexcess;
  string autocvar__togglezoom;
 +float autocvar_cl_damageeffect_player;
 +float autocvar_cl_damageeffect_gibs;
 +float autocvar_cl_damageeffect_gibs_randomize;
 +float autocvar_cl_damageeffect_lifetime;
 +float autocvar_cl_damageeffect_lifetime_max;
+ float autocvar_cl_playerdetailreduction;
+ float autocvar_cl_loddistance1 = 1024;
+ float autocvar_cl_loddistance2 = 4096;
+ float autocvar_cl_forceplayermodels;
+ float autocvar_cl_forceplayercolors;
+ string autocvar_cl_forcemyplayermodel;
+ float autocvar_cl_forcemyplayerskin;
+ float autocvar_cl_forcemyplayercolors;
+ float autocvar__cl_playerskin;
+ string autocvar__cl_playermodel;
+ float autocvar_cl_precacheplayermodels;
diff --combined qcsrc/client/gibs.qc
index b40de4aa90f1f2c479ff55ecac75988224eeb63c,6f6316bec1d4c46e2fd474e874316b8563f0af29..a93f62d830b0bd818df3b3967ccd2e377a8ad6ca
@@@ -52,8 -52,8 +52,8 @@@ void new_te_bloodshower (float ef, vect
  {
        float i, pmod;
        pmod = autocvar_cl_particles_quality;
-       for (i = 0; i < 250 * pmod; ++i)
-               pointparticles(ef, org, randomvec() * explosionspeed, howmany / 250);
+       for (i = 0; i < 50 * pmod; ++i)
+               pointparticles(ef, org, randomvec() * explosionspeed, howmany / 50);
  }
  
  void SUB_RemoveOnNoImpact()
@@@ -89,11 -89,17 +89,17 @@@ void Gib_Draw(
                return;
  
        if(self.touch == Gib_Touch) // don't do this for the "chunk" thingie...
+               // TODO somehow make it spray in a direction dependent on self.angles
                trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_SLIGHTBLOOD")), oldorg, self.origin);
        else
                trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_BLOOD")), oldorg, self.origin);
  
        self.renderflags = 0;
+       // make gibs die faster at low view quality
+       // if view_quality is 0.5, we want to have them die twice as fast
+       self.nextthink -= frametime * (1 / bound(0.01, view_quality, 1.00) - 1);
        self.alpha = bound(0, self.nextthink - time, 1);
  
        if(self.alpha < ALPHA_MIN_VISIBLE)
        }
  }
  
 -void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, float specnum, float destroyontouch, float issilent)
 +void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, float specnum, float destroyontouch, float issilent, float gibownernum)
  {
        entity gib;
  
        // TODO remove some gibs according to cl_nogibs
        gib = RubbleNew("gib");
 +      gib.classname = "gib";
        gib.move_movetype = MOVETYPE_BOUNCE;
        gib.gravity = 1;
        gib.solid = SOLID_CORPSE;
        gib.cnt = specnum;
        gib.silent = issilent;
 +      gib.team = gibownernum - 1;
        Gib_setmodel(gib, mdlname, specnum);
  
        setsize (gib, '-8 -8 -8', '8 8 8');
  
        gib.move_origin = gib.origin = org;
        gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
-       gib.move_avelocity = prandomvec() * vlen(gib.move_velocity);
+       gib.move_avelocity = prandomvec() * vlen(gib.move_velocity) * autocvar_cl_gibs_avelocity_scale;
        gib.move_time = time;
        gib.damageforcescale = autocvar_cl_gibs_damageforcescale;
  
  
  void Ent_GibSplash(float isNew)
  {
 -      float amount, type, specnum;
 +      float amount, type, specnum, entnumber;
        vector org, vel;
        string specstr;
        float issilent;
  
        type = ReadByte(); // gibbage type
        amount = ReadByte() / 16.0; // gibbage amount
 +      entnumber = ReadByte(); // player num
        org_x = ReadShort() * 4 + 2;
        org_y = ReadShort() * 4 + 2;
        org_z = ReadShort() * 4 + 2;
                                sound (self, CH_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM);
  
                        if(prandom() < amount)
 -                              TossGib ("models/gibs/eye.md3", org, org, vel, prandomvec() * 150, specnum, 0, issilent);
 +                              TossGib ("models/gibs/eye.md3", org, org, vel, prandomvec() * 150, specnum, 0, issilent, entnumber);
                        new_te_bloodshower(particleeffectnum(strcat(specstr, "bloodshower")), org, 1200, amount);
                        if(prandom() < amount)
 -                              TossGib ("models/gibs/bloodyskull.md3", org, org + 16 * prandomvec(), vel, prandomvec() * 100, specnum, 0, issilent);
 +                              TossGib ("models/gibs/bloodyskull.md3", org, org + 16 * prandomvec(), vel, prandomvec() * 100, specnum, 0, issilent, entnumber);
  
                        for(c = 0; c < amount; ++c)
                        {
                                randomvalue = amount - c;
  
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/arm.md3", org, org + 16 * prandomvec() + '0 0 8', vel, prandomvec() * (prandom() * 120 + 90), specnum,0, issilent);
 +                                      TossGib ("models/gibs/arm.md3", org, org + 16 * prandomvec() + '0 0 8', vel, prandomvec() * (prandom() * 120 + 90), specnum,0, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/arm.md3", org, org + 16 * prandomvec() + '0 0 8', vel, prandomvec() * (prandom() * 120 + 90), specnum,0, issilent);
 +                                      TossGib ("models/gibs/arm.md3", org, org + 16 * prandomvec() + '0 0 8', vel, prandomvec() * (prandom() * 120 + 90), specnum,0, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/chest.md3", org, org + 16 * prandomvec(), vel, prandomvec() * (prandom() * 120 + 80), specnum,0, issilent);
 +                                      TossGib ("models/gibs/chest.md3", org, org + 16 * prandomvec(), vel, prandomvec() * (prandom() * 120 + 80), specnum,0, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/smallchest.md3", org, org + 16 * prandomvec(), vel, prandomvec() * (prandom() * 120 + 80), specnum,0, issilent);
 +                                      TossGib ("models/gibs/smallchest.md3", org, org + 16 * prandomvec(), vel, prandomvec() * (prandom() * 120 + 80), specnum,0, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/leg1.md3", org, org + 16 * prandomvec() + '0 0 -5', vel, prandomvec() * (prandom() * 120 + 85), specnum,0, issilent);
 +                                      TossGib ("models/gibs/leg1.md3", org, org + 16 * prandomvec() + '0 0 -5', vel, prandomvec() * (prandom() * 120 + 85), specnum,0, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/leg2.md3", org, org + 16 * prandomvec() + '0 0 -5', vel, prandomvec() * (prandom() * 120 + 85), specnum,0, issilent);
 +                                      TossGib ("models/gibs/leg2.md3", org, org + 16 * prandomvec() + '0 0 -5', vel, prandomvec() * (prandom() * 120 + 85), specnum,0, issilent, entnumber);
  
                                // these splat on impact
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent);
 +                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent);
 +                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent);
 +                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent, entnumber);
                                if(prandom() < randomvalue)
 -                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent);
 +                                      TossGib ("models/gibs/chunk.mdl", org, org + 16 * prandomvec(), vel, prandomvec() * 450, specnum,1, issilent, entnumber);
                        }
                        break;
                case 0x02:
                        break;
                case 0x03:
                        if(prandom() < amount)
 -                              TossGib ("models/gibs/chunk.mdl", org, org, vel, prandomvec() * (prandom() * 30 + 20), specnum, 1, issilent); // TODO maybe adjust to more randomization?
 +                              TossGib ("models/gibs/chunk.mdl", org, org, vel, prandomvec() * (prandom() * 30 + 20), specnum, 1, issilent, entnumber); // TODO maybe adjust to more randomization?
                        break;
                case 0x81:
                        pointparticles(particleeffectnum(strcat(gentle_prefix, "damage_dissolve")), org, vel, amount);
index bc9f5c8f1528d21a392bf6363c60db11187bb84e,7532b3f50b0a85a25dab66ae98a40ccc79dff39c..cf8ed5215ba5ca11277edb1d3a8fd5686202c020
  // Revision 22: hook shot origin
  #define CSQC_REVISION 22
  
- // probably put these in common/
- // so server/ and client/ can be synced better
- const float GAME_DEATHMATCH           = 1;
- const float GAME_TEAM_DEATHMATCH      = 2;
- const float GAME_DOMINATION           = 3;
- const float GAME_CTF                  = 4;
- const float GAME_RUNEMATCH            = 5;
- const float GAME_LMS                  = 6;
- const float GAME_ARENA                = 7;
- const float GAME_KEYHUNT              = 8;
- const float GAME_ASSAULT              = 9;
- const float GAME_ONSLAUGHT    = 10;
- const float GAME_RACE = 11;
- const float GAME_NEXBALL = 12;
- const float GAME_CTS = 13;
- const float GAME_CA           = 14;
- const float GAME_FREEZETAG            = 15;
- const float GAME_KEEPAWAY             = 16;
  const float AS_STRING         = 1;
  const float AS_INT            = 2;
  const float AS_FLOAT_TRUNCATED        = 2;
@@@ -114,7 -95,7 +95,8 @@@ const float ENT_CLIENT_GAUNTLET = 29
  const float ENT_CLIENT_ACCURACY = 30;
  const float ENT_CLIENT_SHOWNAMES = 31;
  const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
 -const float ENT_CLIENT_MODEL = 33;
 +const float ENT_CLIENT_DAMAGEEFFECT = 33;
++const float ENT_CLIENT_MODEL = 34;
  
  const float ENT_CLIENT_TURRET = 40;
  const float ENT_CLIENT_AUXILIARYXHAIR = 50;
@@@ -137,151 -118,6 +119,6 @@@ const float RADARICON_DOMPOINT = 1
  const float RADARICON_POWERUP = 1;
  const float RADARICON_TAGGED = 1;
  
- ///////////////////////////
- // key constants
- //
- // these are the key numbers that should be passed to Key_Event
- //
- const float K_TAB                     =       9;
- const float K_ENTER           =       13;
- const float K_ESCAPE          =       27;
- const float K_SPACE           =       32;
- // normal keys should be passed as lowercased ascii
- const float K_BACKSPACE       =       127;
- const float K_UPARROW         =       128;
- const float K_DOWNARROW       =       129;
- const float K_LEFTARROW       =       130;
- const float K_RIGHTARROW      =       131;
- const float K_ALT             =       132;
- const float K_CTRL    =       133;
- const float K_SHIFT   =       134;
- const float K_F1              =       135;
- const float K_F2              =       136;
- const float K_F3              =       137;
- const float K_F4              =       138;
- const float K_F5              =       139;
- const float K_F6              =       140;
- const float K_F7              =       141;
- const float K_F8              =       142;
- const float K_F9              =       143;
- const float K_F10             =       144;
- const float K_F11             =       145;
- const float K_F12             =       146;
- const float K_INS             =       147;
- const float K_DEL             =       148;
- const float K_PGDN    =       149;
- const float K_PGUP    =       150;
- const float K_HOME    =       151;
- const float K_END             =       152;
- const float K_NUMLOCK         =       154;
- const float K_CAPSLOCK                =       155;
- const float K_SCROLLOCK               =       156;
- const float K_KP_0                    =       157;
- const float K_KP_INS          =       K_KP_0;
- const float K_KP_1                    =       158;
- const float K_KP_END          =       K_KP_1;
- const float K_KP_2                    =       159;
- const float K_KP_DOWNARROW    =       K_KP_2;
- const float K_KP_3                    =       160;
- const float K_KP_PGDN         =       K_KP_3;
- const float K_KP_4                    =       161;
- const float K_KP_LEFTARROW    =       K_KP_4;
- const float K_KP_5                    =       162;
- const float K_KP_6                    =       163;
- const float K_KP_RIGHTARROW   =       K_KP_6;
- const float K_KP_7                    =       164;
- const float K_KP_HOME         =       K_KP_7;
- const float K_KP_8                    =       165;
- const float K_KP_UPARROW      =       K_KP_8;
- const float K_KP_9                    =       166;
- const float K_KP_PGUP         =       K_KP_9;
- const float K_KP_PERIOD               =       167;
- const float K_KP_DEL          =       K_KP_PERIOD;
- const float K_KP_DIVIDE               =       168;
- const float K_KP_SLASH                =       K_KP_DIVIDE;
- const float K_KP_MULTIPLY     =       169;
- const float K_KP_MINUS                =       170;
- const float K_KP_PLUS         =       171;
- const float K_KP_ENTER                =       172;
- const float K_KP_EQUALS               =       173;
- const float K_PAUSE           =       255;
- //
- // joystick buttons
- //
- const float K_JOY1            =       768;
- const float K_JOY2            =       769;
- const float K_JOY3            =       770;
- const float K_JOY4            =       771;
- //
- // aux keys are for multi-buttoned joysticks to generate so they can use
- // the normal binding process
- //
- const float K_AUX1            =       772;
- const float K_AUX2            =       773;
- const float K_AUX3            =       774;
- const float K_AUX4            =       775;
- const float K_AUX5            =       776;
- const float K_AUX6            =       777;
- const float K_AUX7            =       778;
- const float K_AUX8            =       779;
- const float K_AUX9            =       780;
- const float K_AUX10           =       781;
- const float K_AUX11           =       782;
- const float K_AUX12           =       783;
- const float K_AUX13           =       784;
- const float K_AUX14           =       785;
- const float K_AUX15           =       786;
- const float K_AUX16           =       787;
- const float K_AUX17           =       788;
- const float K_AUX18           =       789;
- const float K_AUX19           =       790;
- const float K_AUX20           =       791;
- const float K_AUX21           =       792;
- const float K_AUX22           =       793;
- const float K_AUX23           =       794;
- const float K_AUX24           =       795;
- const float K_AUX25           =       796;
- const float K_AUX26           =       797;
- const float K_AUX27           =       798;
- const float K_AUX28           =       799;
- const float K_AUX29           =       800;
- const float K_AUX30           =       801;
- const float K_AUX31           =       802;
- const float K_AUX32           =       803;
- //
- // mouse buttons generate virtual keys
- //
- const float K_MOUSE1          =       512;
- const float K_MOUSE2          =       513;
- const float K_MOUSE3          =       514;
- const float K_MWHEELUP        =       515;
- const float K_MWHEELDOWN      =       516;
- const float K_MOUSE4          =       517;
- const float K_MOUSE5          =       518;
- const float K_MOUSE6          =       519;
- const float K_MOUSE7          =       520;
- const float K_MOUSE8          =       521;
- const float K_MOUSE9          =       522;
- const float K_MOUSE10         =       523;
- const float K_MOUSE11         =       524;
- const float K_MOUSE12         =       525;
- const float K_MOUSE13         =       526;
- const float K_MOUSE14         =       527;
- const float K_MOUSE15         =       528;
- const float K_MOUSE16         =       529;
  ///////////////////////////
  // keys pressed
  const float KEY_FORWARD               =       1;
@@@ -356,6 -192,9 +193,9 @@@ const float STAT_VEHICLESTAT_RELOAD1 = 
  const float STAT_VEHICLESTAT_AMMO2   = 65;
  const float STAT_VEHICLESTAT_RELOAD2 = 66;
  
+ const float STAT_SECRETS_TOTAL = 70;
+ const float STAT_SECRETS_FOUND = 71;
  // mod stats (1xx)
  const float STAT_REDALIVE = 100;
  const float STAT_BLUEALIVE = 101;
@@@ -535,7 -374,6 +375,6 @@@ float DEATH_TOUCHEXPLODE = 10015
  float DEATH_CHEAT = 10016;
  float DEATH_FIRE = 10017;
  float DEATH_QUIET = 10021;
- float DEATH_HEADSHOT = 10022;
  
  float  DEATH_VHFIRST       = 10030;
  float  DEATH_VHCRUSH       = 10030;
@@@ -626,38 -464,38 +465,38 @@@ float MSG_INFO = 5
  float MSG_KA = 6;
  float MSG_RACE = 10;
  
- float KILL_TEAM_RED = 10301;
- float KILL_TEAM_BLUE = 10302;
- float KILL_TEAM_SPREE = 10303;
- float KILL_FIRST_BLOOD = 10304;
- float KILL_FIRST_VICTIM = 10305;
- float KILL_TYPEFRAG = 10306;
- float KILL_TYPEFRAGGED = 10307;
- float KILL_FRAG = 10308;
- float KILL_FRAGGED = 10309;
- float KILL_SPREE = 10310;
- float KILL_END_SPREE = 10311;
- float KILL_SPREE_3 = 10312;
- float KILL_SPREE_5 = 10313;
- float KILL_SPREE_10 = 10314;
- float KILL_SPREE_15 = 10315;
- float KILL_SPREE_20 = 10316;
- float KILL_SPREE_25 = 10317;
- float KILL_SPREE_30 = 10318;
- float INFO_GOTFLAG = 10319;
- float INFO_PICKUPFLAG = 10320;
- float INFO_LOSTFLAG = 10321;
- float INFO_RETURNFLAG = 10322;
- float INFO_CAPTUREFLAG = 10323;
- float KA_PICKUPBALL = 10350;
- float KA_DROPBALL = 10351;
- float RACE_SERVER_RECORD = 10400;
- float RACE_NEW_TIME = 10401;
- float RACE_NEW_RANK = 10402;
- float RACE_FAIL = 10403;
+ float KILL_TEAM_RED = 12001;
+ float KILL_TEAM_BLUE = 12002;
+ float KILL_TEAM_SPREE = 12003;
+ float KILL_FIRST_BLOOD = 12004;
+ float KILL_FIRST_VICTIM = 12005;
+ float KILL_TYPEFRAG = 12006;
+ float KILL_TYPEFRAGGED = 12007;
+ float KILL_FRAG = 12008;
+ float KILL_FRAGGED = 12009;
+ float KILL_SPREE = 12010;
+ float KILL_END_SPREE = 12011;
+ float KILL_SPREE_3 = 12012;
+ float KILL_SPREE_5 = 12013;
+ float KILL_SPREE_10 = 12014;
+ float KILL_SPREE_15 = 12015;
+ float KILL_SPREE_20 = 12016;
+ float KILL_SPREE_25 = 12017;
+ float KILL_SPREE_30 = 12018;
+ float INFO_GOTFLAG = 13001;
+ float INFO_PICKUPFLAG = 13002;
+ float INFO_LOSTFLAG = 13003;
+ float INFO_RETURNFLAG = 13004;
+ float INFO_CAPTUREFLAG = 13005;
+ float KA_PICKUPBALL = 14001;
+ float KA_DROPBALL = 14002;
+ float RACE_SERVER_RECORD = 15001;
+ float RACE_NEW_TIME = 15002;
+ float RACE_NEW_RANK = 15003;
+ float RACE_FAIL = 15004;
  
  // weapon requests
  float WR_SETUP                = 1; // (SVQC) setup weapon data
@@@ -717,3 -555,35 +556,35 @@@ float HUD_MENU_ENABLE            = 0
  #define SERVERFLAG_ALLOW_FULLBRIGHT 1
  #define SERVERFLAG_TEAMPLAY 2
  #define SERVERFLAG_PLAYERSTATS 4
+ var vector autocvar_sv_player_maxs = '16 16 45';
+ var vector autocvar_sv_player_mins = '-16 -16 -24';
+ var vector autocvar_sv_player_viewoffset = '0 0 20';
+ var vector autocvar_sv_player_crouch_maxs = '16 16 25';
+ var vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
+ var vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
+ noref var vector autocvar_sv_player_headsize = '24 24 12';
+ #define PL_VIEW_OFS autocvar_sv_player_viewoffset
+ #define PL_MIN autocvar_sv_player_mins
+ #define PL_MAX autocvar_sv_player_maxs
+ #define PL_CROUCH_VIEW_OFS autocvar_sv_player_crouch_viewoffset
+ #define PL_CROUCH_MIN autocvar_sv_player_crouch_mins
+ #define PL_CROUCH_MAX autocvar_sv_player_crouch_maxs
+ #define PL_HEAD autocvar_sv_player_headsize
+ // helpers
+ #define PL_VIEW_OFS_z autocvar_sv_player_viewoffset_z
+ #define PL_MIN_z autocvar_sv_player_mins_z
+ #define PL_MAX_z autocvar_sv_player_maxs_z
+ #define PL_CROUCH_VIEW_OFS_z autocvar_sv_player_crouch_viewoffset_z
+ #define PL_CROUCH_MIN_z autocvar_sv_player_mins_z
+ #define PL_HEAD_x autocvar_sv_player_headsize_x
+ #define PL_HEAD_y autocvar_sv_player_headsize_y
+ #define PL_HEAD_z autocvar_sv_player_headsize_z
+ // spawnpoint prios
+ #define SPAWN_PRIO_NEAR_TEAMMATE_FOUND    200
+ #define SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM 100
+ #define SPAWN_PRIO_RACE_PREVIOUS_SPAWN     50
+ #define SPAWN_PRIO_GOOD_DISTANCE           10
index 5337219f5573223b46dc7ecc6bc0cea1c78eee37,6d7c8b9ac8b42a3c2a54c046c3cd81fe51cf32c5..9dfc2a5b2825384ec16c351e645534b9480a9069
@@@ -124,6 -124,22 +124,22 @@@ void WeaponStats_LogKill(float awep, fl
  .entity pusher;
  .float pushltime;
  
+ .float CopyBody_nextthink;
+ .void(void) CopyBody_think;
+ void CopyBody_Think(void)
+ {
+       if(self.CopyBody_nextthink && time > self.CopyBody_nextthink)
+       {
+               self.CopyBody_think();
+               if(wasfreed(self))
+                       return;
+               self.CopyBody_nextthink = self.nextthink;
+               self.CopyBody_think = self.think;
+               self.think = CopyBody_Think;
+       }
+       CSQCMODEL_AUTOUPDATE();
+       self.nextthink = time;
+ }
  void CopyBody(float keepvelocity)
  {
        entity oldself;
        self.enemy = oldself;
        self.lip = oldself.lip;
        self.colormap = oldself.colormap;
-       self.glowmod = oldself.glowmod;
        self.iscreature = oldself.iscreature;
        self.damagedbycontents = oldself.damagedbycontents;
        self.angles = oldself.angles;
        self.classname = "body";
        self.damageforcescale = oldself.damageforcescale;
        self.effects = oldself.effects;
+       self.glowmod = oldself.glowmod;
        self.event_damage = oldself.event_damage;
        self.animstate_startframe = oldself.animstate_startframe;
        self.animstate_numframes = oldself.animstate_numframes;
        self.animstate_override = oldself.animstate_override;
        self.animstate_looping = oldself.animstate_looping;
        self.frame = oldself.frame;
-       self.dead_frame = oldself.dead_frame;
        self.pain_finished = oldself.pain_finished;
        self.health = oldself.health;
        self.armorvalue = oldself.armorvalue;
        self.armortype = oldself.armortype;
        self.model = oldself.model;
        self.modelindex = oldself.modelindex;
-       self.modelindex_lod0 = oldself.modelindex_lod0;
-       self.modelindex_lod0_from_xonotic = oldself.modelindex_lod0_from_xonotic;
-       self.modelindex_lod1 = oldself.modelindex_lod1;
-       self.modelindex_lod2 = oldself.modelindex_lod2;
-       self.skinindex = oldself.skinindex;
+       self.skin = oldself.skin;
        self.species = oldself.species;
        self.movetype = oldself.movetype;
-       self.nextthink = oldself.nextthink;
        self.solid = oldself.solid;
        self.ballistics_density = oldself.ballistics_density;
        self.takedamage = oldself.takedamage;
-       self.think = oldself.think;
        self.customizeentityforclient = oldself.customizeentityforclient;
        self.uncustomizeentityforclient = oldself.uncustomizeentityforclient;
        self.uncustomizeentityforclient_set = oldself.uncustomizeentityforclient_set;
        if (keepvelocity == 1)
                self.velocity = oldself.velocity;
        self.oldvelocity = self.velocity;
+       self.alpha = oldself.alpha;
        self.fade_time = oldself.fade_time;
        self.fade_rate = oldself.fade_rate;
        //self.weapon = oldself.weapon;
  
        Drag_MoveDrag(oldself, self);
  
 +      self.owner = oldself;
++
+       if(self.colormap <= maxclients && self.colormap > 0)
+               self.colormap = 1024 + oldself.clientcolors;
+       CSQCMODEL_AUTOINIT();
+       self.CopyBody_nextthink = oldself.nextthink;
+       self.CopyBody_think = oldself.think;
+       self.nextthink = time;
+       self.think = CopyBody_Think;
        self = oldself;
  }
  
  float player_getspecies()
  {
        float s;
-       get_model_parameters(self.model, self.skinindex);
+       get_model_parameters(self.model, self.skin);
        s = get_model_parameters_species;
        get_model_parameters(string_null, 0);
        if(s < 0)
@@@ -221,13 -239,20 +241,20 @@@ void player_setupanimsformodel(
        self.anim_runbackwards = animfixfps(self, '14 1 1');
        self.anim_strafeleft = animfixfps(self, '15 1 1');
        self.anim_straferight = animfixfps(self, '16 1 1');
-       self.anim_dead1 = animfixfps(self, '17 1 1');
-       self.anim_dead2 = animfixfps(self, '18 1 1');
+       //self.anim_dead1 = animfixfps(self, '17 1 1');
+       //self.anim_dead2 = animfixfps(self, '18 1 1');
        self.anim_forwardright = animfixfps(self, '19 1 1');
        self.anim_forwardleft = animfixfps(self, '20 1 1');
        self.anim_backright = animfixfps(self, '21 1 1');
        self.anim_backleft  = animfixfps(self, '22 1 1');
        self.anim_melee = animfixfps(self, '23 1 1');
+       self.anim_duckwalkbackwards = animfixfps(self, '24 1 1');
+       self.anim_duckwalkstrafeleft = animfixfps(self, '25 1 1');
+       self.anim_duckwalkstraferight = animfixfps(self, '26 1 1');
+       self.anim_duckwalkforwardright = animfixfps(self, '27 1 1');
+       self.anim_duckwalkforwardleft = animfixfps(self, '28 1 1');
+       self.anim_duckwalkbackright = animfixfps(self, '29 1 1');
+       self.anim_duckwalkbackleft  = animfixfps(self, '30 1 1');
        // TODO introspect models for finding right "fps" value (1/duration)
        // reset animstate now
        setanim(self, self.anim_idle, TRUE, FALSE, TRUE);
@@@ -240,18 -265,7 +267,7 @@@ void player_anim (void
                updateanim(self.weaponentity);
  
        if (self.deadflag != DEAD_NO)
-       {
-               if (time > self.animstate_endtime)
-               {
-                       if (self.maxs_z > 5)
-                       {
-                               self.maxs_z = 5;
-                               setsize(self, self.mins, self.maxs);
-                       }
-                       self.frame = self.dead_frame;
-               }
                return;
-       }
  
        if (!self.animstate_override)
        {
                }
                else if (self.crouch)
                {
-                       if (self.movement_x * self.movement_x + self.movement_y * self.movement_y > 20)
+                       if (self.movement_x > 0 && self.movement_y == 0)
                                setanim(self, self.anim_duckwalk, TRUE, FALSE, FALSE);
+                       else if (self.movement_x < 0 && self.movement_y == 0)
+                               setanim(self, self.anim_duckwalkbackwards, TRUE, FALSE, FALSE);
+                       else if (self.movement_x == 0 && self.movement_y > 0)
+                               setanim(self, self.anim_duckwalkstraferight, TRUE, FALSE, FALSE);
+                       else if (self.movement_x == 0 && self.movement_y < 0)
+                               setanim(self, self.anim_duckwalkstrafeleft, TRUE, FALSE, FALSE);
+                       else if (self.movement_x > 0 && self.movement_y > 0)
+                               setanim(self, self.anim_duckwalkforwardright, TRUE, FALSE, FALSE);
+                       else if (self.movement_x > 0 && self.movement_y < 0)
+                               setanim(self, self.anim_duckwalkforwardleft, TRUE, FALSE, FALSE);
+                       else if (self.movement_x < 0 && self.movement_y > 0)
+                               setanim(self, self.anim_duckwalkbackright, TRUE, FALSE, FALSE);
+                       else if (self.movement_x < 0 && self.movement_y < 0)
+                               setanim(self, self.anim_duckwalkbackleft, TRUE, FALSE, FALSE);
                        else
                                setanim(self, self.anim_duckidle, TRUE, FALSE, FALSE);
                }
@@@ -381,18 -409,16 +411,17 @@@ void PlayerCorpseDamage (entity inflict
        self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
        self.dmg_inflictor = inflictor;
  
-       if (self.health <= -autocvar_sv_gibhealth && self.modelindex != 0)
+       if (self.health <= -autocvar_sv_gibhealth && self.alpha >= 0)
        {
                // don't use any animations as a gib
                self.frame = 0;
-               self.dead_frame = 0;
                // view just above the floor
                self.view_ofs = '0 0 4';
  
                Violence_GibSplash(self, 1, 1, attacker);
-               self.modelindex = 0; // restore later
+               self.alpha = -1;
                self.solid = SOLID_NOT; // restore later
 +              self.takedamage = DAMAGE_NO; // restore later
        }
  }
  
@@@ -631,7 -657,7 +660,7 @@@ void PlayerDamage (entity inflictor, en
                if(!g_freezetag)
                {
                        // become fully visible
-                       self.alpha = 1;
+                       self.alpha = default_player_alpha;
                        // throw a weapon
                        SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);
                }
          float w;
          w = DEATH_WEAPONOF(deathtype);
          if(WEP_VALID(w))
-         if(self.classname == "player")
-         if(self != attacker)
+       if(accuracy_isgooddamage(attacker, self))
          attacker.accuracy.(accuracy_frags[w-1]) += 1;
  
                if(deathtype == DEATH_HURTTRIGGER && g_freezetag)
                else
                        self.respawn_countdown = -1; // do not count down
                if (random() < 0.5)
-               {
                        setanim(self, self.anim_die1, FALSE, TRUE, TRUE);
-                       self.dead_frame = self.anim_dead1_x;
-               }
                else
-               {
                        setanim(self, self.anim_die2, FALSE, TRUE, TRUE);
-                       self.dead_frame = self.anim_dead2_x;
+               if (self.maxs_z > 5)
+               {
+                       self.maxs_z = 5;
+                       setsize(self, self.mins, self.maxs);
                }
                // set damage function to corpse damage
                self.event_damage = PlayerCorpseDamage;
@@@ -1148,18 -1172,18 +1175,18 @@@ float LoadPlayerSounds(string f, float 
  }
  
  .float modelindex_for_playersound;
- .float skinindex_for_playersound;
+ .float skin_for_playersound;
  void UpdatePlayerSounds()
  {
        if(self.modelindex == self.modelindex_for_playersound)
-       if(self.skinindex == self.skinindex_for_playersound)
+       if(self.skin == self.skin_for_playersound)
                return;
        self.modelindex_for_playersound = self.modelindex;
-       self.skinindex_for_playersound = self.skinindex;
+       self.skin_for_playersound = self.skin;
        ClearPlayerSounds();
        LoadPlayerSounds("sound/player/default.sounds", 1);
        if(!autocvar_g_debug_defaultsounds)
-               if(!LoadPlayerSounds(get_model_datafilename(self.model, self.skinindex, "sounds"), 0))
+               if(!LoadPlayerSounds(get_model_datafilename(self.model, self.skin, "sounds"), 0))
                        LoadPlayerSounds(get_model_datafilename(self.model, 0, "sounds"), 0);
  }
  
diff --combined qcsrc/server/g_damage.qc
index 5c0f2c233ab0eecf50c2cfd718cd7cc1d65ba64e,170793a5524b0621760b283023dbee138a205132..2e3296fbaf335e4526af59eedd9fde26c8cf717d
@@@ -221,6 -221,42 +221,42 @@@ void GiveFrags (entity attacker, entit
                UpdateFrags(attacker, f);
  }
  
+ string Obituary_ExtraFragInfo(entity player) // Extra fragmessage information
+ {
+       string health_output;
+       string ping_output;
+       string handicap_output;
+       string output;
+       // health/armor of attacker (person who killed you)
+       if(autocvar_sv_fraginfo_stats && (player.health >= 1))
+               if((autocvar_sv_fraginfo_stats == 2) || !inWarmupStage)
+                       health_output = strcat("^7(Health ^1", ftos(rint(player.health)), "^7 / Armor ^2", ftos(rint(player.armorvalue)), "^7)");
+       
+       // ping display
+       if(autocvar_sv_fraginfo_ping)
+               ping_output = ((clienttype(player) == CLIENTTYPE_BOT) ? "^2Bot" : strcat("Ping ", ((player.ping >= 150) ? "^1" : "^2"), ftos(player.ping), "ms"));
+               
+       // handicap display 
+       if(autocvar_sv_fraginfo_handicap) 
+       {
+               if(autocvar_sv_fraginfo_handicap == 2)  
+                       handicap_output = strcat(output, strcat("Handicap ^2", ((player.cvar_cl_handicap <= 1) ? "Off" : ftos(player.cvar_cl_handicap))));
+               else if(player.cvar_cl_handicap) // with _handicap 1, only show this if there actually is a handicap enabled.   
+                       handicap_output = strcat("Handicap ^2", ftos(player.cvar_cl_handicap));
+       }
+       
+       // format the string
+       output = strcat(health_output, (health_output ? " ^7(" : ((ping_output || handicap_output) ? "^7(" : "")), 
+               ping_output, ((ping_output && handicap_output) ? "^7 / " : ""), 
+               handicap_output, ((ping_output || handicap_output) ? "^7)" : ""));
+       
+       // add new line to the beginning if there is a message
+       if(output) { output = strcat("\n", output); }
+               
+       return output;
+ }
  string AppendItemcodes(string s, entity player)
  {
        float w;
@@@ -329,7 -365,7 +365,7 @@@ void Obituary (entity attacker, entity 
                }
                else if (attacker.classname == "player")
                {
-                       if(teamplay && attacker.team == targ.team)
+                       if(!IsDifferentTeam(attacker, targ))
                        {
                                if(attacker.team == COLOR_TEAM1)
                                        type = KILL_TEAM_RED;
                                        PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
                                }
  
-                               if((autocvar_sv_fragmessage_information_typefrag) && (targ.BUTTON_CHAT)) {
-                                       Send_CSQC_KillCenterprint(attacker, s, GetAdvancedDeathReports(targ), KILL_TYPEFRAG, MSG_KILL);
-                                       Send_CSQC_KillCenterprint(targ, a, GetAdvancedDeathReports(attacker), KILL_TYPEFRAGGED, MSG_KILL);
+                               if((autocvar_sv_fraginfo_typefrag) && (targ.BUTTON_CHAT)) {
+                                       Send_CSQC_KillCenterprint(attacker, s, Obituary_ExtraFragInfo(targ), KILL_TYPEFRAG, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(targ, a, Obituary_ExtraFragInfo(attacker), KILL_TYPEFRAGGED, MSG_KILL);
                                } else {
-                                       Send_CSQC_KillCenterprint(attacker, s, GetAdvancedDeathReports(targ), KILL_FRAG, MSG_KILL);
-                                       Send_CSQC_KillCenterprint(targ, a, GetAdvancedDeathReports(attacker), KILL_FRAGGED, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(attacker, s, Obituary_ExtraFragInfo(targ), KILL_FRAG, MSG_KILL);
+                                       Send_CSQC_KillCenterprint(targ, a, Obituary_ExtraFragInfo(attacker), KILL_FRAGGED, MSG_KILL);
                                }
  
                                attacker.taunt_soundtime = time + 1;
@@@ -491,10 -527,6 +527,10 @@@ entity damage_attacker
  
  void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
  {
 +      // if the target is a player or dead body, activate damage effects
 +      if(targ.classname == "player" || targ.classname == "body")
 +              Violence_DamageEffect(targ, damage, DEATH_WEAPONOF(deathtype));
 +
        float mirrordamage;
        float mirrorforce;
        float teamdamage0;
                                damage = 0;
                                force = '0 0 0';
                        }
-                       else if(teamplay && attacker.team == targ.team)
+                       else if(!IsDifferentTeam(attacker, targ))
                        {
                                if(autocvar_teamplay_mode == 1)
                                        damage = 0;
                                                        {
                                                                vector v;
                                                                v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+                                                               v_z = 0; // fteqcc sucks
                                                                attacker.dmg_take += v_x;
                                                                attacker.dmg_save += v_y;
                                                                attacker.dmg_inflictor = inflictor;
                                                        {
                                                                vector v;
                                                                v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+                                                               v_z = 0; // fteqcc sucks
                                                                targ.dmg_take += v_x;
                                                                targ.dmg_save += v_y;
                                                                targ.dmg_inflictor = inflictor;
                                                                damage = 0;
-                                 if(!autocvar_g_friendlyfire_virtual_force)
-                                     force = '0 0 0';
+                                                               if(!autocvar_g_friendlyfire_virtual_force)
+                                                                       force = '0 0 0';
                                                        }
                                                }
                                                else