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