Commit 2f553b6b authored by Mario's avatar Mario

Purge autocvars.qh from the codebase, cvars are defined in the headers of the...

Purge autocvars.qh from the codebase, cvars are defined in the headers of the features that use them
parent 126111bb
Pipeline #207616799 passed with stages
in 32 minutes and 54 seconds
......@@ -9,5 +9,7 @@ float autocvar_cl_casings_ticrate = 0.1;
#endif
#ifdef SVQC
int autocvar_g_casings;
void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner, .entity weaponentity);
#endif
......@@ -7,6 +7,8 @@
#ifdef SVQC
/** Use new sound handling. TODO: use when sounds play correctly on clients */
bool autocvar_g_debug_globalsounds = false;
bool autocvar_sv_taunt;
bool autocvar_sv_autotaunt;
#endif
// player sounds, voice messages
......
......@@ -8,6 +8,9 @@
void ctf_Initialize();
int autocvar_captureleadlimit_override;
int autocvar_capturelimit_override;
REGISTER_MUTATOR(ctf, false)
{
MUTATOR_STATIC();
......
......@@ -3,6 +3,7 @@
#include "sv_generator.qh"
#include <server/bot/api.qh>
#include <server/campaign.qh>
#include <server/command/vote.qh>
#include <server/damage.qh>
#include <server/items/items.qh>
......
#pragma once
//int autocvar_leadlimit;
int autocvar_leadlimit_and_fraglimit;
int autocvar_leadlimit_override;
// TODO: find a better location for these?
int total_players;
......
......@@ -3,6 +3,7 @@
#include "pickup.qh"
#include <common/items/all.qh>
#ifdef SVQC
#include <common/stats.qh>
#include <server/items/items.qh>
#include <server/resources.qh>
#endif
......
......@@ -23,6 +23,10 @@ SOUND(Strength, Item_Sound("powerup"));
#endif
#ifdef SVQC
float autocvar_g_balance_powerup_strength_damage;
float autocvar_g_balance_powerup_strength_force;
float autocvar_g_balance_powerup_strength_selfdamage;
float autocvar_g_balance_powerup_strength_selfforce;
float autocvar_g_balance_powerup_strength_time;
void powerup_strength_init(Pickup this, entity item)
{
......@@ -61,6 +65,8 @@ SOUND(Shield, Item_Sound("powerup_shield"));
#endif
#ifdef SVQC
float autocvar_g_balance_powerup_invincible_takedamage;
float autocvar_g_balance_powerup_invincible_takeforce = 0.33;
float autocvar_g_balance_powerup_invincible_time;
void powerup_shield_init(Pickup this, entity item)
{
......
#pragma once
#ifdef SVQC
bool autocvar_sv_doors_always_open;
#endif
const int DOOR_START_OPEN = BIT(0);
const int DOOR_DONT_LINK = BIT(2);
......
......@@ -16,7 +16,6 @@
#include <lib/warpzone/server.qh>
#include <lib/warpzone/util_server.qh>
#include <server/anticheat.qh>
#include <server/autocvars.qh>
#include <server/weapons/csqcprojectile.qh>
#endif
......
#pragma once
#include "defs.qh"
#ifdef SVQC
bool autocvar_g_telefrags;
bool autocvar_g_telefrags_avoid;
bool autocvar_g_telefrags_teamplay;
#endif
IntrusiveList g_teleporters;
STATIC_INIT(g_teleporters) { g_teleporters = IL_NEW(); }
......
#pragma once
#ifdef SVQC
float autocvar_g_triggerimpulse_accel_multiplier;
float autocvar_g_triggerimpulse_accel_power;
float autocvar_g_triggerimpulse_directional_multiplier;
float autocvar_g_triggerimpulse_radial_multiplier;
#endif
// tZorks trigger impulse / gravity
.float radius;
.int falloff;
......
#pragma once
bool autocvar_sv_minigames;
bool autocvar_sv_minigames_observer;
/// Create a new minigame session
/// \return minigame session entity
entity start_minigame(entity player, string minigame );
......
......@@ -6,6 +6,7 @@
#include <common/mapobjects/teleporters.qh>
#include <common/mapobjects/triggers.qh>
#include <common/monsters/all.qh>
#include <common/mutators/mutator/nades/nades.qh>
#include <common/physics/movelib.qh>
#include <common/stats.qh>
#include <common/teams.qh>
......@@ -17,9 +18,9 @@
#include <common/weapons/_mod.qh>
#include <lib/csqcmodel/sv_model.qh>
#include <lib/warpzone/common.qh>
#include <server/autocvars.qh>
#include <server/campaign.qh>
#include <server/cheats.qh>
#include <server/client.qh>
#include <server/command/_mod.qh>
#include <server/damage.qh>
#include <server/items/items.qh>
......
......@@ -2,6 +2,34 @@
#include "all.qh"
float autocvar_g_monsters;
bool autocvar_g_monsters_edit;
bool autocvar_g_monsters_sounds;
float autocvar_g_monsters_think_delay;
int autocvar_g_monsters_max;
int autocvar_g_monsters_max_perplayer;
float autocvar_g_monsters_damageforcescale = 0.8;
float autocvar_g_monsters_target_range;
bool autocvar_g_monsters_target_infront;
float autocvar_g_monsters_target_infront_range = 0.3;
float autocvar_g_monsters_attack_range;
int autocvar_g_monsters_score_kill;
int autocvar_g_monsters_score_spawned;
bool autocvar_g_monsters_typefrag;
bool autocvar_g_monsters_owners;
float autocvar_g_monsters_miniboss_chance;
float autocvar_g_monsters_miniboss_healthboost;
float autocvar_g_monsters_drop_time;
float autocvar_g_monsters_spawnshieldtime;
bool autocvar_g_monsters_quake_resize = true;
bool autocvar_g_monsters_teams;
float autocvar_g_monsters_respawn_delay;
bool autocvar_g_monsters_respawn;
float autocvar_g_monsters_armor_blockpercent;
float autocvar_g_monsters_healthbars;
bool autocvar_g_monsters_lineofsight = true;
//bool autocvar_g_monsters_ignoretraces = true;
// stats networking
int monsters_total;
int monsters_killed;
......
......@@ -8,7 +8,6 @@
#include <common/stats.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
#include <server/autocvars.qh>
#include <server/weapons/common.qh>
#endif
......
#pragma once
#ifdef SVQC
bool autocvar_sv_doublejump;
#endif
......@@ -3,6 +3,27 @@
#include "items.qh"
#include <common/gamemodes/_mod.qh>
// TODO: make this its own mutator (somehow)!
float autocvar_g_rm;
float autocvar_g_rm_damage;
float autocvar_g_rm_edgedamage;
float autocvar_g_rm_force;
float autocvar_g_rm_radius;
float autocvar_g_rm_laser;
float autocvar_g_rm_laser_count;
float autocvar_g_rm_laser_speed;
float autocvar_g_rm_laser_spread;
float autocvar_g_rm_laser_spread_random;
float autocvar_g_rm_laser_lifetime;
float autocvar_g_rm_laser_damage;
float autocvar_g_rm_laser_refire;
float autocvar_g_rm_laser_rapid;
float autocvar_g_rm_laser_rapid_refire;
float autocvar_g_rm_laser_rapid_delay;
float autocvar_g_rm_laser_radius;
float autocvar_g_rm_laser_force;
bool autocvar_g_instagib;
float autocvar_g_instagib_invis_alpha;
int autocvar_g_instagib_extralives;
......
#pragma once
#ifdef SVQC
int autocvar_sv_itemstime;
#endif
......@@ -2,6 +2,72 @@
#include <common/teams.qh>
#ifdef SVQC
bool autocvar_g_nades;
bool autocvar_g_nades_override_dropweapon = true;
vector autocvar_g_nades_throw_offset;
bool autocvar_g_nades_spawn;
int autocvar_g_nades_spawn_count;
bool autocvar_g_nades_client_select;
bool autocvar_g_nades_pickup = true;
float autocvar_g_nades_pickup_time = 2;
float autocvar_g_nades_nade_lifetime;
float autocvar_g_nades_nade_minforce;
float autocvar_g_nades_nade_maxforce;
float autocvar_g_nades_nade_health;
float autocvar_g_nades_nade_refire;
float autocvar_g_nades_nade_damage;
float autocvar_g_nades_nade_edgedamage;
float autocvar_g_nades_nade_radius;
float autocvar_g_nades_nade_force;
int autocvar_g_nades_nade_newton_style;
int autocvar_g_nades_napalm_ball_count;
float autocvar_g_nades_napalm_ball_spread;
float autocvar_g_nades_napalm_ball_damage;
float autocvar_g_nades_napalm_ball_damageforcescale;
float autocvar_g_nades_napalm_ball_lifetime;
float autocvar_g_nades_napalm_ball_radius;
bool autocvar_g_nades_napalm_blast;
float autocvar_g_nades_napalm_fountain_lifetime;
float autocvar_g_nades_napalm_fountain_delay;
float autocvar_g_nades_napalm_fountain_radius;
float autocvar_g_nades_napalm_fountain_damage;
float autocvar_g_nades_napalm_fountain_edgedamage;
float autocvar_g_nades_napalm_burntime;
bool autocvar_g_nades_napalm_selfdamage;
int autocvar_g_nades_nade_type;
int autocvar_g_nades_bonus_type;
bool autocvar_g_nades_bonus;
bool autocvar_g_nades_bonus_onstrength;
bool autocvar_g_nades_bonus_client_select;
bool autocvar_g_nades_bonus_only;
int autocvar_g_nades_bonus_max;
int autocvar_g_nades_bonus_score_max;
int autocvar_g_nades_bonus_score_time;
int autocvar_g_nades_bonus_score_time_flagcarrier;
int autocvar_g_nades_bonus_score_minor;
int autocvar_g_nades_bonus_score_low;
int autocvar_g_nades_bonus_score_high;
int autocvar_g_nades_bonus_score_medium;
int autocvar_g_nades_bonus_score_spree;
float autocvar_g_nades_ice_freeze_time;
float autocvar_g_nades_ice_health;
bool autocvar_g_nades_ice_explode;
bool autocvar_g_nades_ice_teamcheck;
float autocvar_g_nades_heal_time;
float autocvar_g_nades_heal_rate;
float autocvar_g_nades_heal_friend;
float autocvar_g_nades_heal_foe;
float autocvar_g_nades_entrap_strength = 0.01;
float autocvar_g_nades_entrap_speed = 0.5;
float autocvar_g_nades_entrap_radius = 500;
float autocvar_g_nades_entrap_time = 10;
float autocvar_g_nades_veil_time = 8;
float autocvar_g_nades_veil_radius = 300;
string autocvar_g_nades_pokenade_monster_type;
float autocvar_g_nades_pokenade_monster_lifetime;
#endif
// use slots 70-100
const int PROJECTILE_NADE = 71;
const int PROJECTILE_NADE_BURN = 72;
......
......@@ -7,7 +7,6 @@
#include <common/constants.qh>
#include <common/net_linked.qh>
#include <common/teams.qh>
#include <server/autocvars.qh>
#include <server/command/getreplies.qh>
#include <server/mutators/_mod.qh>
#include <server/world.qh>
......
#pragma once
#ifdef SVQC
// undefined on client, engine cvar
bool autocvar_physics_ode;
#endif
// water levels
const int WATERLEVEL_NONE = 0;
const int WATERLEVEL_WETFEET = 1;
......
......@@ -5,6 +5,50 @@
#ifdef SVQC
// TODO: get rid of this random dumb include!
#include <common/state.qh>
float autocvar_sv_airaccel_qw;
float autocvar_sv_airstrafeaccel_qw;
float autocvar_sv_airspeedlimit_nonqw;
float autocvar_sv_airaccel_qw_stretchfactor;
float autocvar_sv_maxairstrafespeed;
float autocvar_sv_airstrafeaccelerate;
float autocvar_sv_warsowbunny_turnaccel;
float autocvar_sv_airaccel_sideways_friction;
float autocvar_sv_aircontrol;
float autocvar_sv_aircontrol_power;
float autocvar_sv_aircontrol_backwards;
float autocvar_sv_aircontrol_sidewards;
float autocvar_sv_aircontrol_penalty;
float autocvar_sv_warsowbunny_airforwardaccel;
float autocvar_sv_warsowbunny_topspeed;
float autocvar_sv_warsowbunny_accel;
float autocvar_sv_warsowbunny_backtosideratio;
float autocvar_sv_friction;
float autocvar_sv_accelerate;
float autocvar_sv_stopspeed;
float autocvar_sv_airaccelerate;
float autocvar_sv_airstopaccelerate;
float autocvar_sv_track_canjump;
string autocvar_g_physics_clientselect_options;
string autocvar_g_physics_clientselect_default;
bool autocvar_g_jump_grunt;
bool autocvar_g_physics_clientselect;
float autocvar_g_maxspeed;
float autocvar_g_movement_highspeed = 1;
bool autocvar_g_movement_highspeed_q3_compat = 0;
//float autocvar_g_nick_flood_penalty;
int autocvar_g_nick_flood_penalty_red;
int autocvar_g_nick_flood_penalty_yellow;
//float autocvar_g_nick_flood_timeout;
bool autocvar_speedmeter;
string autocvar_sv_jumpspeedcap_max;
float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
string autocvar_sv_jumpspeedcap_min;
float autocvar_sv_jumpvelocity;
float autocvar_sv_jumpvelocity_crouch;
float autocvar_sv_maxairspeed;
float autocvar_sv_maxspeed;
bool autocvar_g_footsteps;
#endif
.entity conveyor;
......
#pragma once
// you're next
#ifdef SVQC
#include <server/autocvars.qh>
#include <server/client.qh>
#include <server/main.qh>
#include <common/gamemodes/sv_rules.qh>
#include <common/mapobjects/teleporters.qh>
#include <common/mapobjects/trigger/secret.qh>
#include <common/mutators/mutator/doublejump/doublejump.qh>
#include <common/mutators/mutator/itemstime/itemstime.qh>
#include <common/physics/player.qh>
#endif
// Full list of all stat constants, included in a single location for easy reference
......@@ -68,6 +75,11 @@ float game_starttime; //point in time when the countdown to game start is over
float round_starttime; //point in time when the countdown to round start is over
bool autocvar_g_allow_oldvortexbeam;
int autocvar_leadlimit;
// TODO: world.qh can't be included here due to circular includes!
#define autocvar_fraglimit cvar("fraglimit")
#define autocvar_fraglimit_override cvar("fraglimit_override")
#define autocvar_timelimit cvar("timelimit")
#define autocvar_timelimit_override cvar("timelimit_override")
#endif
REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this))
REGISTER_STAT(GAME_STOPPED, int, game_stopped)
......@@ -201,6 +213,7 @@ int autocvar_sv_gameplayfix_grenadebouncedownslopes = 1;
int autocvar_sv_gameplayfix_noairborncorpse = 1;
int autocvar_sv_gameplayfix_noairborncorpse_allowsuspendeditems = 1;
int autocvar_sv_gameplayfix_delayprojectiles = 0;
bool autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag = true;
#endif
REGISTER_STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, int, autocvar_sv_gameplayfix_downtracesupportsongroundflag)
REGISTER_STAT(GAMEPLAYFIX_EASIERWATERJUMP, int, autocvar_sv_gameplayfix_easierwaterjump)
......@@ -219,6 +232,10 @@ REGISTER_STAT(GAMEPLAYFIX_DELAYPROJECTILES, int, autocvar_sv_gameplayfix_delaypr
REGISTER_STAT(MOVEVARS_JUMPSTEP, int, cvar("sv_jumpstep"))
REGISTER_STAT(NOSTEP, int, cvar("sv_nostep"))
#ifdef SVQC
float autocvar_sv_friction_on_land;
var float autocvar_sv_friction_slick = 0.5;
#endif
REGISTER_STAT(MOVEVARS_FRICTION, float)
REGISTER_STAT(MOVEVARS_FRICTION_SLICK, float, autocvar_sv_friction_slick)
REGISTER_STAT(MOVEVARS_FRICTION_ONLAND, float, autocvar_sv_friction_on_land)
......@@ -272,6 +289,15 @@ REGISTER_STAT(DODGING_CLIENTSELECT, bool, autocvar_sv_dodging_clientselect)
REGISTER_STAT(DODGING_FROZEN, int, autocvar_sv_dodging_frozen)
REGISTER_STAT(DODGING_TIMEOUT, float)
#ifdef SVQC
float autocvar_g_jetpack_acceleration_side;
float autocvar_g_jetpack_acceleration_up;
float autocvar_g_jetpack_antigravity;
int autocvar_g_jetpack_fuel;
float autocvar_g_jetpack_maxspeed_side;
float autocvar_g_jetpack_maxspeed_up;
float autocvar_g_jetpack_reverse_thrust;
#endif
REGISTER_STAT(JETPACK_ACCEL_SIDE, float, autocvar_g_jetpack_acceleration_side)
REGISTER_STAT(JETPACK_ACCEL_UP, float, autocvar_g_jetpack_acceleration_up)
REGISTER_STAT(JETPACK_ANTIGRAVITY, float, autocvar_g_jetpack_antigravity)
......@@ -314,6 +340,9 @@ REGISTER_STAT(DOM_PPS_BLUE, float)
REGISTER_STAT(DOM_PPS_YELLOW, float)
REGISTER_STAT(DOM_PPS_PINK, float)
#ifdef SVQC
float autocvar_g_teleport_maxspeed;
#endif
REGISTER_STAT(TELEPORT_MAXSPEED, float, autocvar_g_teleport_maxspeed)
REGISTER_STAT(TELEPORT_TELEFRAG_AVOID, int, autocvar_g_telefrags_avoid)
......@@ -350,7 +379,11 @@ REGISTER_STAT(MOVEVARS_AIRSTRAFEACCEL_QW, float)
REGISTER_STAT(MOVEVARS_AIRCONTROL_POWER, float)
REGISTER_STAT(MOVEVARS_AIRCONTROL_BACKWARDS, bool)
REGISTER_STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, bool)
noref bool autocvar_sv_gameplayfix_nogravityonground = true;
#ifdef SVQC
float autocvar_sv_gameplayfix_q2airaccelerate = 1;
bool autocvar_sv_gameplayfix_nogravityonground = true;
bool autocvar_sv_gameplayfix_gravityunaffectedbyticrate = true;
#endif
REGISTER_STAT(MOVEFLAGS, int, MOVEFLAG_VALID
| (autocvar_sv_gameplayfix_q2airaccelerate ? MOVEFLAG_Q2AIRACCELERATE : 0)
| (autocvar_sv_gameplayfix_nogravityonground ? MOVEFLAG_NOGRAVITYONGROUND : 0)
......@@ -371,6 +404,8 @@ REGISTER_STAT(TIMELIMIT, float, autocvar_timelimit)
REGISTER_STAT(WARMUP_TIMELIMIT, float, warmup_limit)
#ifdef SVQC
float autocvar_sv_wallfriction;
#define autocvar_sv_gravity cvar("sv_gravity")
float autocvar_sv_stepheight;
#endif
REGISTER_STAT(MOVEVARS_WALLFRICTION, int, autocvar_sv_wallfriction)
REGISTER_STAT(MOVEVARS_TICRATE, float, autocvar_sys_ticrate)
......
......@@ -2,7 +2,6 @@
#ifdef SVQC
#include <common/mapobjects/defs.qh>
#include <server/autocvars.qh>
#include <server/bot/api.qh>
#include <server/damage.qh>
#include <server/weapons/common.qh>
......
......@@ -2,6 +2,13 @@
#include "all.qh"
bool autocvar_g_turrets;
float autocvar_g_turrets_aimidle_delay;
bool autocvar_g_turrets_nofire;
bool autocvar_g_turrets_reloadcvars;
float autocvar_g_turrets_targetscan_maxdelay;
float autocvar_g_turrets_targetscan_mindelay;
entity turret_projectile(entity actor, Sound _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim);
void turret_projectile_explode(entity this);
float turret_validate_target(entity e_turret, entity e_target, float validate_flags);
......
#pragma once
#ifdef SVQC
#include <server/autocvars.qh>
#endif
#ifdef SVQC
float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomonsters, entity forent, float stopatentity, entity ignorestopatentity); // returns the number of traces done, for benchmarking
......@@ -201,6 +197,7 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
int autocvar_cl_gentle_messages;
#define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
#else
int autocvar_sv_gentle;
#define GENTLE autocvar_sv_gentle
#endif
#define normal_or_gentle(normal, gentle) ((GENTLE && (gentle != "")) ? gentle : normal)
......
......@@ -5,6 +5,7 @@
#include <common/mapobjects/teleporters.qh>
#include <common/mapobjects/triggers.qh>
#include <server/bot/api.qh>
#include <server/client.qh>
#include <server/damage.qh>
#include <server/items/items.qh>
#include <server/weapons/common.qh>
......
......@@ -37,7 +37,6 @@
#include <lib/warpzone/common.qh>
#include <lib/warpzone/server.qh>
#include <lib/warpzone/util_server.qh>
#include <server/autocvars.qh>
#include <server/command/_mod.qh>
#include <server/hook.qh>
#include <server/items/spawning.qh>
......
......@@ -381,6 +381,7 @@ ENUMCLASS_END(WFRAME)
.WFRAME wframe;
#ifdef SVQC
string autocvar_g_shootfromfixedorigin;
#define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
#elif defined(CSQC)
string autocvar_cl_shootfromfixedorigin;
......
......@@ -53,5 +53,7 @@ classfield(Tuba) .int tuba_instrument;
#endif
#ifdef SVQC
float autocvar_snd_soundradius;
bool W_Tuba_HasPlayed(entity pl, .entity weaponentity, string melody, int instrument, bool ignorepitch, float mintempo, float maxtempo);
#endif
#include "physics.qh"
float autocvar_sv_spectator_speed_multiplier;
float autocvar_sv_spectator_speed_multiplier_min = 1;
float autocvar_sv_spectator_speed_multiplier_max = 5;
void sys_phys_fix(entity this, float dt)
{
WarpZone_PlayerPhysics_FixVAngle(this);
......
......@@ -5,7 +5,6 @@
#include <common/stats.qh>
#include <common/weapons/_all.qh>
#include <server/antilag.qh>
#include <server/autocvars.qh>
#include <server/client.qh>
#include <server/command/common.qh>
#include <server/gamelog.qh>
......
#pragma once
int autocvar_g_antilag;
float autocvar_g_antilag_nudge;
void antilag_record(entity e, entity store, float t);
vector antilag_takebackorigin(entity e, entity store, float t);
void antilag_takeback(entity e, ent