Xonotic
main.qh File Reference
+ Include dependency graph for main.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define getcommandkey(cmd_name, command)   _getcommandkey(cmd_name, command, false)
 
#define getcommandkey_forcename(cmd_name, command)   _getcommandkey(cmd_name, command, true)
 
#define ISGAMETYPE(NAME)   (gametype == MAPINFO_TYPE_##NAME)
 
#define player_currententnum   (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
 

Functions

string _getcommandkey (string text, string command, bool forcename)
 
void AuditLists ()
 
void Ent_Remove (entity this)
 
void Fog_Force ()
 
void Gamemode_Init ()
 
string GetSpeedUnit (int speed_unit)
 
float GetSpeedUnitFactor (int speed_unit)
 
entity GetTeam (int Team, bool add)
 
void MoveToLast (entity e)
 
void PostInit ()
 
float RegisterPlayer (entity player)
 
float RegisterTeam (entity Team)
 
void RemovePlayer (entity player)
 
void RemoveTeam (entity Team)
 
bool SetTeam (entity pl, int Team)
 
 STATIC_INIT (main)
 
 void (entity) draw
 

Variables

const float ALPHA_MIN_VISIBLE = 0.003
 
float armorblockpercent
 
bool autocvar__hud_showbinds_reload
 
bool autocvar_cl_db_saveasdump
 
bool autocvar_cl_race_cptimes_onlyself
 
bool autocvar_cl_race_cptimes_showself = false
 
bool autocvar_cl_spawn_event_particles
 
bool autocvar_cl_spawn_event_sound = 1
 
float autocvar_cl_spawn_point_dist_max = 1200
 
bool autocvar_cl_spawn_point_particles
 
bool autocvar_cl_unpress_attack_on_weapon_switch = false
 
bool autocvar_cl_unpress_zoom_on_death = true
 
bool autocvar_cl_unpress_zoom_on_spawn = true
 
bool autocvar_cl_unpress_zoom_on_weapon_switch = true
 
bool autocvar_developer_csqcentities
 
bool autocvar_hud_showbinds
 
bool autocvar_hud_showbinds_limit
 
int binddb
 
bool button_attack2
 
bool button_zoom
 
int calledhooks
 
float camera_active
 
vector camera_direction
 
float camera_roll
 
float chase_active_backup
 
int ClientProgsDB
 
int cs_project_is_b0rked
 
float current_viewzoom
 
float current_zoomfraction
 
float damagepush_speedfactor
 
float drawframetime
 
bool eliminated
 
int enttype
 
float FONT_USER = 8
 
int framecount
 
IntrusiveList g_drawables
 
IntrusiveList g_drawables_2d
 
IntrusiveList g_radaricons
 
IntrusiveList g_radarlinks
 
float g_trueaim_minrange
 
entity gametype
 
bool gotscores
 
string grecordholder [RANKINGS_CNT]
 
float grecordtime [RANKINGS_CNT]
 
const int HOOK_END = 2
 
vector hook_shotorigin [4]
 
const int HOOK_START = 1
 
int hud
 
vector hud_fontsize
 
vector lightning_shotorigin [4]
 
const int MAX_SPECTATORS = 7
 
vector mi_center
 
vector mi_scale
 
string minimapname
 
int num_spectators
 
entity owner
 
float ping
 
float ping_movementloss
 
float ping_packetloss
 
entity players
 
entity playerslots [255]
 
bool postinit
 
float RANKINGS_DISPLAY_CNT
 
float RANKINGS_RECEIVED_CNT
 
bool ready
 
bool ready_waiting
 
bool ready_waiting_for_me
 
float renderflags
 
float serverdeltatime
 
int serverflags
 
float serverprevtime
 
string shortmapname
 
float spectatee_status
 
float spectatee_status_changed_time
 
bool spectatorbutton_zoom
 
int spectatorlist [MAX_SPECTATORS]
 
int sv_entnum
 
int team
 
float team_count
 
int team_size
 
entity teams
 
entity teamslots [17]
 
int tempdb
 
float ticrate
 
int vid_height
 
float vid_pixelheight
 
int vid_width
 
vector view_forward
 
vector view_origin
 
float view_quality
 
vector view_right
 
vector view_up
 
string vote_called_vote
 
bool vote_waiting
 
bool vote_waiting_for_me
 
bool warmup_stage
 
float zoomin_effect
 

Macro Definition Documentation

◆ getcommandkey

#define getcommandkey (   cmd_name,
  command 
)    _getcommandkey(cmd_name, command, false)

Definition at line 108 of file main.qh.

Referenced by HUD_Weapons().

◆ getcommandkey_forcename

#define getcommandkey_forcename (   cmd_name,
  command 
)    _getcommandkey(cmd_name, command, true)

Definition at line 109 of file main.qh.

◆ ISGAMETYPE

#define ISGAMETYPE (   NAME)    (gametype == MAPINFO_TYPE_##NAME)

Definition at line 32 of file main.qh.

