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

Go to the source code of this file.

Macros

#define autocvar_g_weaponarena   cvar_string("g_weaponarena")
 
#define WARMUP_START_WEAPONS   ((autocvar_g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
 

Functions

void CheckRules_World ()
 
void droptofloor (entity this)
 
void DumpStats (float final)
 
void InitializeEntitiesRun ()
 
void InitializeEntity (entity e, void(entity this) func, int order)
 
bool MoveToRandomLocationWithinBounds (entity e, vector boundmin, vector boundmax, float goodcontents, float badcontents, float badsurfaceflags, int attempts, float maxaboveground, float minviewdistance)
 
float MoveToRandomMapLocation (entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance)
 
void readlevelcvars ()
 
void readplayerstartcvars ()
 
void ReadyRestart (bool forceWarmupEnd)
 
float RedirectionThink ()
 
void SetWinners (.float field, float value)
 
 STATIC_INIT (g_moveables)
 
 void (entity this) initialize_entity
 
float want_weapon (entity weaponinfo, float allguns)
 
float WinningCondition_Scores (float limit, float leadlimit)
 

Variables

bool autocvar__endmatch
 
bool autocvar__sv_init
 
bool autocvar_g_jetpack
 
string autocvar_g_random_start_weapons
 Holds a list of possible random start weapons. More...
 
bool autocvar_g_use_ammunition
 
bool autocvar_g_warmup_allguns
 
bool autocvar_g_warmup_allow_timeout
 
string autocvar_quit_and_redirect
 
float autocvar_quit_and_redirect_timer
 
bool autocvar_quit_when_empty
 
string autocvar_sessionid
 
bool autocvar_sv_curl_serverpackages_auto
 
bool autocvar_sv_db_saveasdump
 
bool autocvar_sv_logscores_bots
 
bool autocvar_sv_logscores_console
 
bool autocvar_sv_logscores_file
 
string autocvar_sv_logscores_filename
 
float autocvar_sv_mapchange_delay
 
string autocvar_sv_termsofservice_url
 
float autocvar_timelimit_decrement
 
float autocvar_timelimit_increment
 
float autocvar_timelimit_max
 
float autocvar_timelimit_min
 
float autocvar_timelimit_overtime
 
int autocvar_timelimit_overtimes
 
float autocvar_timelimit_suddendeath
 
string cache_lastmutatormsg
 
string cache_mutatormsg
 
float checkrules_equality
 
int checkrules_overtimesadded
 
float checkrules_suddendeathend
 
float checkrules_suddendeathwarning
 
string clientstuff
 
string cvar_changes
 
string cvar_purechanges
 
float cvar_purechanges_count
 
float default_player_alpha
 
float default_weapon_alpha
 
vector dropped_origin
 
string fog
 
float g_grappling_hook
 
IntrusiveList g_moveables
 
float g_pickup_cells_max
 
float g_pickup_fuel_max
 
float g_pickup_nails_max
 
float g_pickup_plasma_max
 
float g_pickup_rockets_max
 
float g_pickup_shells_max
 
float g_pickup_weapons_anyway
 
float g_weapon_stay
 
float g_weaponarena
 
string g_weaponarena_list
 
float g_weaponarena_random
 
WepSet g_weaponarena_weapons
 
string gamemode_name
 
entity initialize_entity_first
 
entity initialize_entity_next
 
int initialize_entity_order
 
string matchid
 
string modname
 
entity random_start_ammo
 Entity that contains amount of ammo to give with random start weapons. More...
 
int random_start_weapons_count
 Number of random start weapons to give to players. More...
 
string record_type
 
string redirection_target
 
bool server_is_dedicated
 
float ServerProgsDB
 
float start_ammo_cells
 
float start_ammo_fuel
 
float start_ammo_nails
 
float start_ammo_plasma
 
float start_ammo_rockets
 
float start_ammo_shells
 
float start_armorvalue
 
float start_health
 
int start_items
 
WepSet start_weapons
 
WepSet start_weapons_default
 
WepSet start_weapons_defaultmask
 
bool sv_ready_restart_after_countdown
 
string sv_termsofservice_url_escaped
 
float TemporaryDB
 
float warmup_stage
 
float warmup_start_ammo_cells
 
float warmup_start_ammo_fuel
 
float warmup_start_ammo_nails
 
float warmup_start_ammo_plasma
 
float warmup_start_ammo_rockets
 
float warmup_start_ammo_shells
 
float warmup_start_armorvalue
 
float warmup_start_health
 
WepSet warmup_start_weapons
 
WepSet warmup_start_weapons_default
 
WepSet warmup_start_weapons_defaultmask
 
float winning
 
const int WINNING_NEVER = 2
 
const int WINNING_NO = 0
 
const int WINNING_STARTSUDDENDEATHOVERTIME = 3
 
const int WINNING_YES = 1
 
int world_initialized
 

Macro Definition Documentation

◆ autocvar_g_weaponarena

#define autocvar_g_weaponarena   cvar_string("g_weaponarena")

Definition at line 11 of file world.qh.

Referenced by spawnfunc().

◆ WARMUP_START_WEAPONS

#define WARMUP_START_WEAPONS   ((autocvar_g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)

Definition at line 103 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), and PutPlayerInServer().

Function Documentation

◆ CheckRules_World()

void CheckRules_World ( )

Definition at line 1593 of file world.qc.

References autocvar__endmatch, bprint(), checkrules_overtimesadded, checkrules_suddendeathend, checkrules_suddendeathwarning, CheckRules_World(), ClearWinners(), FOREACH_CLIENT, g_race, g_race_qualifying, GameRules_scoring_add, InitiateOvertime(), InitiateSuddenDeath(), intermission_running, IS_PLAYER, M_ARGV, MapVote_Start(), MapVote_Think(), MUTATOR_CALLHOOK, NextLevel(), NULL, player_count, ReadyRestart(), SetDefaultAlpha(), time, VoteThink(), warmup_stage, WINNING_NEVER, WINNING_STARTSUDDENDEATHOVERTIME, WINNING_YES, WinningCondition_RanOutOfSpawns(), and WinningCondition_Scores().

Referenced by CheckRules_World(), and StartFrame().

