]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/world.qh
Purge autocvars.qh from the codebase, cvars are defined in the headers of the feature...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qh
1 #pragma once
2
3 #include <common/weapons/_all.qh>
4
5 bool autocvar__sv_init;
6 bool autocvar_g_use_ammunition;
7 bool autocvar_g_jetpack;
8 bool autocvar_g_warmup_allguns;
9 bool autocvar_g_warmup_allow_timeout;
10 #define autocvar_g_weaponarena cvar_string("g_weaponarena")
11 string autocvar_quit_and_redirect;
12 float autocvar_quit_and_redirect_timer;
13 bool autocvar_quit_when_empty;
14 string autocvar_sessionid;
15 bool autocvar_sv_curl_serverpackages_auto;
16 bool autocvar_sv_db_saveasdump;
17 bool autocvar_sv_logscores_bots;
18 bool autocvar_sv_logscores_console;
19 bool autocvar_sv_logscores_file;
20 string autocvar_sv_logscores_filename;
21 float autocvar_sv_mapchange_delay;
22 float autocvar_timelimit_increment;
23 float autocvar_timelimit_decrement;
24 float autocvar_timelimit_min;
25 float autocvar_timelimit_max;
26 float autocvar_timelimit_overtime;
27 int autocvar_timelimit_overtimes;
28 float autocvar_timelimit_suddendeath;
29
30 float checkrules_equality;
31 float checkrules_suddendeathwarning;
32 float checkrules_suddendeathend;
33 float checkrules_overtimesadded; //how many overtimes have been already added
34
35 // flag set on worldspawn so that the code knows if it is dedicated or not
36 bool server_is_dedicated;
37
38 string cvar_changes;
39 string cvar_purechanges;
40 float cvar_purechanges_count;
41
42 string modname;
43
44 string gamemode_name;
45
46 string clientstuff;
47
48 string matchid;
49
50 .string fog;
51
52 string redirection_target;
53
54 string cache_mutatormsg;
55 string cache_lastmutatormsg;
56
57 float default_player_alpha;
58 float default_weapon_alpha;
59
60 float g_pickup_shells_max;
61 float g_pickup_nails_max;
62 float g_pickup_rockets_max;
63 float g_pickup_cells_max;
64 float g_pickup_plasma_max;
65 float g_pickup_fuel_max;
66 float g_pickup_weapons_anyway;
67 float g_weaponarena;
68 WepSet g_weaponarena_weapons;
69 float g_weaponarena_random; // TODO
70 string g_weaponarena_list;
71
72 WepSet start_weapons;
73 WepSet start_weapons_default;
74 WepSet start_weapons_defaultmask;
75 int start_items;
76 float start_ammo_shells;
77 float start_ammo_nails;
78 float start_ammo_rockets;
79 float start_ammo_cells;
80 float start_ammo_plasma;
81 float start_ammo_fuel;
82 /// \brief Number of random start weapons to give to players.
83 int random_start_weapons_count;
84 /// \brief Holds a list of possible random start weapons.
85 string autocvar_g_random_start_weapons;
86 /// \brief Entity that contains amount of ammo to give with random start
87 /// weapons.
88 entity random_start_ammo;
89 float start_health;
90 float start_armorvalue;
91 WepSet warmup_start_weapons;
92 WepSet warmup_start_weapons_default;
93 WepSet warmup_start_weapons_defaultmask;
94 #define WARMUP_START_WEAPONS ((autocvar_g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
95 float warmup_start_ammo_shells;
96 float warmup_start_ammo_nails;
97 float warmup_start_ammo_rockets;
98 float warmup_start_ammo_cells;
99 float warmup_start_ammo_plasma;
100 float warmup_start_ammo_fuel;
101 float warmup_start_health;
102 float warmup_start_armorvalue;
103 float g_weapon_stay;
104
105 float want_weapon(entity weaponinfo, float allguns); // WEAPONTODO: what still needs done?
106
107 float g_grappling_hook;
108 float warmup_stage;
109
110 bool sv_ready_restart_after_countdown;
111
112 .void(entity this) initialize_entity;
113 .int initialize_entity_order;
114 .entity initialize_entity_next;
115 entity initialize_entity_first;
116
117 void InitializeEntitiesRun();
118
119 void InitializeEntity(entity e, void(entity this) func, int order);
120
121 // database
122 float ServerProgsDB;
123 float TemporaryDB;
124
125 .float winning;
126 const int WINNING_NO = 0; // no winner, but time limits may terminate the game
127 const int WINNING_YES = 1; // winner found
128 const int WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
129 const int WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
130
131 float WinningCondition_Scores(float limit, float leadlimit);
132 void SetWinners(.float field, float value);
133 void ReadyRestart();
134
135 void DumpStats(float final);
136
137 bool MoveToRandomLocationWithinBounds(entity e, vector boundmin, vector boundmax, float goodcontents, float badcontents, float badsurfaceflags, int attempts, float maxaboveground, float minviewdistance);
138
139 float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance);
140
141 void CheckRules_World();
142 float RedirectionThink();
143
144 void readplayerstartcvars();
145
146 void readlevelcvars();
147
148 .vector dropped_origin;
149 void droptofloor(entity this);
150
151 IntrusiveList g_moveables;
152 STATIC_INIT(g_moveables) { g_moveables = IL_NEW(); }