Referenced by CSQCPlayer_ModelAppearance_Apply(), HUD_Mod_Race(), and MUTATOR_HOOKFUNCTION().

◆ player_currententnum

#define player_currententnum   (spectatee_status > 0 ? spectatee_status : player_localnum + 1)

Definition at line 169 of file main.qh.

Function Documentation

◆ _getcommandkey()

string _getcommandkey ( string  text,
string  command,
bool  forcename 
)

Definition at line 1289 of file main.qc.

References argv(), autocvar_hud_showbinds, autocvar_hud_showbinds_limit, binddb, cmd_name, cvar(), db_get(), db_put(), keynumtostring(), stof(), strcat(), substring(), tokenize(), and translate_key().

1290 {
1291  string keys;
1292  float n, j, k, l = 0;
1293 
1295  return cmd_name;
1296 
1297  keys = db_get(binddb, command);
1298  if (keys == "")
1299  {
1300  bool joy_active = cvar("joy_active");
1301  n = tokenize(findkeysforcommand(command, 0)); // uses '...' strings
1302  for(j = 0; j < n; ++j)
1303  {
1304  k = stof(argv(j));
1305  if(k != -1)
1306  {
1307  string key = keynumtostring(k);
1308  if(!joy_active && substring(key, 0, 3) == "JOY")
1309  continue;
1310 
1311  key = translate_key(key);
1312 
1313  if (keys == "")
1314  keys = key;
1315  else
1316  keys = strcat(keys, ", ", key);
1317 
1318  ++l;
1320  break;
1321  }
1322 
1323  }
1324  if (keys == "")
1325  keys = "NO_KEY";
1326  db_put(binddb, command, keys);
1327  }
1328 
1329  if (keys == "NO_KEY") {
1330  if (autocvar_hud_showbinds > 1)
1331  return sprintf(_("%s (not bound)"), cmd_name);
1332  else
1333  return cmd_name;
1334  }
1335  else if (autocvar_hud_showbinds > 1 || forcename)
1336  return sprintf("%s (%s)", cmd_name, keys);
1337  else
1338  return keys;
1339 }
int binddb
Definition: main.qh:160
ERASEABLE void db_put(int db, string key, string value)
Definition: map.qh:101
bool autocvar_hud_showbinds_limit
Definition: main.qh:17
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
ERASEABLE string db_get(int db, string key)
Definition: map.qh:91
string translate_key(string key)
Definition: util.qc:1376
bool autocvar_hud_showbinds
Definition: main.qh:16
+ Here is the call graph for this function:

◆ AuditLists()

void AuditLists ( )

Definition at line 196 of file main.qc.

References entity(), error(), players, prev, strcat(), and teams.

Referenced by MoveToLast(), RegisterPlayer(), RegisterTeam(), RemovePlayer(), and RemoveTeam().

197 {
198  entity e;
199  entity prev;
200 
201  prev = players;
202  for(e = prev.sort_next; e; prev = e, e = e.sort_next)
203  {
204  if(prev != e.sort_prev)
205  error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
206  }
207 
208  prev = teams;
209  for(e = prev.sort_next; e; prev = e, e = e.sort_next)
210  {
211  if(prev != e.sort_prev)
212  error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
213  }
214 }
entity() spawn
prev
Definition: all.qh:66
entity teams
Definition: main.qh:44
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
entity players
Definition: main.qh:43
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Ent_Remove()

void Ent_Remove ( entity  this)

Definition at line 920 of file main.qc.

References autocvar_cl_jetpack_attenuation, classname, enttype, func_null(), skeletonindex, snd_looping, sound, and VOL_BASE.

Referenced by CSQC_Ent_Remove(), CSQC_Ent_Update(), and NET_HANDLE().

921 {
922  if(this.entremove) this.entremove(this);
923 
924  if(this.skeletonindex)
925  {
926  skel_delete(this.skeletonindex);
927  this.skeletonindex = 0;
928  }
929 
930  if(this.snd_looping > 0)
931  {
933  this.snd_looping = 0;
934  }
935 
936  this.enttype = 0;
937  this.classname = "";
938  this.draw = func_null;
939  this.entremove = func_null;
940  // TODO possibly set more stuff to defaults
941 }
float autocvar_cl_jetpack_attenuation
string classname
Definition: csprogsdefs.qc:107
float skeletonindex
const float VOL_BASE
Definition: sound.qh:36
int enttype
Definition: main.qh:154
#define sound(e, c, s, v, a)
Definition: sound.qh:52
var void func_null()
int snd_looping
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Fog_Force()

void Fog_Force ( )

Definition at line 1006 of file main.qc.

References autocvar_cl_orthoview, autocvar_cl_orthoview_nofog, forcefog, and localcmd.

Referenced by CSQC_UpdateView().