1594 {
1595  VoteThink();
1596  MapVote_Think();
1597 
1598  SetDefaultAlpha();
1599 
1600  if (intermission_running) // someone else quit the game already
1601  {
1602  if(player_count == 0) // Nobody there? Then let's go to the next map
1603  MapVote_Start();
1604  // this will actually check the player count in the next frame
1605  // again, but this shouldn't hurt
1606  return;
1607  }
1608 
1609  float timelimit = autocvar_timelimit * 60;
1610  float fraglimit = autocvar_fraglimit;
1611  float leadlimit = autocvar_leadlimit;
1612  if (leadlimit < 0) leadlimit = 0;
1613 
1614  if(warmup_stage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
1615  {
1616  if(timelimit > 0)
1617  timelimit = 0; // timelimit is not made for warmup
1618  if(fraglimit > 0)
1619  fraglimit = 0; // no fraglimit for now
1620  leadlimit = 0; // no leadlimit for now
1621  }
1622 
1623  if (autocvar__endmatch || timelimit < 0)
1624  {
1625  // endmatch
1626  NextLevel();
1627  return;
1628  }
1629 
1630  if(timelimit > 0)
1631  timelimit += game_starttime;
1632 
1633  float wantovertime;
1634  wantovertime = 0;
1635 
1637  {
1639  {
1641  if(g_race && !g_race_qualifying)
1642  Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_RACE_FINISHLAP);
1643  else
1644  Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_FRAG);
1645  }
1646  }
1647  else
1648  {
1649  if (timelimit && time >= timelimit)
1650  {
1651  if(g_race && (g_race_qualifying == 2) && timelimit > 0)
1652  {
1653  float totalplayers;
1654  float playerswithlaps;
1655  float readyplayers;
1656  totalplayers = playerswithlaps = readyplayers = 0;
1657  FOREACH_CLIENT(IS_PLAYER(it), {
1658  ++totalplayers;
1659  if(GameRules_scoring_add(it, RACE_FASTEST, 0))
1660  ++playerswithlaps;
1661  if(it.ready)
1662  ++readyplayers;
1663  });
1664 
1665  // at least 2 of the players have completed a lap: start the RACE
1666  // otherwise, the players should end the qualifying on their own
1667  if(readyplayers || playerswithlaps >= 2)
1668  {
1670  ReadyRestart(true); // go to race
1671  return;
1672  }
1673  else
1674  wantovertime |= InitiateSuddenDeath();
1675  }
1676  else
1677  wantovertime |= InitiateSuddenDeath();
1678  }
1679  }
1680 
1682  {
1683  NextLevel();
1684  return;
1685  }
1686 
1687  int checkrules_status = WinningCondition_RanOutOfSpawns();
1688  if(checkrules_status == WINNING_YES)
1689  bprint("Hey! Someone ran out of spawns!\n");
1690  else if(MUTATOR_CALLHOOK(CheckRules_World, checkrules_status, timelimit, fraglimit))
1691  checkrules_status = M_ARGV(0, float);
1692  else
1693  checkrules_status = WinningCondition_Scores(fraglimit, leadlimit);
1694 
1695  if(checkrules_status == WINNING_STARTSUDDENDEATHOVERTIME)
1696  {
1697  checkrules_status = WINNING_NEVER;
1699  wantovertime |= InitiateSuddenDeath();
1700  }
1701 
1702  if(checkrules_status == WINNING_NEVER)
1703  // equality cases! Nobody wins if the overtime ends in a draw.
1704  ClearWinners();
1705 
1706  if(wantovertime)
1707  {
1708  if(checkrules_status == WINNING_NEVER)
1709  InitiateOvertime();
1710  else
1711  checkrules_status = WINNING_YES;
1712  }
1713 
1715  if(checkrules_status != WINNING_NEVER || time >= checkrules_suddendeathend)
1716  checkrules_status = WINNING_YES;
1717 
1718  if(checkrules_status == WINNING_YES)
1719  {
1720  //print("WINNING\n");
1721  NextLevel();
1722  }
1723 }
float checkrules_suddendeathend
Definition: world.qh:33
int player_count
Definition: api.qh:103
#define FOREACH_CLIENT(cond, body)
Definition: utils.qh:49
int checkrules_overtimesadded
Definition: world.qh:34
#define GameRules_scoring_add(client, fld, value)
Definition: sv_rules.qh:78
float checkrules_suddendeathwarning
Definition: world.qh:32
const int WINNING_STARTSUDDENDEATHOVERTIME
Definition: world.qh:138
bool autocvar__endmatch
Definition: world.qh:6
bool warmup_stage
Definition: main.qh:103
void CheckRules_World()
Definition: world.qc:1593
bool g_race_qualifying
Definition: race.qh:12
const int WINNING_YES
Definition: world.qh:136
void ClearWinners()
Definition: world.qc:1422
void InitiateOvertime()
Definition: world.qc:1369
#define g_race
Definition: race.qh:46
void VoteThink()
Definition: vote.qc:324
#define NULL
Definition: post.qh:17
void NextLevel()
Definition: world.qc:1276
const int WINNING_NEVER
Definition: world.qh:137
float WinningCondition_RanOutOfSpawns()
Definition: world.qc:1509
#define M_ARGV(x, type)
Definition: events.qh:17
void ReadyRestart(bool forceWarmupEnd)
Definition: vote.qc:484
void MapVote_Think()
Definition: mapvoting.qc:645
void MapVote_Start()
Definition: mapvoting.qc:632
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
float WinningCondition_Scores(float limit, float leadlimit)
Definition: world.qc:1428
bool intermission_running
Definition: intermission.qh:9
void SetDefaultAlpha()
Definition: world.qc:104
float time
Definition: csprogsdefs.qc:16
#define IS_PLAYER(v)
Definition: utils.qh:9
float InitiateSuddenDeath()
Definition: world.qc:1337
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ droptofloor()

void droptofloor ( entity  this)

Definition at line 2224 of file world.qc.

References DropToFloor_Handler(), and InitializeEntity().

2225 {
2226  InitializeEntity(this, DropToFloor_Handler, INITPRIO_DROPTOFLOOR);
2227 }
void DropToFloor_Handler(entity this)
Definition: world.qc:2218
void InitializeEntity(entity e, void(entity this) func, int order)
Definition: world.qc:2146
+ Here is the call graph for this function:

◆ DumpStats()

void DumpStats ( float  final)

Definition at line 1170 of file world.qc.

References autocvar_sv_eventlog, autocvar_sv_eventlog_console, autocvar_sv_logscores_bots, autocvar_sv_logscores_console, autocvar_sv_logscores_file, autocvar_sv_logscores_filename, CS(), fclose(), FILE_APPEND, fopen(), FOREACH_CLIENT, fputs(), ftos(), GameLogEcho(), GetGametype(), GetMapname(), GetPlayerScoreString(), GetTeamScoreString(), INGAME_JOINED, IS_BOT_CLIENT, IS_PLAYER, IS_REAL_CLIENT, jointime, LOG_HELP, NULL, rint(), strcat(), teamplay, and time.

Referenced by GameCommand_printstats(), and NextLevel().

1171 {
1172  float file;
1173  string s;
1174  float to_console;
1175  float to_eventlog;
1176  float to_file;
1177  float i;
1178 
1179  to_console = autocvar_sv_logscores_console;
1180  to_eventlog = autocvar_sv_eventlog;
1181  to_file = autocvar_sv_logscores_file;
1182 
1183  if(!final)
1184  {
1185  to_console = true; // always print printstats replies
1186  to_eventlog = false; // but never print them to the event log
1187  }
1188 
1189  if(to_eventlog)
1191  to_console = false; // otherwise we get the output twice
1192 
1193  if(final)
1194  s = ":scores:";
1195  else
1196  s = ":status:";
1197  s = strcat(s, GetGametype(), "_", GetMapname(), ":", ftos(rint(time)));
1198 
1199  if(to_console)
1200  LOG_HELP(s);
1201  if(to_eventlog)
1202  GameLogEcho(s);
1203 
1204  file = -1;
1205  if(to_file)
1206  {
1208  if(file == -1)
1209  to_file = false;
1210  else
1211  fputs(file, strcat(s, "\n"));
1212  }
1213 
1214  s = strcat(":labels:player:", GetPlayerScoreString(NULL, 0));
1215  if(to_console)
1216  LOG_HELP(s);
1217  if(to_eventlog)
1218  GameLogEcho(s);
1219  if(to_file)
1220  fputs(file, strcat(s, "\n"));
1221 
1223  s = strcat(":player:see-labels:", GetPlayerScoreString(it, 0), ":");
1224  s = strcat(s, ftos(rint(time - CS(it).jointime)), ":");
1225  if(IS_PLAYER(it) || INGAME_JOINED(it))
1226  s = strcat(s, ftos(it.team), ":");
1227  else
1228  s = strcat(s, "spectator:");
1229 
1230  if(to_console)
1231  LOG_HELP(s, playername(it.netname, it.team, false));
1232  if(to_eventlog)
1233  GameLogEcho(strcat(s, ftos(it.playerid), ":", playername(it.netname, it.team, false)));
1234  if(to_file)
1235  fputs(file, strcat(s, playername(it.netname, it.team, false), "\n"));
1236  });
1237 
1238  if(teamplay)
1239  {
1240  s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0));
1241  if(to_console)
1242  LOG_HELP(s);
1243  if(to_eventlog)
1244  GameLogEcho(s);
1245  if(to_file)
1246  fputs(file, strcat(s, "\n"));
1247 
1248  for(i = 1; i < 16; ++i)
1249  {
1250  s = strcat(":teamscores:see-labels:", GetTeamScoreString(i, 0));
1251  s = strcat(s, ":", ftos(i));
1252  if(to_console)
1253  LOG_HELP(s);
1254  if(to_eventlog)
1255  GameLogEcho(s);
1256  if(to_file)
1257  fputs(file, strcat(s, "\n"));
1258  }
1259  }
1260 
1261  if(to_console)
1262  LOG_HELP(":end");
1263  if(to_eventlog)
1264  GameLogEcho(":end");
1265  if(to_file)
1266  {
1267  fputs(file, ":end\n");
1268  fclose(file);
1269  }
1270 }
string GetTeamScoreString(float tm, float shortString)
Definition: scores.qc:648
string GetMapname()
Definition: intermission.qc:18
ClientState CS(Client this)
Definition: state.qh:47
#define FOREACH_CLIENT(cond, body)
Definition: utils.qh:49
const float FILE_APPEND
Definition: csprogsdefs.qc:232
#define LOG_HELP(...)
Definition: log.qh:95
#define IS_REAL_CLIENT(v)
Definition: utils.qh:17
bool autocvar_sv_eventlog_console
Definition: gamelog.qh:4
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"))
#define NULL
Definition: post.qh:17
float jointime
Definition: client.qh:64
void GameLogEcho(string s)
Definition: gamelog.qc:12
float teamplay
Definition: progsdefs.qc:31
bool autocvar_sv_logscores_file
Definition: world.qh:20
string GetGametype()
Definition: intermission.qc:13
#define INGAME_JOINED(it)
Definition: sv_rules.qh:21
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition: utils.qh:15
bool autocvar_sv_logscores_console
Definition: world.qh:19
bool autocvar_sv_logscores_bots
Definition: world.qh:18
bool autocvar_sv_eventlog
Definition: gamelog.qh:3
float time
Definition: csprogsdefs.qc:16
string GetPlayerScoreString(entity pl, float shortString)
Returns score strings for eventlog etc.
Definition: scores.qc:586
string autocvar_sv_logscores_filename
Definition: world.qh:21
#define IS_PLAYER(v)
Definition: utils.qh:9
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeEntitiesRun()

