From: FruitieX Date: Mon, 9 Aug 2010 11:27:26 +0000 (+0300) Subject: Merge branch 'master' into mirceakitsune/multijump X-Git-Tag: xonotic-v0.1.0preview~361^2~11^2~7 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=992529cda6e328df91113b580eae2f1b3ef0cdfd;hp=-c Merge branch 'master' into mirceakitsune/multijump Conflicts: qcsrc/server/cl_physics.qc --- 992529cda6e328df91113b580eae2f1b3ef0cdfd diff --combined defaultXonotic.cfg index 9976b8e395,3b585d7237..5944d7e712 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@@ -1,30 -1,3 +1,3 @@@ - set g_xonoticversion 2.5svn "Xonotic version (formatted for humans)" - - //!showbrand - - // changes a cvar and reports it to the server (for the menu to notify the - // server about changes) - alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\"" - - // detect dedicated server or client - alias "_detect_dedicated_$qport" "$*" - alias "_detect_dedicated_0" "" - alias if_dedicated "_detect_dedicated_$qport ${* asis}" - alias if_client "${* asis}" - if_dedicated alias if_client "" - - seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg" - // Xonotic version (formatted for machines) // used to determine if a client version is compatible // this doesn't have to be bumped with every release @@@ -35,23 -8,31 +8,31 @@@ // servers either // // e.g. Xonotic 1.5.1 RC1 will be 15101 - gameversion 20000 - gameversion_min 20000 // 2.5.2 still used this - gameversion_max 20699 // 2.5 version allows any 2.6 release, but no more + set g_xonoticversion git "Xonotic version (formatted for humans)" + gameversion 100 // 0.1.0 + gameversion_min 0 // git builds see all versions + gameversion_max 65535 // git builds see all versions // compatibility guideline: // version a.b.c = a0b0c // gameversion_min = a0(b-1)00 // show servers of the previous "line" // gameversion_max = a0(b+1)99 // show servers of the next "line" - // example: 2.6.3 - // gameversion 20603 - // gameversion_min 20500 - // gameversion_max 20799 - // however, in 2.5.x, we will: - // gameversion = 20000 // let other 2.5 clients connect - // gameversion_min = 20000 // 2.5.x still has this, we cannot block it within 2.5 - // however, in 2.6.x, we will just: - // gameversion_min = 20000 // show 2.5 servers + // so, for a given gameversion, _min and _max calculate as follows: + // gameversion_min = (gameversion / 100) * 100 - 100 + // gameversion_max = (gameversion / 100) * 100 + 199 + + // changes a cvar and reports it to the server (for the menu to notify the + // server about changes) + alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\"" + + // detect dedicated server or client + alias "_detect_dedicated_$qport" "$*" + alias "_detect_dedicated_0" "" + alias if_dedicated "_detect_dedicated_$qport ${* asis}" + alias if_client "${* asis}" + if_dedicated alias if_client "" + + seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg" // say aliases alias asay_ctf_flagcarrier "say_team flag carrier at %y" @@@ -105,7 -86,7 +86,7 @@@ mod_q3bsp_lightmapmergepower // player defaults _cl_color 102 _cl_name Player - _cl_playermodel models/player/marine.zym + _cl_playermodel models/player/umbra.iqm _cl_playerskin 0 crosshair 1 seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair" @@@ -193,6 -174,12 +174,12 @@@ seta crosshair_hlac_color_green 0.65 "c seta crosshair_hlac_color_blue 0.2 "crosshair color blue component to display when wielding the H.L.A.C." seta crosshair_hlac_color_alpha 1 "crosshair alpha value to display when wielding the H.L.A.C." seta crosshair_hlac_size 0.6 "crosshair size when wielding the H.L.A.C." + seta crosshair_seeker "" "crosshair to display when wielding the TAG Seeker" + seta crosshair_seeker_color_red 1 "crosshair color red component to display when wielding the TAG seeker" + seta crosshair_seeker_color_green 0.35 "crosshair color green component to display when wielding the TAG seeker" + seta crosshair_seeker_color_blue 0.35 "crosshair color blue component to display when wielding the TAG seeker" + seta crosshair_seeker_color_alpha 0.9 "crosshair alpha value to display when wielding the TAG seeker" + seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker" seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle" seta crosshair_campingrifle_color_red 0.85 "crosshair color red component to display when wielding the campingrifle" seta crosshair_campingrifle_color_green 0.5 "crosshair color green component to display when wielding the campingrifle" @@@ -212,6 -199,9 +199,9 @@@ seta crosshair_fireball_color_green 1. seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball" seta crosshair_fireball_color_alpha 1 "crosshair alpha value to display when wielding the fireball" seta crosshair_fireball_size 1 "crosshair size when wielding the fireball" + seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)" + seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha" + seta cl_reticle_item_normal 1 "draw recticle 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" @@@ -245,6 -235,29 +235,29 @@@ cl_deathfade 1 // fade screen to dark r cl_bobcycle 0 // how long the cycle of up/down view movement takes (only works if cl_bob is not 0), default is 0.6 cl_bob 0.01 // how much view moves up/down when moving (does not move if cl_bobcycle is 0, but still enables cl_bobmodel), default is 0.02 cl_bobmodel 1 // whether to have gun model move around on screen when moving (only works if cl_bob is not 0), default is 1 + cl_leanmodel 1 // enables weapon leaning effect when looking around + cl_leanmodel_side_speed 0.7 "gun leaning sideways speed" + cl_leanmodel_side_limit 35 "gun leaning sideways limit" + cl_leanmodel_side_highpass1 30 "gun leaning sideways pre-highpass in 1/s" + cl_leanmodel_side_highpass 3 "gun leaning sideways highpass in 1/s" + cl_leanmodel_side_lowpass 20 "gun leaning sideways lowpass in 1/s" + cl_leanmodel_up_speed 0.65 "gun leaning upward speed" + cl_leanmodel_up_limit 50 "gun leaning upward limit" + cl_leanmodel_up_highpass1 5 "gun leaning upward pre-highpass in 1/s" + cl_leanmodel_up_highpass 15 "gun leaning upward highpass in 1/s" + cl_leanmodel_up_lowpass 20 "gun leaning upward lowpass in 1/s" + cl_followmodel 1 // enables weapon pushing / pulling effect when walking + cl_followmodel_side_speed 0.25 "gun following sideways speed" + cl_followmodel_side_limit 6 "gun following sideways limit" + cl_followmodel_side_highpass1 30 "gun following sideways pre-highpass in 1/s" + cl_followmodel_side_highpass 5 "gun following sideways highpass in 1/s" + cl_followmodel_side_lowpass 10 "gun following sideways lowpass in 1/s" + cl_followmodel_up_speed 0.5 "gun following upward speed" + cl_followmodel_up_limit 5 "gun following upward limit" + cl_followmodel_up_highpass1 60 "gun following upward pre-highpass in 1/s" + cl_followmodel_up_highpass 2 "gun following upward highpass in 1/s" + cl_followmodel_up_lowpass 10 "gun following upward lowpass in 1/s" + cl_rollangle 0 // amount of view tilt when strafing, default is 2.0 v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds gl_polyblend 0.5 // whether to use screen tints, default is 1 @@@ -278,6 -291,8 +291,8 @@@ set sv_ready_restart 0 "if set to 1 all set sv_ready_restart_after_countdown 0 "if set to 1 the players and map items are reset after the countdown ended, otherwise they're reset already at the beginning of the countdown" set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed" + set sv_hitsound_antispam_time 0.05 "don't play the hitsound more often than this for the electro lightning gun or the laser gauntlet" + //nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)" @@@ -311,15 -326,19 +326,19 @@@ set g_telefrags set g_telefrags_avoid 0 set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed" + set g_respawn_ghosts 0 "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" + // fragmessage: This allows extra information to be displayed with the frag centerprints. - set sv_fragmessage_information_ping 0 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)" + set sv_fragmessage_information_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 0 "Enable statistics (health/armor) display information, 0 = Never display; 1 = Always display (Only available for the person who was killed)" + set sv_fragmessage_information_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" // use default physics set sv_friction_on_land 0 - exec physicsNoQWBunny.cfg + exec physicsNoQWBunny-nexbased.cfg set sv_player_viewoffset "0 0 35" "view offset of the player model" set sv_player_mins "-16 -16 -24" "playermodel mins" @@@ -330,9 -349,9 +349,9 @@@ set sv_player_crouch_maxs "16 16 25" "m set sv_pogostick 1 "don't require releasing the space bar for jumping again" set sv_doublejump 0 "allow Quake 2-style double jumps" - set sv_jumpspeedcap_min "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this" - set sv_jumpspeedcap_max "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this" - set sv_jumpspeedcap_max_disable_on_ramps 0 "disable max jumpspeedcap on ramps to preserve the old rampjump style" + set sv_jumpspeedcap_min "" "lower bound on the baseline velocity of a jump; final velocity will be >= (jumpheight * min + jumpheight)" + set sv_jumpspeedcap_max "" "upper bound on the baseline velocity of a jump; final velocity will be <= (jumpheight * max + jumpheight)" + set sv_jumpspeedcap_max_disable_on_ramps 0 "disable upper baseline velocity bound on ramps to preserve the old rampjump style" seta sv_precacheplayermodels 1 seta sv_precacheweapons 0 @@@ -409,9 -428,9 +428,9 @@@ set bot_ai_keyboard_treshold 0.5 set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim" set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming" set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons" - set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle rocketlauncher grenadelauncher electro hagar hlac crylink laser uzi fireball shotgun tuba" "Desired weapons for far distances ordered by priority" - set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority" - set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba hagar crylink grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority" + set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle rocketlauncher grenadelauncher electro hagar hlac crylink laser uzi fireball seeker shotgun tuba" "Desired weapons for far distances ordered by priority" + set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority" + set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba seeker hagar crylink grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority" set bot_ai_weapon_combo 1 "Enable bots to do weapon combos" set bot_ai_weapon_combo_threshold 0.3 "Try to make a combo N seconds after the last attack" set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item" @@@ -439,7 -458,7 +458,7 @@@ set bot_ai_aimskill_order_filter_5th 0. set g_waypointeditor 0 set bot_ignore_bots 0 "When set, bots don't shoot at other bots" set bot_join_empty 0 "When set, bots also play if no player has joined the server" - set bot_vs_human 0 "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count)" + set bot_vs_human 0 "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game" alias g_waypointeditor_spawn "impulse 103" alias g_waypointeditor_remove "impulse 104" @@@ -480,7 -499,6 +499,6 @@@ set g_laserguided_missile 0 "if set to set g_midair 0 "if set to 1 you can only apply damage to your opponent while he is airborne" set g_midair_shieldtime 0.3 "number of seconds you are still invincible since you lost contact to the ground" set g_spawnsound 1 "set to 0 if you don't want to hear the spawn sound when a player spawns" - set g_spawnpoints_autodrop 0 "if set to 1, automatically drop spawn point locations if they were placed too high" set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid" set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once seconds are over" set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)" @@@ -526,6 -544,7 +544,7 @@@ set sv_dodging_wall_distance_threshold set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent" set leadlimit 0 + set leadlimit_and_fraglimit 0 "if set, leadlimit is ANDed with fraglimit (otherwise ORed)" // this means that timelimit can be overidden globally and fraglimit can be overidden for each game mode: DM/TDM, Domination, CTF, and Runematch. seta timelimit_override -1 "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)" @@@ -819,18 -838,20 +838,25 @@@ set g_nexball_radar_showallplayers 1 " // server game balance settings // powerup balance settings // weapon balance settings follow - exec balance.cfg + exec balanceXonotic.cfg set g_bloodloss 0 "amount of health below which blood loss occurs" - set g_footsteps 0 "serverside footstep sounds" + set g_footsteps 1 "serverside footstep sounds" - set g_multijump 0 "Number of multiple jumps to allow (jumping again in the air), -1 allows for infinite jumps" - set g_multijump_delay 0.25 "Delay between multiple jumps" - set g_multijump_speed 30 "Minimum vertical speed a player must have in order to jump again" + set g_deathglow 1.25 "when enabled, players stop glowing after they die (the value specifies glow fading speed)" + ++set g_multijump 1 "Number of multiple jumps to allow (jumping again in the air), -1 allows for infinite jumps" ++set g_multijump_add 0 "0 = make the current z velocity equal to jumpvelocity, 1 = add jumpvelocity to the current z velocity" ++set g_multijump_delay 0 "Delay between multiple jumps" ++set g_multijump_speed -999999 "Minimum vertical speed a player must have in order to jump again" + // effects r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints) + r_picmipworld 1 + gl_picmip_world 0 + gl_picmip_sprites 0 + gl_picmip_other 2 // so, picmip -2 is best possible quality r_mipsprites 1 r_mipskins 1 r_shadow_realtime_world_lightmaps 1 @@@ -893,40 -914,25 +919,25 @@@ alias sv_loadconfig "exec $serverconfig alias sv_restart "say \"Server will restart at the end of the match, you will all be reconnected automatically. $* \"; quit_and_redirect self" // aliases: - alias +attack2 +button3 - alias -attack2 -button3 + alias +fire +attack + alias -fire -attack + alias +fire2 +button3 + alias -fire2 -button3 + alias +attack2 +button3 // old alias from Nexuiz + alias -attack2 -button3 // old alias name from Nexuiz alias +zoom +button4 alias -zoom -button4 alias +crouch +button5 alias -crouch -button5 - alias weapnext "_weapnext_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}" - alias _weapnext_000 "impulse 10" - alias _weapnext_001 "impulse 10" - alias _weapnext_010 "impulse 10" - alias _weapnext_011 "impulse 10" - alias _weapnext_020 "impulse 10" - alias _weapnext_021 "impulse 10" - alias _weapnext_100 "impulse 10" - alias _weapnext_101 "impulse 15" - alias _weapnext_110 "impulse 18" - alias _weapnext_111 "impulse 15" - alias _weapnext_120 "impulse 18" - alias _weapnext_121 "impulse 15" + alias weapnext "_weapnext_${cl_weaponpriority_useforcycling}" + alias _weapnext_0 "impulse 18" + alias _weapnext_1 "impulse 15" + alias _weapnext_2 "impulse 10" alias weaplast "impulse 11" - alias weapprev "_weapprev_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}" - alias _weapprev_000 "impulse 12" - alias _weapprev_001 "impulse 12" - alias _weapprev_010 "impulse 12" - alias _weapprev_011 "impulse 12" - alias _weapprev_020 "impulse 12" - alias _weapprev_021 "impulse 12" - alias _weapprev_100 "impulse 12" - alias _weapprev_101 "impulse 16" - alias _weapprev_110 "impulse 19" - alias _weapprev_111 "impulse 16" - alias _weapprev_120 "impulse 19" - alias _weapprev_121 "impulse 16" - set _supports_weaponpriority 0 "set to 1 by csqc if supported, and to 0 on disconnect" + alias weapprev "_weapprev_${cl_weaponpriority_useforcycling}" + alias _weapprev_0 "impulse 19" + alias _weapprev_1 "impulse 16" + alias _weapprev_2 "impulse 12" alias weapbest "impulse 13" alias reload "impulse 20" @@@ -956,8 -962,8 +967,8 @@@ bind 8 "impulse 8 bind 9 "impulse 9" bind 0 "impulse 14" // cycles the superweapons bind q weaplast - bind MOUSE1 +attack - bind MOUSE2 +attack2 + bind MOUSE1 +fire + bind MOUSE2 +fire2 bind MOUSE3 +zoom bind MOUSE4 weaplast bind MOUSE5 +hook @@@ -984,7 -990,6 +995,6 @@@ bind F10 qui bind F11 disconnect bind F12 screenshot bind F4 ready - bind m radar bind ALT +showaccuracy // Gamepad defaults. Tested with Logitech Rumblepad 2, I hope similar ones works as well. @@@ -992,8 -997,8 +1002,8 @@@ bind JOY1 "+crouch bind JOY2 "+jump" bind JOY3 "weapprev" bind JOY4 "weapnext" - bind JOY5 "+attack2" - bind JOY6 "+attack" + bind JOY5 "+fire2" + bind JOY6 "+fire" bind JOY7 "+zoom" bind JOY8 "dropweapon" bind JOY9 "menu_showteamselect" @@@ -1038,7 -1043,7 +1048,7 @@@ bind kp_minus "+userbind 18 set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted" set sv_vote_only_commands "" set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" "maybe add kickban here (but then sv_vote_master 0)" - set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" + set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" set sv_vote_call 1 "users can call a vote for the above commands" set sv_vote_master 1 "users can call a vote to become master" set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master" @@@ -1318,34 -1323,71 +1328,71 @@@ con_chatwidth 0. con_notifysize 10 con_notifyalign 0 - sbar_info_pos 50 - seta sbar_alpha_bg 0.8 "alpha value of the HUD background" - seta sbar_alpha_fg 1 "alpha value of the HUD foreground items" - seta sbar_border_thickness 1 "scoreboard border thickness" - seta sbar_accuracy_border_thickness 1 "accuracy stats border thickness" - seta sbar_accuracy_doublerows 0 "use two rows instead of one" - seta sbar_accuracy_yellow 40 "percentage at which the accuracy color is yellow" - seta sbar_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard" - seta sbar_accuracy_hud 1 "0 = no weapon accuracy bar on the weapon icons" - seta sbar_color_bg_r 0 "red color component of the HUD background" - seta sbar_color_bg_g 0.25 "green color component of the HUD background" - seta sbar_color_bg_b 0.17 "blue color component of the HUD background" - seta sbar_color_bg_team 0.5 "team color multiplier of the HUD background" - seta sbar_scoreboard_alpha_bg 0.6 "scoreboard background alpha" - seta sbar_scoreboard_alpha_fg 1 "scoreboard foreground alpha" - seta sbar_scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self" - seta sbar_scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self" - seta sbar_scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)" - seta sbar_scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)" - seta sbar_scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard" - seta sbar_scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on sbar_scoreboard_highlight 1)" - seta sbar_scoreboard_highlight_alpha_self 0.25 "self highlight alpha value" - seta sbar_hudselector 1 "0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display" - seta sbar_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon" - seta sbar_showweaponicons 1 "1 = show icons of weapons that you have" - seta sbar_timer_increment 0 "1 = show elapsed time on the timer" - seta sbar_timer_scale 1 "scale multiplier of the timer" - seta sbar_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted" + // hud variables + set _hud_configure 0 "1 = configure the HUD" + seta hud_configure_teamcolorforced 1 "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" + + // hud cvar descriptions + exec _hud_descriptions.cfg + // exec the default skin config. remember, NO menu_restart in the deafault cfg (dp segfaults at startup otherwise) + exec hud_default.cfg + + // 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" + seta hud_panel_weapons_accuracy_color0 "1 0 0" + seta hud_panel_weapons_accuracy_color1 "1 1 0" + seta hud_panel_weapons_accuracy_color2 "0 1 0" + seta hud_panel_weapons_accuracy_color_levels "0 20 100" "accuracy values at which a specified color (hud_panel_weapons_accuracy_color) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order" + seta 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_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_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_engineinfo_framecounter_time 1 "time between framerate display updates, smaller values yield less accuracy" + 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" + + // scoreboard + seta scoreboard_columns default + seta scoreboard_border_thickness 1 "scoreboard border thickness" + seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness" + seta scoreboard_accuracy_doublerows 0 "use two rows instead of one" + seta scoreboard_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard" + seta scoreboard_color_bg_r 0 "red color component of the HUD background" + seta scoreboard_color_bg_g 0.25 "green color component of the HUD background" + seta scoreboard_color_bg_b 0.17 "blue color component of the HUD background" + seta scoreboard_color_bg_team 0.5 "team color multiplier of the HUD background" + seta scoreboard_alpha_bg 0.6 "scoreboard background alpha" + seta scoreboard_alpha_fg 1 "scoreboard foreground alpha" + seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self" + seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self" + seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)" + seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)" + seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard" + seta scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on hud_scoreboard_highlight 1)" + seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value" // for menu server list (eventually make them have engine support?) seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join" @@@ -1372,15 -1414,27 +1419,27 @@@ alias reducematchtime "sv_cmd rpn /time alias endmatch "timelimit -1" // useful keybind to maximize the chat area temporarily + // HUD code takes care of many of these now... + //set _backup_con_chatvars_set 0 + //alias _restore_con_chatvars_0 "" + //alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites" + //alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set" + //alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites" + //alias _backup_con_chatvars_1 "" + //alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set" + //alias +con_chat_maximize "_backup_con_chatvars; con_chatpos -9; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0" + //alias -con_chat_maximize "_restore_con_chatvars" + + set _con_chat_maximized 0 set _backup_con_chatvars_set 0 alias _restore_con_chatvars_0 "" - alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites" + alias _restore_con_chatvars_1 "set _backup_con_chatvars_set 0; con_notify $_backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard; scr_centertime $_backup_scr_centertime;r_track_sprites $_backup_r_track_sprites" alias _restore_con_chatvars "_restore_con_chatvars_$_backup_con_chatvars_set" - alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites" + alias _backup_con_chatvars_0 "set _backup_con_chatvars_set 1; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; set _backup_scr_centertime $scr_centertime;set _backup_r_track_sprites $r_track_sprites" alias _backup_con_chatvars_1 "" alias _backup_con_chatvars "_backup_con_chatvars_$_backup_con_chatvars_set" - alias +con_chat_maximize "_backup_con_chatvars; con_chatpos -9; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0" - alias -con_chat_maximize "_restore_con_chatvars" + alias +con_chat_maximize "_con_chat_maximized 1; _backup_con_chatvars; con_notify 0; con_chattime 3600; cl_deathscoreboard 0; scr_centertime 0; r_track_sprites 0" + alias -con_chat_maximize "_con_chat_maximized 0; _restore_con_chatvars" // tab completion set con_completion_playdemo *.dem @@@ -1432,11 -1486,22 +1491,22 @@@ alias sethostname "set menu_use_default set sv_foginterval 0 // Audio track names (for old-style "cd loop NUMBER" usage) - set g_cdtracks_remaplist "digital-pursuit breakdown-easy brainsukker chaos-fog infight neuronal-diving subcities thru-the-mirror calling-bogus beast-of-insanity thunder brokenlight brokenlight stairs sixtyfour_ desert3 ninesix sixtyfour_revisited northern-lights" "list used by mapinfo system to automatically assign cdtracks - must match the cd remap command" - set g_cdtracks_dontusebydefault "digital-pursuit thunder brokenlight" "list used by mapinfo system to automatically assign cdtracks - must be a subset of g_cdtracks_remaplist" + set _cdtrack_first "1" + alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\"" + alias _cdtrack_1 "g_cdtracks_remaplist \"$1\"; set _cdtrack_first 0" + alias _cdtrack "_cdtrack_$_cdtrack_first $2" + set g_cdtracks_remaplist "" + exec cdtracks.cfg + unset _cdtrack_first + unalias _cdtrack_0 + unalias _cdtrack_1 + unalias _cdtrack + cd remap $g_cdtracks_remaplist set sv_intermission_cdtrack "" - set menu_cdtrack brokenlight + + set g_cdtracks_dontusebydefault "" + set menu_cdtrack "ninesix" // maxidle (in seconds): kick players idle for more than that amount of time set sv_maxidle 0 @@@ -1446,17 -1511,14 +1516,14 @@@ set sv_maxidle_spectatorsareidle // CTF capture limit placeholder cvar set capturelimit 0 - // sbar: font size - seta sbar_fontsize 11 - seta sbar_fontsize_spec 16 + // hud: font size + seta hud_fontsize 11 + seta hud_fontsize_spec 16 seta scr_centersize 11 - seta sbar_width 560 - // alias sbar_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; sbar_columns_set" + seta hud_width 560 + // alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; scoreboard_columns_set" alias sbar_font "set _requested_sbar_font \"${*}\"" - seta sbar_columns default sbar_font gfx/vera-sans 8 12 16 24 32 - seta sbar_showbinds 1 "display actions / bound keys in the strings shown during the game. 0 displays only actions, 1 displays only bound keys, 2 displays both" - seta sbar_showbinds_limit 2 "maximum number of bound keys to show for an action. 0 for unlimited" // these entities are not referenced by anything directly, they just represent // teams and are found by find() when needed @@@ -1468,15 -1530,14 +1535,14 @@@ set g_jump_grunt 0 "Do you make a grunt alias allready "sv_cmd allready" - // note: these cvars use weapon NUMBERS. Use the menu to edit this cvar, or look the numbers up in qcsrc/common/constants.qh. - seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher fireball hlac hagar crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list" - seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list" - seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun. Default value: explosives" - seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser" "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun. Default value: energy" - seta cl_weaponpriority2 "minstanex nex campingrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact" - seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all" - seta cl_weaponpriority4 "grenadelauncher hlac hagar crylink shotgun" "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun. Default value: spam weapons" - seta cl_weaponpriority5 "laser hook porto" "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun. Default value: weapons for moving" + seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher fireball hlac hagar seeker crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list" + seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (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" + seta cl_weaponpriority2 "minstanex nex campingrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact" + seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all" + seta cl_weaponpriority4 "grenadelauncher hlac hagar crylink seeker shotgun" "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun. Default value: spam weapons" + seta cl_weaponpriority5 "laser hook porto" "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun. Default value: weapons for moving" seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun" seta cl_weaponpriority7 "" "use impulse 207 for prev gun from this list, 217 for best gun, 227 for next gun" seta cl_weaponpriority8 "" "use impulse 208 for prev gun from this list, 218 for best gun, 228 for next gun" @@@ -1485,17 -1546,6 +1551,6 @@@ seta cl_weaponimpulsemode 0 "0: only cy seta sv_status_privacy 1 "hide IP addresses from \"status\" replies shown to clients" - - seta cl_teamradar 1 "show radar in teammatches when available" - seta cl_teamradar_background_alpha 0 "set to -1 to disable" - seta cl_teamradar_foreground_alpha 0.8 "alpha of the map" - seta cl_teamradar_scale 4096 "distance you can see on the team radar" - seta cl_teamradar_rotation 0 "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north" - seta cl_teamradar_size "128 128" "size of the team radar in pixels" - seta cl_teamradar_position "1 0" "1 0 would be upper right corner, 0.5 0.5 the center, append a 2 at the end to disable the corner hack, and a 1 to disable half the hack" - seta cl_teamradar_zoommode 0 "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out" - alias cl_teamradar_rotate "toggle cl_teamradar_rotation 0 1 2 3 4" - set g_maplist_allow_hidden 0 "allow hidden maps to be, e.g., voted for and in the maplist" set g_maplist_allow_frustrating 0 "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)" @@@ -1504,8 -1554,8 +1559,8 @@@ seta g_start_delay 0 "delay before the alias ons_map "cl_cmd radar" // legacy alias alias radar "cl_cmd radar" - alias sbar_columns_set "cl_cmd sbar_columns_set $*" - alias sbar_columns_help "cl_cmd sbar_columns_help $*" + alias scoreboard_columns_set "cl_cmd scoreboard_columns_set $*" + alias scoreboard_columns_help "cl_cmd scoreboard_columns_help $*" alias _gl_flashblend_update_00 "gl_flashblend 1" alias _gl_flashblend_update_10 "gl_flashblend 0" @@@ -1522,6 -1572,8 +1577,8 @@@ exec turrets.cf // must be at the bottom of this file: // alias for switching the teamselect menu alias menu_showteamselect "menu_cmd directmenu TeamSelect" + alias menu_showhudexit "menu_cmd directmenu HUDExit" + alias menu_showhudoptions "menu_cmd directpanelhudmenu $*" alias menu_sync "menu_cmd sync" bind f5 menu_showteamselect @@@ -1565,6 -1617,8 +1622,8 @@@ alias rankings "cmd rankings set g_ballistics_materialconstant 1414213562 set g_ballistics_mindistance 16 + set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls + set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls // unit: qJ / qu^3 (energy needed per volume unit of solid to push/burn away // parameter: bullet constant: mass / area in g/qu^2 // = mass / (pi/4 * caliber^2) @@@ -1608,8 -1662,10 +1667,10 @@@ set camera_look_attenuation 8 "Attenua set camera_forward_follows 1 "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking" // "Gentle mode": show no blood - seta sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages" - seta cl_gentle 0 "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs" + seta sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages" + seta cl_gentle 0 "client side gentle mode, master switch for removing both gibs and messages" + seta cl_gentle_gibs 0 "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs" + seta cl_gentle_messages 0 "client side gentle mode (only replaces frag messages/centerprints)" seta cl_racetimer_position 0.25 "Y-axis positioning of the race timer (from 0 to 1)" seta cl_showpressedkeys 0 "Show which movement keys someone is pressing: 1 for spectating, 2 for always" @@@ -1687,6 -1743,7 +1748,7 @@@ alias cl_hook_gamestart_r alias cl_hook_gamestart_nexball alias cl_hook_gamestart_cts alias cl_hook_gameend + alias cl_hook_activeweapon alias _sv_hook_gamestart "set _sv_hook_gametype $1; _sv_hook_gamestart_stage2" alias _sv_hook_gamestart_stage2 "sv_hook_gamestart_all; sv_hook_gamestart_${_sv_hook_gametype}" @@@ -1742,7 -1799,7 +1804,7 @@@ seta cl_noantilag 0 "turn this on if yo set sv_pitch_min -35 "minimum aiming angle for shooting direction display of the gun" set sv_pitch_max 35 "maximum aiming angle for shooting direction display of the gun" - set sv_pitch_fixyaw 1 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0" + set sv_pitch_fixyaw 0 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0" set rescan_pending 0 "set to 1 to schedule a fs_rescan at the end of this match" @@@ -1783,9 -1840,6 +1845,6 @@@ collision_endposnudge set cl_lerpanim_maxdelta_framegroups 0.05 // must be faster than fastest weapon refire set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server controlled anim (e.g. animinfo stuff) - // FIXME temporary - set menu_font_size_snapping_fix 1 - // player ID seta _cl_userid "" "player ID (e.g. for tournaments)" @@@ -1802,3 -1856,58 +1861,58 @@@ mod_q1bsp_polygoncollisions // improve some minor details sv_gameplayfix_gravityunaffectedbyticrate 1 sv_gameplayfix_nogravityonground 1 + + // autodemo deleting + seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos" + + // freeze camera + set cl_lockview 0 "when 1, the camera does not move any more" + + // we now use mastervolume + volume 1 + + // sucks less than the old one + cl_decals_newsystem 1 + + // NOTE: this only replaces weapons on the map + // use g_start_weapon_* to also replace the on-startup weapons! + // example: g_weaponreplace_nex "nex minstanex", then Nexes become MinstaNexes 50% of the times + // set the cvars to "0" to totally disable a weapon + set g_weaponreplace_laser "" + set g_weaponreplace_shotgun "" + set g_weaponreplace_uzi "" + set g_weaponreplace_grenadelauncher "" + set g_weaponreplace_electro "" + set g_weaponreplace_crylink "" + set g_weaponreplace_nex "" + set g_weaponreplace_hagar "" + set g_weaponreplace_rocketlauncher "" + set g_weaponreplace_porto "" + set g_weaponreplace_minstanex "" + set g_weaponreplace_hook "" + set g_weaponreplace_hlac "" + set g_weaponreplace_campingrifle "" + set g_weaponreplace_tuba "" + set g_weaponreplace_fireball "" + set g_weaponreplace_seeker "" + set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping uzi and shotgun (for Q3A map compatibility in mapinfo files)" + + set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)" + + set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)" + + scr_conalpha 1 + scr_conalpha2factor 0.3 + scr_conalpha3factor 1 + scr_conalphafactor 0.8 + scr_conbrightness 0.35 + scr_conforcewhiledisconnected 1 + scr_conscroll2_x 0.11 + scr_conscroll2_y 0.2 + scr_conscroll3_x 0 + scr_conscroll3_y 0 + scr_conscroll_x -0.1 + scr_conscroll_y -0.3 + + // DP cannot properly detect this, so rather turn off the detection + r_texture_dds_load_dxt1_noalpha 1 diff --combined qcsrc/server/cl_physics.qc index 11d0cbf253,70e702505c..83b2abd4f7 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@@ -13,12 -13,16 +13,16 @@@ float sv_airaccel_qw float sv_airstopaccelerate; float sv_airstrafeaccelerate; float sv_maxairstrafespeed; + float sv_airstrafeaccel_qw; float sv_aircontrol; + float sv_aircontrol_power; + float sv_aircontrol_penalty; float sv_warsowbunny_airforwardaccel; float sv_warsowbunny_accel; float sv_warsowbunny_topspeed; float sv_warsowbunny_turnaccel; float sv_warsowbunny_backtosideratio; + float sv_airspeedlimit_nonqw; .float ladder_time; .entity ladder_entity; @@@ -29,10 -33,6 +33,10 @@@ .float wasFlying; .float spectatorspeed; +.float multijump_count; +.float multijump_delay; +.float multijump_ready; + /* ============= PlayerJump @@@ -43,6 -43,15 +47,15 @@@ When you press the jump ke void PlayerJump (void) { float mjumpheight; + float doublejump; + + doublejump = FALSE; + if (sv_doublejump) + { + tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self); + if (trace_fraction < 1 && trace_plane_normal_z > 0.7) + doublejump = TRUE; + } mjumpheight = cvar("sv_jumpvelocity"); if (self.waterlevel >= WATERLEVEL_SWIMMING) @@@ -57,28 -66,9 +70,33 @@@ return; } - if (!doublejump) - if (!(self.flags & FL_ONGROUND)) - return; + if (cvar("g_multijump")) + { + if ((self.flags & FL_JUMPRELEASED) && !(self.flags & FL_ONGROUND)) + self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again + else if (self.flags & FL_ONGROUND) + { + if (cvar("g_multijump") > 0) + self.multijump_count = 0; + else + self.multijump_count = -2; // the cvar value for infinite jumps is -1, so this needs to be smaller + self.multijump_ready = FALSE; + } + } + + if(self.multijump_ready && time > self.multijump_delay && self.multijump_count < cvar("g_multijump") && self.velocity_z > cvar("g_multijump_speed")) + { + if (cvar("g_multijump") > 0) ++ { ++ if (cvar("g_multijump_add") == 0) // in this case we make the z velocity == jumpvelocity ++ self.velocity_z = 0; + self.multijump_count += 1; ++ } + self.multijump_ready = FALSE; // require releasing and pressing the jump button again for the next jump + } - else if (!(self.flags & FL_ONGROUND)) - return; ++ else if (!doublejump) ++ if (!(self.flags & FL_ONGROUND)) ++ return; if(!sv_pogostick) if (!(self.flags & FL_JUMPRELEASED)) @@@ -107,15 -97,34 +125,34 @@@ mjumpheight = mjumpheight * cvar("g_minstagib_speed_jumpheight"); } + // sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline + // velocity bounds. Final velocity is bound between (jumpheight * + // min + jumpheight) and (jumpheight * max + jumpheight); + if(cvar_string("sv_jumpspeedcap_min") != "") - self.velocity_z = max(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_min"), self.velocity_z); - if(cvar_string("sv_jumpspeedcap_max") != "") { - if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")) { - // don't do jump speedcaps on ramps to preserve old xonotic ramjump style - //print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling speed cap!\n"); + { + float minjumpspeed; + + minjumpspeed = mjumpheight * cvar("sv_jumpspeedcap_min"); + + if (self.velocity_z < minjumpspeed) + mjumpheight += minjumpspeed - self.velocity_z; + } + + if(cvar_string("sv_jumpspeedcap_max") != "") + { + // don't do jump speedcaps on ramps to preserve old xonotic ramjump style + tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self); + + if(!(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps"))) + { + float maxjumpspeed; + + maxjumpspeed = mjumpheight * cvar("sv_jumpspeedcap_max"); + + if (self.velocity_z > maxjumpspeed) + mjumpheight -= self.velocity_z - maxjumpspeed; } - else - self.velocity_z = min(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_max"), self.velocity_z) + trace_ent.velocity_z; } if(!(self.lastflags & FL_ONGROUND)) @@@ -138,9 -147,6 +175,9 @@@ self.flags &~= FL_ONGROUND; self.flags &~= FL_JUMPRELEASED; + if (cvar("g_multijump")) + self.multijump_delay = time + cvar("g_multijump_delay"); + if (self.crouch) setanim(self, self.anim_duckjump, FALSE, TRUE, TRUE); else @@@ -412,7 -418,7 +449,7 @@@ float IsMoveInDirection(vector mv, floa { if(mv_x == 0 && mv_y == 0) return 0; // avoid division by zero - angle = RAD2DEG * atan2(mv_y, mv_x); + angle -= RAD2DEG * atan2(mv_y, mv_x); angle = remainder(angle, 360) / 45; if(angle > 1) return 0; @@@ -421,6 -427,25 +458,25 @@@ return 1 - fabs(angle); } + float GeomLerp(float a, float lerp, float b) + { + if(a == 0) + { + if(lerp < 1) + return 0; + else + return b; + } + if(b == 0) + { + if(lerp > 0) + return 0; + else + return a; + } + return a * pow(fabs(b / a), lerp); + } + void CPM_PM_Aircontrol(vector wishdir, float wishspeed) { float zspeed, xyspeed, dot, k; @@@ -443,10 -468,12 +499,12 @@@ xyspeed = vlen(self.velocity); self.velocity = normalize(self.velocity); dot = self.velocity * wishdir; - k *= sv_aircontrol*dot*dot*frametime; if(dot > 0) // we can't change direction while slowing down { + k *= pow(dot, sv_aircontrol_power)*frametime; + xyspeed = max(0, xyspeed - sv_aircontrol_penalty * sqrt(max(0, 1 - dot*dot)) * k/32); + k *= sv_aircontrol; self.velocity = normalize(self.velocity * xyspeed + wishdir * k); } @@@ -454,12 -481,17 +512,17 @@@ self.velocity_z = zspeed; } + float AdjustAirAccelQW(float accelqw, float factor) + { + return copysign(bound(0.000001, 1 - (1 - fabs(accelqw)) * factor, 1), accelqw); + } + // example config for alternate speed clamping: // sv_airaccel_qw 0.8 // sv_airaccel_sideways_friction 0 // prvm_globalset server speedclamp_mode 1 // (or 2) - void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float accel, float accelqw, float sidefric) + void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float accel, float accelqw, float sidefric, float speedlimit) { float vel_straight; float vel_z; @@@ -486,6 -518,8 +549,8 @@@ step = accel * frametime * wishspeed0; vel_xy_current = vlen(vel_xy); + if(speedlimit) + accelqw = AdjustAirAccelQW(accelqw, (speedlimit - bound(wishspeed, vel_xy_current, speedlimit)) / max(1, speedlimit - wishspeed)); vel_xy_forward = vel_xy_current + bound(0, wishspeed - vel_xy_current, step) * accelqw + step * (1 - accelqw); vel_xy_backward = vel_xy_current - bound(0, wishspeed + vel_xy_current, step) * accelqw - step * (1 - accelqw); if(vel_xy_backward < 0) @@@ -610,7 -644,6 +675,6 @@@ void race_send_speedaward_alltimebest(f string GetMapname(void); float speedaward_lastupdate; float speedaward_lastsent; - .float jumppadusetime; void SV_PlayerPhysics() { local vector wishvel, wishdir, v; @@@ -620,6 -653,14 +684,14 @@@ float not_allowed_to_move; string c; + // fix physics stats for g_movement_highspeed + self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, autocvar_g_movement_highspeed); + if(sv_airstrafeaccel_qw) + self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, autocvar_g_movement_highspeed); + else + self.stat_sv_airstrafeaccel_qw = 0; + self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * autocvar_g_movement_highspeed; + if(self.PlayerPhysplug) if(self.PlayerPhysplug()) return; @@@ -856,14 -897,6 +928,6 @@@ if(self.classname == "player") { - if(sv_doublejump && time - self.jumppadusetime > 2 * sys_frametime) - { - tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self); - self.flags &~= FL_ONGROUND; - if(trace_fraction < 1 && trace_plane_normal_z > 0.7) - self.flags |= FL_ONGROUND; - } - if (self.BUTTON_JUMP) PlayerJump (); else @@@ -902,7 -935,7 +966,7 @@@ if (wishspeed > sv_maxspeed*maxspd_mod) wishspeed = sv_maxspeed*maxspd_mod; if (time >= self.teleport_time) - PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); + PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0, 0); } else if (self.waterlevel >= WATERLEVEL_SWIMMING) { @@@ -925,7 -958,7 +989,7 @@@ self.velocity = self.velocity * (1 - frametime * sv_friction); // water acceleration - PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); + PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0, 0); } else if (time < self.ladder_time) { @@@ -968,7 -1001,7 +1032,7 @@@ if (time >= self.teleport_time) { // water acceleration - PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); + PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0, 0); } } else if ((self.items & IT_JETPACK) && self.BUTTON_HOOK && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO)) @@@ -1128,7 -1161,7 +1192,7 @@@ if (self.crouch) wishspeed = wishspeed * 0.5; if (time >= self.teleport_time) - PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); + PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0, 0); } else { @@@ -1164,39 -1197,42 +1228,42 @@@ float accelerating; float wishspeed2; float airaccelqw; + float strafity; - airaccelqw = sv_airaccel_qw; + airaccelqw = self.stat_sv_airaccel_qw; accelerating = (self.velocity * wishdir > 0); wishspeed2 = wishspeed; // CPM if(sv_airstopaccelerate) - if(self.velocity * wishdir < 0) - airaccel = sv_airstopaccelerate*maxspd_mod; - // this doesn't play well with analog input, but can't r - // fixed like the AirControl can. So, don't set the maxa - // cvars when you want to support analog input. - if(self.movement_x == 0 && self.movement_y != 0) { - if(sv_maxairstrafespeed) - { - wishspeed = min(wishspeed, sv_maxairstrafespeed*maxspd_mod); - if(sv_maxairstrafespeed < sv_maxairspeed) - airaccelqw = 1; - } - if(sv_airstrafeaccelerate) - { - airaccel = sv_airstrafeaccelerate*maxspd_mod; - if(sv_airstrafeaccelerate > sv_airaccelerate) - airaccelqw = 1; - } + vector curdir; + curdir = self.velocity; + curdir_z = 0; + curdir = normalize(curdir); + airaccel = airaccel + (sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir)); } + // note that for straight forward jumping: + // step = accel * frametime * wishspeed0; + // accel = bound(0, wishspeed - vel_xy_current, step) * accelqw + step * (1 - accelqw); + // --> + // dv/dt = accel * maxspeed (when slow) + // dv/dt = accel * maxspeed * (1 - accelqw) (when fast) + // log dv/dt = logaccel + logmaxspeed (when slow) + // log dv/dt = logaccel + logmaxspeed + log(1 - accelqw) (when fast) + strafity = IsMoveInDirection(self.movement, -90) + IsMoveInDirection(self.movement, +90); // if one is nonzero, other is always zero + if(sv_maxairstrafespeed) + wishspeed = min(wishspeed, GeomLerp(sv_maxairspeed*maxspd_mod, strafity, sv_maxairstrafespeed*maxspd_mod)); + if(sv_airstrafeaccelerate) + airaccel = GeomLerp(airaccel, strafity, sv_airstrafeaccelerate*maxspd_mod); + if(self.stat_sv_airstrafeaccel_qw) + airaccelqw = copysign(1-GeomLerp(1-fabs(self.stat_sv_airaccel_qw), strafity, 1-fabs(self.stat_sv_airstrafeaccel_qw)), ((strafity > 0.5) ? self.stat_sv_airstrafeaccel_qw : self.stat_sv_airaccel_qw)); // !CPM if(sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement_x != 0) PM_AirAccelerate(wishdir, wishspeed); else - PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, sv_airaccel_sideways_friction / maxairspd); + PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw); if(sv_aircontrol) CPM_PM_Aircontrol(wishdir, wishspeed2);