1007 {
1009  localcmd("\nr_drawfog 0\n");
1010  else if (forcefog != "")
1011  localcmd(sprintf("\nfog %s\nr_fog_exp2 0\nr_drawfog 1\n", forcefog));
1012 }
string forcefog
Definition: main.qc:1005
bool autocvar_cl_orthoview
Definition: view.qh:21
bool autocvar_cl_orthoview_nofog
Definition: view.qh:22
+ Here is the caller graph for this function:

◆ Gamemode_Init()

void Gamemode_Init ( )

Definition at line 955 of file main.qc.

References calledhooks, gametype, HOOK_START, isdemo(), localcmd, and MapInfo_Type_ToString().

Referenced by NET_HANDLE().

956 {
957  if (!isdemo())
958  {
959  if(!(calledhooks & HOOK_START))
960  localcmd("\n_cl_hook_gamestart ", MapInfo_Type_ToString(gametype), "\n");
962  }
963 }
string MapInfo_Type_ToString(Gametype t)
Definition: mapinfo.qc:616
int calledhooks
Definition: main.qh:134
entity gametype
Definition: main.qh:30
const int HOOK_START
Definition: main.qh:135
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSpeedUnit()

string GetSpeedUnit ( int  speed_unit)

Definition at line 1076 of file main.qc.

References strcat().

Referenced by HUD_Physics(), and HUD_StrafeHUD().