void InitializeEntitiesRun ( )

Definition at line 2179 of file world.qc.

References backtrace, delete_fn(), entity(), eprint(), func_null(), initialize_entity_first, next, NULL, remove_except_protected(), remove_unsafely(), strcat(), and void.

Referenced by StartFrame().

2180 {
2181  entity startoflist = initialize_entity_first;
2184  for (entity e = startoflist; e; e = e.initialize_entity_next)
2185  {
2186  e.remove_except_protected_forbidden = 1;
2187  }
2188  for (entity e = startoflist; e; )
2189  {
2190  e.remove_except_protected_forbidden = 0;
2191  e.initialize_entity_order = 0;
2192  entity next = e.initialize_entity_next;
2193  e.initialize_entity_next = NULL;
2194  var void(entity this) func = e.initialize_entity;
2195  e.initialize_entity = func_null;
2196  if (e.classname == "initialize_entity")
2197  {
2198  entity wrappee = e.enemy;
2199  builtin_remove(e);
2200  e = wrappee;
2201  }
2202  //dprint("Delayed initialization: ", e.classname, "\n");
2203  if (func)
2204  {
2205  func(e);
2206  }
2207  else
2208  {
2209  eprint(e);
2210  backtrace(strcat("Null function in: ", e.classname, "\n"));
2211  }
2212  e = next;
2213  }
2215 }
void remove_unsafely(entity e)
Definition: main.qc:248
void remove_except_protected(entity e)
Definition: main.qc:241
entity() spawn
var void delete_fn(entity e)
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"))
#define NULL
Definition: post.qh:17
#define backtrace(msg)
Definition: log.qh:105
next
Definition: all.qh:88
entity initialize_entity_first
Definition: world.qh:124
void
Definition: self.qh:83
var void func_null()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeEntity()

