From: Lyberta Date: Mon, 30 Jul 2018 23:36:02 +0000 (+0300) Subject: Teamplay: Consolidating autocvars. X-Git-Tag: xonotic-v0.8.5~1899^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f3c6e73fd1982f4a7bb868a7ef34715dcfd6039;p=xonotic%2Fxonotic-data.pk3dir.git Teamplay: Consolidating autocvars. --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 5f5731e2d..8a19f06c6 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -88,9 +88,6 @@ float autocvar_g_balance_powerup_strength_selfforce; //float autocvar_g_balance_powerup_strength_time; float autocvar_g_balance_superweapons_time; float autocvar_g_balance_selfdamagepercent; -bool autocvar_g_balance_teams; -bool autocvar_g_balance_teams_prevent_imbalance; -//float autocvar_g_balance_teams_scorefactor; float autocvar_g_ballistics_density_corpse; float autocvar_g_ballistics_density_player; float autocvar_g_ballistics_mindistance; @@ -109,7 +106,6 @@ bool autocvar_g_campaign; #define autocvar_g_campaign_forceteam cvar("g_campaign_forceteam") int autocvar_g_campaign_skill; int autocvar_g_casings; -bool autocvar_g_changeteam_banned; float autocvar_g_chat_flood_burst; float autocvar_g_chat_flood_burst_team; float autocvar_g_chat_flood_burst_tell; @@ -362,8 +358,6 @@ bool autocvar_sv_vote_gamestart; string autocvar_sv_weaponstats_file; float autocvar_sv_gibhealth; float autocvar_sys_ticrate; -bool autocvar_teamplay_lockonrestart; -int autocvar_teamplay_mode; #define autocvar_timelimit cvar("timelimit") #define autocvar_timelimit_override cvar("timelimit_override") float autocvar_timelimit_increment; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index a25ae5bec..4964bf91e 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -4,6 +4,7 @@ #include "bot/api.qh" #include "g_hook.qh" #include +#include "teamplay.qh" #include "scores.qh" #include "spawnpoints.qh" #include "../common/state.qh" diff --git a/qcsrc/server/teamplay.qh b/qcsrc/server/teamplay.qh index 477d24ee1..33f9d02d7 100644 --- a/qcsrc/server/teamplay.qh +++ b/qcsrc/server/teamplay.qh @@ -1,5 +1,13 @@ #pragma once +int autocvar_teamplay_mode; + +bool autocvar_g_changeteam_banned; +bool autocvar_teamplay_lockonrestart; + +bool autocvar_g_balance_teams; +bool autocvar_g_balance_teams_prevent_imbalance; + bool lockteams; // ========================== Global teams API ================================ diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 21a94e340..958a51778 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -258,9 +258,7 @@ set g_teamdamage_resetspeed 20 "for teamplay_mode 4: how fast player's 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_balance_teams_scorefactor 0.25 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)" set g_changeteam_banned 0 "not allowed to change team" -set g_changeteam_fragtransfer 0 "% of frags you get to keep when you change teams (rounded down)" set sv_teamnagger 1 "enable a nag message when the teams are unbalanced"