1077 {
1078  switch(speed_unit)
1079  {
1080  // translator-friendly strings without the initial space
1081  default:
1082  case 1: return strcat(" ", _("qu/s"));
1083  case 2: return strcat(" ", _("m/s"));
1084  case 3: return strcat(" ", _("km/h"));
1085  case 4: return strcat(" ", _("mph"));
1086  case 5: return strcat(" ", _("knots"));
1087  }
1088 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSpeedUnitFactor()

float GetSpeedUnitFactor ( int  speed_unit)

Definition at line 1063 of file main.qc.

Referenced by HUD_Physics(), and HUD_StrafeHUD().

1064 {
1065  switch(speed_unit)
1066  {
1067  default:
1068  case 1: return 1.0;
1069  case 2: return 0.0254;
1070  case 3: return 0.0254 * 3.6;
1071  case 4: return 0.0254 * 3.6 * 0.6213711922;
1072  case 5: return 0.0254 * 1.943844492; // 1 m/s = 1.943844492 knots, because 1 knot = 1.852 km/h
1073  }
1074 }
+ Here is the caller graph for this function:

◆ GetTeam()

entity GetTeam ( int  Team,
bool  add 
)

Definition at line 303 of file main.qc.

References entity(), new_pure, NULL, NUM_SPECTATOR, RegisterTeam(), TC, team, and teamslots.

Referenced by CSQC_Init(), NET_HANDLE(), and SetTeam().

304 {
305  TC(int, Team); TC(bool, add);
306  int num = (Team == NUM_SPECTATOR) ? 16 : Team;
307  if(teamslots[num])
308  return teamslots[num];
309  if (!add)
310  return NULL;
311  entity tm = new_pure(team);
312  tm.team = Team;
313  teamslots[num] = tm;
314  RegisterTeam(tm);
315  return tm;
316 }
const int NUM_SPECTATOR
Definition: teams.qh:23
entity teamslots[17]
Definition: main.qh:71
int team
Definition: main.qh:157
float RegisterTeam(entity Team)
Definition: main.qc:263
entity() spawn
#define NULL
Definition: post.qh:17
#define TC(T, sym)
Definition: _all.inc:82
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveToLast()

void MoveToLast ( entity  e)

Definition at line 251 of file main.qc.

References AuditLists(), entity(), and SORT_SWAP.

252 {
253  AuditLists();
254  entity ent = e.sort_next;
255  while(ent)
256  {
257  SORT_SWAP(ent, e);
258  ent = e.sort_next;
259  }
260  AuditLists();
261 }
entity() spawn
void AuditLists()
Definition: main.qc:196
#define SORT_SWAP(a, b)
Swap two neighbours in a sortlist.
Definition: sortlist.qh:14
+ Here is the call graph for this function:

◆ PostInit()

void PostInit ( )

Definition at line 434 of file main.qc.

References entity(), new_pure, Playerchecker_Think(), postinit, setthink, time, and TrueAim_Init().

Referenced by CSQC_UpdateView(), and NET_HANDLE().

435 {
436  entity playerchecker = new_pure(playerchecker);
437  setthink(playerchecker, Playerchecker_Think);
438  playerchecker.nextthink = time + 0.2;
439 
440  TrueAim_Init();
441 
442  postinit = true;
443 }
entity() spawn
void TrueAim_Init()
Definition: crosshair.qc:46
bool postinit
Definition: main.qh:29
void Playerchecker_Think(entity this)
Definition: main.qc:392
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
#define setthink(e, f)
float time
Definition: csprogsdefs.qc:16
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegisterPlayer()

float RegisterPlayer ( entity  player)

Definition at line 216 of file main.qc.

References AuditLists(), entity(), error(), and players.

Referenced by Playerchecker_Think().

217 {
218  entity pl;
219  AuditLists();
220  for(pl = players.sort_next; pl; pl = pl.sort_next)
221  if(pl == player)
222  error("Player already registered!");
223  player.sort_next = players.sort_next;
224  player.sort_prev = players;
225  if(players.sort_next)
226  players.sort_next.sort_prev = player;
227  players.sort_next = player;
228  AuditLists();
229  return true;
230 }
entity() spawn
void AuditLists()
Definition: main.qc:196
entity players
Definition: main.qh:43
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegisterTeam()

float RegisterTeam ( entity  Team)

Definition at line 263 of file main.qc.

References assert_once, AuditLists(), entity(), eprint(), error(), NUM_SPECTATOR, team_count, and teams.

Referenced by GetTeam().

264 {
265  assert_once(Team.team, eprint(Team));
266  entity tm;
267  AuditLists();
268  for(tm = teams.sort_next; tm; tm = tm.sort_next)
269  if(tm == Team)
270  error("Team already registered!");
271  Team.sort_next = teams.sort_next;
272  Team.sort_prev = teams;
273  if(teams.sort_next)
274  teams.sort_next.sort_prev = Team;
275  teams.sort_next = Team;
276  if(Team.team && Team.team != NUM_SPECTATOR)
277  ++team_count;
278  AuditLists();
279  return true;
280 }
const int NUM_SPECTATOR
Definition: teams.qh:23
entity() spawn
void AuditLists()
Definition: main.qc:196
#define assert_once(expr,...)
Definition: log.qh:11
entity teams
Definition: main.qh:44
float team_count
Definition: main.qh:45
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemovePlayer()

void RemovePlayer ( entity  player)

Definition at line 232 of file main.qc.

References AuditLists(), entity(), error(), parent, and players.

Referenced by Playerchecker_Think().

233 {
234  entity pl, parent;
235  AuditLists();
236  parent = players;
237  for(pl = players.sort_next; pl && pl != player; pl = pl.sort_next)
238  parent = pl;
239 
240  if(!pl)
241  {
242  error("Trying to remove a player which is not in the playerlist!");
243  return;
244  }
245  parent.sort_next = player.sort_next;
246  if(player.sort_next)
247  player.sort_next.sort_prev = parent;
248  AuditLists();
249 }
entity parent
Definition: animhost.qc:7
entity() spawn
void AuditLists()
Definition: main.qc:196
entity players
Definition: main.qh:43
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveTeam()

void RemoveTeam ( entity  Team)

Definition at line 282 of file main.qc.

References AuditLists(), entity(), LOG_INFO, parent, and teams.

283 {
284  entity tm, parent;
285  AuditLists();
286  parent = teams;
287  for(tm = teams.sort_next; tm && tm != Team; tm = tm.sort_next)
288  parent = tm;
289 
290  if(!tm)
291  {
292  LOG_INFO(_("Trying to remove a team which is not in the teamlist!"));
293  return;
294  }
295  parent.sort_next = Team.sort_next;
296  if(Team.sort_next)
297  Team.sort_next.sort_prev = parent;
298  if(Team.team && Team.team != NUM_SPECTATOR)
299  --team_count;
300  AuditLists();
301 }
const int NUM_SPECTATOR
Definition: teams.qh:23
entity parent
Definition: animhost.qc:7
entity() spawn
void AuditLists()
Definition: main.qc:196
entity teams
Definition: main.qh:44
#define LOG_INFO(...)
Definition: log.qh:70
float team_count
Definition: main.qh:45
+ Here is the call graph for this function:

◆ SetTeam()

bool SetTeam ( entity  pl,
int  Team 
)

Definition at line 319 of file main.qc.

References entity(), GetTeam(), LOG_TRACEF, NULL, NUM_SPECTATOR, NUM_TEAM_1, NUM_TEAM_2, NUM_TEAM_3, NUM_TEAM_4, TC, and teamplay.

Referenced by Ent_RemovePlayerScore(), Playerchecker_Think(), and Scoreboard_UpdatePlayerTeams().

320 {
321  TC(int, Team);
322  //devassert_once(Team);
323  entity tm;
324  if(teamplay)
325  {
326  switch(Team)
327  {
328  case -1:
329  case NUM_TEAM_1:
330  case NUM_TEAM_2:
331  case NUM_TEAM_3:
332  case NUM_TEAM_4:
333  break;
334  default:
335  if(GetTeam(Team, false) == NULL)
336  {
337  LOG_TRACEF("trying to switch to unsupported team %d", Team);
338  Team = NUM_SPECTATOR;
339  }
340  break;
341  }
342  }
343  else
344  {
345  switch(Team)
346  {
347  case -1:
348  case 0:
349  break;
350  default:
351  if(GetTeam(Team, false) == NULL)
352  {
353  LOG_TRACEF("trying to switch to unsupported team %d", Team);
354  Team = NUM_SPECTATOR;
355  }
356  break;
357  }
358  }
359  if(Team == -1) // leave
360  {
361  if(o.has_team)
362  {
363  tm = GetTeam(o.team, false);
364  tm.team_size -= 1;
365  o.has_team = 0;
366  return true;
367  }
368  }
369  else
370  {
371  if (!o.has_team)
372  {
373  o.team = Team;
374  tm = GetTeam(Team, true);
375  tm.team_size += 1;
376  o.has_team = 1;
377  return true;
378  }
379  else if(Team != o.team)
380  {
381  tm = GetTeam(o.team, false);
382  tm.team_size -= 1;
383  o.team = Team;
384  tm = GetTeam(Team, true);
385  tm.team_size += 1;
386  return true;
387  }
388  }
389  return false;
390 }
const int NUM_SPECTATOR
Definition: teams.qh:23
const int NUM_TEAM_2
Definition: teams.qh:19
entity() spawn
#define NULL
Definition: post.qh:17
#define LOG_TRACEF(...)
Definition: log.qh:82
#define TC(T, sym)
Definition: _all.inc:82
float teamplay
Definition: progsdefs.qc:31
const int NUM_TEAM_4
Definition: teams.qh:21
const int NUM_TEAM_1
Definition: teams.qh:18
entity GetTeam(int Team, bool add)
Definition: main.qc:303
const int NUM_TEAM_3
Definition: teams.qh:20
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ STATIC_INIT()

STATIC_INIT ( main  )

Definition at line 81 of file main.qh.

References entity(), and IL_NEW.

82 {
83  g_drawables = IL_NEW();
85  g_radarlinks = IL_NEW();
86  g_radaricons = IL_NEW();
87 }
#define IL_NEW()
IntrusiveList g_radarlinks
Definition: main.qh:79
IntrusiveList g_radaricons
Definition: main.qh:80
IntrusiveList g_drawables
Definition: main.qh:77
IntrusiveList g_drawables_2d
Definition: main.qh:78
+ Here is the call graph for this function:

◆ void()

void ( entity  )

Variable Documentation

◆ ALPHA_MIN_VISIBLE

const float ALPHA_MIN_VISIBLE = 0.003

Definition at line 128 of file main.qh.

Referenced by MUTATOR_HOOKFUNCTION(), and turret_gib_draw().

◆ armorblockpercent

float armorblockpercent

Definition at line 130 of file main.qh.

Referenced by crosshair_getcolor(), HUD_HealthArmor(), and NET_HANDLE().

◆ autocvar__hud_showbinds_reload

bool autocvar__hud_showbinds_reload

Definition at line 18 of file main.qh.

Referenced by CSQC_UpdateView().

◆ autocvar_cl_db_saveasdump

bool autocvar_cl_db_saveasdump

Definition at line 6 of file main.qh.

Referenced by Shutdown().

◆ autocvar_cl_race_cptimes_onlyself

bool autocvar_cl_race_cptimes_onlyself

Definition at line 20 of file main.qh.

Referenced by NET_HANDLE().

◆ autocvar_cl_race_cptimes_showself

bool autocvar_cl_race_cptimes_showself = false

Definition at line 21 of file main.qh.

Referenced by MakeRaceString().

◆ autocvar_cl_spawn_event_particles

bool autocvar_cl_spawn_event_particles

Definition at line 7 of file main.qh.

Referenced by NET_HANDLE().

◆ autocvar_cl_spawn_event_sound

bool autocvar_cl_spawn_event_sound = 1

Definition at line 8 of file main.qh.

Referenced by NET_HANDLE().

◆ autocvar_cl_spawn_point_dist_max

float autocvar_cl_spawn_point_dist_max = 1200

Definition at line 11 of file main.qh.

Referenced by Spawn_Draw().

◆ autocvar_cl_spawn_point_particles

bool autocvar_cl_spawn_point_particles

Definition at line 10 of file main.qh.

Referenced by Spawn_Draw().

◆ autocvar_cl_unpress_attack_on_weapon_switch

bool autocvar_cl_unpress_attack_on_weapon_switch = false

Definition at line 15 of file main.qh.

Referenced by View_CheckButtonStatus().

◆ autocvar_cl_unpress_zoom_on_death

bool autocvar_cl_unpress_zoom_on_death = true

Definition at line 13 of file main.qh.

Referenced by View_CheckButtonStatus().

◆ autocvar_cl_unpress_zoom_on_spawn

bool autocvar_cl_unpress_zoom_on_spawn = true

Definition at line 12 of file main.qh.

Referenced by NET_HANDLE().

◆ autocvar_cl_unpress_zoom_on_weapon_switch

bool autocvar_cl_unpress_zoom_on_weapon_switch = true

Definition at line 14 of file main.qh.

Referenced by View_CheckButtonStatus().

◆ autocvar_developer_csqcentities

bool autocvar_developer_csqcentities

◆ autocvar_hud_showbinds

bool autocvar_hud_showbinds

Definition at line 16 of file main.qh.

Referenced by _getcommandkey().

◆ autocvar_hud_showbinds_limit

bool autocvar_hud_showbinds_limit

Definition at line 17 of file main.qh.

Referenced by _getcommandkey().

◆ binddb

int binddb

Definition at line 160 of file main.qh.

Referenced by _getcommandkey(), CSQC_Init(), CSQC_UpdateView(), and Shutdown().

◆ button_attack2

bool button_attack2

Definition at line 99 of file main.qh.

Referenced by CSQC_UpdateView(), and View_CheckButtonStatus().

◆ button_zoom

bool button_zoom

◆ calledhooks

int calledhooks

Definition at line 134 of file main.qh.

Referenced by CSQC_Init(), CSQC_UpdateView(), Gamemode_Init(), and Shutdown().

◆ camera_active

float camera_active

◆ camera_direction

vector camera_direction

Definition at line 126 of file main.qh.

Referenced by CSQC_Demo_Camera().

◆ camera_roll

float camera_roll

Definition at line 125 of file main.qh.

Referenced by CSQC_Demo_Camera().

◆ chase_active_backup

float chase_active_backup

Definition at line 124 of file main.qh.

Referenced by Shutdown(), and View_DemoCamera().

◆ ClientProgsDB

int ClientProgsDB

Definition at line 176 of file main.qh.

Referenced by CSQC_Init(), HUD_Mod_Race(), and Shutdown().

◆ cs_project_is_b0rked

int cs_project_is_b0rked

Definition at line 119 of file main.qh.

Referenced by CSQC_UpdateView(), and project_3d_to_2d().

◆ current_viewzoom

float current_viewzoom

Definition at line 101 of file main.qh.

Referenced by CSQCPlayer_LOD_Apply(), GetCurrentFov(), and NET_HANDLE().

◆ current_zoomfraction

float current_zoomfraction

Definition at line 117 of file main.qh.

Referenced by DrawReticle(), GetCurrentFov(), and HUD_Radar_GetZoomFactor().

◆ damagepush_speedfactor

float damagepush_speedfactor

Definition at line 131 of file main.qh.

Referenced by NET_HANDLE().

◆ drawframetime

float drawframetime

Definition at line 92 of file main.qh.

Referenced by CSQC_UpdateView(), doBGMScript(), GetCurrentFov(), and HUD_Contents().

◆ eliminated

bool eliminated

Definition at line 75 of file main.qh.

◆ enttype

int enttype

Definition at line 154 of file main.qh.

Referenced by CSQC_Ent_Remove(), CSQC_Ent_Update(), Ent_Remove(), and NET_HANDLE().

◆ FONT_USER

float FONT_USER = 8

Definition at line 34 of file main.qh.

◆ framecount

int framecount

Definition at line 149 of file main.qh.

Referenced by CSQC_UpdateView(), and CSQCModel_Hook_PreDraw().

◆ g_drawables

◆ g_drawables_2d

◆ g_radaricons

IntrusiveList g_radaricons

Definition at line 80 of file main.qh.

Referenced by HUD_Radar().

◆ g_radarlinks

IntrusiveList g_radarlinks

Definition at line 79 of file main.qh.

Referenced by HUD_Radar(), and NET_HANDLE().

◆ g_trueaim_minrange

float g_trueaim_minrange

Definition at line 140 of file main.qh.

Referenced by NET_HANDLE(), and TrueAimCheck().

◆ gametype

◆ gotscores

bool gotscores

Definition at line 72 of file main.qh.

◆ grecordholder

string grecordholder[RANKINGS_CNT]

Definition at line 67 of file main.qh.

Referenced by race_CheckName(), and Scoreboard_Rankings_Draw().

◆ grecordtime

float grecordtime[RANKINGS_CNT]

Definition at line 68 of file main.qh.

Referenced by Scoreboard_Rankings_Draw().

◆ HOOK_END

const int HOOK_END = 2

Definition at line 136 of file main.qh.

Referenced by CSQC_UpdateView(), and Shutdown().

◆ hook_shotorigin

vector hook_shotorigin[4]

Definition at line 177 of file main.qh.

Referenced by ClientInit_misc(), FireGrapplingHook(), GrapplingHookThink(), NET_HANDLE(), and PRECACHE().

◆ HOOK_START

const int HOOK_START = 1

Definition at line 135 of file main.qh.

Referenced by CSQC_UpdateView(), Gamemode_Init(), and Shutdown().

◆ hud

◆ hud_fontsize

◆ lightning_shotorigin

vector lightning_shotorigin[4]

Definition at line 178 of file main.qh.

◆ MAX_SPECTATORS

const int MAX_SPECTATORS = 7

Definition at line 146 of file main.qh.

Referenced by NET_HANDLE().

◆ mi_center

vector mi_center

Definition at line 24 of file main.qh.

Referenced by CSQC_Init(), and HUD_Radar().

◆ mi_scale

vector mi_scale

Definition at line 25 of file main.qh.

Referenced by CSQC_Init(), and HUD_Radar().

◆ minimapname

string minimapname

Definition at line 27 of file main.qh.

Referenced by CSQC_Init(), draw_teamradar_background(), and HUD_Radar().

◆ num_spectators

int num_spectators

Definition at line 145 of file main.qh.

Referenced by NET_HANDLE().

◆ owner

entity owner

Definition at line 73 of file main.qh.

Referenced by accuracy_send(), AuxiliaryXhair_customize(), ball_customize(), ball_restart(), bd_check_winner(), bd_close_editor(), bd_find_controller(), bd_find_dozer(), bd_find_piece(), bd_move(), bd_reset_moves(), bd_save_level(), bd_setup_pieces(), buff_Reset(), buff_Think(), buff_Touch(), buff_Vengeance_DelayedDamage(), buff_Waypoint_visible_for_player(), buffs_BuffModel_Customize(), buffs_BuffModel_Think(), c4_find_piece(), c4_move(), ChatBubbleThink(), CL_ExteriorWeaponentity_Think(), CL_Weaponentity_CustomizeEntityForClient(), CL_Weaponentity_Think(), ClientData_Send(), cpicon_send(), ctf_FlagBase_Customize(), ctf_FlagThink(), ctf_Reset(), ctf_Return_Customize(), ctf_Stalemate_Customize(), deactivate_minigame(), dompoint_captured(), dompointtouch(), door_damage(), door_fire(), door_touch(), door_trigger_touch(), door_use(), dropclient_do(), DropOwner(), end_minigame(), Ent_RemovePlayerScore(), findperpendicular(), Ice_Think(), Item_Touch(), ka_TimeScoring(), ka_TouchEvent(), kh_Key_Damage(), kh_Key_Think(), kh_Key_Touch(), kh_Key_waypointsprite_visible_for_player(), KillIndicator_Think(), LinkDoors(), Local_Notification_WOVA(), minigame_CheckSend(), minigame_count_players(), minigame_player_entremove(), minigame_read_owner(), minigame_resend(), minigame_SendEntity(), Monster_Delay_Action(), nb_Goal_Customize(), NET_HANDLE(), nmm_find_tile(), nmm_in_mill(), nmm_kill_tiles(), nmm_tile_canmove(), ons_ControlPoint_Icon_BuildThink(), ons_ControlPoint_Icon_Damage(), ons_ControlPoint_Icon_Think(), ons_MonsterSpawn_Delayed(), ons_TurretSpawn_Delayed(), pathlib_deletepath(), pathlib_getbestopen(), physical_item_think(), PlayerScore_SendEntity(), pp_find_piece(), pp_next_match(), ps_draw(), ps_find_piece(), ps_move(), ps_winning_piece(), race_waypointsprite_visible_for_player(), SpawnEvent_Send(), SUB_CalcMove_controller_think(), target_objective_decrease_activate(), thrown_wep_think(), ttt_find_piece(), ttt_next_match(), vehicles_damage(), vehicles_locktarget(), vehicles_painframe(), vehicles_projectile_explode(), vehicles_regen(), vehicles_regen_resource(), vehicles_reset(), vehicles_spawn(), vehicles_think(), vehicles_touch(), W_Model(), W_Nexball_Touch(), W_PrepareExplosionByDamage(), WarpZone_Projectile_Touch_ImpactFilter_Callback(), WarpZone_RefSys_GC(), weapon_defaultspawnfunc(), and XonoticGametypeList_saveCvars().

◆ ping

◆ ping_movementloss

float ping_movementloss

Definition at line 138 of file main.qh.

Referenced by PingPLReport_Think(), and PM_UpdateButtons().

◆ ping_packetloss

float ping_packetloss

Definition at line 138 of file main.qh.

Referenced by CommonCommand_who(), PingPLReport_Think(), and PM_UpdateButtons().

◆ players

◆ playerslots

◆ postinit

bool postinit

Definition at line 29 of file main.qh.

Referenced by CSQC_Init(), CSQC_UpdateView(), NET_HANDLE(), and PostInit().

◆ RANKINGS_DISPLAY_CNT

float RANKINGS_DISPLAY_CNT

Definition at line 66 of file main.qh.

◆ RANKINGS_RECEIVED_CNT

float RANKINGS_RECEIVED_CNT

Definition at line 65 of file main.qh.

Referenced by Scoreboard_Rankings_Draw().

◆ ready

bool ready

Definition at line 74 of file main.qh.

Referenced by PutObserverInServer().

◆ ready_waiting

bool ready_waiting

Definition at line 112 of file main.qh.

Referenced by NET_HANDLE(), and Scoreboard_GetName().

◆ ready_waiting_for_me

bool ready_waiting_for_me

Definition at line 113 of file main.qh.

Referenced by NET_HANDLE().

◆ renderflags

float renderflags

◆ serverdeltatime

float serverdeltatime

Definition at line 180 of file main.qh.

Referenced by CSQC_Ent_Update().

◆ serverflags

◆ serverprevtime

float serverprevtime

Definition at line 180 of file main.qh.

Referenced by CSQC_Ent_Update(), InterpolateOrigin_Note(), and StartFrame().

◆ shortmapname

string shortmapname

Definition at line 172 of file main.qh.

Referenced by CSQC_Init(), and HUD_Mod_Race().

◆ spectatee_status

◆ spectatee_status_changed_time

float spectatee_status_changed_time

Definition at line 167 of file main.qh.

Referenced by Draw_ShowNames(), NET_HANDLE(), and WantEventchase().

◆ spectatorbutton_zoom

bool spectatorbutton_zoom

Definition at line 98 of file main.qh.

Referenced by GetCurrentFov(), and NET_HANDLE().

◆ spectatorlist

int spectatorlist[MAX_SPECTATORS]

Definition at line 147 of file main.qh.

Referenced by NET_HANDLE().

◆ sv_entnum

int sv_entnum

Definition at line 155 of file main.qh.

Referenced by Draw_ShowNames(), and NET_HANDLE().

◆ team

int team

Definition at line 157 of file main.qh.

Referenced by _StartItem(), c4_winning_piece(), CheatsAllowed(), cpicon_changeteam(), cpicon_send(), ctf_DelayedFlagSetup(), ctf_FlagThink(), ctf_SpawnTeam(), dompoint_captured(), dompointtouch(), Entity_GetTeamIndex(), Entity_HasValidTeam(), football_touch(), generator_changeteam(), generator_send(), GetTeam(), GoalTouch(), havocbot_ast_reset_role(), havocbot_goalrating_ons_controlpoints_attack(), havocbot_role_kh_carrier(), havocbot_role_kh_defense(), havocbot_role_kh_freelancer(), havocbot_role_kh_offense(), InitBall(), Item_FindTeam(), Item_Touch(), ka_RespawnBall(), kh_Key_Damage(), kh_Key_Think(), link_spawnpoint(), minigame_SendEntity(), monster_changeteam(), monster_setupcolors(), Monster_Spawn(), Monster_Spawn_Setup(), NET_HANDLE(), nexball_setstatus(), ons_CaptureShield_Reset(), ons_CaptureShield_Spawn(), ons_ControlPoint_Icon_Damage(), ons_ControlPoint_Reset(), ons_GeneratorDamage(), ons_GeneratorReset(), ons_GeneratorThink(), pp_valid_move(), pp_winning_piece(), relocate_spawnpoint(), ResetBall(), SelectSpawnPoint(), setcolor(), Spawn_Draw(), spawnfunc(), SpawnGoal(), SpawnPoint_Send(), spawnpoint_use(), sys_phys_fix(), tdm_SpawnTeam(), TeamScore_SendEntity(), Teleport_Active(), Teleport_Touch(), trigger_push_findtarget(), trigger_push_test(), trigger_push_touch(), ttt_winning_piece(), turret_changeteam(), turret_draw2d(), vehicle_initialize(), vehicles_reset_colors(), vehicles_spawn(), weapon_defaultspawnfunc(), WinningCondition_Assault(), WinningCondition_RanOutOfSpawns(), and WinningCondition_Scores().

◆ team_count

◆ team_size

int team_size

Definition at line 158 of file main.qh.

◆ teams

◆ teamslots

entity teamslots[17]

Definition at line 71 of file main.qh.

Referenced by GetTeam().

◆ tempdb

int tempdb

Definition at line 175 of file main.qh.

Referenced by CSQC_Init(), and Shutdown().

◆ ticrate

◆ vid_height

int vid_height

◆ vid_pixelheight

float vid_pixelheight

Definition at line 121 of file main.qh.

Referenced by CSQC_UpdateView(), GetCurrentFov(), and GetViewLocationFOV().

◆ vid_width

int vid_width

◆ view_forward

vector view_forward

Definition at line 93 of file main.qh.

Referenced by CSQC_UpdateView(), HUD_Crosshair(), and TrueAimCheck().

◆ view_origin

◆ view_quality

float view_quality

Definition at line 143 of file main.qh.

Referenced by CSQC_UpdateView(), and CSQCPlayer_LOD_Apply().

◆ view_right

vector view_right

Definition at line 93 of file main.qh.

Referenced by CSQC_UpdateView(), and TrueAimCheck().

◆ view_up

vector view_up

Definition at line 93 of file main.qh.

Referenced by CSQC_UpdateView(), and TrueAimCheck().

◆ vote_called_vote

string vote_called_vote

Definition at line 111 of file main.qh.

Referenced by NET_HANDLE().

◆ vote_waiting

bool vote_waiting

Definition at line 114 of file main.qh.

Referenced by NET_HANDLE().

◆ vote_waiting_for_me

bool vote_waiting_for_me

Definition at line 115 of file main.qh.

Referenced by NET_HANDLE().

◆ warmup_stage

◆ zoomin_effect

float zoomin_effect

Definition at line 102 of file main.qh.

Referenced by GetCurrentFov(), and NET_HANDLE().