void InitializeEntity ( entity  e,
void(entity this func,
int  order 
)

Definition at line 2146 of file world.qc.

References entity(), initialize_entity_first, NULL, and prev.

Referenced by _StartItem(), buffs_Initialize(), ctf_FlagSetup(), ctf_Initialize(), dom_Initialize(), door_reset(), droptofloor(), InitGameplayMode(), invasion_Initialize(), ka_SpawnBall(), MUTATOR_HOOKFUNCTION(), nb_Initialize(), ons_ControlPoint_Setup(), ons_GeneratorSetup(), ons_Initialize(), readplayerstartcvars(), relocate_spawnpoint(), spawnfunc(), SUB_CalcAngleMoveEnt(), target_checkpoint_setup(), target_give_init(), tdm_Initialize(), Teleport_Touch(), train_next(), and trigger_push_findtarget().

2147 {
2148  entity prev, cur;
2149 
2150  if (!e || e.initialize_entity)
2151  {
2152  // make a proxy initializer entity
2153  entity e_old = e;
2154  e = new(initialize_entity);
2155  e.enemy = e_old;
2156  }
2157 
2158  e.initialize_entity = func;
2159  e.initialize_entity_order = order;
2160 
2162  prev = NULL;
2163  for (;;)
2164  {
2165  if (!cur || cur.initialize_entity_order > order)
2166  {
2167  // insert between prev and cur
2168  if (prev)
2169  prev.initialize_entity_next = e;
2170  else
2172  e.initialize_entity_next = cur;
2173  return;
2174  }
2175  prev = cur;
2176  cur = cur.initialize_entity_next;
2177  }
2178 }
entity() spawn
prev
Definition: all.qh:66
#define NULL
Definition: post.qh:17
entity initialize_entity_first
Definition: world.qh:124
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveToRandomLocationWithinBounds()

bool MoveToRandomLocationWithinBounds ( entity  e,
vector  boundmin,
vector  boundmax,
float  goodcontents,
float  badcontents,
float  badsurfaceflags,
int  attempts,
float  maxaboveground,
float  minviewdistance 
)

Definition at line 1035 of file world.qc.

References checkpvs(), entity(), ftos(), g_items, g_spawnpoints, IL_EACH, LOG_DEBUG, MOVE_NORMAL, normalize(), NULL, Q3SURFACEFLAG_SKY, random(), setorigin(), trace_dphitcontents, trace_dphitq3surfaceflags, trace_dphittexturename, trace_endpos, trace_fraction, trace_startsolid, vectoangles(), vector(), and vlen().

Referenced by MoveToRandomMapLocation().

1036 {
1037  float m = e.dphitcontentsmask;
1038  e.dphitcontentsmask = goodcontents | badcontents;
1039 
1040  vector org = boundmin;
1041  vector delta = boundmax - boundmin;
1042 
1043  vector start, end;
1044  start = end = org;
1045  int j; // used after the loop
1046  for(j = 0; j < attempts; ++j)
1047  {
1048  start.x = org.x + random() * delta.x;
1049  start.y = org.y + random() * delta.y;
1050  start.z = org.z + random() * delta.z;
1051 
1052  // rule 1: start inside world bounds, and outside
1053  // solid, and don't start from somewhere where you can
1054  // fall down to evil
1055  tracebox(start, e.mins, e.maxs, start - '0 0 1' * delta.z, MOVE_NORMAL, e);
1056  if (trace_fraction >= 1)
1057  continue;
1058  if (trace_startsolid)
1059  continue;
1060  if (trace_dphitcontents & badcontents)
1061  continue;
1062  if (trace_dphitq3surfaceflags & badsurfaceflags)
1063  continue;
1064 
1065  // rule 2: if we are too high, lower the point
1066  if (trace_fraction * delta.z > maxaboveground)
1067  start = trace_endpos + '0 0 1' * maxaboveground;
1068  vector enddown = trace_endpos;
1069 
1070  // rule 3: make sure we aren't outside the map. This only works
1071  // for somewhat well formed maps. A good rule of thumb is that
1072  // the map should have a convex outside hull.
1073  // these can be traceLINES as we already verified the starting box
1074  vector mstart = start + 0.5 * (e.mins + e.maxs);
1075  traceline(mstart, mstart + '1 0 0' * delta.x, MOVE_NORMAL, e);
1076  if (trace_fraction >= 1 || trace_dphittexturename == "common/caulk")
1077  continue;
1078  traceline(mstart, mstart - '1 0 0' * delta.x, MOVE_NORMAL, e);
1079  if (trace_fraction >= 1 || trace_dphittexturename == "common/caulk")
1080  continue;
1081  traceline(mstart, mstart + '0 1 0' * delta.y, MOVE_NORMAL, e);
1082  if (trace_fraction >= 1 || trace_dphittexturename == "common/caulk")
1083  continue;
1084  traceline(mstart, mstart - '0 1 0' * delta.y, MOVE_NORMAL, e);
1085  if (trace_fraction >= 1 || trace_dphittexturename == "common/caulk")
1086  continue;
1087  traceline(mstart, mstart + '0 0 1' * delta.z, MOVE_NORMAL, e);
1088  if (trace_fraction >= 1 || trace_dphittexturename == "common/caulk")
1089  continue;
1090 
1091  // rule 4: we must "see" some spawnpoint or item
1092  entity sp = NULL;
1093  IL_EACH(g_spawnpoints, checkpvs(mstart, it),
1094  {
1095  if((traceline(mstart, it.origin, MOVE_NORMAL, e), trace_fraction) >= 1)
1096  {
1097  sp = it;
1098  break;
1099  }
1100  });
1101  if(!sp)
1102  {
1103  int items_checked = 0;
1104  IL_EACH(g_items, checkpvs(mstart, it),
1105  {
1106  if((traceline(mstart, it.origin + (it.mins + it.maxs) * 0.5, MOVE_NORMAL, e), trace_fraction) >= 1)
1107  {
1108  sp = it;
1109  break;
1110  }
1111 
1112  ++items_checked;
1113  if(items_checked >= attempts)
1114  break; // sanity
1115  });
1116 
1117  if(!sp)
1118  continue;
1119  }
1120 
1121  // find a random vector to "look at"
1122  end.x = org.x + random() * delta.x;
1123  end.y = org.y + random() * delta.y;
1124  end.z = org.z + random() * delta.z;
1125  end = start + normalize(end - start) * vlen(delta);
1126 
1127  // rule 4: start TO end must not be too short
1128  tracebox(start, e.mins, e.maxs, end, MOVE_NORMAL, e);
1129  if(trace_startsolid)
1130  continue;
1131  if(trace_fraction < minviewdistance / vlen(delta))
1132  continue;
1133 
1134  // rule 5: don't want to look at sky
1136  continue;
1137 
1138  // rule 6: we must not end up in trigger_hurt
1139  if(tracebox_hits_trigger_hurt(start, e.mins, e.maxs, enddown))
1140  continue;
1141 
1142  break;
1143  }
1144 
1145  e.dphitcontentsmask = m;
1146 
1147  if(j < attempts)
1148  {
1149  setorigin(e, start);
1150  e.angles = vectoangles(end - start);
1151  LOG_DEBUG("Needed ", ftos(j + 1), " attempts");
1152  return true;
1153  }
1154  return false;
1155 }
#define IL_EACH(this, cond, body)
float trace_dphitq3surfaceflags
float trace_dphitcontents
entity() spawn
const float MOVE_NORMAL
Definition: csprogsdefs.qc:252
float checkpvs(vector viewpos, entity viewee)
string trace_dphittexturename
float Q3SURFACEFLAG_SKY
IntrusiveList g_items
Definition: items.qh:126
#define NULL
Definition: post.qh:17
vector trace_endpos
Definition: csprogsdefs.qc:37
vector(float skel, float bonenum) _skel_get_boneabs_hidden
setorigin(ent, v)
float trace_startsolid
Definition: csprogsdefs.qc:35
float trace_fraction
Definition: csprogsdefs.qc:36
IntrusiveList g_spawnpoints
Definition: spawnpoints.qh:32
#define LOG_DEBUG(...)
Definition: log.qh:85
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveToRandomMapLocation()

float MoveToRandomMapLocation ( entity  e,
float  goodcontents,
float  badcontents,
float  badsurfaceflags,
float  attempts,
float  maxaboveground,
float  minviewdistance 
)

Definition at line 1157 of file world.qc.

References MoveToRandomLocationWithinBounds(), and world.

Referenced by buff_Respawn(), CheatImpulse(), invasion_SpawnChosenMonster(), and ka_RespawnBall().

1158 {
1159  return MoveToRandomLocationWithinBounds(e, world.mins, world.maxs, goodcontents, badcontents, badsurfaceflags, attempts, maxaboveground, minviewdistance);
1160 }
entity world
Definition: csprogsdefs.qc:15
bool MoveToRandomLocationWithinBounds(entity e, vector boundmin, vector boundmax, float goodcontents, float badcontents, float badsurfaceflags, int attempts, float maxaboveground, float minviewdistance)
Definition: world.qc:1035
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readlevelcvars()

void readlevelcvars ( )

Definition at line 2063 of file world.qc.

References cvar(), FOREACH, g_pickup_cells_max, g_pickup_fuel_max, g_pickup_nails_max, g_pickup_plasma_max, g_pickup_rockets_max, g_pickup_shells_max, g_pickup_weapons_anyway, g_weapon_stay, GetGametype(), MUTATOR_CALLHOOK, readplayerstartcvars(), SERVERFLAG_ALLOW_FULLBRIGHT, serverflags, strcat(), sv_ready_restart_after_countdown, time, and warmup_stage.

Referenced by spawnfunc().

2064 {
2065  if(cvar("sv_allow_fullbright"))
2067 
2068  sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown");
2069 
2070  warmup_stage = cvar("g_warmup");
2071  warmup_limit = cvar("g_warmup_limit");
2072 
2073  if(cvar("g_campaign"))
2074  warmup_stage = 0; // no warmup during campaign
2075 
2076  g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
2077  g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon");
2078  g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo");
2079  g_pickup_respawntime_short = cvar("g_pickup_respawntime_short");
2080  g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium");
2081  g_pickup_respawntime_long = cvar("g_pickup_respawntime_long");
2082  g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup");
2083  g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon");
2084  g_pickup_respawntimejitter_superweapon = cvar("g_pickup_respawntimejitter_superweapon");
2085  g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo");
2086  g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short");
2087  g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium");
2088  g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long");
2089  g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup");
2090 
2091  g_pickup_shells = cvar("g_pickup_shells");
2092  g_pickup_shells_max = cvar("g_pickup_shells_max");
2093  g_pickup_nails = cvar("g_pickup_nails");
2094  g_pickup_nails_max = cvar("g_pickup_nails_max");
2095  g_pickup_rockets = cvar("g_pickup_rockets");
2096  g_pickup_rockets_max = cvar("g_pickup_rockets_max");
2097  g_pickup_cells = cvar("g_pickup_cells");
2098  g_pickup_cells_max = cvar("g_pickup_cells_max");
2099  g_pickup_plasma = cvar("g_pickup_plasma");
2100  g_pickup_plasma_max = cvar("g_pickup_plasma_max");
2101  g_pickup_fuel = cvar("g_pickup_fuel");
2102  g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack");
2103  g_pickup_fuel_max = cvar("g_pickup_fuel_max");
2104  g_pickup_armorsmall = cvar("g_pickup_armorsmall");
2105  g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max");
2106  g_pickup_armorsmall_anyway = cvar("g_pickup_armorsmall_anyway");
2107  g_pickup_armormedium = cvar("g_pickup_armormedium");
2108  g_pickup_armormedium_max = cvar("g_pickup_armormedium_max");
2109  g_pickup_armormedium_anyway = cvar("g_pickup_armormedium_anyway");
2110  g_pickup_armorbig = cvar("g_pickup_armorbig");
2111  g_pickup_armorbig_max = cvar("g_pickup_armorbig_max");
2112  g_pickup_armorbig_anyway = cvar("g_pickup_armorbig_anyway");
2113  g_pickup_armormega = cvar("g_pickup_armormega");
2114  g_pickup_armormega_max = cvar("g_pickup_armormega_max");
2115  g_pickup_armormega_anyway = cvar("g_pickup_armormega_anyway");
2116  g_pickup_healthsmall = cvar("g_pickup_healthsmall");
2117  g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max");
2118  g_pickup_healthsmall_anyway = cvar("g_pickup_healthsmall_anyway");
2119  g_pickup_healthmedium = cvar("g_pickup_healthmedium");
2120  g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max");
2121  g_pickup_healthmedium_anyway = cvar("g_pickup_healthmedium_anyway");
2122  g_pickup_healthbig = cvar("g_pickup_healthbig");
2123  g_pickup_healthbig_max = cvar("g_pickup_healthbig_max");
2124  g_pickup_healthbig_anyway = cvar("g_pickup_healthbig_anyway");
2125  g_pickup_healthmega = cvar("g_pickup_healthmega");
2126  g_pickup_healthmega_max = cvar("g_pickup_healthmega_max");
2127  g_pickup_healthmega_anyway = cvar("g_pickup_healthmega_anyway");
2128 
2129  g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway");
2130  g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway");
2131 
2132  g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
2133  if(!g_weapon_stay)
2134  g_weapon_stay = cvar("g_weapon_stay");
2135 
2136  MUTATOR_CALLHOOK(ReadLevelCvars);
2137 
2138  if (!warmup_stage)
2139  game_starttime = time + cvar("g_start_delay");
2140 
2141  FOREACH(Weapons, it != WEP_Null, { it.wr_init(it); });
2142 
2144 }
int serverflags
Definition: main.qh:184
float g_pickup_nails_max
Definition: world.qh:70
float g_pickup_weapons_anyway
Definition: world.qh:75
const int SERVERFLAG_ALLOW_FULLBRIGHT
Definition: constants.qh:15
bool warmup_stage
Definition: main.qh:103
void readplayerstartcvars()
Definition: world.qc:1843
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"))
float g_pickup_rockets_max
Definition: world.qh:71
float g_pickup_fuel_max
Definition: world.qh:74
float g_pickup_shells_max
Definition: world.qh:69
float g_pickup_plasma_max
Definition: world.qh:73
bool sv_ready_restart_after_countdown
Definition: world.qh:119
string GetGametype()
Definition: intermission.qc:13
float g_weapon_stay
Definition: world.qh:112
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
float g_pickup_cells_max
Definition: world.qh:72
float time
Definition: csprogsdefs.qc:16
#define FOREACH(list, cond, body)
Definition: iter.qh:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readplayerstartcvars()

void readplayerstartcvars ( )

Definition at line 1843 of file world.qc.

References argv(), autocvar_g_jetpack, autocvar_g_warmup_allguns, cvar(), cvar_string(), FOREACH, g_weapon_stay, g_weaponarena, g_weaponarena_list, g_weaponarena_weapons, GetResource(), InitializeEntity(), M_ARGV, Weapon::m_name, max(), MUTATOR_CALLHOOK, new_pure, NULL, random_start_ammo, random_start_weapons_count, SetResource(), start_ammo_cells, start_ammo_fuel, start_ammo_nails, start_ammo_plasma, start_ammo_rockets, start_ammo_shells, start_armorvalue, start_health, start_items, start_weapons, start_weapons_default, start_weapons_defaultmask, strcat(), strlen(), strzone(), substring(), tokenize_console, want_weapon(), warmup_start_ammo_cells, warmup_start_ammo_fuel, warmup_start_ammo_nails, warmup_start_ammo_plasma, warmup_start_ammo_rockets, warmup_start_ammo_shells, warmup_start_armorvalue, warmup_start_health, warmup_start_weapons, warmup_start_weapons_default, warmup_start_weapons_defaultmask, Weapon_from_name(), weaponarena_available_all_update(), weaponarena_available_devall_update(), weaponarena_available_most_update(), weapons_all(), weapons_devall(), and weapons_most().

Referenced by readlevelcvars().

1844 {
1845  // initialize starting values for players
1846  start_weapons = '0 0 0';
1847  start_weapons_default = '0 0 0';
1848  start_weapons_defaultmask = '0 0 0';
1849  start_items = 0;
1850  start_ammo_shells = 0;
1851  start_ammo_nails = 0;
1852  start_ammo_rockets = 0;
1853  start_ammo_cells = 0;
1854  start_ammo_plasma = 0;
1855  if (random_start_ammo == NULL)
1856  {
1858  }
1859  start_health = cvar("g_balance_health_start");
1860  start_armorvalue = cvar("g_balance_armor_start");
1861 
1862  g_weaponarena = 0;
1863  g_weaponarena_weapons = '0 0 0';
1864 
1865  string s = cvar_string("g_weaponarena");
1866 
1867  MUTATOR_CALLHOOK(SetWeaponArena, s);
1868  s = M_ARGV(0, string);
1869 
1870  if (s == "0" || s == "")
1871  {
1872  // no arena
1873  }
1874  else if (s == "off")
1875  {
1876  // forcibly turn off weaponarena
1877  }
1878  else if (s == "all" || s == "1")
1879  {
1880  g_weaponarena = 1;
1881  g_weaponarena_list = "All Weapons";
1883  }
1884  else if (s == "devall")
1885  {
1886  g_weaponarena = 1;
1887  g_weaponarena_list = "Dev All Weapons";
1889  }
1890  else if (s == "most")
1891  {
1892  g_weaponarena = 1;
1893  g_weaponarena_list = "Most Weapons";
1895  }
1896  else if (s == "all_available")
1897  {
1898  g_weaponarena = 1;
1899  g_weaponarena_list = "All Available Weapons";
1900 
1901  // this needs to run after weaponsInMapAll is initialized
1903  }
1904  else if (s == "devall_available")
1905  {
1906  g_weaponarena = 1;
1907  g_weaponarena_list = "Dev All Available Weapons";
1908 
1909  // this needs to run after weaponsInMapAll is initialized
1911  }
1912  else if (s == "most_available")
1913  {
1914  g_weaponarena = 1;
1915  g_weaponarena_list = "Most Available Weapons";
1916 
1917  // this needs to run after weaponsInMapAll is initialized
1919  }
1920  else if (s == "none")
1921  {
1922  g_weaponarena = 1;
1923  g_weaponarena_list = "No Weapons";
1924  }
1925  else
1926  {
1927  g_weaponarena = 1;
1928  float t = tokenize_console(s);
1929  g_weaponarena_list = "";
1930  for (int j = 0; j < t; ++j)
1931  {
1932  s = argv(j);
1933  Weapon wep = Weapon_from_name(s);
1934  if(wep != WEP_Null)
1935  {
1936  g_weaponarena_weapons |= (wep.m_wepset);
1938  }
1939  }
1941  }
1942 
1943  if (g_weaponarena)
1944  {
1945  g_weapon_stay = 0; // incompatible
1947  start_items |= IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS;
1948  }
1949  else
1950  {
1951  FOREACH(Weapons, it != WEP_Null, {
1952  int w = want_weapon(it, false);
1953  WepSet s = it.m_wepset;
1954  if(w & 1)
1955  start_weapons |= s;
1956  if(w & 2)
1957  start_weapons_default |= s;
1958  if(w & 4)
1960  });
1961  }
1962 
1963  if(cvar("g_balance_superweapons_time") < 0)
1964  start_items |= IT_UNLIMITED_SUPERWEAPONS;
1965 
1966  if(!cvar("g_use_ammunition"))
1967  start_items |= IT_UNLIMITED_AMMO;
1968 
1969  if(start_items & IT_UNLIMITED_AMMO)
1970  {
1971  start_ammo_shells = 999;
1972  start_ammo_nails = 999;
1973  start_ammo_rockets = 999;
1974  start_ammo_cells = 999;
1975  start_ammo_plasma = 999;
1976  start_ammo_fuel = 999;
1977  }
1978  else
1979  {
1980  start_ammo_shells = cvar("g_start_ammo_shells");
1981  start_ammo_nails = cvar("g_start_ammo_nails");
1982  start_ammo_rockets = cvar("g_start_ammo_rockets");
1983  start_ammo_cells = cvar("g_start_ammo_cells");
1984  start_ammo_plasma = cvar("g_start_ammo_plasma");
1985  start_ammo_fuel = cvar("g_start_ammo_fuel");
1986  random_start_weapons_count = cvar("g_random_start_weapons_count");
1987  SetResource(random_start_ammo, RES_SHELLS, cvar("g_random_start_shells"));
1988  SetResource(random_start_ammo, RES_BULLETS, cvar("g_random_start_bullets"));
1989  SetResource(random_start_ammo, RES_ROCKETS, cvar("g_random_start_rockets"));
1990  SetResource(random_start_ammo, RES_CELLS, cvar("g_random_start_cells"));
1991  SetResource(random_start_ammo, RES_PLASMA, cvar("g_random_start_plasma"));
1992  }
1993 
2005 
2006  if (!g_weaponarena)
2007  {
2008  warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells");
2009  warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails");
2010  warmup_start_ammo_rockets = cvar("g_warmup_start_ammo_rockets");
2011  warmup_start_ammo_cells = cvar("g_warmup_start_ammo_cells");
2012  warmup_start_ammo_plasma = cvar("g_warmup_start_ammo_plasma");
2013  warmup_start_ammo_fuel = cvar("g_warmup_start_ammo_fuel");
2014  warmup_start_health = cvar("g_warmup_start_health");
2015  warmup_start_armorvalue = cvar("g_warmup_start_armor");
2016  warmup_start_weapons = '0 0 0';
2017  warmup_start_weapons_default = '0 0 0';
2019  FOREACH(Weapons, it != WEP_Null, {
2021  WepSet s = it.m_wepset;
2022  if(w & 1)
2023  warmup_start_weapons |= s;
2024  if(w & 2)
2026  if(w & 4)
2028  });
2029  }
2030 
2031  if (autocvar_g_jetpack)
2032  start_items |= ITEM_Jetpack.m_itemid;
2033 
2034  MUTATOR_CALLHOOK(SetStartItems);
2035 
2036  if (start_items & ITEM_Jetpack.m_itemid)
2037  {
2038  start_items |= ITEM_JetpackRegen.m_itemid;
2039  start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
2040  warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
2041  }
2042 
2049  SetResource(random_start_ammo, RES_SHELLS, max(0, GetResource(random_start_ammo, RES_SHELLS)));
2050  SetResource(random_start_ammo, RES_BULLETS, max(0, GetResource(random_start_ammo, RES_BULLETS)));
2051  SetResource(random_start_ammo, RES_ROCKETS, max(0, GetResource(random_start_ammo, RES_ROCKETS)));
2052  SetResource(random_start_ammo, RES_CELLS, max(0, GetResource(random_start_ammo, RES_CELLS)));
2053  SetResource(random_start_ammo, RES_PLASMA, max(0, GetResource(random_start_ammo, RES_PLASMA)));
2054 
2061 }
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 start_ammo_rockets
Definition: world.qh:87
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
WepSet start_weapons
Definition: world.qh:81
void weaponarena_available_all_update(entity this)
Definition: world.qc:1804
WepSet warmup_start_weapons_defaultmask
Definition: world.qh:102
int start_items
Definition: world.qh:84
string m_name
M: wepname : human readable name.
Definition: weapon.qh:78
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 warmup_start_ammo_plasma
Definition: world.qh:108
bool autocvar_g_warmup_allguns
Definition: world.qh:9
float warmup_start_ammo_cells
Definition: world.qh:107
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
Definition: cl_resources.qc:26
float warmup_start_ammo_fuel
Definition: world.qh:109
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"))
float start_ammo_cells
Definition: world.qh:88
WepSet weapons_most()
Definition: world.qc:1794
#define NULL
Definition: post.qh:17
#define M_ARGV(x, type)
Definition: events.qh:17
void weaponarena_available_devall_update(entity this)
Definition: world.qc:1817
float warmup_start_armorvalue
Definition: world.qh:111
#define tokenize_console
Definition: dpextensions.qh:24
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
Definition: cl_resources.qc:10
float start_health
Definition: world.qh:98
void InitializeEntity(entity e, void(entity this) func, int order)
Definition: world.qc:2146
WepSet weapons_devall()
Definition: world.qc:1784
float warmup_start_ammo_rockets
Definition: world.qh:106
float want_weapon(entity weaponinfo, float allguns)
Definition: world.qc:1725
WepSet start_weapons_default
Definition: world.qh:82
WepSet weapons_all()
Definition: world.qc:1774
float g_weapon_stay
Definition: world.qh:112
float start_ammo_nails
Definition: world.qh:86
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
bool autocvar_g_jetpack
Definition: world.qh:8
float warmup_start_health
Definition: world.qh:110
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62
int random_start_weapons_count
Number of random start weapons to give to players.
Definition: world.qh:92
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition: weapon.qh:41
float start_armorvalue
Definition: world.qh:99
Weapon Weapon_from_name(string s)
Definition: all.qh:134
WepSet start_weapons_defaultmask
Definition: world.qh:83
float start_ammo_plasma
Definition: world.qh:89
#define FOREACH(list, cond, body)
Definition: iter.qh:19
WepSet g_weaponarena_weapons
Definition: world.qh:77
float warmup_start_ammo_nails
Definition: world.qh:105
void weaponarena_available_most_update(entity this)
Definition: world.qc:1830
float g_weaponarena
Definition: world.qh:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadyRestart()

void ReadyRestart ( bool  forceWarmupEnd)

Definition at line 484 of file vote.qc.

References cvar(), intermission_running, localcmd, MUTATOR_CALLHOOK, race_completing, ReadyRestart_force(), and warmup_stage.

Referenced by CheckRules_World(), GameCommand_allready(), GameCommand_resetmatch(), ReadyCount(), and StartFrame().

485 {
486  if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing) localcmd("restart\n");
487  else localcmd("\nsv_hook_readyrestart\n");
488 
489  if(forceWarmupEnd)
490  warmup_stage = 0; // forcefully end warmup and go to match stage
491  else
492  warmup_stage = cvar("g_warmup"); // go into warmup if it's enabled, otherwise restart into match stage
493 
494  ReadyRestart_force(false);
495 }
void ReadyRestart_force(bool is_fake_round_start)
Definition: vote.qc:426
bool warmup_stage
Definition: main.qh:103
float race_completing
Definition: race.qh:27
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
bool intermission_running
Definition: intermission.qh:9
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RedirectionThink()

