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