done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
- exit 1
+# NOTE: The generated docs are incomplete - they don't contain code behind SVQC CSQC MENUQC GAMEQC ifdefs.
+# With them added to PREDEFINED, it would take over half an hour to generate the docs and even then
+# they might not be complete. Doxygen doesn't handle #elif and might not understand some QC definitions.
doxygen: # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
stage: deploy
script:
seta hud_panel_weapons_accuracy "" "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
seta hud_panel_weapons_ammo "" "show ammo as a status bar"
seta hud_panel_weapons_onlyowned "" "show only owned weapons, set it to 2 to show only the held weapon"
+seta hud_panel_weapons_orderbyimpulse "" "List weapons in their impulse order instead of priority"
seta hud_panel_weapons_noncurrent_alpha "" "alpha of noncurrent weapons"
seta hud_panel_weapons_noncurrent_scale "" "scale of noncurrent weapons, relative to the current weapon"
seta hud_panel_weapons_selection_radius "" "number of weapons that get partially highlighted on each side of the currently selected weapon"
// other aliases for server commands
alias endmatch "timelimit -1"
+alias bots "minplayers 4; minplayers_per_team 2"
+alias nobots "minplayers 0; minplayers_per_team 0"
alias savedb "sv_cmd database save \"${1 ?}\""
alias dumpdb "sv_cmd database dump \"${1 ?}\""
// =================================
set sv_vote_call 1 "Allow users to call a vote for the commands in sv_vote_commands"
set sv_vote_change 1 "Allow voters to change their mind after already voting"
-set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams" "these commands can be voted"
+set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams bots nobots" "these commands can be voted by players or used directly by masters (vdo) in addition to sv_vote_master_commands"
set sv_vote_only_commands ""
set sv_vote_limit 160 "Maximum allowed length of a vote command"
-set sv_vote_master_commands "movetored movetoblue movetoyellow movetopink movetospec " "Extra commands which vote masters can execute by themselves, along with the normal sv_vote_commands." // maybe add kickban here (but then sv_vote_master 0)
+set sv_vote_master_commands "movetored movetoblue movetoyellow movetopink movetospec" "Extra commands which vote masters can execute by themselves, along with the normal sv_vote_commands." // maybe add kickban here (but then sv_vote_master 0)
set sv_vote_master 0 "Allows the use of the vote master system"
set sv_vote_master_callable 0 "When set, users can use \"vmaster\" to call a vote to become master of voting commands"
-set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
+set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master, then run master commands directly using vdo"
set sv_vote_master_playerlimit 2 "Minimum number of players needed for a player to be allowed to vote for master"
set sv_vote_no_stops_vote 1 "Allow the vote caller to stop his own vote simply by voting no"
set sv_vote_singlecount 0 "set to 1 to count votes once after timeout or to 0 to count with every vote"
// rcon server commands
// ======================
rcon_secure 1
-set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoauto movetored movetoblue movetoyellow movetopink movetospec"
+set rcon_restricted_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams bots nobots movetored movetoblue movetoyellow movetopink movetospec kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\""
set g_trueaim_minrange 44 "TrueAim minimum range (TrueAim adjusts shots so they hit the crosshair point even though the gun is not at the screen center)"
seta crosshair_hittest 1 "do a crosshair hit evaluation, applying effects from the _blur, _scale, and _showipact cvars"
seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
-seta crosshair_hittest_scale 1.25 "enlarge crosshair if aiming at an enemy, shrink crosshair if shot is obstructed or aiming at a teammate"
+seta crosshair_hittest_scale 1.25 "shrink crosshair if shot is obstructed or aiming at a teammate"
seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
// change color based on special case
alias sv_vote_gametype_hook_tdm
alias sv_vote_gametype_hook_duel
-// Example preset to allow 1v1ctf to be used for the gametype voting screen
+// Example preset to allow 1v1ctf to be used for the gametype voting screen.
+// Aliases can have max 31 chars so the gametype can have max 9 chars.
// sv_vote_gametype_*_type Must be set to the name of the gametype the option is based on
// sv_vote_gametype_*_name Contains a human-readable name of the gametype
// sv_vote_gametype_*_description Contains a longer description
//set sv_vote_gametype_1v1ctf_type ctf
//set sv_vote_gametype_1v1ctf_name "Capture the Flag Duel"
//set sv_vote_gametype_1v1ctf_description "One vs One match in CTF"
-//alias sv_vote_gametype_hook_all "set g_maxplayers 0"
-//alias sv_vote_gametype_hook_1v1ctf "set g_maxplayers 2"
+//alias sv_vote_gametype_hook_all "g_maxplayers 0"
+//alias sv_vote_gametype_hook_1v1ctf "g_maxplayers 2"
// ===========
set g_ctf_flag_return 1 "auto return the flag to base when touched by a teammate"
set g_ctf_flag_return_carrying 0 "(manual return mode) auto return the flag to base if touched by a flag carrier"
set g_ctf_flag_return_carried_radius 100 "allow flags to be returned by carrier if base is within this radius"
-set g_ctf_flag_return_time 15 "automatically return the flag to base after this amount of time"
+set g_ctf_flag_return_time 30 "automatically return the flag to base after this amount of time"
set g_ctf_flag_return_dropped 100 "automatically return the flag to base if dropped within this distance from base (in qu)"
set g_ctf_flag_return_damage 0 "allow the flag to be damaged, reducing time needed to automatically return to base"
set g_ctf_flag_return_damage_delay 0 "how much time the flag takes to automatically return to base if it falls into lava/slime/trigger hurt"
set g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
set g_freezetag_revive_nade 1 "Enable reviving from own nade explosion"
set g_freezetag_revive_nade_health 40 "Amount of health player has if they revived from their own nade explosion"
-set g_freezetag_round_timelimit 180 "round time limit in seconds"
+set g_freezetag_round_timelimit 360 "round time limit in seconds"
set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds"
set g_freezetag_teams_override 0
set g_freezetag_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
// keepaway
// ==========
set g_keepaway 0 "game mode which focuses around a ball"
-set g_keepaway_score_bckill 1 "enable scoring points (y/n) for ball carrier kills (value is how many points to award)"
-set g_keepaway_score_killac 1 "amount of points to give when you kill someone while you have the ball"
+set g_keepaway_score_bckill 1 "points for killing the ball barrier (Ball Carrier Kill)"
+set g_keepaway_score_killac 1 "points for kills while holding the ball (Kill As Carrier)"
set g_keepaway_score_timeinterval 1 "amount of time it takes between intervals for timepoints to be added to the score"
set g_keepaway_score_timepoints 0 "points to add to score per timeinterval, 0 for no points"
set g_keepaway_ballcarrier_effects 8 "Add together the numbers you want: EF_ADDITIVE (32) / EF_NODEPTHTEST (8192) / EF_DIMLIGHT (8)"
set help_msg_0 "Big Admin is watching you, so please be friendly or feel their almighty ban-hammer!"
-set help_msg_1 "If you want to learn more about Xonotic, read ^1'Halogene's Newbie Corner' (https://xonotic.org/guide) ${help_cfg_prefix}as it contains lots of useful tips and tricks, explains all the weapons and helps to improve your gameplay."
+set help_msg_1 "If you want to become better at Xonotic, read ^1'Halogene's Newbie Corner' (https://xonotic.org/guide) ${help_cfg_prefix}as it explains movement and all the weapons in detail."
set help_msg_2 "Please watch out for balanced teams and change by pressing F5 (teammenu) or F6 (auto join 'best' team)."
-set help_msg_3 "When trying to bunny-hop you can ^1hold the jump button ${help_cfg_prefix}while you are still in the air, this will make those jumps VERY easy to time and work more reliable."
+set help_msg_3 "When trying to bunny-hop you can simply ^1keep holding the jump button${help_cfg_prefix}. Pressing and releasing it for every jump works but often makes players lose some speed. Holding it also works on stairs."
set help_msg_4 "When a vote is called you can accept it via F1 or reject it via F2 (default keys)."
-set help_msg_5 "Spectating other (good) players helps to learn new tricks. To spectate press F3 and then Mouse1 to switch between the players you want to spectate. F5, F6 or jump will get you back into the game (default keys)."
-set help_msg_6 "Being a beginner is great! You can learn so many new tricks and improve quickly. Watch others, ask for advice and use your common sense effectively."
+set help_msg_5 "Spectating other (good) players helps to learn new tricks. To spectate press F3 and then Mouse1 to switch between the players you want to spectate."
+set help_msg_6 "Notice what other players do differently. Often winning or losing comes down to more than accuracy and evading the other player's shots. Movement, map knowledge and items are equally important."
set help_msg_7 "If others are better than you, it does not mean they cheat. Save such complaints for when you have more experience and know what kind of funky stuff is possible."
-set help_msg_8 "In CTF, it's good to move around and get involved in the action. You get fragged quite a bit but you are also most helpful to your team."
-set help_msg_9 "Use the radar to see where your teammates are. Pressing zoom will expand the radar image to give you a better overview."
-set help_msg_10 "Most teammessages display waypoints by default. Use those to guide your teammates. You can also see them and the flagcarrier in the radar."
-set help_msg_11 "Protect your flagcarrier at all cost! Also save health and armor for him, he might need them more than you!"
-set help_msg_12 "You can use the Blaster and most explosive weapons to jump around. Just look 'at your feet' and press fire. If you also jump at the same time, you get even higher."
+set help_msg_8 "Listen and remember that the enemy is listening too. Footsteps and item pickups make sounds that can give away your position."
+set help_msg_9 "Use the radar to see where your teammates are. Try to time returning your flag with your FC (flag carrier) arriving at your base so enemies can't steal it again before the FC caps."
+set help_msg_10 "Xonotic provides a wide array of gamemodes, each rewarding their own unique skills that will help you become the best player you can be. Variety is key, try them all!"
+set help_msg_11 "Protect your FC (flag carrier) at all costs! Save health and armor for them, they need it more than you!"
+set help_msg_12 "Use the Blaster to make very high jumps. Just look 'at your feet' and press fire. Other explosive weapons work too but do a lot more damage."
set help_msg_13 "Be friendly and helpful to other players! Being angry at others' mistakes is understandable, but nobody is perfect. Try to use calm words when telling them how to correct their mistake."
-set help_msg_14 "You can use the zoom key with all guns, only the Vortex has it as a extra function on Mouse2 (default key)."
-set help_msg_15 "Notice what is happening around you! If your base is empty in CTF, then STAY and defend the flag! Make sure someone defends the flagcarrier or assist him yourself."
+set help_msg_14 "You can use the zoom key with all guns, only the Vortex has it as an extra function on secondary fire."
+set help_msg_15 "Notice what is happening around you! If your base is empty in CTF, then STAY and defend the flag!"
set help_msg_16 "You can drop the weapon you currently have with Backspace (default key). You can help your unarmed teammates this way."
-set help_msg_17 "Learn to use the team messages! You find them in the Setting/Input menu. Try changing them to keys you can press easier than the defaults."
+set help_msg_17 "When you see the enemy FC, use your 'flag seen' bind to point teammates at them. You can even use the bind after death."
set help_msg_18 "Gaming should be fun! Try to have a nice time, be helpful, mindful and treat others like you want to be treated."
set help_msg_19 "Visit the official forum on ^1https://forums.xonotic.org/ ${help_cfg_prefix}and feel free to open a thread if you have questions."
set help_msg_20 "If you already have a good weapon, it's a great idea to let your teammates get something better than the Shotgun too!"
set help_msg_21 "Press T to chat with others, press Y for messages to your team only, press TAB to see the scores and U for the chat history (default keys)."
-set help_msg_22 "You can use ^1'suggestmap PART_OF_NAME' ${help_cfg_prefix}to make a map come up at the vote screen after a map was played."
+set help_msg_22 "You can use ^1'suggestmap PART_OF_NAME' ${help_cfg_prefix}to make a map come up at the vote screen after the match."
set help_msg_23 "The console is accessible through the ~ key or by pressing Shift+ESC. It has many more advanced features, use 'cmdlist' and 'cvarlist' to get a full list of available commands/settings."
-set help_msg_24 "The Blaster is a useful tool for gaining speed and jumping around, but it does little damage."
-set help_msg_25 "The Shotgun's primary firemode has spread and is more useful at a closer distance, use secondary for the melee attack and slap into other players faces!"
-set help_msg_26 "The Machine Gun secondary has a burst fire mode and less spread than the primary mode."
-set help_msg_27 "The Mortar is a good all around gun but takes some practice to aim it, because of the projectile's curve."
+set help_msg_24 "The Blaster is a movement tool more than a weapon. Use it to accelerate by blastering walls - bunny-hop along a wall and shoot it to make the explosion push you."
+set help_msg_25 "The Shotgun's primary is useful at a closer distance, use secondary for the melee attack which is surprisingly strong and has longer reach than you might expect."
+set help_msg_26 "The MachineGun's ^1secondary ${help_cfg_prefix}burst firemode has no spread, use it as a cheap Vortex substitute at long range."
+set help_msg_27 "The Mortar's secondary fire bounces before exploding - useful for hitting enemies around corners and behind obstacles"
set help_msg_28 "The Electro has a combo attack. Fire the primary mode at the balls from the secondary mode for a huge and powerful explosion."
-set help_msg_29 "The Crylink's primary fire bounces. Both firemodes pull your enemies, making it a great tool to stop a flag carrier."
-set help_msg_30 "The Vortex is a powerful sniper gun. Aim carefully!"
-set help_msg_31 "The Hagar is underestimated, but very powerful if you aim right. The secondary mode charges up to four rockets and causes devasting damage if you release them."
-set help_msg_32 "The Devastator is powerful but slow. Keep Mouse1 pressed to guide the rockets. Secondary firemode makes the rocket(s) explode."
-set help_msg_33 "The Arc is a strong lighting beam, which bends slighty if you move your mouse. The secondary firemode is very strong but short. Both firemodes also heal teammates if you shoot at them."
-set help_msg_34 "By default, explosions go through walls. Be careful when hiding behind walls!"
+set help_msg_29 "The Crylink's primary fire bounces. Both firemodes pull your enemies, making it a great tool for stopping enemy FCs (flag carriers)."
+set help_msg_30 "The Vortex is one of the most powerful weapons in Xonotic. It has barely any competition at long range and can serve as a great combo weapon at mid and short range. Put some effort into mastering it, it'll pay off."
+set help_msg_31 "The Hagar is a powerful weapon in enclosed spaces, to use it effectively aim at the enemy's feet."
+set help_msg_32 "Guide your Devastator rockets by holding primary fire and turning or moving. Secondary fire makes the rocket(s) explode."
+set help_msg_33 "The Arc is a strong lightning beam, which bends slighty if you move your mouse. The secondary firemode is very strong but short. Both firemodes also heal teammates if you shoot at them."
+set help_msg_34 "By default, explosions go through walls and floors. Be careful where you hide!"
set help_msg_35 "Get on IRC to chat with fellow players. Take a look at ^1https://xonotic.org/chat/${help_cfg_prefix}."
set help_msg_36 "Don't drink and frag."
set help_msg_37 "Don't shoot at players who are typing/chatting. You recognize those players by the keyboard symbols above their head."
set help_msg_39 "Players with the prefix '$bot_prefix${help_cfg_prefix}' in their nick are bots on this server. There is also a clan named [BOT]."
set help_msg_40 "You spawn with ^1two ${help_cfg_prefix}weapons. Use the Blaster for much faster movement."
set help_msg_41 "Visit the stats page at ^1https://stats.xonotic.org/ ${help_cfg_prefix}and check out how you are doing in the rankings!"
-set help_msg_42 "Start playing 1on1 if you want to learn fast"
+set help_msg_42 "Play with fewer players if you want to improve faster. Overcrowded DM has too much randomness so you get too little feedback if you're doing things right or wrong."
set help_msg_43 "Visit ^1https://xonotic.org/pickup/ ${help_cfg_prefix}to get in touch with the experienced players, ask them stuff and play with them!"
set help_msg_44 "Look for servers that have a good ping for you. You can't play this game well with a ping > 100. If there are no servers close enough to you, cooperate with your friends to setup one."
set help_msg_45 "If you want to play the next map you can cast a vote via 'vcall endmatch' in the console. Other players can vote using F1 and F2 (default keys)."
set help_msg_46 "Always watch your back. Do not just run away, fight back as you retreat. Otherwise, you could be shot in the back."
-set help_msg_47 "Try to get as much armor and health as you can, but remember your teammates need armor and health too."
-set help_msg_48 "Do not attack if you have neither a good weapon, nor health, nor armor."
-set help_msg_49 "Standing still makes you an easy target. You can move around the map faster by bunny hopping."
-set help_msg_50 "You can use the Blaster to climb up walls. Before trying this, become familiar with the basics of Blaster movement."
-set help_msg_51 "You can control your movement in air. Use it to prevent yourself from falling off the map when somebody starts pushing you around."
-set help_msg_52 "Use the Blaster, Mortar or Devastator in space maps to push other players off the map. They will enjoy it."
-set help_msg_53 "You can turn off automatic weapon changing in the Player menu. If you configure your key bindings, manually switching weapons can be faster and easier."
+set help_msg_47 "Get as much armor and health as you can, but remember your teammates need them too."
+set help_msg_48 "In some modes like TDM (Team Deathmatch), getting killed means the enemy gets a point. You should not only focus on getting frags but also on not dying."
+set help_msg_49 "Standing still makes you an easy target. You can move around the map faster by bunny-hopping."
+set help_msg_50 "You can use the Blaster to climb up walls. Have enough health, walk up to a wall and keep shooting downwards at a 45° angle while holding forward (to stay near the wall)."
+set help_msg_51 "You can control your movement in the air. Use it to prevent yourself from falling off the map when somebody starts pushing you around."
+set help_msg_52 "Use the Blaster, Vortex or Devastator on space maps to push other players off the map. They will enjoy it."
+set help_msg_53 "You can turn off automatic weapon changing in the Settings->Game->Weapons menu. If you configure your key bindings, manually switching weapons can be faster and easier."
set help_msg_54 "Choose the right weapon for the job, not just the one that the game automatically puts in your hand."
set help_msg_55 "Enter ^1'lsmaps' ${help_cfg_prefix}in the console to get a list of maps configured on the server."
-set help_msg_56 "While you are in the air, release the forward key, press one of the left/right keys and move your mouse in the same direction. This will bend your fly/jump path."
-set help_msg_57 "Hold the jump key to keep on jumping (called ^1'bunny-hopping'${help_cfg_prefix}) which will accelerate your speed."
+set help_msg_56 "While you are bunny-hopping, release forward, press left/right and move your mouse in the same direction to turn much faster than just with mouse and forward."
+set help_msg_57 "You can keep accelerating while in the air, that's why ^1'bunny-hopping'${help_cfg_prefix} can be several times faster than running."
set help_msg_58 "'xonotic.org/guide changed my life' -- ^x777S^x090Є^x088Є^x000Қ^x900⁻ʸ${help_cfg_prefix}, 2018"
-set help_msg_count 59 // update this when adding messages - it should be the number of messages (which means last message index + 1)
+set help_msg_59 "Always remember to mind your surroundings. You should pick up items ^1while ${help_cfg_prefix}fighting too."
+set help_msg_60 "The Crylink's primary fire's projectiles expand as long as you hold the button, then converge quickly. Time it right so they all hit the enemy."
+set help_msg_61 "The Crylink's secondary mode does little damage but provides strong pull, use it to accelerate together with bunny-hopping."
+set help_msg_62 "You can switch weapons faster than some weapons can shoot. Increase your DPS (damage per second) by switching after every shot. This is called comboing."
+set help_msg_63 "The most common weapons to combo are Mortar, Vortex and Devastator. Bind them close to your movement keys or change the weapon order to make comboing possible."
+set help_msg_64 "You can blaster-jump higher if you're moving fast. Combining it with a regular jump also gets you a bit more height."
+set help_msg_65 "Xonotic is an arena shooter (aFPS) which means it focuses on fast movement and item control (in addition to positioning and aim) more than tactical shooters (tFPSes) do."
+set help_msg_66 "Try to always move with a purpose, usually that is getting more health/armor or a new weapon."
+set help_msg_67 "Clan Arena gives you all weapons, full health/armor and has no selfdamage. It's the ideal mode to learn movement using weapons."
+set help_msg_68 "The Hagar's secondary mode charges up to four rockets, each does more damage than primary. Cancel the charge by pressing primary fire."
+set help_msg_69 "In addition to gamemodes, Xonotic offers multiple rulesets. The default is known as vanilla or simply Xonotic. Xonotic ProMode (XPM) focuses on more competitive play. Other popular rulesets are Instagib, Overkill and Xonotic DeFrag (XDF)."
+set help_msg_70 "You cannot hurt teammates in vanilla Xonotic (as opposed to XPM) but you can push them, so try to avoid hitting them unnecessarily."
+set help_msg_count 71 // update this when adding messages - it should be the number of messages (which means last message index + 1)
// Simple help message system
-// It prints messages with the configured name
+
+// First exec this file, then the correct help-*.cfg for your ruleset.
// You can start the help system with the command help_loop but this has been found to annoy players.
// A better way is to put `alias sv_hook_gamestart_all "defer 20 help_next"` into your server.cfg,
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "0.8"
seta hud_panel_weapons_noncurrent_scale "0.9"
seta hud_panel_weapons_selection_radius "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "0"
+seta hud_panel_weapons_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
sv_warsowbunny_topspeed 925
sv_warsowbunny_backtosideratio 0.8
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 0
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
sv_warsowbunny_topspeed 925
sv_warsowbunny_backtosideratio 0.8
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 1
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
sv_warsowbunny_topspeed 925
sv_warsowbunny_backtosideratio 0.8
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 1
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
sv_warsowbunny_topspeed 925
sv_warsowbunny_backtosideratio 0.8
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 0
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
sv_warsowbunny_topspeed 925
sv_warsowbunny_backtosideratio 0.8
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 0
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
sv_warsowbunny_topspeed 925
sv_warsowbunny_backtosideratio 0.8
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 0
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
sv_warsowbunny_topspeed 900
sv_warsowbunny_backtosideratio 0.9
sv_friction_on_land 0
+sv_friction_slick 0
sv_doublejump 0
sv_jumpspeedcap_min ""
sv_jumpspeedcap_max ""
float autocvar_hud_panel_weapons_selection_speed = 10;
float autocvar_hud_panel_weapons_timeout;
int autocvar_hud_panel_weapons_timeout_effect;
+bool autocvar_hud_panel_weapons_orderbyimpulse = true;
float autocvar_hud_panel_weapons_timeout_fadebgmin;
float autocvar_hud_panel_weapons_timeout_fadefgmin;
float autocvar_hud_panel_weapons_timeout_speed_in = 0.25;
tref = EFFECT_TR_BLOOD.m_id;
if(this.csqcmodel_modelflags & MF_ROTATE)
{
+ // This will be hard to replace with MAKE_VECTORS because it's called as part of the predraw function
+ // as documented in csprogs.h in the engine. The globals can then be read in many places in the engine.
+ // However MF_ROTATE is currently only used in one place - might be possible to get rid of it entirely.
this.renderflags |= RF_USEAXIS;
- MAKEVECTORS(makevectors, this.angles + '0 100 0' * fmod(time, 3.6), v_forward, v_right, v_up);
+ makevectors(this.angles + '0 100 0' * fmod(time, 3.6));
}
if(this.csqcmodel_modelflags & MF_TRACER)
tref = EFFECT_TR_WIZSPIKE.m_id;
float bgmtime;
-string weaponorder_byimpulse;
+string weaponorder_byimpulse; // NOTE: this is a misnomer, weapon order is not always sorted by impulse
string weaponorder_bypriority;
+bool weapons_orderbyimpulse; // update priority list when toggling this
float vortex_charge_movingavg;
HUD_Write_Cvar("hud_panel_weapons_timeout_speed_in");
HUD_Write_Cvar("hud_panel_weapons_timeout_speed_out");
HUD_Write_Cvar("hud_panel_weapons_onlyowned");
+ HUD_Write_Cvar("hud_panel_weapons_orderbyimpulse");
HUD_Write_Cvar("hud_panel_weapons_noncurrent_alpha");
HUD_Write_Cvar("hud_panel_weapons_noncurrent_scale");
HUD_Write_Cvar("hud_panel_weapons_selection_radius");
Weapon wep = wepent.switchweapon;
int i;
- bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_WEAPON_AMMO);
+ bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_AMMO);
row = column = 0;
if(autocvar_hud_panel_ammo_onlycurrent)
{
float when = max(1, autocvar_hud_panel_weapons_complainbubble_time);
float fadetime = max(0, autocvar_hud_panel_weapons_complainbubble_fadetime);
- bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_WEAPON_AMMO);
+ bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_AMMO);
vector weapon_pos, weapon_size = '0 0 0';
vector color;
HUD_Panel_LoadCvars();
// figure out weapon order (how the weapons are sorted) // TODO make this configurable
- if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
+ if(weaponorder_bypriority != autocvar_cl_weaponpriority || autocvar_hud_panel_weapons_orderbyimpulse != weapons_orderbyimpulse || !weaponorder[0])
{
int weapon_cnt;
+ weapons_orderbyimpulse = autocvar_hud_panel_weapons_orderbyimpulse;
strcpy(weaponorder_bypriority, autocvar_cl_weaponpriority);
- strcpy(weaponorder_byimpulse, W_FixWeaponOrder_BuildImpulseList(W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority))));
+ string weporder = W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority));
+ if(autocvar_hud_panel_weapons_orderbyimpulse)
+ weporder = W_FixWeaponOrder_BuildImpulseList(weporder);
+ strcpy(weaponorder_byimpulse, weporder);
weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
weapon_cnt = 0;
coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(coord3d));
- vector forward = '0 0 0', right = '0 0 0', up = '0 0 0';
- MAKEVECTORS(makevectors, pangles - '0 1 0' * teamradar_angle, forward, right, up);
+ vector forward, right, up;
+ MAKE_VECTORS(pangles - '0 1 0' * teamradar_angle, forward, right, up);
if(v_flipped)
{
forward.x = -forward.x;
vel = view.velocity;
else
{
- vector forward = '0 0 0', right = '0 0 0', up = '0 0 0';
- MAKEVECTORS(makevectors, view_angles, forward, right, up);
+ vector forward, right, up;
+ MAKE_VECTORS(view_angles, forward, right, up);
vel.x = view.velocity * forward;
vel.y = view.velocity * right * -1;
vel.z = view.velocity * up;
if (autocvar_cl_followmodel_velocity_absolute)
{
vector fixed_gunorg;
- vector forward = '0 0 0', right = '0 0 0', up = '0 0 0';
- MAKEVECTORS(makevectors, view_angles, forward, right, up);
+ vector forward, right, up;
+ MAKE_VECTORS(view_angles, forward, right, up);
fixed_gunorg.x = gunorg * forward;
fixed_gunorg.y = gunorg * right * -1;
fixed_gunorg.z = gunorg * up;
curspeed = 0;
else
{
- makevectors(view_angles);
+ vector forward, right, up;
+ MAKE_VECTORS(view_angles, forward, right, up);
v = pmove_vel;
if(csqcplayer)
v = csqcplayer.velocity;
switch(autocvar_cl_velocityzoom_type)
{
- case 3: curspeed = max(0, v_forward * v); break;
- case 2: curspeed = (v_forward * v); break;
+ case 3: curspeed = max(0, forward * v); break;
+ case 2: curspeed = (forward * v); break;
case 1: default: curspeed = vlen(v); break;
}
}
wcross_color.z += sin(hitindication_crosshair_size) * hitindication_color.z;
}
- if(shottype == SHOTTYPE_HITENEMY)
- wcross_scale *= autocvar_crosshair_hittest; // is not queried if hittest is 0
+ // no effects needed for targeting enemies, this can't possibly span all valid targets!
+ // just show for teammates to give a sign that they're an invalid target
+ //if(shottype == SHOTTYPE_HITENEMY)
+ //wcross_scale *= autocvar_crosshair_hittest; // is not queried if hittest is 0
if(shottype == SHOTTYPE_HITTEAM)
wcross_scale /= autocvar_crosshair_hittest; // is not queried if hittest is 0
else if(eventchase_current_distance != chase_distance)
eventchase_current_distance = chase_distance;
- makevectors(view_angles);
+ vector forward, right, up;
+ MAKE_VECTORS(view_angles, forward, right, up);
- vector eventchase_target_origin = (current_view_origin - (v_forward * eventchase_current_distance));
+ vector eventchase_target_origin = (current_view_origin - (forward * eventchase_current_distance));
WarpZone_TraceBox(current_view_origin, autocvar_cl_eventchase_mins, autocvar_cl_eventchase_maxs, eventchase_target_origin, MOVE_WORLDONLY, this);
// If the boxtrace fails, revert back to line tracing.
if(!local_player.viewloc)
if(trace_startsolid)
{
- eventchase_target_origin = (current_view_origin - (v_forward * eventchase_current_distance));
+ eventchase_target_origin = (current_view_origin - (forward * eventchase_current_distance));
WarpZone_TraceLine(current_view_origin, eventchase_target_origin, MOVE_WORLDONLY, this);
- setproperty(VF_ORIGIN, (trace_endpos - (v_forward * autocvar_cl_eventchase_mins.z)));
+ setproperty(VF_ORIGIN, (trace_endpos - (forward * autocvar_cl_eventchase_mins.z)));
}
else { setproperty(VF_ORIGIN, trace_endpos); }
// Render the Scene
view_origin = getpropertyvec(VF_ORIGIN);
view_angles = getpropertyvec(VF_ANGLES);
- MAKEVECTORS(makevectors, view_angles, view_forward, view_right, view_up);
+ MAKE_VECTORS(view_angles, view_forward, view_right, view_up);
#ifdef BLURTEST
if(time > blurtest_time0 && time < blurtest_time1)
setproperty(VF_ORIGIN, '0 0 0');
setproperty(VF_ANGLES, '0 0 0');
setproperty(VF_PERSPECTIVE, 1);
- makevectors('0 0 0');
+ vector forward, right, up;
+ MAKE_VECTORS('0 0 0', forward, right, up);
vector v1, v2;
cvar_set("vid_conwidth", "800");
cvar_set("vid_conheight", "600");
- v1 = cs_project(v_forward);
+ v1 = cs_project(forward);
cvar_set("vid_conwidth", "640");
cvar_set("vid_conheight", "480");
- v2 = cs_project(v_forward);
+ v2 = cs_project(forward);
if(v1 == v2)
cs_project_is_b0rked = 1;
else
it.solid = SOLID_BBOX;
});
vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
- MAKEVECTORS(makevectors, it.v_angle, forward, right, up);
+ MAKE_VECTORS(it.v_angle, forward, right, up);
vector pos = it.origin + it.view_ofs;
traceline(pos, pos + forward * max_shot_distance, MOVE_NORMAL, it);
FOREACH_ENTITY(true, {
MUTATOR_HOOKFUNCTION(ca, SetStartItems)
{
- start_items &= ~IT_UNLIMITED_AMMO;
+ start_items &= ~(IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS);
start_health = warmup_start_health = cvar("g_lms_start_health");
start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor");
start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells");
MUTATOR_HOOKFUNCTION(ft, SetStartItems)
{
- start_items &= ~IT_UNLIMITED_AMMO;
+ start_items &= ~(IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS);
//start_health = warmup_start_health = cvar("g_lms_start_health");
//start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor");
start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells");
MUTATOR_HOOKFUNCTION(lms, SetStartItems)
{
- start_items &= ~IT_UNLIMITED_AMMO;
+ start_items &= ~(IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS);
start_health = warmup_start_health = cvar("g_lms_start_health");
start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor");
start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells");
#include <server/items.qh>
#endif
-const int IT_UNLIMITED_WEAPON_AMMO = BIT(0); // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
+const int IT_UNLIMITED_AMMO = BIT(0); // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
const int IT_UNLIMITED_SUPERWEAPONS = BIT(1); // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
const int IT_JETPACK = BIT(2); // actual item
const int IT_STRENGTH = BIT(22);
// item masks
-const int IT_UNLIMITED_AMMO = IT_UNLIMITED_WEAPON_AMMO | IT_UNLIMITED_SUPERWEAPONS;
-const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately
+const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately
#ifdef SVQC
const .float strength_finished = _STAT(STRENGTH_FINISHED);
if(type == 0) // server set
{
LOG_TRACE("Applying temporary setting ", t, " := ", s);
+ #if 0
if(cvar("g_campaign"))
cvar_set(t, s); // this is a wrapper and is always temporary anyway; no need to backup old values then
else
+ #endif
cvar_settemp(t, s);
}
else
CLASS(LastManStanding, Gametype)
INIT(LastManStanding)
{
- this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,true,"","timelimit=20 lives=9 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
+ this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,true,"","timelimit=20 lives=5 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
}
METHOD(LastManStanding, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
{
CLASS(ClanArena, Gametype)
INIT(ClanArena)
{
- this.gametype_init(this, _("Clan Arena"),"ca","g_ca",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill all enemy teammates to win the round"));
+ this.gametype_init(this, _("Clan Arena"),"ca","g_ca",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill all enemy teammates to win the round"));
}
METHOD(ClanArena, m_parse_mapinfo, bool(string k, string v))
{
CLASS(FreezeTag, Gametype)
INIT(FreezeTag)
{
- this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
+ this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
}
METHOD(FreezeTag, m_parse_mapinfo, bool(string k, string v))
{
void MapInfo_Cache_Create(); // enable caching
void MapInfo_Cache_Invalidate(); // delete cache if any, but keep enabled
+void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, float recurse);
+
void MapInfo_ClearTemps(); // call this when done with mapinfo for this frame
void MapInfo_Shutdown(); // call this in the shutdown handler
precache_sound(this.noise2);
}
- if (!this.wait)
- {
- this.wait = 3;
- }
+ if(autocvar_sv_doors_always_open)
+ {
+ this.wait = -1;
+ }
+ else if (!this.wait)
+ {
+ this.wait = 3;
+ }
+
if (!this.lip)
{
this.lip = 8;
this.pos1 = this.origin;
this.pos2 = this.pos1 + this.movedir*(fabs(this.movedir*this.size) - this.lip);
- if (!this.speed)
- {
- this.speed = 100;
- }
+ if(autocvar_sv_doors_always_open)
+ {
+ this.speed = max(750, this.speed);
+ }
+ else if (!this.speed)
+ {
+ this.speed = 100;
+ }
settouch(this, door_touch);
{
if (buff == BUFF_Null)
return false;
- if (buff == BUFF_AMMO && ((start_items & IT_UNLIMITED_WEAPON_AMMO) || (start_items & IT_UNLIMITED_AMMO) || (cvar("g_melee_only"))))
+ if (buff == BUFF_AMMO && ((start_items & IT_UNLIMITED_AMMO) || cvar("g_melee_only")))
return false;
if (buff == BUFF_VAMPIRE && cvar("g_vampire"))
return false;
entity player = M_ARGV(0, entity);
player.oldbuffs = 0;
- PS(player).buff_shield = time + 0.5; // prevent picking up buffs immediately
// reset timers here to prevent them continuing after re-spawn
player.buff_disability_time = 0;
player.buff_disability_effect_time = 0;
BUFF_ONADD(BUFF_AMMO)
{
- player.buff_ammo_prev_infitems = (player.items & IT_UNLIMITED_WEAPON_AMMO);
- player.items |= IT_UNLIMITED_WEAPON_AMMO;
+ player.buff_ammo_prev_infitems = (player.items & IT_UNLIMITED_AMMO);
+ player.items |= IT_UNLIMITED_AMMO;
if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
{
BUFF_ONREM(BUFF_AMMO)
{
if(player.buff_ammo_prev_infitems)
- player.items |= IT_UNLIMITED_WEAPON_AMMO;
+ player.items |= IT_UNLIMITED_AMMO;
else
- player.items &= ~IT_UNLIMITED_WEAPON_AMMO;
+ player.items &= ~IT_UNLIMITED_AMMO;
if(STAT(BUFFS, player) & BUFF_AMMO.m_itemid)
{
if (this.m_screen_coords) {
screen_pos = this.origin + since_hit * autocvar_cl_damagetext_2d_velocity;
} else {
- makevectors(view_angles);
+ vector forward, right, up;
+ MAKE_VECTORS(view_angles, forward, right, up);
vector world_offset = since_hit * autocvar_cl_damagetext_velocity_world + autocvar_cl_damagetext_offset_world;
- vector world_pos = this.origin + world_offset.x * v_forward + world_offset.y * v_right + world_offset.z * v_up;
+ vector world_pos = this.origin + world_offset.x * forward + world_offset.y * right + world_offset.z * up;
screen_pos = project_3d_to_2d(world_pos) + since_hit * autocvar_cl_damagetext_velocity_screen + autocvar_cl_damagetext_offset_screen;
}
screen_pos.y += size / 2;
return true;
// returns true if the player is close to a wall
-bool is_close_to_wall(entity this, float threshold)
+bool is_close_to_wall(entity this, float threshold, vector forward, vector right)
{
- X(v_right);
- X(-v_right);
- X(v_forward);
- X(-v_forward);
+ X(right);
+ X(-right);
+ X(forward);
+ X(-forward);
return false;
}
-bool is_close_to_ground(entity this, float threshold)
+bool is_close_to_ground(entity this, float threshold, vector up)
{
if (IS_ONGROUND(this)) return true;
- X(-v_up); // necessary for dodging down a slope using doubletap (using `+dodge` works anyway)
+ X(-up); // necessary for dodging down a slope using doubletap (using `+dodge` works anyway)
return false;
}
if ((time - this.last_dodging_time) < PHYS_DODGING_DELAY)
return false;
- makevectors(this.angles);
+ vector forward, right, up;
+ MAKE_VECTORS(this.angles, forward, right, up);
- bool can_dodge = (is_close_to_ground(this, PHYS_DODGING_HEIGHT_THRESHOLD) && (PHYS_DODGING_MAXSPEED == 0 || vdist(this.velocity, <, PHYS_DODGING_MAXSPEED)));
- bool can_wall_dodge = (PHYS_DODGING_WALL && is_close_to_wall(this, PHYS_DODGING_DISTANCE_THRESHOLD));
+ bool can_dodge = (is_close_to_ground(this, PHYS_DODGING_HEIGHT_THRESHOLD, up) && (PHYS_DODGING_MAXSPEED == 0 || vdist(this.velocity, <, PHYS_DODGING_MAXSPEED)));
+ bool can_wall_dodge = (PHYS_DODGING_WALL && is_close_to_wall(this, PHYS_DODGING_DISTANCE_THRESHOLD, forward, right));
bool can_air_dodge = (PHYS_DODGING_AIR && (PHYS_DODGING_AIR_MAXSPEED == 0 || vdist(this.velocity, <, PHYS_DODGING_AIR_MAXSPEED)));
if (!can_dodge && !can_wall_dodge && !can_air_dodge) return false;
return;
}
- // make sure v_up, v_right and v_forward are sane
+ vector forward, right, up;
if(PHYS_DODGING_AIR)
- makevectors(this.v_angle);
+ MAKE_VECTORS(this.v_angle, forward, right, up);
else
- makevectors(this.angles);
+ MAKE_VECTORS(this.angles, forward, right, up);
// fraction of the force to apply each frame
// if we have e.g. 0.5 sec ramptime and a frametime of 0.25, then the ramp code
float velocity_increase = min(common_factor * this.dodging_force_total, this.dodging_force_remaining);
this.dodging_force_remaining -= velocity_increase;
- this.velocity += this.dodging_direction.x * velocity_increase * v_forward
- + this.dodging_direction.y * velocity_increase * v_right;
+ this.velocity += this.dodging_direction.x * velocity_increase * forward
+ + this.dodging_direction.y * velocity_increase * right;
// the up part of the dodge is a single shot action
if (this.dodging_single_action == 1)
{
UNSET_ONGROUND(this);
- this.velocity += PHYS_DODGING_UP_SPEED * v_up;
+ this.velocity += PHYS_DODGING_UP_SPEED * up;
#ifdef SVQC
if (autocvar_sv_dodging_sound)
if(IS_DEAD(this) || game_stopped)
instagib_stop_countdown(this);
- else if (GetResource(this, RES_CELLS) > 0 || (this.items & IT_UNLIMITED_WEAPON_AMMO) || (this.flags & FL_GODMODE))
+ else if (GetResource(this, RES_CELLS) > 0 || (this.items & IT_UNLIMITED_AMMO) || (this.flags & FL_GODMODE))
instagib_stop_countdown(this);
else if(autocvar_g_rm && autocvar_g_rm_laser)
{
SetResource(this, RES_CELLS, 0);
SetResource(this, RES_PLASMA, 0);
SetResource(this, RES_FUEL, 0);
- if(this.items & IT_UNLIMITED_WEAPON_AMMO)
+ if(this.items & IT_UNLIMITED_AMMO)
{
switch (wpn.ammo_type)
{
Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_NIX_COUNTDOWN, nix_nextweapon, dt);
}
- if(!(this.items & IT_UNLIMITED_WEAPON_AMMO) && time > this.nix_nextincr)
+ if(!(this.items & IT_UNLIMITED_AMMO) && time > this.nix_nextincr)
{
switch (wpn.ammo_type)
{
return;
}
- if((!thiswep.wr_checkammo1(thiswep, actor, weaponentity) && !(actor.items & IT_UNLIMITED_WEAPON_AMMO)) || (!(actor.items & IT_SUPERWEAPON) && !(actor.items & IT_UNLIMITED_SUPERWEAPONS)))
+ if((!thiswep.wr_checkammo1(thiswep, actor, weaponentity) && !(actor.items & IT_UNLIMITED_AMMO)) || (!(actor.items & IT_SUPERWEAPON) && !(actor.items & IT_UNLIMITED_SUPERWEAPONS)))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
}
if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
// if(fire & 2) // only eat ammo when the button is pressed
// {
// dt = min(dt, (1 - actor.(weaponentity).oknex_charge) / WEP_CVAR(oknex, charge_rate));
- // if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ // if(!(actor.items & IT_UNLIMITED_AMMO))
// {
// // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
// if(autocvar_g_balance_vortex_reload_ammo)
if(WEP_OVERKILL_RPC.weaponstart > 0) { ok_start_items |= WEPSET(OVERKILL_RPC); }
if(WEP_OVERKILL_HMG.weaponstart > 0) { ok_start_items |= WEPSET(OVERKILL_HMG); }
+ // this gives unlimited ammo (the 4 types) but not fuel
+ // using `g_use_ammunition` instead gives also fuel which is unnecessary and distracting in the HUD
+ start_items |= IT_UNLIMITED_AMMO;
+
start_weapons = warmup_start_weapons = ok_start_items;
}
vector horiz_vel = vec2(it.velocity);
// when walking slowly sideways, we assume the player wants a clear shot ahead - spawn behind him according to where he's looking
// when running fast, spawn behind him according to his direction of movement to prevent colliding with the newly spawned player
+ vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
if (vdist(horiz_vel, >, autocvar_sv_maxspeed + 50))
- fixedmakevectors(vectoangles(horiz_vel));
+ {
+ FIXED_MAKE_VECTORS(vectoangles(horiz_vel), forward, right, up);
+ }
else
- fixedmakevectors(it.angles); // .angles is the angle of the model - usually/always 0 pitch
+ {
+ FIXED_MAKE_VECTORS(it.angles, forward, right, up);
+ }
// test different spots close to mate - trace upwards so it works on uneven surfaces
// don't spawn in front of player or directly behind to avoid players shooting each other
switch(i)
{
case 0:
- tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 64 + v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - forward * 64 + right * 128 + up * 64, MOVE_NOMONSTERS, it);
break;
case 1:
- tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 64 - v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - forward * 64 - right * 128 + up * 64, MOVE_NOMONSTERS, it);
break;
case 2:
- tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin + v_right * 192 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin + right * 192 + up * 64, MOVE_NOMONSTERS, it);
break;
case 3:
- tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_right * 192 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - right * 192 + up * 64, MOVE_NOMONSTERS, it);
break;
case 4:
- tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 128 + v_right * 64 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - forward * 128 + right * 64 + up * 64, MOVE_NOMONSTERS, it);
break;
case 5:
- tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 128 - v_right * 64 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - forward * 128 - right * 64 + up * 64, MOVE_NOMONSTERS, it);
break;
}
// 400 is about the height of a typical laser jump (in overkill)
// not traceline because we need space for the whole player, not just his origin
- tracebox(horizontal_trace_endpos, STAT(PL_MIN, player), STAT(PL_MAX, player), horizontal_trace_endpos - '0 0 400', MOVE_NORMAL, it);
+ tracebox(horizontal_trace_endpos, STAT(PL_MIN, player), STAT(PL_MAX, player), horizontal_trace_endpos - 400 * up, MOVE_NORMAL, it);
vector vectical_trace_endpos = trace_endpos;
//te_lightning1(NULL, horizontal_trace_endpos, vectical_trace_endpos);
if (trace_startsolid) goto skip; // inside another player
if (tracebox_hits_trigger_hurt(horizontal_trace_endpos, STAT(PL_MIN, player), STAT(PL_MAX, player), vectical_trace_endpos)) goto skip;
// make sure the spawned player will have floor ahead (or at least a wall - he shouldn't fall as soon as he starts moving)
- vector floor_test_start = vectical_trace_endpos + v_up * STAT(PL_MAX, player).z + v_forward * STAT(PL_MAX, player).x; // top front of player's bbox - highest point we know is not inside solid
- traceline(floor_test_start, floor_test_start + v_forward * 100 - v_up * 128, MOVE_NOMONSTERS, it);
+ // top front of player's bbox - highest point we know is not inside solid
+ vector floor_test_start = vectical_trace_endpos + up * STAT(PL_MAX, player).z + forward * STAT(PL_MAX, player).x;
+ traceline(floor_test_start, floor_test_start + forward * 100 - up * 128, MOVE_NOMONSTERS, it);
//te_beam(NULL, floor_test_start, trace_endpos);
if (trace_fraction == 1.0) goto skip;
// here, we know we found a good spot
RandomSelection_Add(it, 0, string_null, vectical_trace_endpos, 1, 1);
- //te_lightning1(NULL, vectical_trace_endpos, vectical_trace_endpos + v_forward * 10);
+ //te_lightning1(NULL, vectical_trace_endpos, vectical_trace_endpos + forward * 10);
LABEL(skip)
if (i % 2 == 1 && RandomSelection_chosen_ent)
MUTATOR_CALLHOOK(PlayerPhysics_UpdateStats, this);
float maxspd_mod = PHYS_HIGHSPEED(this);
-
- STAT(MOVEVARS_AIRACCEL_QW, this) = AdjustAirAccelQW(Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw), maxspd_mod);
- STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = (Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw))
- ? AdjustAirAccelQW(Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw), maxspd_mod)
- : 0;
- STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
- STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking
-
+ STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking
+ if (autocvar_g_movement_highspeed_q3_compat) {
+ STAT(MOVEVARS_AIRACCEL_QW, this) = Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw);
+ STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw);
+ STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw);
+ } else {
+ STAT(MOVEVARS_AIRACCEL_QW, this) = AdjustAirAccelQW(Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw), maxspd_mod);
+ STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = (Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw))
+ ? AdjustAirAccelQW(Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw), maxspd_mod)
+ : 0;
+ STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
+ }
bool vq3compat = autocvar_sv_vq3compat && autocvar_sv_vq3compat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences
STAT(PL_MIN, this) = (vq3compat) ? '-15 -15 -24' : autocvar_sv_player_mins;
STAT(PL_MAX, this) = (vq3compat) ? '15 15 32' : autocvar_sv_player_maxs;
// fix some new settings
STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, this) = Physics_ClientOption(this, "airaccel_qw_stretchfactor", autocvar_sv_airaccel_qw_stretchfactor);
STAT(MOVEVARS_MAXAIRSTRAFESPEED, this) = Physics_ClientOption(this, "maxairstrafespeed", autocvar_sv_maxairstrafespeed);
- STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed);
+ if (autocvar_g_movement_highspeed_q3_compat) {
+ STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed) * maxspd_mod;
+ } else {
+ STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed);
+ }
+
STAT(MOVEVARS_AIRSTRAFEACCELERATE, this) = Physics_ClientOption(this, "airstrafeaccelerate", autocvar_sv_airstrafeaccelerate);
STAT(MOVEVARS_WARSOWBUNNY_TURNACCEL, this) = Physics_ClientOption(this, "warsowbunny_turnaccel", autocvar_sv_warsowbunny_turnaccel);
STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, this) = Physics_ClientOption(this, "airaccel_sideways_friction", autocvar_sv_airaccel_sideways_friction);
bool air_jump = !playerjump || M_ARGV(2, bool);
bool activate = JETPACK_JUMP(this) && air_jump && PHYS_INPUT_BUTTON_JUMP(this) || PHYS_INPUT_BUTTON_JETPACK(this);
- bool has_fuel = !PHYS_JETPACK_FUEL(this) || PHYS_AMMO_FUEL(this) || (ITEMS_STAT(this) & IT_UNLIMITED_WEAPON_AMMO);
+ bool has_fuel = !PHYS_JETPACK_FUEL(this) || PHYS_AMMO_FUEL(this) || (ITEMS_STAT(this) & IT_UNLIMITED_AMMO);
if (!(ITEMS_STAT(this) & ITEM_Jetpack.m_itemid)) { }
else if (this.jetpack_stopped) { }
wishvel_z = (wishvel_z - PHYS_GRAVITY(this)) * fz + PHYS_GRAVITY(this);
fvel = min(1, vlen(wishvel) / best);
- if (PHYS_JETPACK_FUEL(this) && !(ITEMS_STAT(this) & IT_UNLIMITED_WEAPON_AMMO))
+ if (PHYS_JETPACK_FUEL(this) && !(ITEMS_STAT(this) & IT_UNLIMITED_AMMO))
f = min(1, PHYS_AMMO_FUEL(this) / (PHYS_JETPACK_FUEL(this) * dt * fvel));
else
f = 1;
UNSET_ONGROUND(this);
#ifdef SVQC
- if (!(ITEMS_STAT(this) & IT_UNLIMITED_WEAPON_AMMO))
+ if (!(ITEMS_STAT(this) & IT_UNLIMITED_AMMO))
TakeResource(this, RES_FUEL, PHYS_JETPACK_FUEL(this) * dt * fvel * f);
ITEMS_STAT(this) |= IT_USING_JETPACK;
spawnfunc(target_items)
{
- int n;
- string s;
-
this.use = target_items_use;
if(!this.strength_finished)
this.strength_finished = autocvar_g_balance_powerup_strength_time;
if(!this.superweapons_finished)
this.superweapons_finished = autocvar_g_balance_superweapons_time;
- n = tokenize_console(this.netname);
+ int n = tokenize_console(this.netname);
if(argv(0) == "give")
{
this.netname = substring(this.netname, argv_start_index(1), argv_end_index(-1) - argv_start_index(1));
{
for(int j = 0; j < n; ++j)
{
- if (argv(j) == "unlimited_ammo") this.items |= IT_UNLIMITED_AMMO;
- else if(argv(j) == "unlimited_weapon_ammo") this.items |= IT_UNLIMITED_WEAPON_AMMO;
+ // this is from a time when unlimited superweapons were handled together with ammo in some parts of the code
+ if (argv(j) == "unlimited_ammo") this.items |= IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS;
+ else if(argv(j) == "unlimited_weapon_ammo") this.items |= IT_UNLIMITED_AMMO;
else if(argv(j) == "unlimited_superweapons") this.items |= IT_UNLIMITED_SUPERWEAPONS;
else if(argv(j) == "strength") this.items |= ITEM_Strength.m_itemid;
else if(argv(j) == "invincible") this.items |= ITEM_Shield.m_itemid;
{
FOREACH(Buffs, it != BUFF_Null,
{
- s = Buff_UndeprecateName(argv(j));
+ string s = Buff_UndeprecateName(argv(j));
if(s == it.netname)
{
STAT(BUFFS, this) |= (it.m_itemid);
}
});
FOREACH(Weapons, it != WEP_Null, {
- s = W_UndeprecateName(argv(j));
+ string s = W_UndeprecateName(argv(j));
if(s == it.netname)
{
STAT(WEAPONS, this) |= (it.m_wepset);
}
this.netname = "";
- this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, boolean(this.items & IT_UNLIMITED_WEAPON_AMMO), "unlimited_weapon_ammo");
+ this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, boolean(this.items & IT_UNLIMITED_AMMO), "unlimited_weapon_ammo");
this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, boolean(this.items & IT_UNLIMITED_SUPERWEAPONS), "unlimited_superweapons");
this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, this.strength_finished * boolean(this.items & ITEM_Strength.m_itemid), "strength");
this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, this.invincible_finished * boolean(this.items & ITEM_Shield.m_itemid), "invincible");
got += GiveValue(e, strength_finished, op, val);
got += GiveValue(e, invincible_finished, op, val);
got += GiveValue(e, superweapons_finished, op, val);
- got += GiveBit(e, items, IT_UNLIMITED_AMMO, op, val);
+ got += GiveBit(e, items, IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS, op, val);
case "all":
got += GiveBit(e, items, ITEM_Jetpack.m_itemid, op, val);
got += GiveResourceValue(e, RES_HEALTH, op, val);
got += GiveResourceValue(e, RES_FUEL, op, val);
break;
case "unlimited_ammo":
- got += GiveBit(e, items, IT_UNLIMITED_AMMO, op, val);
+ // this is from a time when unlimited superweapons were handled together with ammo in some parts of the code
+ got += GiveBit(e, items, IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS, op, val);
break;
case "unlimited_weapon_ammo":
- got += GiveBit(e, items, IT_UNLIMITED_WEAPON_AMMO, op, val);
+ got += GiveBit(e, items, IT_UNLIMITED_AMMO, op, val);
break;
case "unlimited_superweapons":
got += GiveBit(e, items, IT_UNLIMITED_SUPERWEAPONS, op, val);
POSTGIVE_BIT(e, items, ITEM_JetpackRegen.m_itemid, SND_ITEMPICKUP, SND_Null);
POSTGIVE_BIT(e, items, IT_UNLIMITED_SUPERWEAPONS, SND_POWERUP, SND_POWEROFF);
- POSTGIVE_BIT(e, items, IT_UNLIMITED_WEAPON_AMMO, SND_POWERUP, SND_POWEROFF);
+ POSTGIVE_BIT(e, items, IT_UNLIMITED_AMMO, SND_POWERUP, SND_POWEROFF);
POSTGIVE_BIT(e, items, ITEM_Jetpack.m_itemid, SND_ITEMPICKUP, SND_Null);
FOREACH(Weapons, it != WEP_Null, {
POSTGIVE_WEAPON(e, it, SND_WEAPONPICKUP, SND_Null);
}
if(this == own.(weaponentity).arc_beam) { own.(weaponentity).arc_beam = NULL; }
- if(!thiswep.wr_checkammo1(thiswep, own, weaponentity) && !(own.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!thiswep.wr_checkammo1(thiswep, own, weaponentity) && !(own.items & IT_UNLIMITED_AMMO))
{
// note: this doesn't force the switch
W_SwitchToOtherWeapon(own, weaponentity);
// decrease ammo
float coefficient = frametime;
- if(!(own.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(own.items & IT_UNLIMITED_AMMO))
{
float rootammo;
if(burst)
}
actor.(weaponentity).crylink_waitrelease = 0;
if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity) && !thiswep.wr_checkammo2(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
// ran out of ammo!
actor.cnt = thiswep.m_id;
if(this.realowner.(weaponentity).m_weapon == thiswep)
{
if(GetResource(this.realowner, thiswep.ammo_type) < WEP_CVAR(devastator, ammo))
- if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(this.realowner.items & IT_UNLIMITED_AMMO))
{
this.realowner.cnt = thiswep.m_id;
ATTACK_FINISHED(this.realowner, weaponentity) = time;
if(this.realowner.(weaponentity).m_weapon == thiswep)
{
if(GetResource(this.realowner, thiswep.ammo_type) < WEP_CVAR(devastator, ammo))
- if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(this.realowner.items & IT_UNLIMITED_AMMO))
{
this.realowner.cnt = thiswep.m_id;
ATTACK_FINISHED(this.realowner, weaponentity) = time;
// this is different than WR_CHECKAMMO when it comes to reloading
bool enough_ammo;
- if(actor.items & IT_UNLIMITED_WEAPON_AMMO)
+ if(actor.items & IT_UNLIMITED_AMMO)
enough_ammo = true;
else if(autocvar_g_balance_hagar_reload_ammo)
enough_ammo = actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_SEC(hagar, ammo);
// we aren't checking ammo during an attack, so we must do it here
if(!(thiswep.wr_checkammo1(thiswep, actor, weaponentity) + thiswep.wr_checkammo2(thiswep, actor, weaponentity)))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
// note: this doesn't force the switch
W_SwitchToOtherWeapon(actor, weaponentity);
}
if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
if(PHYS_INPUT_BUTTON_ATCK(actor))
{
if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
actor.(weaponentity).hook_refire = max(actor.(weaponentity).hook_refire, time + WEP_CVAR_PRI(hook, refire) * W_WeaponRateFactor(actor));
// hook also inhibits health regeneration, but only for 1 second
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
actor.pauseregen_finished = max(actor.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
}
{
if( time > actor.(weaponentity).hook_time_fueldecrease )
{
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
if( GetResource(actor, RES_FUEL) >= (time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel )
{
if(PHYS_INPUT_BUTTON_ATCK(actor))
{
if(!thiswep.wr_checkammo2(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
}
if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
if(weapon_prepareattack(thiswep, actor, weaponentity, true, 0))
{
if(!thiswep.wr_checkammo2(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
void W_Seeker_Vollycontroller_Think(entity this) // TODO: Merge this with W_Seeker_Attack
{
- float c;
- entity oldenemy;
this.cnt = this.cnt - 1;
Weapon thiswep = WEP_SEEKER;
entity own = this.realowner;
- oldenemy = own.enemy;
+ entity oldenemy = own.enemy;
own.enemy = this.enemy;
- c = own.cnt % 4;
- switch(c)
+ switch(own.cnt % 4)
{
case 0:
W_Seeker_Fire_Missile(thiswep, own, weaponentity, '-1.25 -3.75 0', own.enemy); // TODO
// WEAPONTODO: trace to find what we actually hit
vector endpos = (this.sw_shotorg + (this.sw_shotdir * this.sw_distance));
- vectorvectors(this.sw_shotdir);
- vector right = v_right; // save this for when we do makevectors later
- vector up = v_up; // save this for when we do makevectors later
+ vector _forward, right, up;
+ VECTOR_VECTORS(this.sw_shotdir, _forward, right, up);
// WEAPONTODO: combine and simplify these calculations
vector min_end = ((this.sw_shotorg + (this.sw_shotdir * SW_DISTTOMIN)) + (up * this.sw_spread_min));
void W_Shotgun_Attack3_Frame2(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
if (!thiswep.wr_checkammo2(thiswep, actor, weaponentity))
- if (!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if (!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity, int fire)
{
if (!thiswep.wr_checkammo2(thiswep, actor, weaponentity))
- if (!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if (!(actor.items & IT_UNLIMITED_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
w_ready(thiswep, actor, weaponentity, fire);
}
if(actor.(weaponentity).clip_load >= 0) // we are not currently reloading
if(WEP_CVAR(shotgun, secondary) == 1)
- if(((fire & 1) && GetResource(actor, thiswep.ammo_type) <= 0 && !(actor.items & IT_UNLIMITED_WEAPON_AMMO)) || (fire & 2))
+ if(((fire & 1) && GetResource(actor, thiswep.ammo_type) <= 0 && !(actor.items & IT_UNLIMITED_AMMO)) || (fire & 2))
if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(shotgun, refire)))
{
// attempt forcing playback of the anim by switching to another anim (that we never play) here...
if(fire & 2) // only eat ammo when the button is pressed
{
dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(vortex, charge_rate));
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if(autocvar_g_balance_vortex_reload_ammo)
#define use use1
.void(entity this, entity actor, entity trigger) use;
#define touch move_touch
+
+// deglobalization:
+
+void(vector ang) _makevectors_hidden = #1;
+//#define makevectors DO_NOT_USE_GLOBALS_PREFER_MAKE_VECTORS_MACRO_INSTEAD
+
+#define makestatic DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+#define skel_get_bonerel DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+vector(float skel, float bonenum) _skel_get_boneabs_hidden = #270;
+//#define skel_get_boneabs DO_NOT_USE_GLOBALS_PREFER_SKEL_GET_BONE_ABS_MACRO_INSTEAD
+
+void(float skel, float bonenum, vector org) _skel_set_bone_hidden = #271;
+//#define skel_set_bone DO_NOT_USE_GLOBALS_PREFER_SKEL_SET_BONE_MACRO_INSTEAD
+
+#define skel_mul_bone DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+#define skel_mul_bones DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+void(vector org, float radius, vector lightcolours) _adddynamiclight_hidden = #305;
+//#define adddynamiclight DO_NOT_USE_GLOBALS_PREFER_ADD_DYNAMIC_LIGHT_MACRO_INSTEAD
+#define adddynamiclight2 DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+void(vector dir) _vectorvectors_hidden = #432;
+#define vectorvectors DO_NOT_USE_GLOBALS_PREFER_VECTOR_VECTORS_MACRO_INSTEAD
+
+vector(entity ent, float tagindex) _gettaginfo_hidden = #452;
+//#define gettaginfo DO_NOT_USE_GLOBALS_PREFER_GET_TAG_INFO_MACRO_INSTEAD
+
+#define getentity DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+#define getentityvec DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
#define buf_create _buf_create
#pragma noref 0
+
+// deglobalization:
+
+#define skel_get_bonerel DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+vector(float skel, float bonenum) _skel_get_boneabs_hidden = #270;
+//#define skel_get_boneabs DO_NOT_USE_GLOBALS_PREFER_SKEL_GET_BONE_ABS_MACRO_INSTEAD
+
+void(float skel, float bonenum, vector org) _skel_set_bone_hidden = #271;
+//#define skel_set_bone DO_NOT_USE_GLOBALS_PREFER_SKEL_SET_BONE_MACRO_INSTEAD
+
+#define skel_mul_bone DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+#define skel_mul_bones DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+vector(entity ent, float tagindex) _gettaginfo_hidden = #452;
+//#define gettaginfo DO_NOT_USE_GLOBALS_PREFER_GET_TAG_INFO_MACRO_INSTEAD
#define use use1
.void(entity this, entity actor, entity trigger) use;
+
+// deglobalization:
+
+void(vector ang) _makevectors_hidden = #1;
+//#define makevectors DO_NOT_USE_GLOBALS_PREFER_MAKE_VECTORS_MACRO_INSTEAD
+
+#define aim DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
+
+#define makestatic DO_NOT_USE_GLOBALS // not used anywhere so not wrapped
// this mimics quakeworld code
if (this.com_in_jump && this.waterlevel == WATERLEVEL_SWIMMING && this.velocity_z >= -180 && !this.viewloc) {
vector yawangles = '0 1 0' * this.v_angle.y;
- makevectors(yawangles);
- vector forward = v_forward;
+ vector forward, right, up;
+ MAKE_VECTORS(yawangles, forward, right, up);
vector spot = this.origin + 24 * forward;
spot_z += 8;
traceline(spot, spot, MOVE_NOMONSTERS, this);
}
}
}
- makevectors(vmul(this.v_angle, (this.com_phys_vel_2d ? '0 1 0' : '1 1 1')));
- // wishvel = v_forward * PHYS_CS(this).movement.x + v_right * PHYS_CS(this).movement.y + v_up * PHYS_CS(this).movement.z;
- vector wishvel = v_forward * PHYS_CS(this).movement.x
- + v_right * PHYS_CS(this).movement.y
+
+ vector forward, right, up;
+ MAKE_VECTORS(vmul(this.v_angle, (this.com_phys_vel_2d ? '0 1 0' : '1 1 1')), forward, right, up);
+ // wishvel = forward * PHYS_CS(this).movement.x + right * PHYS_CS(this).movement.y + up * PHYS_CS(this).movement.z;
+ vector wishvel = forward * PHYS_CS(this).movement.x
+ + right * PHYS_CS(this).movement.y
+ '0 0 1' * PHYS_CS(this).movement.z * (this.com_phys_vel_2d ? 0 : 1);
if (this.com_phys_water) {
if (PHYS_INPUT_BUTTON_CROUCH(this)) {
#include "counting.qh"
#include "cvar.qh"
#include "defer.qh"
+#include "deglobalization.qh"
#include "draw.qh"
#include "enumclass.qh"
#include "file.qh"
+#include "float.qh"
#include "functional.qh"
#include "i18n.qh"
#include "intrusivelist.qh"
if (this.iflags & IFLAG_ANGLES)
{
- fixedmakevectors(this.angles);
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(this.angles, forward, right, up);
if (f0 & IFLAG_VALID)
{
this.iforward1 = this.iforward2;
}
else
{
- this.iforward1 = v_forward;
- this.iup1 = v_up;
+ this.iforward1 = forward;
+ this.iup1 = up;
}
- this.iforward2 = v_forward;
- this.iup2 = v_up;
+ this.iforward2 = forward;
+ this.iup2 = up;
}
if (this.iflags & IFLAG_V_ANGLE)
{
- fixedmakevectors(this.v_angle);
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(this.v_angle, forward, right, up);
if (f0 & IFLAG_VALID)
{
this.ivforward1 = this.ivforward2;
}
else
{
- this.ivforward1 = v_forward;
- this.ivup1 = v_up;
+ this.ivforward1 = forward;
+ this.ivup1 = up;
}
- this.ivforward2 = v_forward;
- this.ivup2 = v_up;
+ this.ivforward2 = forward;
+ this.ivup2 = up;
}
else if (this.iflags & IFLAG_V_ANGLE_X)
{
--- /dev/null
+#include "lib/float.qh"
+#include "lib/misc.qh"
+#include "lib/static.qh"
+#include "lib/vector.qh"
+
+// These macros wrap functions which use globals so mutation only occurs inside them and is not visible from outside.
+// Functions for which all usages are replaced with these macros can be hidden by #defines inside our `*defs.qh` files
+// to prevent anyone from using them accidentally in the future
+
+// TODO stuff in the engine that uses the v_forward/v_right/v_up globals and is not wrapped yet:
+// - RF_USEAXIS, addentities, predraw,
+// - CL_GetEntityMatrix (in engine but is called from other functions so transitively any of them can use the globals - e.g. V_CalcRefdef, maybe others)
+// - however RF_USEAXIS is only used if MF_ROTATE is used which is only set in one place
+// - e.camera_transform / CL_VM_TransformView (in engine)
+// - this is the only used function that both sets and gets the globals (aim does too but isn't used in our code)
+
+// convenience for deglobalization code - don't use these just to hide that globals are still used
+#define CLEAR_V_GLOBALS() v_forward = VEC_NAN; v_right = VEC_NAN; v_up = VEC_NAN
+#define GET_V_GLOBALS(forward, right, up) forward = v_forward; right = v_right; up = v_up
+#define SET_V_GLOBALS(forward, right, up) v_forward = forward; v_right = right; v_up = up
+
+#ifdef GAMEQC
+STATIC_INIT(globals) {
+ // set to NaN to more easily detect uninitialized use
+ // TODO when all functions are wrapped and the raw functions are not used anymore,
+ // uncomment the defines in *progs.qh files that hide the raw functions
+ // and assert that the global vectors are NaN before calling the raw functions here
+ // to make sure nobody (even builtins) is accidentally using them - NaN is the most likely value to expose remaining usages
+
+ CLEAR_V_GLOBALS();
+}
+#endif
+
+/// Same as the `makevectors` builtin but uses the provided locals instead of the `v_*` globals.
+/// Always use this instead of raw `makevectors` to make the data flow clear.
+/// Note that you might prefer `FIXED_MAKE_VECTORS` for new code.
+#define MAKE_VECTORS(angles, forward, right, up) MACRO_BEGIN \
+ _makevectors_hidden(angles); \
+ GET_V_GLOBALS(forward, right, up); \
+ CLEAR_V_GLOBALS(); \
+MACRO_END
+
+/// Returns all 4 vectors by assigning to them (instead of returning a value) for consistency (and sanity)
+#define SKEL_GET_BONE_ABS(skel, bonenum, forward, right, up, origin) MACRO_BEGIN \
+ origin = _skel_get_boneabs_hidden(skel, bonenum) \
+ GET_V_GLOBALS(forward, right, up); \
+ CLEAR_V_GLOBALS(); \
+MACRO_END
+
+#define SKEL_SET_BONE(skel, bonenum, org, forward, right, up) MACRO_BEGIN \
+ SET_V_GLOBALS(forward, right, up); \
+ _skel_set_bone_hidden(skel, bonenum, org); \
+ CLEAR_V_GLOBALS(); \
+MACRO_END
+
+#define ADD_DYNAMIC_LIGHT(org, radius, lightcolours, forward, right, up) MACRO_BEGIN \
+ SET_V_GLOBALS(forward, right, up); \
+ _adddynamiclight_hidden(org, radius, lightcolours); \
+ CLEAR_V_GLOBALS(); \
+MACRO_END
+
+#define VECTOR_VECTORS(forward_in, forward, right, up) MACRO_BEGIN \
+ _vectorvectors_hidden(forward_in); \
+ GET_V_GLOBALS(forward, right, up); \
+ CLEAR_V_GLOBALS(); \
+MACRO_END
+
+/// Note that this only avoids the v_* globals, not the gettaginfo_* ones
+#define GET_TAG_INFO(ent, tagindex, forward, right, up, origin) MACRO_BEGIN \
+ origin = _gettaginfo_hidden(ent, tagindex); \
+ GET_V_GLOBALS(forward, right, up); \
+ CLEAR_V_GLOBALS(); \
+MACRO_END
const float FLOAT_MAX = 340282346638528859811704183484516925440.0f;
const float FLOAT_EPSILON = 0.00000011920928955078125f;
+/// Always use `isnan` function to compare because `float x = FLOAT_NAN; x == x;` gives true
+const float FLOAT_NAN = 0.0 / 0.0;
#define YAW(v) ((v).y)
#define ROLL(v) ((v).z)
-#define MAKEVECTORS(f, angles, forward, right, up) MACRO_BEGIN \
- f(angles); \
- forward = v_forward; \
- right = v_right; \
- up = v_up; \
-MACRO_END
-
//pseudo prototypes:
// vector vec2(vector v); // returns a vector with just the x and y components of the given vector
// vector vec2(float x, float y); // returns a vector with the given x and y components
noref vector _vec3;
#define vec3(_x, _y, _z) (_vec3.x = (_x), _vec3.y = (_y), _vec3.z = (_z), _vec3)
+#define VEC_NAN vec3(FLOAT_NAN, FLOAT_NAN, FLOAT_NAN);
+
+ERASEABLE
+bool is_all_nans(vector v) {
+ return isnan(v.x) && isnan(v.y) && isnan(v.z);
+}
+
ERASEABLE
vector Rotate(vector v, float a)
{
// angles in fixedmakevectors/fixedvectoangles space
vector AnglesTransform_Apply(vector transform, vector v)
{
- fixedmakevectors(transform);
- return v_forward * v.x
- + v_right * (-v.y)
- + v_up * v.z;
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(transform, forward, right, up);
+ return forward * v.x + right * (-v.y) + up * v.z;
}
vector AnglesTransform_Multiply(vector t1, vector t2)
{
- vector m_forward, m_up;
- fixedmakevectors(t2); m_forward = v_forward; m_up = v_up;
- m_forward = AnglesTransform_Apply(t1, m_forward); m_up = AnglesTransform_Apply(t1, m_up);
- return fixedvectoangles2(m_forward, m_up);
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(t2, forward, right, up);
+ forward = AnglesTransform_Apply(t1, forward);
+ up = AnglesTransform_Apply(t1, up);
+ return fixedvectoangles2(forward, up);
}
vector AnglesTransform_Invert(vector transform)
{
vector i_forward, i_up;
- fixedmakevectors(transform);
- // we want angles that turn v_forward into '1 0 0', v_right into '0 1 0' and v_up into '0 0 1'
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(transform, forward, right, up);
+ // we want angles that turn forward into '1 0 0', right into '0 1 0' and up into '0 0 1'
// but these are orthogonal unit vectors!
// so to invert, we can simply fixedvectoangles the TRANSPOSED matrix
// TODO is this always -transform?
- i_forward.x = v_forward.x;
- i_forward.y = -v_right.x;
- i_forward.z = v_up.x;
- i_up.x = v_forward.z;
- i_up.y = -v_right.z;
- i_up.z = v_up.z;
+ i_forward.x = forward.x;
+ i_forward.y = -right.x;
+ i_forward.z = up.x;
+ i_up.x = forward.z;
+ i_up.y = -right.z;
+ i_up.z = up.z;
return fixedvectoangles2(i_forward, i_up);
}
#if POSITIVE_PITCH_IS_DOWN
#define fixedmakevectors makevectors
+ #define FIXED_MAKE_VECTORS MAKE_VECTORS
noref vector _fixedvectoangles;
#define fixedvectoangles(a) (_fixedvectoangles = vectoangles(a), _fixedvectoangles.x *= -1, _fixedvectoangles)
noref vector _fixedvectoangles2;
a.x = -a.x;
makevectors(a);
}
+ #define FIXED_MAKE_VECTORS(angles, forward, right, up) MACRO_BEGIN \
+ fixedmakevectors(angles); \
+ GET_V_GLOBALS(forward, right, up); \
+ CLEAR_V_GLOBALS(); \
+ MACRO_END
#define fixedvectoangles2 vectoangles2
#define fixedvectoangles vectoangles
#endif
e.warpzone_targetorigin = other_org;
e.warpzone_angles = my_ang;
e.warpzone_targetangles = other_ang;
- fixedmakevectors(my_ang); e.warpzone_forward = v_forward;
- fixedmakevectors(other_ang); e.warpzone_targetforward = v_forward;
+ vector forward, right, up;
+ FIXED_MAKE_VECTORS(my_ang, forward, right, up);
+ e.warpzone_forward = forward;
+ FIXED_MAKE_VECTORS(other_ang, forward, right, up);
+ e.warpzone_targetforward = forward;
setcamera_transform(e, WarpZone_camera_transform);
}
float nomonsters_adjusted;
float frac, sol, i;
float contentshack;
- vector o0, e0;
entity wz;
vector vf, vr, vu;
vf = v_forward;
vr = v_right;
vu = v_up;
- o0 = org;
- e0 = end;
switch(nomonsters)
{
}
bool isnan(float e)
{
- float f = e;
- return (e != f);
+ // the sane way to detect NaN is broken because of a compiler bug
+ // (works with constants but breaks when assigned to variables)
+ // use conversion to string instead
+ //float f = e;
+ //return (e != f);
+
+ // Negative NaN ("-nan") is much more common but plain "nan" can be created by negating *some* -nans so we need to check both.
+ // DP's QCVM and GMQCC's QCVM behave differently - one needs ftos(-(0.0 / 0.0)), the other ftos(-sqrt(-1)).
+ string s = ftos(e);
+ return s == "nan" || s == "-nan";
}
bool isnormal(float e)
{
{
return fabs(e) * ((f>0) ? 1 : -1);
}
+/// Always use `isnan` function to compare because `float x = nan(); x == x;` gives true
float nan(string tag)
{
return sqrt(-1);
if(area > 0)
{
org = org - ((org - point) * norm) * norm; // project to plane
- makevectors(ang);
- if(norm * v_forward < 0)
+ vector forward, right, up;
+ MAKE_VECTORS(ang, forward, right, up);
+ if(norm * forward < 0)
{
LOG_INFO("Position target of trigger_warpzone near ", vtos(this.aiment.origin), " points into trigger_warpzone. BEWARE.");
norm = -1 * norm;
}
- ang = vectoangles2(norm, v_up); // keep rotation, but turn exactly against plane
+ ang = vectoangles2(norm, up); // keep rotation, but turn exactly against plane
ang.x = -ang.x;
- if(norm * v_forward < 0.99)
+ if(norm * forward < 0.99)
LOG_INFO("trigger_warpzone near ", vtos(this.aiment.origin), " has been turned to match plane orientation (", vtos(this.aiment.angles), " -> ", vtos(ang));
if(vdist(org - this.aiment.origin, >, 0.5))
LOG_INFO("trigger_warpzone near ", vtos(this.aiment.origin), " has been moved to match the plane (", vtos(this.aiment.origin), " -> ", vtos(org), ").");
if (this.movedir == '0 0 0')
if (this.angles != '0 0 0')
{
- makevectors (this.angles);
- this.movedir = v_forward;
+ vector forward, _r, _u;
+ MAKE_VECTORS(this.angles, forward, _r, _u);
+ this.movedir = forward;
}
if(this.model == "")
{
#include <menu/xonotic/demolist.qc>
#include <menu/xonotic/dialog.qc>
#include <menu/xonotic/dialog_credits.qc>
+#include <menu/xonotic/dialog_disconnect.qc>
#include <menu/xonotic/dialog_firstrun.qc>
#include <menu/xonotic/dialog_hudpanel_ammo.qc>
#include <menu/xonotic/dialog_hudpanel_centerprint.qc>
#include <menu/xonotic/demolist.qh>
#include <menu/xonotic/dialog.qh>
#include <menu/xonotic/dialog_credits.qh>
+#include <menu/xonotic/dialog_disconnect.qc>
#include <menu/xonotic/dialog_firstrun.qh>
#include <menu/xonotic/dialog_hudpanel_ammo.qh>
#include <menu/xonotic/dialog_hudpanel_centerprint.qh>
--- /dev/null
+#include "dialog_disconnect.qh"
+
+#include "textlabel.qh"
+#include "button.qh"
+
+void Disconnect_Click(entity btn, entity me)
+{
+ localcmd("disconnect");
+ Dialog_Close(btn, me);
+}
+
+void XonoticDisconnectDialog_fill(entity me)
+{
+ entity e;
+ me.TR(me);
+ me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Are you sure to disconnect from server?")));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticButton_T(_("Yes"), '1 0 0', _("I would disconnect from server...")));
+ e.onClick = Disconnect_Click;
+ e.onClickEntity = me;
+ me.TD(me, 1, 1, e = makeXonoticButton_T(_("No"), '0 1 0', _("I would play more!")));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
\ No newline at end of file
--- /dev/null
+#pragma once
+
+#include "dialog.qh"
+CLASS(XonoticDisconnectDialog, XonoticDialog)
+ METHOD(XonoticDisconnectDialog, fill, void(entity));
+ ATTRIB(XonoticDisconnectDialog, title, string, _("Disconnect"));
+ ATTRIB(XonoticDisconnectDialog, tooltip, string, _("Disconnect server"));
+ ATTRIB(XonoticDisconnectDialog, color, vector, SKINCOLOR_DIALOG_QUIT);
+ ATTRIB(XonoticDisconnectDialog, intendedWidth, float, 0.5);
+ ATTRIB(XonoticDisconnectDialog, rows, float, 3);
+ ATTRIB(XonoticDisconnectDialog, colums, float, 2);
+ ATTRIB(XonoticDisconnectDialog, name, string, "Disconnect");
+ENDCLASS(XonoticDisconnectDialog)
\ No newline at end of file
e.onClickEntity = slist;
slist.infoButton = e;
me.TR(me);
+
+ /*
me.TD(me, 1, 1, e = makeXonoticCommandButton_T(_("Disconnect"), '0 0 0', "disconnect", 0,
_("Disconnect from the server")));
slist.disconnectButton = e;
- me.TD(me, 1, me.columns-1, e = makeXonoticButton(_("Join!"), '0 0 0'));
+ */
+
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("Join!"), '0 0 0'));
e.onClick = ServerList_Connect_Click;
e.onClickEntity = slist;
slist.connectButton = e;
float pmin = 2, pmax = 16, pstep = 1;
cvar_set("timelimit_override", "10");
- cvar_set("g_lms_lives_override", "9");
if(random() < 0.4) // 40% are DM
{
#include "dialog_credits.qh"
#include "dialog_quit.qh"
+#include "dialog_disconnect.qh"
+
+
+
void MainWindow_draw(entity me)
{
SUPER(MainWindow).draw(me);
DialogOpenButton_Click_withCoords(NULL, me.dialogToShow, '0 0 0', eX * conwidth + eY * conheight);
me.dialogToShow = NULL;
}
+
+ //-------------------------------------
+ // Part of Disconnect Dialog button:
+ // In case of this function is recalling every time, need to use condition of visibility
+
+ if (me.disconnectDialogVisibility && !(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)))
+ {
+ // If gamestate is not "ingame" (and it is a first "frame" of drawing (or dialog is visible)),
+ // disconnect button is unnecessary, remove it
+ me.removeItem(me.mainNexposee, me.disconnectDialog);
+ me.disconnectDialogVisibility = 0;
+
+ } else if(!me.disconnectDialogVisibility && (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))) {
+
+ // If gamestate is "ingame" (and dialog is not visible),
+ // make disconnect button visible
+ entity n, i;
+ n = me.mainNexposee;
+ i = me.disconnectDialog;
+ n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+ n.setNexposee(n, i, '0.5 1.2 0.0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+ me.disconnectDialogVisibility = 1;
+ }
+
+ // I haven't found the best solution for making button visible.
+ // Alpha channel is the worst thing, because dialog with alpha is also clickable
+ //-------------------------------------
}
void DemoButton_Click(entity me, entity other)
// main dialogs/windows
me.mainNexposee = n = NEW(XonoticNexposee);
+
/*
if(checkextension("DP_GECKO_SUPPORT"))
{
n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
}
*/
+
i = NEW(XonoticSingleplayerDialog);
i.configureDialog(i);
n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
+ //Disconnect dialog at center of screen (between credits and quit)
+ i = NEW(XonoticDisconnectDialog);
+ i.configureDialog(i);
+ n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+ n.setNexposee(n, i, '0.5 1.2 0.0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+ n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
+ me.disconnectDialog = i;
+
i = NEW(XonoticQuitDialog);
i.configureDialog(i);
n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
me.moveItemAfter(me, n, NULL);
me.initializeDialog(me, n);
+ me.disconnectDialogVisibility = 1;
if(cvar_string("_cl_name") == cvar_defstring("_cl_name"))
me.dialogToShow = me.firstRunDialog;
ATTRIB(MainWindow, demostartconfirmDialog, entity);
ATTRIB(MainWindow, demotimeconfirmDialog, entity);
ATTRIB(MainWindow, resetDialog, entity);
+ ATTRIB(MainWindow, disconnectDialog, entity);
+ ATTRIB(MainWindow, disconnectDialogVisibility, float, 1);
ENDCLASS(MainWindow)
else { me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT); }
me.connectButton.disabled = (me.lockedSelectedItem || (me.nItems == 0 && me.ipAddressBox.text == ""));
- me.disconnectButton.disabled = (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)));
+ //me.disconnectButton.disabled = (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)));
me.infoButton.disabled = (me.lockedSelectedItem || me.nItems == 0 || !owned);
me.favoriteButton.disabled = (me.lockedSelectedItem || (me.nItems == 0 && me.ipAddressBox.text == ""));
ATTRIB(XonoticServerList, sortButton4, entity);
ATTRIB(XonoticServerList, sortButton5, entity);
ATTRIB(XonoticServerList, connectButton, entity);
- ATTRIB(XonoticServerList, disconnectButton, entity);
+ //ATTRIB(XonoticServerList, disconnectButton, entity);
ATTRIB(XonoticServerList, infoButton, entity);
ATTRIB(XonoticServerList, currentSortOrder, float, 0);
ATTRIB(XonoticServerList, currentSortField, float, -1);
bool autocvar_g_mirrordamage_onlyweapons;
float autocvar_g_movement_highspeed = 1;
+bool autocvar_g_movement_highspeed_q3_compat = 0;
string autocvar_g_mutatormsg;
//float autocvar_g_nick_flood_penalty;
int autocvar_g_nick_flood_penalty_red;
string autocvar_sv_defaultplayermodel_red;
string autocvar_sv_defaultplayermodel_yellow;
int autocvar_sv_defaultplayerskin;
+bool autocvar_sv_doors_always_open;
bool autocvar_sv_doublejump;
bool autocvar_sv_eventlog;
bool autocvar_sv_eventlog_console;
vector pm1 = ent.origin + ent.mins;
vector pm2 = ent.origin + ent.maxs;
- // do two scans, because box test is cheaper
- IL_EACH(g_waypoints, it != ent && it != except && !(it.wpflags & (WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_JUMP)),
+ if (autocvar_g_waypointeditor && !IS_BOT_CLIENT(ent))
{
- if(boxesoverlap(pm1, pm2, it.absmin, it.absmax))
+ // this code allows removing waypoints in the air and seeing jumppad/telepport waypoint links
+ // FIXME it causes a bug where a waypoint spawned really close to another one (max 16 qu)
+ // isn't detected as the nearest waypoint
+ IL_EACH(g_waypoints, it != ent && it != except,
{
- if(!autocvar_g_waypointeditor && walkfromwp && !ent.navigation_dynamicgoal)
+ if (boxesoverlap(pm1, pm2, it.absmin, it.absmax))
+ return it;
+ });
+ }
+ else
+ {
+ // do two scans, because box test is cheaper
+ IL_EACH(g_waypoints, it != ent && it != except && !(it.wpflags & (WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_JUMP)),
+ {
+ if(boxesoverlap(pm1, pm2, it.absmin, it.absmax))
{
- waypoint_clearlinks(ent); // initialize wpXXmincost fields
- navigation_item_addlink(it, ent);
+ if(walkfromwp && !ent.navigation_dynamicgoal)
+ {
+ waypoint_clearlinks(ent); // initialize wpXXmincost fields
+ navigation_item_addlink(it, ent);
+ }
+ return it;
}
- return it;
- }
- });
+ });
+ }
vector org = ent.origin;
if (navigation_testtracewalk)
LOG_DEBUG("jetpack ai: required fuel ", ftos(fuel), ", have ", ftos(GetResource(this, RES_FUEL)));
// enough fuel ?
- if(GetResource(this, RES_FUEL) > fuel || (this.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(GetResource(this, RES_FUEL) > fuel || (this.items & IT_UNLIMITED_AMMO))
{
// Estimate cost
// (as onground costs calculation is mostly based on distances, here we do the same establishing some relationship
float CampaignBailout(string s)
{
+#if 0
cvar = cvar_normal;
cvar_string = cvar_string_normal;
cvar_set = cvar_set_normal;
+#endif
cvar_set("g_campaign", "0");
LOG_INFO("^4campaign initialization failed: ", s);
if(autocvar__campaign_testrun)
return 1;
}
+#if 0
string cvar_campaignwrapper_list; // string of format ; var value; var value; var value;
string cvar_string_campaignwrapper(string theCvar)
{
strunzone(s);
//print(cvar_campaignwrapper_list, "\n");
}
+#endif
float Campaign_Invalid()
{
cvar_set("sv_public", "0");
cvar_set("pausable", "1");
+#if 0
cvar_campaignwrapper_list = strzone(strcat("; ", campaign_mutators[0], "; "));
+#else
+ string cvar_campaignwrapper_list = strcat("; ", campaign_mutators[0], "; ");
+ int argc = tokenizebyseparator(cvar_campaignwrapper_list, "; ");
+ if(argc > 0)
+ {
+ for(int j = 0; j < argc; ++j)
+ {
+ string arg = argv(j);
+ if(arg == "") continue;
+ _MapInfo_Parse_Settemp(mapname, MAPINFO_SETTEMP_ACL_USER, 0, arg, 0); // no recursion!
+ }
+ }
+#endif
+#if 0
cvar = cvar_campaignwrapper;
cvar_string = cvar_string_campaignwrapper;
cvar_set = cvar_set_campaignwrapper;
-
cvar_set("g_campaign", "1");
cvar_set("g_dm", "0");
cvar_set("skill", ftos(baseskill));
cvar_set("bot_number", ftos(campaign_bots[0]));
+#else
+ cvar_settemp("g_campaign", "1");
+ cvar_settemp("g_dm", "0");
+ cvar_settemp("skill", ftos(baseskill));
+ cvar_settemp("bot_number", ftos(campaign_bots[0]));
+#endif
MapInfo_SwitchGameType(MapInfo_Type_FromString(campaign_gametype[0]));
// copy sv_gravity cvar, as the engine needs it too (sorry, this will mess
this.event_damage(this, this, this, 1, DEATH_ROT.m_id, DMG_NOWEP, this.origin, '0 0 0');
}
- if (!(this.items & IT_UNLIMITED_WEAPON_AMMO))
+ if (!(this.items & IT_UNLIMITED_AMMO))
{
float minf, maxf, limitf;
// we still allow them to see warnings if it's invalid, so a dead player can find out the sounds in peace
return;
}
+ if (IS_SPEC(caller) || IS_OBSERVER(caller))
+ {
+ // observers/spectators have no player model of their own to play taunts from
+ // again, allow them to see warnings
+ return;
+ }
string msg = "";
if (argc >= 3)
msg = substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2));
break;
}
- case "nextmap": // TODO: replicate the old behaviour of being able to vote for maps from different modes on multimode servers (possibly support it in gotomap too), maybe fallback instead of aborting if map name is invalid?
+ // TODO: replicate the old behaviour of being able to vote for maps from different modes on multimode servers (possibly support it in gotomap too)
+ // maybe fallback instead of aborting if map name is invalid?
+ case "nextmap":
{
vote_command = ValidateMap(argv(startpos + 1), caller);
if (!vote_command) return -1;
break;
}
+ case "timelimit": // include restrictions on the maximum votable time limit
+ {
+ float timelimit_vote = stof(argv(startpos + 1));
+ if(timelimit_vote > autocvar_timelimit_max || timelimit_vote < autocvar_timelimit_min)
+ {
+ print_to(caller, strcat("Invalid timelimit vote, accepted values are between ", ftos(autocvar_timelimit_min), " and ", ftos(autocvar_timelimit_max), "."));
+ return -1;
+ }
+ timelimit_vote = bound(autocvar_timelimit_min, timelimit_vote, autocvar_timelimit_max);
+ vote_parsed_command = strcat("timelimit ", ftos(timelimit_vote));
+ vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
+
+ break;
+ }
+
case "restart":
{
// add a delay so that vote result can be seen and announcer can be heard
BADCVAR("sv_damagetext");
BADCVAR("sv_db_saveasdump");
BADCVAR("sv_intermission_cdtrack");
+ BADCVAR("sv_mapchange_delay");
BADCVAR("sv_minigames");
BADCVAR("sv_namechangetimer");
BADCVAR("sv_precacheplayermodels");
{
g_weapon_stay = 0; // incompatible
start_weapons = g_weaponarena_weapons;
- start_items |= IT_UNLIMITED_AMMO;
+ start_items |= IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS;
}
else
{
if(!cvar("g_use_ammunition"))
start_items |= IT_UNLIMITED_AMMO;
- if(start_items & IT_UNLIMITED_WEAPON_AMMO)
+ if(start_items & IT_UNLIMITED_AMMO)
{
start_ammo_shells = 999;
start_ammo_nails = 999;
if (autocvar_r_showbboxes)
{
// show where spawnpoints point at too
- makevectors(this.angles);
+ vector forward, right, up;
+ MAKE_VECTORS(this.angles, forward, right, up);
entity e = new(info_player_foo);
- setorigin(e, this.origin + v_forward * 24);
+ setorigin(e, this.origin + forward * 24);
setsize(e, '-8 -8 -8', '8 8 8');
e.solid = SOLID_TRIGGER;
}
{
if (andammo)
{
- if(this.items & IT_UNLIMITED_WEAPON_AMMO)
+ if(this.items & IT_UNLIMITED_AMMO)
{
f = 1;
}
WarpZone_TraceLine(ent.origin + ent.view_ofs, ent.origin + ent.view_ofs + s_forward * range, MOVE_NOMONSTERS, ent);
ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
- vector vf, vr, vu;
- vf = v_forward;
- vr = v_right;
- vu = v_up;
+ vector forward, right, up;
+ forward = v_forward;
+ right = v_right;
+ up = v_up;
w_shotend = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); // warpzone support
- v_forward = vf;
- v_right = vr;
- v_up = vu;
+ v_forward = forward;
+ v_right = right;
+ v_up = up;
// un-adjust trueaim if shotend is too close
if(vdist(w_shotend - (ent.origin + ent.view_ofs), <, autocvar_g_trueaim_minrange))
accuracy_add(ent, wep, maxdamage, 0);
if(IS_PLAYER(ent))
- W_HitPlotAnalysis(ent, wep, v_forward, v_right, v_up);
+ W_HitPlotAnalysis(ent, wep, forward, right, up);
vector md = ent.(weaponentity).movedir;
vector vecs = ((md.x > 0) ? md : '0 0 0');
// TODO this is broken - see 637056bea7bf7f5c9c0fc6113e94731a2767476 for an attempted fix
// which fixes issue #1957 but causes #2129
- vector dv = v_right * -vecs.y + v_up * vecs.z;
+ vector dv = right * -vecs.y + up * vecs.z;
w_shotorg = ent.origin + ent.view_ofs + dv;
// now move the shotorg forward as much as requested if possible
if(antilag)
{
if(CS(ent).antilag_debug)
- tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug);
+ tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (vecs.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug);
else
- tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
+ tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (vecs.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
}
else
- tracebox(w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent);
- w_shotorg = trace_endpos - v_forward * nudge;
+ tracebox(w_shotorg, mi, ma, w_shotorg + forward * (vecs.x + nudge), MOVE_NORMAL, ent);
+ w_shotorg = trace_endpos - forward * nudge;
// calculate the shotdir from the chosen shotorg
if(W_DualWielding(ent))
w_shotdir = s_forward;
.float prevwarntime;
bool weapon_prepareattack_checkammo(Weapon thiswep, entity actor, bool secondary, .entity weaponentity)
{
- if ((actor.items & IT_UNLIMITED_WEAPON_AMMO)) return true;
+ if ((actor.items & IT_UNLIMITED_AMMO)) return true;
bool ammo = false;
if (secondary) ammo = thiswep.wr_checkammo2(thiswep, actor, weaponentity);
else ammo = thiswep.wr_checkammo1(thiswep, actor, weaponentity);
restartanim = fr != WFRAME_IDLE;
}
- vector of = v_forward;
- vector or = v_right;
- vector ou = v_up;
-
vector a = '0 0 0';
this.wframe = fr;
if (fr == WFRAME_IDLE) a = this.anim_idle;
a = this.anim_reload;
a.z *= g_weaponratefactor;
- v_forward = of;
- v_right = or;
- v_up = ou;
-
if (this.weapon_think == w_ready && func != w_ready && this.state == WS_RAISE) backtrace(
"Tried to override initial weapon think function - should this really happen?");
return;
}
- makevectors(actor.v_angle);
- vector fo = v_forward; // save them in case the weapon think functions change it
- vector ri = v_right;
- vector up = v_up;
+ vector fo, ri, up;
+ MAKE_VECTORS(actor.v_angle, fo, ri, up);
// Change weapon
if (this.m_weapon != this.m_switchweapon)
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use, .entity weaponentity)
{
if (MUTATOR_CALLHOOK(W_DecreaseAmmo, actor, actor.(weaponentity), ammo_use)) return;
- if ((actor.items & IT_UNLIMITED_WEAPON_AMMO) && !wep.reloading_ammo) return;
+ if ((actor.items & IT_UNLIMITED_AMMO) && !wep.reloading_ammo) return;
ammo_use = M_ARGV(2, float);
w_ent.clip_load = w_ent.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
// if the gun uses no ammo, max out weapon load, else decrease ammo as we increase weapon load
- if (!w_ent.reload_ammo_min || (actor.items & IT_UNLIMITED_WEAPON_AMMO) || wpn.ammo_type == RES_NONE)
+ if (!w_ent.reload_ammo_min || (actor.items & IT_UNLIMITED_AMMO) || wpn.ammo_type == RES_NONE)
{
w_ent.clip_load = w_ent.reload_ammo_amount;
}
{
if (!GetResource(actor, e.ammo_type) && this.reload_ammo_min)
{
- if (!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if (!(actor.items & IT_UNLIMITED_AMMO))
{
if (IS_REAL_CLIENT(actor) && actor.reload_complain < time)
{
declare -a QCCFLAGS=(
-std=gmqcc
+ # Without -O3, GMQCC thinks some variables are used uninitialized if the initialization is done inside an `if (1)` block
+ # (which is created by e.g. BEGIN_MACRO) which would cause the compilation units test to fail.
+ # There doesn't appear to be any measurable increase in compile time
+ # and it allows us to get rid of some explicit initializations which are just useless noise.
+ -O3
-Wall -Werror
-futf8
-freturn-assignments
server) DEFS="-DGAMEQC -DSVQC"
;;
esac
- >&2 echo + ${CPP} "${@:3}" ${DEFS} "${IN}"
+ #>&2 echo + ${CPP} "${@:3}" ${DEFS} "${IN}"
set +e
# additional information
${CPP} "${@:3}" ${DEFS} \
}
function qcc() {
- >&2 echo + $(basename ${QCC}) $@
+ #>&2 echo + $(basename ${QCC}) $@
# FIXME: relative compiler path is too deep
(cd tools && ${QCC} "$@")
}
g_balance_kill_antispam 0
g_forced_respawn 1
// g_playerclip_collisions 0 // do not check playerclips
-g_powerups 0 // set to -1 or patch xonotic
+g_powerups 0
g_spawnpoints_auto_move_out_of_solid 1
g_start_delay 3
-g_use_ammunition 0 "if set to 0 all weapons have unlimited ammunition"
-g_weapon_stay 1 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
+g_use_ammunition 0
+g_weapon_stay 1
teamplay_mode 2 // friendly fire and self damage
sv_vote_nospectators 1
timelimit_override 20
-g_buffs_cooldown_respawn 0.1
+
+// general buff settings
+g_buffs_cooldown_activate 0
+g_buffs_cooldown_respawn 0
g_buffs_randomize 0
+// disabled buffs
+g_buffs_ammo 0
+g_buffs_resistance 0
+g_buffs_medic 0
+g_buffs_vengeance 0
+g_buffs_bash 0
+g_buffs_disability 0
+g_buffs_vampire 0
+g_buffs_jump 0
+g_buffs_invisible 0
+g_buffs_inferno 0
+g_buffs_swapper 0
+g_buffs_magnet 0
+g_buffs_luck 0
+g_buffs_flight 0
+
+// speed buff (q3 haste replacement)
+g_movement_highspeed_q3_compat 1
+g_buffs_speed 1
+g_buffs_speed_time 30
+g_buffs_speed_speed 1.3 // q3 haste lasts 30 seconds
+g_buffs_speed_rate 0.7692307692 // 1/1.3
+g_buffs_speed_weaponspeed 1 // do not increase projectile speed
+g_buffs_speed_damage_take 1
+g_buffs_speed_regen 1.2
+
// game mode settings
g_cts_finish_kill_delay 2
g_cts_selfdamage 0
g_overkill 1
-g_use_ammunition 0
-
// hack - eventually, we should be able to choose overkill models in menu like for vanilla
sv_defaultcharacter 1
sv_defaultplayermodel "models/ok_player/okrobot1.dpm models/ok_player/okrobot2.dpm models/ok_player/okrobot3.dpm models/ok_player/okrobot4.dpm models/ok_player/okmale1.dpm models/ok_player/okmale2.dpm models/ok_player/okmale3.dpm models/ok_player/okmale4.dpm"
seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items (colormod format: 0 0 0 leaves the color unchanged, negative values allowed)"
seta cl_simple_items 0 "enable simple items (if server allows)"
set cl_simpleitems_postfix "_luma" "posfix to add fo model name when simple items are enabled"
-set cl_fullbright_items 0 "enable fullbright items (if server allows, controlled by g_fullbrightitems)"
+set cl_fullbright_items 0 "enable fullbright items (if server allows, controlled by g_fullbrightitems) - items are more visible in shadows"
set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0 (colormod format: 0 0 0 leaves the color unchanged, negative values allowed)"
set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
// server settings
hostname "Xonotic $g_xonoticversion Server"
-set sv_mapchange_delay 5
+set sv_mapchange_delay 5 "delay by this many seconds after the match ends before showing selection screen or changing maps"
set minplayers 0 "fill server with bots to reach this number of players in teamless games (if bot_number is not enough)"
set minplayers_per_team 0 "fill server with bots to reach this number of players per team (if bot_number is not enough)"
// restart server if all players hit "ready"-button
set sv_ready_restart 0 "allow a map to be restarted once all players pressed the \"ready\" button"
-set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
-set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
+set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
+set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
-set g_maxplayers 0 "maximum number of players allowed to play at the same time, set to 0 to allow all players to join the game"
-set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectators\" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked"
+set g_maxplayers 0 "maximum number of players allowed to play at the same time, set to 0 to allow all players to join the game"
+set g_maxplayers_spectator_blocktime 5 "if the players voted for the \"nospectators\" command, this setting defines the number of seconds a observer/spectator has time to join the game before he gets kicked"
// tournament mod
-set g_warmup 0 "split the game into a warmup- and match-stage"
-set g_warmup_limit 180 "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
-set g_warmup_allow_timeout 0 "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
-set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
+set g_warmup 0 "split the game into a warmup- and match-stage"
+set g_warmup_limit 180 "limit warmup-stage to this time (in seconds); if set to -1 the warmup-stage is not affected by any timelimit, if set to 0 the usual timelimit also affects warmup-stage"
+set g_warmup_allow_timeout 0 "allow calling timeouts in the warmup-stage (if sv_timeout is set to 1)"
+set g_warmup_allguns 1 "provide more weapons on start while in warmup: 0 = normal start weapons, 1 = all guns available on the map, 2 = all normal weapons"
set g_warmup_majority_factor 0.8 "minimum percentage of players ready needed for warmup to end"
alias sv_hook_warmupend
-set g_chat_nospectators 0 "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
-set sv_vote_nospectators 0 "only players can call a vote (thus spectators and observers can't call a vote): 0 = all people can vote, 1 = spectators can vote in warmup stage, 2 = only players can vote (no exceptions)."
+set g_chat_nospectators 0 "if 0 spec/observer chat is always visible to the player, if 1 it is never visible to players, if 2 it is only visible to players during warmup stage"
+set sv_vote_nospectators 0 "only players can call a vote (thus spectators and observers can't call a vote): 0 = all people can vote, 1 = spectators can vote in warmup stage, 2 = only players can vote (no exceptions)."
alias g_tourney "g_tourney_$1"
alias g_tourney_1 "g_warmup 1; g_chat_nospectators 2; sv_vote_nospectators 1"
alias g_tourney_0 "g_warmup 0; g_chat_nospectators 0; sv_vote_nospectators 0"
-set sv_timeout 0 "allow a player to call a timeout, this will pause the game for some time"
-set sv_timeout_length 120 "how long the game will be paused at max, in seconds"
-set sv_timeout_number 2 "how many timeouts one player is allowed to call (gets reset after a restart)"
-set sv_timeout_leadtime 4 "how long the players will be informed that a timeout was called before it starts, in seconds"
-set sv_timeout_resumetime 3 "how long the remaining timeout-time will be after a player called the timein command"
+set sv_timeout 0 "allow a player to call a timeout, this will pause the game for some time"
+set sv_timeout_length 120 "how long the game will be paused at max, in seconds"
+set sv_timeout_number 2 "how many timeouts one player is allowed to call (gets reset after a restart)"
+set sv_timeout_leadtime 4 "how long the players will be informed that a timeout was called before it starts, in seconds"
+set sv_timeout_resumetime 3 "how long the remaining timeout-time will be after a player called the timein command"
set g_allow_oldvortexbeam 1 "If enabled, clients are allowed to use old v2.3 Vortex beam"
set sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
set sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
set sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overridden by :<skinnumber> suffix in sv_defaultplayermodel"
-set sv_defaultplayermodel_red "" "\"\" means see sv_defaultplayermodel"
+set sv_defaultplayermodel_red "" "\"\" means see sv_defaultplayermodel"
set sv_defaultplayerskin_red 0 "skin to use on the red team, set to 0 to instead use sv_defaultplayerskin"
set sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
set sv_defaultplayerskin_blue 0 "skin to use on the blue team, set to 0 to instead use sv_defaultplayerskin"
set sv_defaultplayerskin_yellow 0 "skin to use on the yellow team, set to 0 to instead use sv_defaultplayerskin"
set sv_defaultplayermodel_pink "" "\"\" means see sv_defaultplayermodel"
set sv_defaultplayerskin_pink 0 "skin to use on the pink team, set to 0 to instead use sv_defaultplayerskin"
-set sv_defaultplayercolors "" "set to 16*shirt+pants to force a color, note: it does NOT depend on defaultcharacter! Set to \"\" to disable"
+set sv_defaultplayercolors "" "set to 16*shirt+pants to force a color, note: it does NOT depend on defaultcharacter! Set to \"\" to disable"
set sv_autoscreenshot 0 "if set to 1, the server forces all clients to create a local screenshot once the map ended"
net_messagetimeout 30
net_connecttimeout 30
set sv_shownames_cull_distance 2500 "distance after which to not send origin/health/armor of another player"
set bot_config_file bots.txt "Name and path of the bot configuration file"
-set bot_number 0 "Minimum number of bots"
-set bot_usemodelnames 0 "Use player model names for bot names"
-set bot_nofire 0 "When set, bots never fire. Mainly for testing in g_waypointeditor mode"
-set bot_prefix [BOT] "Prefix in front of the bot names"
-set bot_suffix "" "Suffix behind the bot names"
-set skill_auto 0 "when 1, \"skill\" gets adjusted to match the best player on the map"
+set bot_number 0 "Minimum number of bots"
+set bot_usemodelnames 0 "Use player model names for bot names"
+set bot_nofire 0 "When set, bots never fire. Mainly for testing in g_waypointeditor mode"
+set bot_prefix [BOT] "Prefix in front of the bot names"
+set bot_suffix "" "Suffix behind the bot names"
+skill 8
+set skill_auto 0 "when 1, \"skill\" gets adjusted to match the best player on the map"
set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
set bot_ai_dangerdetectioninterval 0.25 "How often scan for waypoints with dangers near"
set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
-set bot_ai_aimskill_blendrate 2 "How much correction will be applied to the aiming angle"
+set bot_ai_aimskill_blendrate 2 "How much correction will be applied to the aiming angle"
set bot_ai_aimskill_fixedrate 15 "Distance based scale from which correction will be applied to the aiming angle"
set bot_ai_aimskill_firetolerance 0 "enable fire tolerance"
set bot_ai_aimskill_firetolerance_distdegrees 100 "Rate at which the aiming angle is updated, scales by skill"
set bot_ai_keyboard_threshold 0.57
set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
-set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far "vaporizer oknex vortex rifle electro devastator mortar hagar hlac crylink blaster okmachinegun machinegun fireball seeker okshotgun shotgun shockwave tuba minelayer" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid "vaporizer devastator oknex vortex fireball seeker mortar electro okmachinegun machinegun arc crylink hlac hagar okshotgun shotgun shockwave blaster rifle tuba minelayer" "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "vaporizer oknex vortex okshotgun shotgun shockwave okmachinegun machinegun arc hlac tuba seeker hagar crylink mortar electro devastator blaster fireball rifle minelayer" "Desired weapons for close distances ordered by priority"
-set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
-set bot_ai_weapon_combo_threshold 0.4 "Try to make a combo N seconds after the last attack"
-set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
-set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds"
-set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this value will perform the \"bunnyhop\" technique"
+set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
+set bot_ai_custom_weapon_priority_far "vaporizer oknex vortex rifle electro devastator mortar hagar hlac crylink blaster okmachinegun machinegun fireball seeker okshotgun shotgun shockwave tuba minelayer" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid "vaporizer devastator oknex vortex fireball seeker mortar electro okmachinegun machinegun arc crylink hlac hagar okshotgun shotgun shockwave blaster rifle tuba minelayer" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "vaporizer oknex vortex okshotgun shotgun shockwave okmachinegun machinegun arc hlac tuba seeker hagar crylink mortar electro devastator blaster fireball rifle minelayer" "Desired weapons for close distances ordered by priority"
+set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
+set bot_ai_weapon_combo_threshold 0.4 "Try to make a combo N seconds after the last attack"
+set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
+set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds"
+set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this value will perform the \"bunnyhop\" technique"
set bot_ai_bunnyhop_startdistance 200 "Run to goals located further than this distance"
set bot_ai_bunnyhop_stopdistance 300 "Stop jumping after reaching this distance to the goal"
set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
set g_waypointeditor_symmetrical_origin "0 0" "Custom origin of symmetry (x y)"
set g_waypointeditor_symmetrical_order 0 "if >= 2 apply rotational symmetry (around origin of symmetry) of this order, otherwise apply autodetected order of symmetry"
set g_waypointeditor_symmetrical_axis "0 0" "Custom axis of symmetry (m q parameters of y = mx + q)"
-set bot_ignore_bots 0 "When set, bots don't shoot at other bots"
-set bot_join_empty 0 "When set, bots also play if no player has joined the server"
-set bot_vs_human 0 "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game"
+set bot_ignore_bots 0 "When set, bots don't shoot at other bots"
+set bot_join_empty 0 "When set, bots also play if no player has joined the server"
+set bot_vs_human 0 "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game"
set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
set g_spawnshield_blockdamage 1 "how much spawn shield protects you from damage (1 = full protection)"
-set g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past)"
+set g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past)"
set g_antilag_nudge 0 "don't touch"
set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
-set g_weapon_stay 0 "1: ghost weapons can be picked up too but give no ammo, 2: ghost weapons refill ammo to one pickup size, thrown guns have no ammo"
+set g_weapon_stay 0 "1: ghost weapons can be picked up but give no ammo, thrown guns have ammo 2: ghost weapons can be picked up and refill ammo to one pickup size, thrown guns have no ammo (to prevent infinite ammo abuse)"
set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
-set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
+set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammo"
set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"
set g_pickup_respawntime_scaling_offset 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right - the results are not intuitive and I recommend plotting the respawn time and the number of items per player to see what's happening"
set g_pickup_respawntime_scaling_linear 1 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly"
-set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\", \"most\", \"all_available\" or \"most_available\" (available only gives the weapon if the map normally has it as a pickup item)"
-set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)"
-set g_weaponarena_random_with_blaster "1" "additionally, always provide the blaster in random weapon arena games"
+set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\", \"most\", \"all_available\" or \"most_available\" (available only gives the weapon if the map normally has it as a pickup item)"
+set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)"
+set g_weaponarena_random_with_blaster "1" "additionally, always provide the blaster in random weapon arena games"
set g_spawnpoints_auto_move_out_of_solid 0 "if set to 1 you will see a warning if a spawn point was placed inside a solid"
set g_forced_respawn 0 "if set to 1 and a player died, that player gets automatically respawned once <g_respawn_delay> seconds are over"
set g_fullbrightplayers 0 "brightens up player models (note that the color, skin or model of the players does not change!)"
-set g_fullbrightitems 0 "brightens up items"
+set g_fullbrightitems 0 "allows players to use cl_fullbright_items"
set g_nodepthtestplayers 0 "disables depth testing on players"
set g_nodepthtestitems 0 "disables depth testing on items"
set g_casings 2 "specifies which casings (0: none, 1: only shotgun casings, 2: shotgun and machine gun casings) are sent to the client"
set g_norecoil 0 "if set to 1 shooting weapons won't make you crosshair to move upwards (recoil)"
set g_maplist_mostrecent "" "contains the name of the maps that were most recently played"
-set g_maplist_mostrecent_count 3 "number of most recent maps that are blocked from being played again"
-set g_maplist_index 0 "this is used internally for saving position in maplist cycle"
-set g_maplist_selectrandom 0 "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
-set g_maplist_shuffle 1 "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list"
-set g_maplist_check_waypoints 0 "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
+set g_maplist_mostrecent_count 3 "number of most recent maps that are blocked from being played again"
+set g_maplist_index 0 "this is used internally for saving position in maplist cycle"
+set g_maplist_selectrandom 0 "if 1, a random map will be chosen as next map - DEPRECATED in favor of g_maplist_shuffle"
+set g_maplist_shuffle 1 "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list"
+set g_maplist_check_waypoints 0 "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
set g_maplist_ignore_sizes 0 "when 1, all maps are shown in the map list regardless of player count"
set g_maplist_sizes_count_bots 1 "include the number of bots currently in the server when counting the number of players for size restrictions"
set g_cloaked 0 "display all players mostly invisible"
set g_player_alpha 1 "default opacity of players"
-set g_player_brightness 0 "set to 2 for brighter players"
+set g_player_brightness 0 "set to 2 for brighter players"
set g_player_damageforcescale 2 "push multiplier of attacks against players"
set g_balance_cloaked_alpha 0.25 "opacity of cloaked players"
set g_teamdamage_threshold 40 "for teamplay_mode 4: threshold over which to apply mirror damage"
set g_teamdamage_resetspeed 20 "for teamplay_mode 4: how fast player's teamdamage count decreases"
-set g_balance_teams 1 "automatically balance out players entering instead of asking them for their preferred team"
-set g_balance_teams_prevent_imbalance 1 "prevent players from changing to larger teams"
-set g_changeteam_banned 0 "not allowed to change team"
+set g_balance_teams 1 "automatically balance out players entering instead of asking them for their preferred team"
+set g_balance_teams_prevent_imbalance 1 "prevent players from changing to larger teams"
+set g_changeteam_banned 0 "not allowed to change team"
set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"
set g_bloodloss 0 "amount of health below which blood loss occurs"
-set g_footsteps 1 "serverside footstep sounds"
+set g_footsteps 1 "serverside footstep sounds"
set g_throughfloor_debug 0 "enable debugging messages for throughfloor calculations"
set g_throughfloor_damage_max_stddev 2 "Maximum standard deviation for splash damage"
alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
// score log
-set sv_logscores_console 0 "print scores to server console"
-set sv_logscores_file 0 "print scores to file"
-set sv_logscores_filename scores.log "filename"
-set sv_logscores_bots 0 "exclude bots by default"
+set sv_logscores_console 0 "print scores to server console"
+set sv_logscores_file 0 "print scores to file"
+set sv_logscores_filename scores.log "filename"
+set sv_logscores_bots 0 "exclude bots by default"
// spam (frag/capture) log
-set sv_eventlog 0 "the master switch for efficiency reasons"
+set sv_eventlog 0 "the master switch for efficiency reasons"
set sv_eventlog_console 1 "print event log entries to the console as well"
set sv_eventlog_files 0 "save the event log to individual files instead of the main server log"
set sv_eventlog_files_timestamps 1 "include timestamps in the log file names"
set sv_eventlog_files_nameprefix xonotic "prefix of individual log file names"
set sv_eventlog_files_namesuffix .log "suffix of individual log file names"
-set nextmap "" "override the maplist when switching to the next map"
+set nextmap "" "override the maplist when switching to the next map"
set lastlevel "" "for singleplayer use, shows the menu once the match has ended"
-set quit_when_empty 0 "set to 1, then the server exits when the next level would start but is empty"
-set quit_and_redirect "" "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
+set quit_when_empty 0 "set to 1, then the server exits when the next level would start but is empty"
+set quit_and_redirect "" "set to an IP to redirect all players at the end of the match to another server. Set to \"self\" to let all players reconnect at the end of the match (use it to make seamless engine updates)"
set quit_and_redirect_timer 1.5 "set to number of seconds after quit before performing the connect operation of quit_and_redirect"
// Green's fullbright skins, updated by Samual
set sv_motd "" "additional information to show on the welcome screen that greets joining players"
-set g_waypoints_for_items 0 "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
+set g_waypoints_for_items 0 "make waypoints out of items, values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always"
-set g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match"
+set g_maplist_votable 6 "number of maps that are shown in the map voting at the end of a match, 0 to disable"
set g_maplist_votable_keeptwotime 15 "show only 2 options after this amount of time during map vote screen"
-set g_maplist_votable_timeout 30 "timeout for the map voting; must be below 50 seconds!"
-set g_maplist_votable_suggestions 2 "number of maps a player is allowed to suggest for the map voting screen"
+set g_maplist_votable_timeout 30 "timeout for the map voting; must be below 50 seconds!"
+set g_maplist_votable_suggestions 2 "number of maps a player is allowed to suggest for the map voting screen using 'suggestmap'"
set g_maplist_votable_suggestions_override_mostrecent 0 "allow players to suggest maps that have been played recently"
-set g_maplist_votable_nodetail 0 "nodetail only shows total count instead of all vote counts per map, so votes don't influence others that much"
-set g_maplist_votable_abstain 0 "when 1, you can abstain from your vote"
+set g_maplist_votable_nodetail 0 "hide per-map vote counts (to avoid influential first votes)"
+set g_maplist_votable_abstain 0 "offer a "\don't care\" option on the voting screen"
set g_maplist_votable_screenshot_dir "maps levelshots" "where to look for map screenshots"
set sv_vote_gametype 0 "show a vote screen for gametypes before map vote screen"
set sv_vote_gametype_keeptwotime 10 "show only 2 options after this amount of time during gametype vote screen"
-set sv_vote_gametype_options "dm tdm ctf" "Keep the identifiers short, otherwise you'll run into issues with too long alias names (max is 31 characters) when using sv_vote_gametype_hook_*"
+set sv_vote_gametype_options "dm tdm ca ctf" "identifiers of gamemodes on the voting screen, can be custom (max 9 chars) - see example in server/server.cfg"
set sv_vote_gametype_timeout 20 "how long the gametype vote screen lasts"
set sv_vote_gametype_default_current 1 "Keep the current gametype if no one votes"
-set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax 2 "normal chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst 2 "normal chat: allow bursts of so many chat lines"
-set g_chat_flood_spl_team 1 "team chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax_team 2 "team chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst_team 2 "team chat: allow bursts of so many chat lines"
-set g_chat_flood_spl_tell 1 "private chat: seconds between lines to not count as flooding"
-set g_chat_flood_lmax_tell 2 "private chat: maximum number of lines per chat message at once"
-set g_chat_flood_burst_tell 2 "private chat: allow bursts of so many chat lines"
-set g_chat_flood_notify_flooder 1 "when 0, the flooder still can see his own message"
-set g_chat_teamcolors 0 "colorize nicknames in team color for chat"
+set g_chat_flood_spl 3 "normal chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax 2 "normal chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst 2 "normal chat: allow bursts of so many chat lines"
+set g_chat_flood_spl_team 1 "team chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax_team 2 "team chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst_team 2 "team chat: allow bursts of so many chat lines"
+set g_chat_flood_spl_tell 1 "private chat: seconds between lines to not count as flooding"
+set g_chat_flood_lmax_tell 2 "private chat: maximum number of lines per chat message at once"
+set g_chat_flood_burst_tell 2 "private chat: allow bursts of so many chat lines"
+set g_chat_flood_notify_flooder 1 "when 0, the flooder still can see his own message"
+set g_chat_teamcolors 0 "colorize nicknames in team color for chat"
set g_chat_tellprivacy 1 "when disabled, tell messages are also sent to the server console log... otherwise they're kept private between players."
set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
set sv_itemstime 1 "enable networking of time left until respawn for items such as mega health/armor and powerups"
-set g_ban_default_bantime 5400 "90 minutes"
-set g_ban_default_masksize 3 "masksize 0 means banning by UID only, 1 means banning by /8 (IPv6: /32) network, 2 means banning by /16 (IPv6: /48) network, 3 means banning by /24 (IPv6: /56) network, 4 means banning by single IP (IPv6: /64 network)"
+set g_ban_default_bantime 5400 "90 minutes"
+set g_ban_default_masksize 3 "masksize 0 means banning by UID only, 1 means banning by /8 (IPv6: /32) network, 2 means banning by /16 (IPv6: /48) network, 3 means banning by /24 (IPv6: /56) network, 4 means banning by single IP (IPv6: /64 network)"
set g_ban_telluser 1 "notify the banned player about it when they try to join"
-set g_banned_list "" "format: IP remainingtime IP remainingtime ..."
-set g_banned_list_idmode "1" "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)"
+set g_banned_list "" "format: IP remainingtime IP remainingtime ..."
+set g_banned_list_idmode "1" "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)"
// useful vote aliases
set timelimit_increment 5 "number of minutes added to the timer when voting for extendmatchtime"
set timelimit_decrement 5 "number of minutes removed from the timer when voting for reducematchtime"
-set timelimit_min 5 "shortest match time achieveable with reducematchtime votes"
-set timelimit_max 60 "maximum match time achieveable with extendmatchtime votes"
+set timelimit_min 5 "shortest match time achieveable with reducematchtime and timelimit votes"
+set timelimit_max 60 "maximum match time achieveable with extendmatchtime and timelimit votes"
sv_gameplayfix_delayprojectiles 0
sv_gameplayfix_q2airaccelerate 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?"
+set g_jump_grunt 0 "Do you make a grunting noise every time you jump? Is it the same grunting noise every time?"
-set g_maplist_allow_hidden 0 "allow hidden maps to be, e.g., voted for and in the maplist"
-set g_maplist_allow_frustrating 0 "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
+set g_maplist_allow_hidden 0 "allow hidden maps to be, e.g., voted for and in the maplist"
+set g_maplist_allow_frustrating 0 "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
-set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
+set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
-set g_ban_sync_uri "" "sync using this ban list provider (empty string to disable)"
-set g_ban_sync_interval 5 "sync every 5 minutes"
-set g_ban_sync_trusted_servers "" "request ban lists from these xonotic servers (do not include your own server there, or unbanning may fail)"
-set g_ban_sync_timeout 45 "time out in seconds for the ban sync requests"
-set g_ban_sync_trusted_servers_verify 0 "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
+set g_ban_sync_uri "" "sync using this ban list provider (empty string to disable)"
+set g_ban_sync_interval 5 "sync every 5 minutes"
+set g_ban_sync_trusted_servers "" "request ban lists from these xonotic servers (do not include your own server there, or unbanning may fail)"
+set g_ban_sync_timeout 45 "time out in seconds for the ban sync requests"
+set g_ban_sync_trusted_servers_verify 0 "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
set g_showweaponspawns 1 "1: display waypoints for weapon spawns found on the map when a weapon key is pressed and the weapon is not owned; 2: for dropped weapons too; 3: for all the weapons sharing the same impulse"
set g_ballistics_penetrate_clips 1 "allow ballistics to pass through weapon clips"
set g_ballistics_solidpenetration_exponent 0.25 "how fast damage falls off when bullets pass through walls - 1 means linear, lower values mean slower initial falloff but faster once there's little solidpenetration left (damage_fraction = solidpen_fraction^exp for solidpen_fraction between 0 and 1)"
-sv_status_show_qcstatus 1 "Xonotic uses this field instead of frags"
-set g_full_getstatus_responses 0 "this currently breaks qstat"
+sv_status_show_qcstatus 1 "Xonotic uses this field instead of frags"
+set g_full_getstatus_responses 0 "this currently breaks qstat"
// "Gentle mode": show no blood
-set sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages"
+set sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages"
set g_jetpack 0 "Jetpack mutator"
set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
set sv_vq3compat 0 "toggle for some compatibility hacks (for VQ3 and CPM map compatibility in mapinfo files)"
-set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
+set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)"
+set g_movement_highspeed_q3_compat 0 "apply speed modifiers to air movement in a more Q3-compatible way (only apply speed buffs and g_movement_highspeed to max air speed, not to acceleration)"
set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"
set sv_damagetext 2 "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage"
set sv_showfps 5 "Show player's FPS counters in the scoreboard. This setting acts as a delay in seconds between updates"
+set autocvar_sv_doors_always_open 0 "If set to 1 don't close doors which after they were open"