float RedirectionThink ( )

Definition at line 2349 of file world.qc.

References autocvar_quit_and_redirect_timer, bprint(), cvar_set(), FOREACH_CLIENT, ftos(), IS_REAL_CLIENT, localcmd, LOG_INFO, redirection_target, strcat(), stuffcmd, and time.

Referenced by StartFrame().

2350 {
2351  float clients_found;
2352 
2353  if(redirection_target == "")
2354  return false;
2355 
2356  if(!redirection_timeout)
2357  {
2358  cvar_set("sv_public", "-2");
2359  redirection_timeout = time + 0.6; // this will only try twice... should be able to keep more clients
2360  if(redirection_target == "self")
2361  bprint("^3SERVER NOTICE:^7 restarting the server\n");
2362  else
2363  bprint("^3SERVER NOTICE:^7 redirecting everyone to ", redirection_target, "\n");
2364  }
2365 
2367  return true;
2368 
2370 
2371  clients_found = 0;
2373  // TODO add timer
2374  LOG_INFO("Redirecting: sending connect command to ", it.netname);
2375  if(redirection_target == "self")
2376  stuffcmd(it, "\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " reconnect\n");
2377  else
2378  stuffcmd(it, strcat("\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " \"connect ", redirection_target, "\"\n"));
2379  ++clients_found;
2380  });
2381 
2382  LOG_INFO("Redirecting: ", ftos(clients_found), " clients left.");
2383 
2384  if(time > redirection_timeout || clients_found == 0)
2385  localcmd("\nwait; wait; wait; quit\n");
2386 
2387  return true;
2388 }
#define FOREACH_CLIENT(cond, body)
Definition: utils.qh:49
float redirection_nextthink
Definition: world.qc:2348
float redirection_timeout
Definition: world.qc:2347
#define IS_REAL_CLIENT(v)
Definition: utils.qh:17
string redirection_target
Definition: world.qh:61
float autocvar_quit_and_redirect_timer
Definition: world.qh:13
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"))
#define LOG_INFO(...)
Definition: log.qh:70
#define stuffcmd(cl,...)
Definition: progsdefs.qh:23
float time
Definition: csprogsdefs.qc:16
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWinners()

void SetWinners ( .float  field,
float  value 
)

Definition at line 1407 of file world.qc.

References FOREACH_CLIENT, INGAME, and IS_PLAYER.

Referenced by WinningCondition_Assault(), WinningCondition_Invasion(), WinningCondition_LMS(), and WinningCondition_Scores().

1408 {
1409  FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), { it.winning = (it.(field) == value); });
1410 }
#define INGAME(it)
Definition: sv_rules.qh:20
#define FOREACH_CLIENT(cond, body)
Definition: utils.qh:49
#define IS_PLAYER(v)
Definition: utils.qh:9
+ Here is the caller graph for this function:

◆ STATIC_INIT()

STATIC_INIT ( g_moveables  )

Definition at line 161 of file world.qh.

References IL_NEW.

161 { g_moveables = IL_NEW(); }
#define IL_NEW()
IntrusiveList g_moveables
Definition: world.qh:160

◆ void()

void ( entity  this)

◆ want_weapon()

float want_weapon ( entity  weaponinfo,
float  allguns 
)

Definition at line 1725 of file world.qc.

References boolean, M_ARGV, MUTATOR_CALLHOOK, WEP_FLAG_HIDDEN, WEP_FLAG_MUTATORBLOCKED, WEP_FLAG_NORMAL, and WEP_FLAG_SPECIALATTACK.

Referenced by readplayerstartcvars(), and weapons_start().

1726 {
1727  int d = 0;
1728  bool allow_mutatorblocked = false;
1729 
1730  if(!weaponinfo.m_id)
1731  return 0;
1732 
1733  bool mutator_returnvalue = MUTATOR_CALLHOOK(WantWeapon, weaponinfo, d, allguns, allow_mutatorblocked);
1734  d = M_ARGV(1, float);
1735  allguns = M_ARGV(2, bool);
1736  allow_mutatorblocked = M_ARGV(3, bool);
1737 
1738  if(allguns)
1739  d = boolean((weaponinfo.spawnflags & WEP_FLAG_NORMAL) && !(weaponinfo.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_SPECIALATTACK)));
1740  else if(!mutator_returnvalue)
1741  d = !(!weaponinfo.weaponstart);
1742 
1743  if(!allow_mutatorblocked && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns
1744  d = 0;
1745 
1746  float t = weaponinfo.weaponstartoverride;
1747 
1748  //LOG_INFOF("want_weapon: %s - d: %d t: %d\n", weaponinfo.netname, d, t);
1749 
1750  // bit order in t:
1751  // 1: want or not
1752  // 2: is default?
1753  // 4: is set by default?
1754  if(t < 0)
1755  t = 4 | (3 * d);
1756  else
1757  t |= (2 * d);
1758 
1759  return t;
1760 }
const int WEP_FLAG_HIDDEN
Definition: weapon.qh:200
#define M_ARGV(x, type)
Definition: events.qh:17
const int WEP_FLAG_SPECIALATTACK
Definition: weapon.qh:211
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
const int WEP_FLAG_NORMAL
Definition: weapon.qh:199
const int WEP_FLAG_MUTATORBLOCKED
Definition: weapon.qh:203
#define boolean(value)
Definition: bool.qh:9
+ Here is the caller graph for this function:

◆ WinningCondition_Scores()

float WinningCondition_Scores ( float  limit,
float  leadlimit 
)

Definition at line 1428 of file world.qc.

References autocvar_leadlimit_and_fraglimit, checkrules_suddendeathend, ClearWinners(), FLOAT_MAX, fragsleft_last, GetWinningCode(), max(), min(), MUTATOR_CALLHOOK, NULL, SetWinners(), team, Team_GetTeamFromIndex(), Team_IndexToTeam(), Team_SetTeamScore(), teamplay, TeamScore_GetCompareValue(), time, WinningConditionHelper(), WinningConditionHelper_equality, WinningConditionHelper_lowerisbetter, WinningConditionHelper_secondscore, WinningConditionHelper_topscore, WinningConditionHelper_winner, WinningConditionHelper_winnerteam, and WinningConditionHelper_zeroisworst.

Referenced by CheckRules_World(), WinningCondition_QualifyingThenRace(), and WinningCondition_Race().

1429 {
1430  // TODO make everything use THIS winning condition (except LMS)
1432 
1433  if(teamplay)
1434  {
1435  for (int i = 1; i < 5; ++i)
1436  {
1439  }
1440  }
1441 
1442  ClearWinners();
1444  WinningConditionHelper_winner.winning = 1;
1447 
1449  {
1452  limit = -limit;
1453  }
1454 
1456  leadlimit = 0; // not supported in this mode
1457 
1458  if(MUTATOR_CALLHOOK(Scores_CountFragsRemaining))
1459  {
1460  float fragsleft;
1462  {
1463  fragsleft = 1;
1464  }
1465  else
1466  {
1467  fragsleft = FLOAT_MAX;
1468  float leadingfragsleft = FLOAT_MAX;
1469  if (limit)
1470  fragsleft = limit - WinningConditionHelper_topscore;
1471  if (leadlimit)
1473 
1474  if (limit && leadlimit && autocvar_leadlimit_and_fraglimit)
1475  fragsleft = max(fragsleft, leadingfragsleft);
1476  else
1477  fragsleft = min(fragsleft, leadingfragsleft);
1478  }
1479 
1480  if (fragsleft_last != fragsleft) // do not announce same remaining frags multiple times
1481  {
1482  if (fragsleft == 1)
1483  Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_1);
1484  else if (fragsleft == 2)
1485  Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_2);
1486  else if (fragsleft == 3)
1487  Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_3);
1488 
1489  fragsleft_last = fragsleft;
1490  }
1491  }
1492 
1493  bool fraglimit_reached = (limit && WinningConditionHelper_topscore >= limit);
1494  bool leadlimit_reached = (leadlimit && WinningConditionHelper_topscore - WinningConditionHelper_secondscore >= leadlimit);
1495 
1496  bool limit_reached;
1497  // only respect leadlimit_and_fraglimit when both limits are set or the game will never end
1498  if (limit && leadlimit && autocvar_leadlimit_and_fraglimit)
1499  limit_reached = (fraglimit_reached && leadlimit_reached);
1500  else
1501  limit_reached = (fraglimit_reached || leadlimit_reached);
1502 
1503  return GetWinningCode(
1504  WinningConditionHelper_topscore && limit_reached,
1506  );
1507 }
float checkrules_suddendeathend
Definition: world.qh:33
int team
Definition: main.qh:157
void Team_SetTeamScore(entity team_ent, float score)
Sets the score of the team.
Definition: teamplay.qc:80
void SetWinners(.float field, float value)
Definition: world.qc:1407
float WinningConditionHelper_lowerisbetter
lower is better, duh
Definition: scores.qh:115
int fragsleft_last
Definition: world.qc:1427
void ClearWinners()
Definition: world.qc:1422
entity WinningConditionHelper_winner
the winning player, or NULL if none
Definition: scores.qh:113
float WinningConditionHelper_zeroisworst
zero is worst, duh
Definition: scores.qh:116
float WinningConditionHelper_secondscore
second highest score
Definition: scores.qh:109
int autocvar_leadlimit_and_fraglimit
Definition: sv_rules.qh:4
float GetWinningCode(float fraglimitreached, float equality)
Definition: world.qc:1378
#define NULL
Definition: post.qh:17
float TeamScore_GetCompareValue(float t)
Returns a value indicating the team score (and higher is better).
Definition: scores.qc:783
float teamplay
Definition: progsdefs.qc:31
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
Definition: teamplay.qc:57
float WinningConditionHelper_winnerteam
the color of the winning team, or -1 if none
Definition: scores.qh:110
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
int Team_IndexToTeam(int index)
Converts team index into team value.
Definition: teams.qh:169
float WinningConditionHelper_topscore
highest score
Definition: scores.qh:108
float time
Definition: csprogsdefs.qc:16
float WinningConditionHelper_equality
we have no winner
Definition: scores.qh:112
const float FLOAT_MAX
Definition: float.qh:3
void WinningConditionHelper(entity this)
Sets the following results for the current scores entities.
Definition: scores.qc:415
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ autocvar__endmatch

bool autocvar__endmatch

Definition at line 6 of file world.qh.

Referenced by CheckRules_World().

◆ autocvar__sv_init

bool autocvar__sv_init

Definition at line 5 of file world.qh.

Referenced by GotoFirstMap().

◆ autocvar_g_jetpack

bool autocvar_g_jetpack

Definition at line 8 of file world.qh.

Referenced by getwelcomemessage(), and readplayerstartcvars().

◆ autocvar_g_random_start_weapons

string autocvar_g_random_start_weapons

Holds a list of possible random start weapons.

Definition at line 94 of file world.qh.

Referenced by PutPlayerInServer().

◆ autocvar_g_use_ammunition

bool autocvar_g_use_ammunition

Definition at line 7 of file world.qh.

Referenced by spawnfunc().

◆ autocvar_g_warmup_allguns

bool autocvar_g_warmup_allguns

Definition at line 9 of file world.qh.

Referenced by readplayerstartcvars().

◆ autocvar_g_warmup_allow_timeout

bool autocvar_g_warmup_allow_timeout

Definition at line 10 of file world.qh.

Referenced by CommonCommand_timeout().

◆ autocvar_quit_and_redirect

string autocvar_quit_and_redirect

Definition at line 12 of file world.qh.

Referenced by DoNextMapOverride().

◆ autocvar_quit_and_redirect_timer

float autocvar_quit_and_redirect_timer

Definition at line 13 of file world.qh.

Referenced by RedirectionThink().

◆ autocvar_quit_when_empty

bool autocvar_quit_when_empty

Definition at line 14 of file world.qh.

Referenced by DoNextMapOverride().

◆ autocvar_sessionid

string autocvar_sessionid

Definition at line 15 of file world.qh.

Referenced by RestoreGame(), Shutdown(), and spawnfunc().

◆ autocvar_sv_curl_serverpackages_auto

bool autocvar_sv_curl_serverpackages_auto

Definition at line 16 of file world.qh.

Referenced by spawnfunc().

◆ autocvar_sv_db_saveasdump

bool autocvar_sv_db_saveasdump

Definition at line 17 of file world.qh.

Referenced by Shutdown().

◆ autocvar_sv_logscores_bots

bool autocvar_sv_logscores_bots

Definition at line 18 of file world.qh.

Referenced by DumpStats().

◆ autocvar_sv_logscores_console

bool autocvar_sv_logscores_console

Definition at line 19 of file world.qh.

Referenced by DumpStats().

◆ autocvar_sv_logscores_file

bool autocvar_sv_logscores_file

Definition at line 20 of file world.qh.

Referenced by DumpStats().

◆ autocvar_sv_logscores_filename

string autocvar_sv_logscores_filename

Definition at line 21 of file world.qh.

Referenced by DumpStats().

◆ autocvar_sv_mapchange_delay

float autocvar_sv_mapchange_delay

Definition at line 22 of file world.qh.

Referenced by NextLevel().

◆ autocvar_sv_termsofservice_url

string autocvar_sv_termsofservice_url

Definition at line 51 of file world.qh.

Referenced by spawnfunc().

◆ autocvar_timelimit_decrement

float autocvar_timelimit_decrement

Definition at line 24 of file world.qh.

Referenced by GameCommand_reducematchtime().

◆ autocvar_timelimit_increment

float autocvar_timelimit_increment

Definition at line 23 of file world.qh.

Referenced by GameCommand_extendmatchtime().

◆ autocvar_timelimit_max

float autocvar_timelimit_max

◆ autocvar_timelimit_min

float autocvar_timelimit_min

◆ autocvar_timelimit_overtime

float autocvar_timelimit_overtime

Definition at line 27 of file world.qh.

Referenced by InitiateOvertime(), InitiateSuddenDeath(), and ReadyRestart_force().

◆ autocvar_timelimit_overtimes

int autocvar_timelimit_overtimes

Definition at line 28 of file world.qh.

Referenced by InitiateSuddenDeath().

◆ autocvar_timelimit_suddendeath

float autocvar_timelimit_suddendeath

Definition at line 29 of file world.qh.

Referenced by InitiateSuddenDeath(), and Onslaught_CheckWinner().

◆ cache_lastmutatormsg

string cache_lastmutatormsg

Definition at line 64 of file world.qh.

Referenced by getwelcomemessage(), and InitGameplayMode().

◆ cache_mutatormsg

string cache_mutatormsg

Definition at line 63 of file world.qh.

Referenced by getwelcomemessage(), and InitGameplayMode().

◆ checkrules_equality

float checkrules_equality

Definition at line 31 of file world.qh.

Referenced by CampaignPreIntermission(), and WinningCondition_RanOutOfSpawns().

◆ checkrules_overtimesadded

int checkrules_overtimesadded

◆ checkrules_suddendeathend

float checkrules_suddendeathend

◆ checkrules_suddendeathwarning

float checkrules_suddendeathwarning

Definition at line 32 of file world.qh.

Referenced by CheckRules_World(), and ReadyRestart_force().

◆ clientstuff

string clientstuff

Definition at line 55 of file world.qh.

Referenced by ClientConnect(), InitGameplayMode(), and spawnfunc().

◆ cvar_changes

string cvar_changes

Definition at line 41 of file world.qh.

Referenced by CommonCommand_cvar_changes(), and cvar_changes_init().

◆ cvar_purechanges

string cvar_purechanges

Definition at line 42 of file world.qh.

Referenced by CommonCommand_cvar_purechanges(), cvar_changes_init(), and WeaponStats_ready().

◆ cvar_purechanges_count

float cvar_purechanges_count

Definition at line 43 of file world.qh.

Referenced by cvar_changes_init(), WeaponStats_ready(), and WinningConditionHelper().

◆ default_player_alpha

◆ default_weapon_alpha

◆ dropped_origin

vector dropped_origin

Definition at line 157 of file world.qh.

Referenced by DropToFloor_Handler().

◆ fog

string fog

Definition at line 59 of file world.qh.

◆ g_grappling_hook

float g_grappling_hook

Definition at line 116 of file world.qh.

Referenced by PRECACHE().

◆ g_moveables

IntrusiveList g_moveables

Definition at line 160 of file world.qh.

Referenced by Physics_Frame().

◆ g_pickup_cells_max

float g_pickup_cells_max

Definition at line 72 of file world.qh.

Referenced by ammo_pickupevalfunc(), GetResourceLimit(), Item_GiveTo(), and readlevelcvars().

◆ g_pickup_fuel_max

float g_pickup_fuel_max

Definition at line 74 of file world.qh.

Referenced by ammo_pickupevalfunc(), Item_GiveTo(), and readlevelcvars().

◆ g_pickup_nails_max

float g_pickup_nails_max

Definition at line 70 of file world.qh.

Referenced by ammo_pickupevalfunc(), GetResourceLimit(), Item_GiveTo(), and readlevelcvars().

◆ g_pickup_plasma_max

float g_pickup_plasma_max

Definition at line 73 of file world.qh.

Referenced by ammo_pickupevalfunc(), GetResourceLimit(), Item_GiveTo(), and readlevelcvars().

◆ g_pickup_rockets_max

float g_pickup_rockets_max

Definition at line 71 of file world.qh.

Referenced by ammo_pickupevalfunc(), GetResourceLimit(), Item_GiveTo(), and readlevelcvars().

◆ g_pickup_shells_max

float g_pickup_shells_max

Definition at line 69 of file world.qh.

Referenced by ammo_pickupevalfunc(), GetResourceLimit(), Item_GiveTo(), and readlevelcvars().

◆ g_pickup_weapons_anyway

float g_pickup_weapons_anyway

Definition at line 75 of file world.qh.

Referenced by readlevelcvars(), and weapon_defaultspawnfunc().

◆ g_weapon_stay

◆ g_weaponarena

◆ g_weaponarena_list

string g_weaponarena_list

Definition at line 79 of file world.qh.

Referenced by getwelcomemessage(), and readplayerstartcvars().

◆ g_weaponarena_random

float g_weaponarena_random

Definition at line 78 of file world.qh.

Referenced by getwelcomemessage(), and MUTATOR_HOOKFUNCTION().

◆ g_weaponarena_weapons

◆ gamemode_name

string gamemode_name

Definition at line 47 of file world.qh.

Referenced by getwelcomemessage(), and InitGameplayMode().

◆ initialize_entity_first

entity initialize_entity_first

Definition at line 124 of file world.qh.

Referenced by InitializeEntitiesRun(), InitializeEntity(), and make_safe_for_remove().

◆ initialize_entity_next

entity initialize_entity_next

Definition at line 123 of file world.qh.

◆ initialize_entity_order

int initialize_entity_order

Definition at line 122 of file world.qh.

◆ matchid

string matchid

Definition at line 57 of file world.qh.

Referenced by spawnfunc(), and W_HitPlotOpen().

◆ modname

◆ random_start_ammo

entity random_start_ammo

Entity that contains amount of ammo to give with random start weapons.

Definition at line 97 of file world.qh.

Referenced by PutPlayerInServer(), and readplayerstartcvars().

◆ random_start_weapons_count

int random_start_weapons_count

Number of random start weapons to give to players.

Definition at line 92 of file world.qh.

Referenced by PutPlayerInServer(), and readplayerstartcvars().

◆ record_type

◆ redirection_target

string redirection_target

Definition at line 61 of file world.qh.

Referenced by DoNextMapOverride(), and RedirectionThink().

◆ server_is_dedicated

◆ ServerProgsDB

◆ start_ammo_cells

float start_ammo_cells

◆ start_ammo_fuel

float start_ammo_fuel

◆ start_ammo_nails

float start_ammo_nails

◆ start_ammo_plasma

float start_ammo_plasma

◆ start_ammo_rockets

float start_ammo_rockets

◆ start_ammo_shells

float start_ammo_shells

◆ start_armorvalue

◆ start_health

◆ start_items

int start_items

◆ start_weapons

◆ start_weapons_default

WepSet start_weapons_default

Definition at line 82 of file world.qh.

Referenced by readplayerstartcvars().

◆ start_weapons_defaultmask

WepSet start_weapons_defaultmask

Definition at line 83 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), and readplayerstartcvars().

◆ sv_ready_restart_after_countdown

bool sv_ready_restart_after_countdown

◆ sv_termsofservice_url_escaped

string sv_termsofservice_url_escaped

Definition at line 53 of file world.qh.

Referenced by Shutdown(), spawnfunc(), and WinningConditionHelper().

◆ TemporaryDB

float TemporaryDB

Definition at line 132 of file world.qh.

Referenced by getladder(), Shutdown(), and spawnfunc().

◆ warmup_stage

float warmup_stage

Definition at line 117 of file world.qh.

◆ warmup_start_ammo_cells

float warmup_start_ammo_cells

Definition at line 107 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_ammo_fuel

float warmup_start_ammo_fuel

Definition at line 109 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_ammo_nails

float warmup_start_ammo_nails

Definition at line 105 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_ammo_plasma

float warmup_start_ammo_plasma

Definition at line 108 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_ammo_rockets

float warmup_start_ammo_rockets

Definition at line 106 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_ammo_shells

float warmup_start_ammo_shells

Definition at line 104 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_armorvalue

float warmup_start_armorvalue

Definition at line 111 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_health

float warmup_start_health

Definition at line 110 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), PutPlayerInServer(), and readplayerstartcvars().

◆ warmup_start_weapons

◆ warmup_start_weapons_default

WepSet warmup_start_weapons_default

Definition at line 101 of file world.qh.

Referenced by readplayerstartcvars().

◆ warmup_start_weapons_defaultmask

WepSet warmup_start_weapons_defaultmask

Definition at line 102 of file world.qh.

Referenced by MUTATOR_HOOKFUNCTION(), and readplayerstartcvars().

◆ winning

◆ WINNING_NEVER

const int WINNING_NEVER = 2

◆ WINNING_NO

◆ WINNING_STARTSUDDENDEATHOVERTIME

const int WINNING_STARTSUDDENDEATHOVERTIME = 3

◆ WINNING_YES

◆ world_initialized

int world_initialized

Definition at line 39 of file world.qh.

Referenced by GameCommand_gametype(), GameCommand_gotomap(), Shutdown(), and spawnfunc().