vkQuake2 doxygen  1.0 dev
g_main.c File Reference
#include "g_local.h"

Go to the source code of this file.

Functions

void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
 
void ClientThink (edict_t *ent, usercmd_t *cmd)
 
qboolean ClientConnect (edict_t *ent, char *userinfo)
 
void ClientUserinfoChanged (edict_t *ent, char *userinfo)
 
void ClientDisconnect (edict_t *ent)
 
void ClientBegin (edict_t *ent)
 
void ClientCommand (edict_t *ent)
 
void RunEntity (edict_t *ent)
 
void WriteGame (char *filename, qboolean autosave)
 
void ReadGame (char *filename)
 
void WriteLevel (char *filename)
 
void ReadLevel (char *filename)
 
void InitGame (void)
 
void G_RunFrame (void)
 
void ShutdownGame (void)
 
game_export_tGetGameAPI (game_import_t *import)
 
void Sys_Error (char *error,...)
 
void Com_Printf (char *msg,...)
 
void ClientEndServerFrames (void)
 
edict_tCreateTargetChangeLevel (char *map)
 
void EndDMLevel (void)
 
void CheckNeedPass (void)
 
void CheckDMRules (void)
 
void ExitLevel (void)
 

Variables

game_locals_t game
 
level_locals_t level
 
game_import_t gi
 
game_export_t globals
 
spawn_temp_t st
 
int sm_meat_index
 
int snd_fry
 
int meansOfDeath
 
edict_tg_edicts
 
cvar_tdeathmatch
 
cvar_tcoop
 
cvar_tdmflags
 
cvar_tskill
 
cvar_tfraglimit
 
cvar_ttimelimit
 
cvar_tpassword
 
cvar_tspectator_password
 
cvar_tneedpass
 
cvar_tmaxclients
 
cvar_tmaxspectators
 
cvar_tmaxentities
 
cvar_tg_select_empty
 
cvar_tdedicated
 
cvar_tfilterban
 
cvar_tsv_maxvelocity
 
cvar_tsv_gravity
 
cvar_tsv_rollspeed
 
cvar_tsv_rollangle
 
cvar_tgun_x
 
cvar_tgun_y
 
cvar_tgun_z
 
cvar_trun_pitch
 
cvar_trun_roll
 
cvar_tbob_up
 
cvar_tbob_pitch
 
cvar_tbob_roll
 
cvar_tsv_cheats
 
cvar_tflood_msgs
 
cvar_tflood_persecond
 
cvar_tflood_waitdelay
 
cvar_tsv_maplist
 

Function Documentation

◆ CheckDMRules()

void CheckDMRules ( void  )

Definition at line 304 of file g_main.c.

305 {
306  int i;
307  gclient_t *cl;
308 
310  return;
311 
312  if (!deathmatch->value)
313  return;
314 
315  if (timelimit->value)
316  {
317  if (level.time >= timelimit->value*60)
318  {
319  gi.bprintf (PRINT_HIGH, "Timelimit hit.\n");
320  EndDMLevel ();
321  return;
322  }
323  }
324 
325  if (fraglimit->value)
326  {
327  for (i=0 ; i<maxclients->value ; i++)
328  {
329  cl = game.clients + i;
330  if (!g_edicts[i+1].inuse)
331  continue;
332 
333  if (cl->resp.score >= fraglimit->value)
334  {
335  gi.bprintf (PRINT_HIGH, "Fraglimit hit.\n");
336  EndDMLevel ();
337  return;
338  }
339  }
340  }
341 }

Referenced by G_RunFrame().

◆ CheckNeedPass()

void CheckNeedPass ( void  )

Definition at line 278 of file g_main.c.

279 {
280  int need;
281 
282  // if password or spectator_password has changed, update needpass
283  // as needed
285  {
287 
288  need = 0;
289 
290  if (*password->string && Q_stricmp(password->string, "none"))
291  need |= 1;
293  need |= 2;
294 
295  gi.cvar_set("needpass", va("%d", need));
296  }
297 }

Referenced by G_RunFrame().

◆ ClientBegin()

void ClientBegin ( edict_t ent)

Definition at line 1305 of file p_client.c.

1306 {
1307  int i;
1308 
1309  ent->client = game.clients + (ent - g_edicts - 1);
1310 
1311  if (deathmatch->value)
1312  {
1313  ClientBeginDeathmatch (ent);
1314  return;
1315  }
1316 
1317  // if there is already a body waiting for us (a loadgame), just
1318  // take it, otherwise spawn one from scratch
1319  if (ent->inuse == true)
1320  {
1321  // the client has cleared the client side viewangles upon
1322  // connecting to the server, which is different than the
1323  // state when the game is saved, so we need to compensate
1324  // with deltaangles
1325  for (i=0 ; i<3 ; i++)
1327  }
1328  else
1329  {
1330  // a spawn point will completely reinitialize the entity
1331  // except for the persistant data that was initialized at
1332  // ClientConnect() time
1333  G_InitEdict (ent);
1334  ent->classname = "player";
1335  InitClientResp (ent->client);
1336  PutClientInServer (ent);
1337  }
1338 
1339  if (level.intermissiontime)
1340  {
1342  }
1343  else
1344  {
1345  // send effect if in a multiplayer game
1346  if (game.maxclients > 1)
1347  {
1349  gi.WriteShort (ent-g_edicts);
1350  gi.WriteByte (MZ_LOGIN);
1351  gi.multicast (ent->s.origin, MULTICAST_PVS);
1352 
1353  gi.bprintf (PRINT_HIGH, "%s entered the game\n", ent->client->pers.netname);
1354  }
1355  }
1356 
1357  // make sure all view stuff is valid
1358  ClientEndServerFrame (ent);
1359 }

Referenced by GetGameAPI().

◆ ClientCommand()

void ClientCommand ( edict_t ent)

Definition at line 908 of file g_cmds.c.

909 {
910  char *cmd;
911 
912  if (!ent->client)
913  return; // not fully in game yet
914 
915  cmd = gi.argv(0);
916 
917  if (Q_stricmp (cmd, "players") == 0)
918  {
919  Cmd_Players_f (ent);
920  return;
921  }
922  if (Q_stricmp (cmd, "say") == 0)
923  {
924  Cmd_Say_f (ent, false, false);
925  return;
926  }
927  if (Q_stricmp (cmd, "say_team") == 0)
928  {
929  Cmd_Say_f (ent, true, false);
930  return;
931  }
932  if (Q_stricmp (cmd, "score") == 0)
933  {
934  Cmd_Score_f (ent);
935  return;
936  }
937  if (Q_stricmp (cmd, "help") == 0)
938  {
939  Cmd_Help_f (ent);
940  return;
941  }
942 
943  if (level.intermissiontime)
944  return;
945 
946  if (Q_stricmp (cmd, "use") == 0)
947  Cmd_Use_f (ent);
948  else if (Q_stricmp (cmd, "drop") == 0)
949  Cmd_Drop_f (ent);
950  else if (Q_stricmp (cmd, "give") == 0)
951  Cmd_Give_f (ent);
952  else if (Q_stricmp (cmd, "god") == 0)
953  Cmd_God_f (ent);
954  else if (Q_stricmp (cmd, "notarget") == 0)
955  Cmd_Notarget_f (ent);
956  else if (Q_stricmp (cmd, "noclip") == 0)
957  Cmd_Noclip_f (ent);
958  else if (Q_stricmp (cmd, "inven") == 0)
959  Cmd_Inven_f (ent);
960  else if (Q_stricmp (cmd, "invnext") == 0)
961  SelectNextItem (ent, -1);
962  else if (Q_stricmp (cmd, "invprev") == 0)
963  SelectPrevItem (ent, -1);
964  else if (Q_stricmp (cmd, "invnextw") == 0)
965  SelectNextItem (ent, IT_WEAPON);
966  else if (Q_stricmp (cmd, "invprevw") == 0)
967  SelectPrevItem (ent, IT_WEAPON);
968  else if (Q_stricmp (cmd, "invnextp") == 0)
969  SelectNextItem (ent, IT_POWERUP);
970  else if (Q_stricmp (cmd, "invprevp") == 0)
971  SelectPrevItem (ent, IT_POWERUP);
972  else if (Q_stricmp (cmd, "invuse") == 0)
973  Cmd_InvUse_f (ent);
974  else if (Q_stricmp (cmd, "invdrop") == 0)
975  Cmd_InvDrop_f (ent);
976  else if (Q_stricmp (cmd, "weapprev") == 0)
977  Cmd_WeapPrev_f (ent);
978  else if (Q_stricmp (cmd, "weapnext") == 0)
979  Cmd_WeapNext_f (ent);
980  else if (Q_stricmp (cmd, "weaplast") == 0)
981  Cmd_WeapLast_f (ent);
982  else if (Q_stricmp (cmd, "kill") == 0)
983  Cmd_Kill_f (ent);
984  else if (Q_stricmp (cmd, "putaway") == 0)
985  Cmd_PutAway_f (ent);
986  else if (Q_stricmp (cmd, "wave") == 0)
987  Cmd_Wave_f (ent);
988  else if (Q_stricmp(cmd, "playerlist") == 0)
989  Cmd_PlayerList_f(ent);
990  else // anything that doesn't match a command will be a chat
991  Cmd_Say_f (ent, false, true);
992 }

Referenced by GetGameAPI().

◆ ClientConnect()

qboolean ClientConnect ( edict_t ent,
char *  userinfo 
)

Definition at line 1440 of file p_client.c.

1441 {
1442  char *value;
1443 
1444  // check to see if they are on the banned IP list
1445  value = Info_ValueForKey (userinfo, "ip");
1446  if (SV_FilterPacket(value)) {
1447  Info_SetValueForKey(userinfo, "rejmsg", "Banned.");
1448  return false;
1449  }
1450 
1451  // check for a spectator
1452  value = Info_ValueForKey (userinfo, "spectator");
1453  if (deathmatch->value && *value && strcmp(value, "0")) {
1454  int i, numspec;
1455 
1456  if (*spectator_password->string &&
1457  strcmp(spectator_password->string, "none") &&
1458  strcmp(spectator_password->string, value)) {
1459  Info_SetValueForKey(userinfo, "rejmsg", "Spectator password required or incorrect.");
1460  return false;
1461  }
1462 
1463  // count spectators
1464  for (i = numspec = 0; i < maxclients->value; i++)
1465  if (g_edicts[i+1].inuse && g_edicts[i+1].client->pers.spectator)
1466  numspec++;
1467 
1468  if (numspec >= maxspectators->value) {
1469  Info_SetValueForKey(userinfo, "rejmsg", "Server spectator limit is full.");
1470  return false;
1471  }
1472  } else {
1473  // check for a password
1474  value = Info_ValueForKey (userinfo, "password");
1475  if (*password->string && strcmp(password->string, "none") &&
1476  strcmp(password->string, value)) {
1477  Info_SetValueForKey(userinfo, "rejmsg", "Password required or incorrect.");
1478  return false;
1479  }
1480  }
1481 
1482 
1483  // they can connect
1484  ent->client = game.clients + (ent - g_edicts - 1);
1485 
1486  // if there is already a body waiting for us (a loadgame), just
1487  // take it, otherwise spawn one from scratch
1488  if (ent->inuse == false)
1489  {
1490  // clear the respawning variables
1491  InitClientResp (ent->client);
1492  if (!game.autosaved || !ent->client->pers.weapon)
1494  }
1495 
1496  ClientUserinfoChanged (ent, userinfo);
1497 
1498  if (game.maxclients > 1)
1499  gi.dprintf ("%s connected\n", ent->client->pers.netname);
1500 
1501  ent->svflags = 0; // make sure we start with known default
1502  ent->client->pers.connected = true;
1503  return true;
1504 }

Referenced by GetGameAPI().

◆ ClientDisconnect()

void ClientDisconnect ( edict_t ent)

Definition at line 1514 of file p_client.c.

1515 {
1516  int playernum;
1517 
1518  if (!ent->client)
1519  return;
1520 
1521  gi.bprintf (PRINT_HIGH, "%s disconnected\n", ent->client->pers.netname);
1522 
1523  // send effect
1525  gi.WriteShort (ent-g_edicts);
1527  gi.multicast (ent->s.origin, MULTICAST_PVS);
1528 
1529  gi.unlinkentity (ent);
1530  ent->s.modelindex = 0;
1531  ent->solid = SOLID_NOT;
1532  ent->inuse = false;
1533  ent->classname = "disconnected";
1534  ent->client->pers.connected = false;
1535 
1536  playernum = ent-g_edicts-1;
1537  gi.configstring (CS_PLAYERSKINS+playernum, "");
1538 }

Referenced by GetGameAPI().

◆ ClientEndServerFrames()

void ClientEndServerFrames ( void  )

Definition at line 177 of file g_main.c.

178 {
179  int i;
180  edict_t *ent;
181 
182  // calc the player views now that all pushing
183  // and damage has been added
184  for (i=0 ; i<maxclients->value ; i++)
185  {
186  ent = g_edicts + 1 + i;
187  if (!ent->inuse || !ent->client)
188  continue;
189  ClientEndServerFrame (ent);
190  }
191 
192 }

Referenced by ExitLevel(), and G_RunFrame().

◆ ClientThink()

void ClientThink ( edict_t ent,
usercmd_t cmd 
)

Definition at line 1580 of file p_client.c.

1581 {
1582  gclient_t *client;
1583  edict_t *other;
1584  int i, j;
1585  pmove_t pm;
1586 
1587  level.current_entity = ent;
1588  client = ent->client;
1589 
1590  if (level.intermissiontime)
1591  {
1592  client->ps.pmove.pm_type = PM_FREEZE;
1593  // can exit intermission after five seconds
1594  if (level.time > level.intermissiontime + 5.0
1595  && (ucmd->buttons & BUTTON_ANY) )
1596  level.exitintermission = true;
1597  return;
1598  }
1599 
1600  pm_passent = ent;
1601 
1602  if (ent->client->chase_target) {
1603 
1604  client->resp.cmd_angles[0] = SHORT2ANGLE(ucmd->angles[0]);
1605  client->resp.cmd_angles[1] = SHORT2ANGLE(ucmd->angles[1]);
1606  client->resp.cmd_angles[2] = SHORT2ANGLE(ucmd->angles[2]);
1607 
1608  } else {
1609 
1610  // set up for pmove
1611  memset (&pm, 0, sizeof(pm));
1612 
1613  if (ent->movetype == MOVETYPE_NOCLIP)
1614  client->ps.pmove.pm_type = PM_SPECTATOR;
1615  else if (ent->s.modelindex != 255)
1616  client->ps.pmove.pm_type = PM_GIB;
1617  else if (ent->deadflag)
1618  client->ps.pmove.pm_type = PM_DEAD;
1619  else
1620  client->ps.pmove.pm_type = PM_NORMAL;
1621 
1622  client->ps.pmove.gravity = sv_gravity->value;
1623  pm.s = client->ps.pmove;
1624 
1625  for (i=0 ; i<3 ; i++)
1626  {
1627  pm.s.origin[i] = ent->s.origin[i]*8;
1628  pm.s.velocity[i] = ent->velocity[i]*8;
1629  }
1630 
1631  if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
1632  {
1633  pm.snapinitial = true;
1634  // gi.dprintf ("pmove changed!\n");
1635  }
1636 
1637  pm.cmd = *ucmd;
1638 
1639  pm.trace = PM_trace; // adds default parms
1641 
1642  // perform a pmove
1643  gi.Pmove (&pm);
1644 
1645  // save results of pmove
1646  client->ps.pmove = pm.s;
1647  client->old_pmove = pm.s;
1648 
1649  for (i=0 ; i<3 ; i++)
1650  {
1651  ent->s.origin[i] = pm.s.origin[i]*0.125;
1652  ent->velocity[i] = pm.s.velocity[i]*0.125;
1653  }
1654 
1655  VectorCopy (pm.mins, ent->mins);
1656  VectorCopy (pm.maxs, ent->maxs);
1657 
1658  client->resp.cmd_angles[0] = SHORT2ANGLE(ucmd->angles[0]);
1659  client->resp.cmd_angles[1] = SHORT2ANGLE(ucmd->angles[1]);
1660  client->resp.cmd_angles[2] = SHORT2ANGLE(ucmd->angles[2]);
1661 
1662  if (ent->groundentity && !pm.groundentity && (pm.cmd.upmove >= 10) && (pm.waterlevel == 0))
1663  {
1664  gi.sound(ent, CHAN_VOICE, gi.soundindex("*jump1.wav"), 1, ATTN_NORM, 0);
1665  PlayerNoise(ent, ent->s.origin, PNOISE_SELF);
1666  }
1667 
1668  ent->viewheight = pm.viewheight;
1669  ent->waterlevel = pm.waterlevel;
1670  ent->watertype = pm.watertype;
1671  ent->groundentity = pm.groundentity;
1672  if (pm.groundentity)
1674 
1675  if (ent->deadflag)
1676  {
1677  client->ps.viewangles[ROLL] = 40;
1678  client->ps.viewangles[PITCH] = -15;
1679  client->ps.viewangles[YAW] = client->killer_yaw;
1680  }
1681  else
1682  {
1683  VectorCopy (pm.viewangles, client->v_angle);
1684  VectorCopy (pm.viewangles, client->ps.viewangles);
1685  }
1686 
1687  gi.linkentity (ent);
1688 
1689  if (ent->movetype != MOVETYPE_NOCLIP)
1690  G_TouchTriggers (ent);
1691 
1692  // touch other objects
1693  for (i=0 ; i<pm.numtouch ; i++)
1694  {
1695  other = pm.touchents[i];
1696  for (j=0 ; j<i ; j++)
1697  if (pm.touchents[j] == other)
1698  break;
1699  if (j != i)
1700  continue; // duplicated
1701  if (!other->touch)
1702  continue;
1703  other->touch (other, ent, NULL, NULL);
1704  }
1705 
1706  }
1707 
1708  client->oldbuttons = client->buttons;
1709  client->buttons = ucmd->buttons;
1710  client->latched_buttons |= client->buttons & ~client->oldbuttons;
1711 
1712  // save light level the player is standing on for
1713  // monster sighting AI
1714  ent->light_level = ucmd->lightlevel;
1715 
1716  // fire weapon from final position if needed
1717  if (client->latched_buttons & BUTTON_ATTACK)
1718  {
1719  if (client->resp.spectator) {
1720 
1721  client->latched_buttons = 0;
1722 
1723  if (client->chase_target) {
1724  client->chase_target = NULL;
1725  client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
1726  } else
1727  GetChaseTarget(ent);
1728 
1729  } else if (!client->weapon_thunk) {
1730  client->weapon_thunk = true;
1731  Think_Weapon (ent);
1732  }
1733  }
1734 
1735  if (client->resp.spectator) {
1736  if (ucmd->upmove >= 10) {
1737  if (!(client->ps.pmove.pm_flags & PMF_JUMP_HELD)) {
1738  client->ps.pmove.pm_flags |= PMF_JUMP_HELD;
1739  if (client->chase_target)
1740  ChaseNext(ent);
1741  else
1742  GetChaseTarget(ent);
1743  }
1744  } else
1745  client->ps.pmove.pm_flags &= ~PMF_JUMP_HELD;
1746  }
1747 
1748  // update chase cam if being followed
1749  for (i = 1; i <= maxclients->value; i++) {
1750  other = g_edicts + i;
1751  if (other->inuse && other->client->chase_target == ent)
1752  UpdateChaseCam(other);
1753  }
1754 }

Referenced by GetGameAPI().

◆ ClientUserinfoChanged()

void ClientUserinfoChanged ( edict_t ent,
char *  userinfo 
)

Definition at line 1371 of file p_client.c.

1372 {
1373  char *s;
1374  int playernum;
1375 
1376  // check for malformed or illegal info strings
1377  if (!Info_Validate(userinfo))
1378  {
1379  strcpy (userinfo, "\\name\\badinfo\\skin\\male/grunt");
1380  }
1381 
1382  // set name
1383  s = Info_ValueForKey (userinfo, "name");
1384  strncpy (ent->client->pers.netname, s, sizeof(ent->client->pers.netname)-1);
1385 
1386  // set spectator
1387  s = Info_ValueForKey (userinfo, "spectator");
1388  // spectators are only supported in deathmatch
1389  if (deathmatch->value && *s && strcmp(s, "0"))
1390  ent->client->pers.spectator = true;
1391  else
1392  ent->client->pers.spectator = false;
1393 
1394  // set skin
1395  s = Info_ValueForKey (userinfo, "skin");
1396 
1397  playernum = ent-g_edicts-1;
1398 
1399  // combine name and skin into a configstring
1400  gi.configstring (CS_PLAYERSKINS+playernum, va("%s\\%s", ent->client->pers.netname, s) );
1401 
1402  // fov
1403  if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
1404  {
1405  ent->client->ps.fov = 90;
1406  }
1407  else
1408  {
1409  ent->client->ps.fov = atoi(Info_ValueForKey(userinfo, "fov"));
1410  if (ent->client->ps.fov < 1)
1411  ent->client->ps.fov = 90;
1412  else if (ent->client->ps.fov > 160)
1413  ent->client->ps.fov = 160;
1414  }
1415 
1416  // handedness
1417  s = Info_ValueForKey (userinfo, "hand");
1418  if (strlen(s))
1419  {
1420  ent->client->pers.hand = atoi(s);
1421  }
1422 
1423  // save off the userinfo in case we want to check something later
1424  strncpy (ent->client->pers.userinfo, userinfo, sizeof(ent->client->pers.userinfo)-1);
1425 }

Referenced by ClientConnect(), GetGameAPI(), and PutClientInServer().

◆ Com_Printf()

void Com_Printf ( char *  msg,
  ... 
)

Definition at line 155 of file g_main.c.

156 {
157  va_list argptr;
158  char text[1024];
159 
160  va_start (argptr, msg);
161  vsnprintf (text, 1024, msg, argptr);
162  va_end (argptr);
163 
164  gi.dprintf ("%s", text);
165 }

◆ CreateTargetChangeLevel()

edict_t* CreateTargetChangeLevel ( char *  map)

Definition at line 201 of file g_main.c.

202 {
203  edict_t *ent;
204 
205  ent = G_Spawn ();
206  ent->classname = "target_changelevel";
207  Com_sprintf(level.nextmap, sizeof(level.nextmap), "%s", map);
208  ent->map = level.nextmap;
209  return ent;
210 }

Referenced by EndDMLevel().

◆ EndDMLevel()

void EndDMLevel ( void  )

Definition at line 219 of file g_main.c.

220 {
221  edict_t *ent;
222  char *s, *t, *f;
223  static const char *seps = " ,\n\r";
224 
225  // stay on same level flag
226  if ((int)dmflags->value & DF_SAME_LEVEL)
227  {
229  return;
230  }
231 
232  // see if it's in the map list
233  if (*sv_maplist->string) {
234  s = strdup(sv_maplist->string);
235  f = NULL;
236  t = strtok(s, seps);
237  while (t != NULL) {
238  if (Q_stricmp(t, level.mapname) == 0) {
239  // it's in the list, go to the next one
240  t = strtok(NULL, seps);
241  if (t == NULL) { // end of list, go to first one
242  if (f == NULL) // there isn't a first one, same level
244  else
246  } else
248  free(s);
249  return;
250  }
251  if (!f)
252  f = t;
253  t = strtok(NULL, seps);
254  }
255  free(s);
256  }
257 
258  if (level.nextmap[0]) // go to a specific map
260  else { // search for a changelevel
261  ent = G_Find (NULL, FOFS(classname), "target_changelevel");
262  if (!ent)
263  { // the map designer didn't include a changelevel,
264  // so create a fake ent that goes back to the same level
266  return;
267  }
268  BeginIntermission (ent);
269  }
270 }

Referenced by CheckDMRules().

◆ ExitLevel()

void ExitLevel ( void  )

Definition at line 349 of file g_main.c.

350 {
351  int i;
352  edict_t *ent;
353  char command [256];
354 
355  Com_sprintf (command, sizeof(command), "gamemap \"%s\"\n", level.changemap);
356  gi.AddCommandString (command);
357  level.changemap = NULL;
361 
362  // clear some things before going to next level
363  for (i=0 ; i<maxclients->value ; i++)
364  {
365  ent = g_edicts + 1 + i;
366  if (!ent->inuse)
367  continue;
368  if (ent->health > ent->client->pers.max_health)
369  ent->health = ent->client->pers.max_health;
370  }
371 
372 }

Referenced by G_RunFrame().

◆ G_RunFrame()

void G_RunFrame ( void  )

Definition at line 381 of file g_main.c.

382 {
383  int i;
384  edict_t *ent;
385 
386  level.framenum++;
388 
389  // choose a client for monsters to target this frame
391 
392  // exit intermissions
393 
395  {
396  ExitLevel ();
397  return;
398  }
399 
400  //
401  // treat each object in turn
402  // even the world gets a chance to think
403  //
404  ent = &g_edicts[0];
405  for (i=0 ; i<globals.num_edicts ; i++, ent++)
406  {
407  if (!ent->inuse)
408  continue;
409 
410  level.current_entity = ent;
411 
412  VectorCopy (ent->s.origin, ent->s.old_origin);
413 
414  // if the ground entity moved, make sure we are still on it
415  if ((ent->groundentity) && (ent->groundentity->linkcount != ent->groundentity_linkcount))
416  {
417  ent->groundentity = NULL;
418  if ( !(ent->flags & (FL_SWIM|FL_FLY)) && (ent->svflags & SVF_MONSTER) )
419  {
420  M_CheckGround (ent);
421  }
422  }
423 
424  if (i > 0 && i <= maxclients->value)
425  {
427  continue;
428  }
429 
430  G_RunEntity (ent);
431  }
432 
433  // see if it is time to end a deathmatch
434  CheckDMRules ();
435 
436  // see if needpass needs updated
437  CheckNeedPass ();
438 
439  // build the playerstate_t structures for all players
441 }

Referenced by GetGameAPI().

◆ GetGameAPI()

◆ InitGame()

void InitGame ( void  )

Definition at line 153 of file g_save.c.

154 {
155  gi.dprintf ("==== InitGame ====\n");
156 
157  gun_x = gi.cvar ("gun_x", "0", 0);
158  gun_y = gi.cvar ("gun_y", "0", 0);
159  gun_z = gi.cvar ("gun_z", "0", 0);
160 
161  //FIXME: sv_ prefix is wrong for these
162  sv_rollspeed = gi.cvar ("sv_rollspeed", "200", 0);
163  sv_rollangle = gi.cvar ("sv_rollangle", "2", 0);
164  sv_maxvelocity = gi.cvar ("sv_maxvelocity", "2000", 0);
165  sv_gravity = gi.cvar ("sv_gravity", "800", 0);
166 
167  // noset vars
168  dedicated = gi.cvar ("dedicated", "0", CVAR_NOSET);
169 
170  // latched vars
171  sv_cheats = gi.cvar ("cheats", "0", CVAR_SERVERINFO|CVAR_LATCH);
172  gi.cvar ("gamename", GAMEVERSION , CVAR_SERVERINFO | CVAR_LATCH);
173  gi.cvar ("gamedate", __DATE__ , CVAR_SERVERINFO | CVAR_LATCH);
174 
175  maxclients = gi.cvar ("maxclients", "4", CVAR_SERVERINFO | CVAR_LATCH);
176  maxspectators = gi.cvar ("maxspectators", "4", CVAR_SERVERINFO);
177  deathmatch = gi.cvar ("deathmatch", "0", CVAR_LATCH);
178  coop = gi.cvar ("coop", "0", CVAR_LATCH);
179  skill = gi.cvar ("skill", "1", CVAR_LATCH);
180  maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH);
181 
182  // change anytime vars
183  dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);
184  fraglimit = gi.cvar ("fraglimit", "0", CVAR_SERVERINFO);
185  timelimit = gi.cvar ("timelimit", "0", CVAR_SERVERINFO);
186  password = gi.cvar ("password", "", CVAR_USERINFO);
187  spectator_password = gi.cvar ("spectator_password", "", CVAR_USERINFO);
188  needpass = gi.cvar ("needpass", "0", CVAR_SERVERINFO);
189  filterban = gi.cvar ("filterban", "1", 0);
190 
191  g_select_empty = gi.cvar ("g_select_empty", "0", CVAR_ARCHIVE);
192 
193  run_pitch = gi.cvar ("run_pitch", "0.002", 0);
194  run_roll = gi.cvar ("run_roll", "0.005", 0);
195  bob_up = gi.cvar ("bob_up", "0.005", 0);
196  bob_pitch = gi.cvar ("bob_pitch", "0.002", 0);
197  bob_roll = gi.cvar ("bob_roll", "0.002", 0);
198 
199  // flood control
200  flood_msgs = gi.cvar ("flood_msgs", "4", 0);
201  flood_persecond = gi.cvar ("flood_persecond", "4", 0);
202  flood_waitdelay = gi.cvar ("flood_waitdelay", "10", 0);
203 
204  // dm map list
205  sv_maplist = gi.cvar ("sv_maplist", "", 0);
206 
207  // items
208  InitItems ();
209 
211 
213 
214  // initialize all entities for this game
219 
220  // initialize all clients for this game
224 }

Referenced by GetGameAPI(), ReadField(), WriteField1(), and WriteLevel().

◆ ReadGame()

void ReadGame ( char *  filename)

Definition at line 491 of file g_save.c.

492 {
493  FILE *f;
494  int i;
495  char str[16];
496 
497  gi.FreeTags (TAG_GAME);
498 
499  f = fopen (filename, "rb");
500  if (!f)
501  gi.error ("Couldn't open %s", filename);
502 
503  fread (str, sizeof(str), 1, f);
504  if (strcmp (str, __DATE__))
505  {
506  fclose (f);
507  gi.error ("Savegame from an older version.\n");
508  }
509 
512 
513  fread (&game, sizeof(game), 1, f);
515  for (i=0 ; i<game.maxclients ; i++)
516  ReadClient (f, &game.clients[i]);
517 
518  fclose (f);
519 }

Referenced by GetGameAPI().

◆ ReadLevel()

void ReadLevel ( char *  filename)

Definition at line 686 of file g_save.c.

687 {
688  int entnum;
689  FILE *f;
690  int i;
691  void *base;
692  edict_t *ent;
693 
694  f = fopen (filename, "rb");
695  if (!f)
696  gi.error ("Couldn't open %s", filename);
697 
698  // free any dynamic memory allocated by loading the level
699  // base state
701 
702  // wipe all the entities
703  memset (g_edicts, 0, game.maxentities*sizeof(g_edicts[0]));
705 
706  // check edict size
707  fread (&i, sizeof(i), 1, f);
708  if (i != sizeof(edict_t))
709  {
710  fclose (f);
711  gi.error ("ReadLevel: mismatched edict size");
712  }
713 
714  // check function pointer base address
715  fread (&base, sizeof(base), 1, f);
716 
717  // load the level locals
718  ReadLevelLocals (f);
719 
720  // load all the entities
721  while (1)
722  {
723  if (fread (&entnum, sizeof(entnum), 1, f) != 1)
724  {
725  fclose (f);
726  gi.error ("ReadLevel: failed to read entnum");
727  }
728  if (entnum == -1)
729  break;
730  if (entnum >= globals.num_edicts)
731  globals.num_edicts = entnum+1;
732 
733  ent = &g_edicts[entnum];
734  ReadEdict (f, ent);
735 
736  // let the server rebuild world links for this ent
737  memset (&ent->area, 0, sizeof(ent->area));
738  gi.linkentity (ent);
739  }
740 
741  fclose (f);
742 
743  // mark all clients as unconnected
744  for (i=0 ; i<maxclients->value ; i++)
745  {
746  ent = &g_edicts[i+1];
747  ent->client = game.clients + i;
748  ent->client->pers.connected = false;
749  }
750 
751  // do any load time things at this point
752  for (i=0 ; i<globals.num_edicts ; i++)
753  {
754  ent = &g_edicts[i];
755 
756  if (!ent->inuse)
757  continue;
758 
759  // fire any cross-level triggers
760  if (ent->classname)
761  if (strcmp(ent->classname, "target_crosslevel_target") == 0)
762  ent->nextthink = level.time + ent->delay;
763  }
764 }

Referenced by GetGameAPI().

◆ RunEntity()

void RunEntity ( edict_t ent)

◆ ShutdownGame()

void ShutdownGame ( void  )

Definition at line 94 of file g_main.c.

95 {
96  gi.dprintf ("==== ShutdownGame ====\n");
97 
100 }

Referenced by GetGameAPI().

◆ SpawnEntities()

void SpawnEntities ( char *  mapname,
char *  entities,
char *  spawnpoint 
)

Definition at line 522 of file g_spawn.c.

523 {
524  edict_t *ent;
525  int inhibit;
526  char *com_token;
527  int i;
528  float skill_level;
529 
530  skill_level = floor (skill->value);
531  if (skill_level < 0)
532  skill_level = 0;
533  if (skill_level > 3)
534  skill_level = 3;
535  if (skill->value != skill_level)
536  gi.cvar_forceset("skill", va("%f", skill_level));
537 
538  SaveClientData ();
539 
541 
542  memset (&level, 0, sizeof(level));
543  memset (g_edicts, 0, game.maxentities * sizeof (g_edicts[0]));
544 
545  strncpy (level.mapname, mapname, sizeof(level.mapname)-1);
546  strncpy (game.spawnpoint, spawnpoint, sizeof(game.spawnpoint)-1);
547 
548  // set client fields on player ents
549  for (i=0 ; i<game.maxclients ; i++)
550  g_edicts[i+1].client = game.clients + i;
551 
552  ent = NULL;
553  inhibit = 0;
554 
555 // parse ents
556  while (1)
557  {
558  // parse the opening brace
559  com_token = COM_Parse (&entities);
560  if (!entities)
561  break;
562  if (com_token[0] != '{')
563  gi.error ("ED_LoadFromFile: found %s when expecting {",com_token);
564 
565  if (!ent)
566  ent = g_edicts;
567  else
568  ent = G_Spawn ();
569  entities = ED_ParseEdict (entities, ent);
570 
571  // yet another map hack
572  if (!Q_stricmp(level.mapname, "command") && !Q_stricmp(ent->classname, "trigger_once") && !Q_stricmp(ent->model, "*27"))
574 
575  // remove things (except the world) from different skill levels or deathmatch
576  if (ent != g_edicts)
577  {
578  if (deathmatch->value)
579  {
581  {
582  G_FreeEdict (ent);
583  inhibit++;
584  continue;
585  }
586  }
587  else
588  {
589  if ( /* ((coop->value) && (ent->spawnflags & SPAWNFLAG_NOT_COOP)) || */
590  ((skill->value == 0) && (ent->spawnflags & SPAWNFLAG_NOT_EASY)) ||
591  ((skill->value == 1) && (ent->spawnflags & SPAWNFLAG_NOT_MEDIUM)) ||
592  (((skill->value == 2) || (skill->value == 3)) && (ent->spawnflags & SPAWNFLAG_NOT_HARD))
593  )
594  {
595  G_FreeEdict (ent);
596  inhibit++;
597  continue;
598  }
599  }
600 
602  }
603 
604  ED_CallSpawn (ent);
605  }
606 
607  gi.dprintf ("%i entities inhibited\n", inhibit);
608 
609  G_FindTeams ();
610 
611  PlayerTrail_Init ();
612 }

Referenced by GetGameAPI().

◆ Sys_Error()

void Sys_Error ( char *  error,
  ... 
)

Definition at line 143 of file g_main.c.

144 {
145  va_list argptr;
146  char text[1024];
147 
148  va_start (argptr, error);
149  vsnprintf (text, 1024, error, argptr);
150  va_end (argptr);
151 
152  gi.error (ERR_FATAL, "%s", text);
153 }

◆ WriteGame()

void WriteGame ( char *  filename,
qboolean  autosave 
)

Definition at line 464 of file g_save.c.

465 {
466  FILE *f;
467  int i;
468  char str[16];
469 
470  if (!autosave)
471  SaveClientData ();
472 
473  f = fopen (filename, "wb");
474  if (!f)
475  gi.error ("Couldn't open %s", filename);
476 
477  memset (str, 0, sizeof(str));
478  strcpy (str, __DATE__);
479  fwrite (str, sizeof(str), 1, f);
480 
481  game.autosaved = autosave;
482  fwrite (&game, sizeof(game), 1, f);
483  game.autosaved = false;
484 
485  for (i=0 ; i<game.maxclients ; i++)
486  WriteClient (f, &game.clients[i]);
487 
488  fclose (f);
489 }

Referenced by GetGameAPI().

◆ WriteLevel()

void WriteLevel ( char *  filename)

Definition at line 632 of file g_save.c.

633 {
634  int i;
635  edict_t *ent;
636  FILE *f;
637  void *base;
638 
639  f = fopen (filename, "wb");
640  if (!f)
641  gi.error ("Couldn't open %s", filename);
642 
643  // write out edict size for checking
644  i = sizeof(edict_t);
645  fwrite (&i, sizeof(i), 1, f);
646 
647  // write out a function pointer for checking
648  base = (void *)InitGame;
649  fwrite (&base, sizeof(base), 1, f);
650 
651  // write out level_locals_t
652  WriteLevelLocals (f);
653 
654  // write out all the entities
655  for (i=0 ; i<globals.num_edicts ; i++)
656  {
657  ent = &g_edicts[i];
658  if (!ent->inuse)
659  continue;
660  fwrite (&i, sizeof(i), 1, f);
661  WriteEdict (f, ent);
662  }
663  i = -1;
664  fwrite (&i, sizeof(i), 1, f);
665 
666  fclose (f);
667 }

Referenced by GetGameAPI().

Variable Documentation

◆ bob_pitch

cvar_t* bob_pitch

Definition at line 64 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ bob_roll

cvar_t* bob_roll

Definition at line 65 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ bob_up

cvar_t* bob_up

Definition at line 63 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ coop

◆ deathmatch

cvar_t* deathmatch

Definition at line 35 of file g_main.c.

Referenced by BeginIntermission(), bfg_think(), Chaingun_Fire(), CheckDMRules(), ClientBegin(), ClientBeginServerFrame(), ClientConnect(), ClientObituary(), ClientUserinfoChanged(), Cmd_Give_f(), Cmd_God_f(), Cmd_Help_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), Cmd_Score_f(), drop_make_touchable(), G_SetStats(), InitGame(), Machinegun_Fire(), MegaHealth_think(), monster_start(), MoveClientToIntermission(), P_FallingDamage(), Pickup_Adrenaline(), Pickup_Ammo(), Pickup_AncientHead(), Pickup_Armor(), Pickup_Bandolier(), Pickup_Health(), Pickup_Pack(), Pickup_PowerArmor(), Pickup_Powerup(), Pickup_Weapon(), player_die(), PlayerNoise(), PlayerTrail_Init(), PutClientInServer(), respawn(), rocket_touch(), SelectSpawnPoint(), SP_func_door(), SP_func_explosive(), SP_info_player_deathmatch(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), SP_item_health_small(), SP_light(), SP_misc_actor(), SP_misc_deadsoldier(), SP_misc_explobox(), SP_misc_insane(), SP_monster_berserk(), SP_monster_boss2(), SP_monster_boss3_stand(), SP_monster_brain(), SP_monster_chick(), SP_monster_flipper(), SP_monster_floater(), SP_monster_flyer(), SP_monster_gladiator(), SP_monster_gunner(), SP_monster_hover(), SP_monster_infantry(), SP_monster_jorg(), SP_monster_makron(), SP_monster_medic(), SP_monster_mutant(), SP_monster_parasite(), SP_monster_soldier(), SP_monster_soldier_light(), SP_monster_soldier_ss(), SP_monster_supertank(), SP_monster_tank(), SP_point_combat(), SP_target_goal(), SP_target_help(), SP_target_lightramp(), SP_target_secret(), SP_turret_driver(), SP_worldspawn(), SpawnEntities(), SpawnItem(), T_Damage(), TossClientWeapon(), use_target_changelevel(), weapon_bfg_fire(), Weapon_Blaster_Fire(), Weapon_HyperBlaster_Fire(), weapon_railgun_fire(), and weapon_shotgun_fire().

◆ dedicated

cvar_t* dedicated

Definition at line 48 of file g_main.c.

◆ dmflags

◆ filterban

cvar_t* filterban

Definition at line 50 of file g_main.c.

Referenced by InitGame(), SV_FilterPacket(), and SVCmd_WriteIP_f().

◆ flood_msgs

cvar_t* flood_msgs

Definition at line 69 of file g_main.c.

Referenced by Cmd_Say_f(), and InitGame().

◆ flood_persecond

cvar_t* flood_persecond

Definition at line 70 of file g_main.c.

Referenced by Cmd_Say_f(), and InitGame().

◆ flood_waitdelay

cvar_t* flood_waitdelay

Definition at line 71 of file g_main.c.

Referenced by Cmd_Say_f(), and InitGame().

◆ fraglimit

cvar_t* fraglimit

Definition at line 39 of file g_main.c.

Referenced by CheckDMRules(), InitGame(), and StartServerActionFunc().

◆ g_edicts

◆ g_select_empty

cvar_t* g_select_empty

Definition at line 47 of file g_main.c.

Referenced by InitGame(), and Use_Weapon().

◆ game

◆ gi

Definition at line 25 of file g_main.c.

Referenced by actor_dead(), actor_pain(), actor_use(), ai_run(), BecomeExplosion1(), BecomeExplosion2(), berserk_dead(), berserk_die(), berserk_fidget(), berserk_pain(), berserk_search(), berserk_sight(), berserk_swing(), bfg_explode(), bfg_think(), bfg_touch(), Blaster_Fire(), blaster_touch(), body_die(), Boss2_CheckAttack(), boss2_dead(), boss2_die(), boss2_pain(), boss2_search(), BossExplode(), brain_chest_open(), brain_dead(), brain_die(), brain_duck_down(), brain_duck_up(), brain_hit_left(), brain_hit_right(), brain_idle(), brain_pain(), brain_search(), brain_sight(), brain_swing_left(), brain_swing_right(), brain_tentacle_attack(), button_fire(), CanDamage(), Chaingun_Fire(), ChangeWeapon(), check_dodge(), CheckDMRules(), CheckNeedPass(), chick_dead(), chick_die(), chick_duck_down(), chick_duck_up(), chick_pain(), Chick_PreAttack1(), chick_sight(), ChickMoan(), ChickReload(), ChickSlash(), ClientBegin(), ClientBeginDeathmatch(), ClientCommand(), ClientConnect(), ClientDisconnect(), ClientEndServerFrame(), ClientObituary(), ClientThink(), ClientUserinfoChanged(), Cmd_Drop_f(), Cmd_Give_f(), Cmd_God_f(), Cmd_InvDrop_f(), Cmd_Inven_f(), Cmd_InvUse_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), Cmd_PlayerList_f(), Cmd_Players_f(), Cmd_Say_f(), Cmd_Use_f(), Cmd_Wave_f(), Com_Printf(), commander_body_think(), commander_body_use(), CopyToBodyQue(), DeathmatchScoreboard(), DeathmatchScoreboardMessage(), door_go_down(), door_go_up(), door_hit_bottom(), door_hit_top(), door_touch(), door_use_areaportals(), DoRespawn(), Drop_Ammo(), Drop_Item(), Drop_Weapon(), droptofloor(), ED_CallSpawn(), ED_NewString(), ED_ParseEdict(), ED_ParseField(), ExitLevel(), FindTarget(), fire_bfg(), fire_blaster(), fire_grenade(), fire_grenade2(), fire_hit(), fire_lead(), fire_rail(), fire_rocket(), flipper_dead(), flipper_die(), flipper_pain(), flipper_preattack(), flipper_sight(), floater_dead(), floater_die(), floater_idle(), floater_pain(), floater_sight(), floater_wham(), floater_zap(), flyer_die(), flyer_idle(), flyer_pain(), flyer_pop_blades(), flyer_sight(), flyer_slash_left(), flyer_slash_right(), flymonster_start_go(), FoundTarget(), func_explosive_spawn(), func_train_find(), func_wall_use(), G_CopyString(), G_FindTeams(), G_FreeEdict(), G_PickTarget(), G_RunEntity(), G_SetClientSound(), G_SetStats(), G_Spawn(), G_TouchSolids(), G_TouchTriggers(), G_UseTargets(), GaldiatorMelee(), GetChaseTarget(), GetGameAPI(), gib_touch(), gladiator_attack(), gladiator_cleaver_swing(), gladiator_dead(), gladiator_die(), gladiator_idle(), gladiator_pain(), gladiator_search(), gladiator_sight(), Grenade_Explode(), Grenade_Touch(), gunner_dead(), gunner_die(), gunner_duck_down(), gunner_duck_up(), gunner_idlesound(), gunner_opengun(), gunner_pain(), gunner_search(), gunner_sight(), HelpComputer(), hover_dead(), hover_die(), hover_pain(), hover_search(), hover_sight(), hurt_touch(), hurt_use(), infantry_cock_gun(), infantry_dead(), infantry_die(), infantry_duck_down(), infantry_duck_up(), infantry_fidget(), infantry_pain(), infantry_sight(), infantry_smack(), infantry_swing(), InitGame(), InitTrigger(), insane_dead(), insane_die(), insane_fist(), insane_moan(), insane_pain(), insane_scream(), insane_shake(), jorg_attack(), Jorg_CheckAttack(), jorg_dead(), jorg_death_hit(), jorg_die(), jorg_idle(), jorg_pain(), jorg_search(), jorg_step_left(), jorg_step_right(), jorgBFG(), KillBox(), light_use(), M_CatagorizePosition(), M_CheckAttack(), M_CheckBottom(), M_CheckGround(), M_droptofloor(), M_FliesOn(), M_WorldEffects(), Machinegun_Fire(), makron_brainsplorch(), Makron_CheckAttack(), makron_dead(), makron_die(), makron_hit(), makron_pain(), makron_popup(), makron_prerailgun(), makron_step_left(), makron_step_right(), makron_taunt(), makron_torso(), makronBFG(), MakronPrecache(), medic_cable_attack(), medic_dead(), medic_die(), medic_duck_down(), medic_duck_up(), medic_hook_launch(), medic_hook_retract(), medic_idle(), medic_pain(), medic_search(), medic_sight(), misc_deadsoldier_die(), monster_fire_bfg(), monster_fire_blaster(), monster_fire_bullet(), monster_fire_grenade(), monster_fire_railgun(), monster_fire_rocket(), monster_fire_shotgun(), monster_start(), monster_start_go(), monster_triggered_spawn(), MoveClientToIntermission(), mutant_check_landing(), mutant_dead(), mutant_die(), mutant_hit_left(), mutant_hit_right(), mutant_idle(), mutant_jump_takeoff(), mutant_pain(), mutant_search(), mutant_sight(), mutant_step(), mutant_swing(), P_DamageFeedback(), P_WorldEffects(), parasite_dead(), parasite_die(), parasite_drain_attack(), parasite_launch(), parasite_pain(), parasite_reel_in(), parasite_scratch(), parasite_search(), parasite_sight(), parasite_tap(), plat_go_down(), plat_go_up(), plat_hit_bottom(), plat_hit_top(), plat_spawn_inside_trigger(), player_die(), PlayerNoise(), PM_trace(), point_combat_touch(), PrecacheItem(), PutClientInServer(), ReadField(), ReadGame(), ReadLevel(), respawn(), rocket_touch(), SelectSpawnPoint(), ServerCommand(), SetItemNames(), SetRespawn(), ShutdownGame(), soldier_cock(), soldier_dead(), soldier_die(), soldier_duck_down(), soldier_duck_up(), soldier_idle(), soldier_pain(), soldier_sight(), SP_func_button(), SP_func_clock(), SP_func_conveyor(), SP_func_door(), SP_func_door_rotating(), SP_func_door_secret(), SP_func_explosive(), SP_func_killbox(), SP_func_object(), SP_func_plat(), SP_func_rotating(), SP_func_timer(), SP_func_train(), SP_func_wall(), SP_func_water(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), SP_item_health_small(), SP_light(), SP_light_mine1(), SP_light_mine2(), SP_misc_actor(), SP_misc_banner(), SP_misc_bigviper(), SP_misc_blackhole(), SP_misc_deadsoldier(), SP_misc_easterchick(), SP_misc_easterchick2(), SP_misc_eastertank(), SP_misc_explobox(), SP_misc_gib_arm(), SP_misc_gib_head(), SP_misc_gib_leg(), SP_misc_insane(), SP_misc_satellite_dish(), SP_misc_strogg_ship(), SP_misc_teleporter(), SP_misc_teleporter_dest(), SP_misc_viper(), SP_misc_viper_bomb(), SP_monster_berserk(), SP_monster_boss2(), SP_monster_boss3_stand(), SP_monster_brain(), SP_monster_chick(), SP_monster_commander_body(), SP_monster_flipper(), SP_monster_floater(), SP_monster_flyer(), SP_monster_gladiator(), SP_monster_gunner(), SP_monster_hover(), SP_monster_infantry(), SP_monster_jorg(), SP_monster_makron(), SP_monster_medic(), SP_monster_mutant(), SP_monster_parasite(), SP_monster_soldier(), SP_monster_soldier_light(), SP_monster_soldier_ss(), SP_monster_soldier_x(), SP_monster_supertank(), SP_monster_tank(), SP_path_corner(), SP_point_combat(), SP_target_actor(), SP_target_blaster(), SP_target_changelevel(), SP_target_character(), SP_target_earthquake(), SP_target_goal(), SP_target_help(), SP_target_lightramp(), SP_target_secret(), SP_target_speaker(), SP_trigger_gravity(), SP_trigger_hurt(), SP_trigger_key(), SP_trigger_multiple(), SP_trigger_once(), SP_trigger_push(), SP_turret_base(), SP_turret_breach(), SP_turret_driver(), SP_viewthing(), SP_worldspawn(), SpawnDamage(), SpawnEntities(), SpawnItem(), spectator_respawn(), StringToFilter(), supertank_dead(), supertank_die(), supertank_pain(), supertank_search(), SV_CalcBlend(), SV_FlyMove(), SV_movestep(), SV_Physics_Noclip(), SV_Physics_Pusher(), SV_Physics_Step(), SV_Physics_Toss(), SV_Push(), SV_PushEntity(), SV_RunThink(), SV_StepDirection(), SV_TestEntityPosition(), SVCmd_AddIP_f(), SVCmd_ListIP_f(), SVCmd_RemoveIP_f(), Svcmd_Test_f(), SVCmd_WriteIP_f(), Sys_Error(), T_Damage(), tank_dead(), tank_die(), tank_footstep(), tank_idle(), tank_pain(), tank_sight(), tank_thud(), tank_windup(), TankStrike(), target_actor_touch(), target_earthquake_think(), target_explosion_explode(), target_laser_start(), target_laser_think(), target_lightramp_think(), target_lightramp_use(), teleporter_touch(), Think_SpawnDoorTrigger(), ThrowClientHead(), ThrowDebris(), ThrowGib(), ThrowHead(), Touch_Item(), train_next(), train_wait(), TreadSound(), trigger_counter_use(), trigger_elevator_init(), trigger_elevator_use(), trigger_enable(), trigger_key_use(), trigger_push_touch(), turret_breach_finish_init(), turret_breach_fire(), UpdateChaseCam(), Use_Areaportal(), Use_Boss3(), Use_Invulnerability(), Use_Item(), Use_PowerArmor(), Use_Quad(), use_target_blaster(), use_target_changelevel(), use_target_goal(), use_target_secret(), use_target_spawner(), Use_Target_Speaker(), use_target_splash(), Use_Target_Tent(), Use_Weapon(), visible(), walkmonster_start_go(), weapon_bfg_fire(), Weapon_Generic(), Weapon_Grenade(), weapon_grenadelauncher_fire(), Weapon_HyperBlaster_Fire(), weapon_railgun_fire(), Weapon_RocketLauncher_Fire(), weapon_shotgun_fire(), weapon_supershotgun_fire(), WriteField1(), WriteGame(), and WriteLevel().

◆ globals

◆ gun_x

cvar_t* gun_x

Definition at line 57 of file g_main.c.

Referenced by InitGame(), and SV_CalcGunOffset().

◆ gun_y

cvar_t* gun_y

Definition at line 58 of file g_main.c.

◆ gun_z

cvar_t* gun_z

Definition at line 59 of file g_main.c.

◆ level

Definition at line 24 of file g_main.c.

Referenced by CheckDMRules(), CreateTargetChangeLevel(), EndDMLevel(), ExitLevel(), and G_RunFrame().

◆ maxclients

cvar_t* maxclients

Definition at line 44 of file g_main.c.

Referenced by CheckDMRules(), ClientEndServerFrames(), and ExitLevel().

◆ maxentities

cvar_t* maxentities

Definition at line 46 of file g_main.c.

Referenced by InitGame().

◆ maxspectators

cvar_t* maxspectators

Definition at line 45 of file g_main.c.

Referenced by ClientConnect(), InitGame(), and spectator_respawn().

◆ meansOfDeath

int meansOfDeath

Definition at line 31 of file g_main.c.

Referenced by ClientObituary(), Cmd_Kill_f(), and T_Damage().

◆ needpass

cvar_t* needpass

Definition at line 43 of file g_main.c.

Referenced by InitGame().

◆ password

cvar_t* password

Definition at line 41 of file g_main.c.

Referenced by CheckNeedPass(), ClientConnect(), InitGame(), and spectator_respawn().

◆ run_pitch

cvar_t* run_pitch

Definition at line 61 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ run_roll

cvar_t* run_roll

Definition at line 62 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ skill

◆ sm_meat_index

int sm_meat_index

Definition at line 29 of file g_main.c.

Referenced by gib_touch(), and SP_worldspawn().

◆ snd_fry

int snd_fry

Definition at line 30 of file g_main.c.

Referenced by G_SetClientSound(), and SP_worldspawn().

◆ spectator_password

cvar_t* spectator_password

Definition at line 42 of file g_main.c.

Referenced by CheckNeedPass(), ClientConnect(), InitGame(), and spectator_respawn().

◆ st

◆ sv_cheats

cvar_t* sv_cheats

Definition at line 67 of file g_main.c.

Referenced by Cmd_Give_f(), Cmd_God_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), and InitGame().

◆ sv_gravity

cvar_t* sv_gravity

Definition at line 53 of file g_main.c.

Referenced by ClientThink(), InitGame(), SV_AddGravity(), and SV_Physics_Step().

◆ sv_maplist

cvar_t* sv_maplist

Definition at line 73 of file g_main.c.

Referenced by EndDMLevel(), and InitGame().

◆ sv_maxvelocity

cvar_t* sv_maxvelocity

Definition at line 52 of file g_main.c.

Referenced by InitGame(), and SV_CheckVelocity().

◆ sv_rollangle

cvar_t* sv_rollangle

Definition at line 56 of file g_main.c.

Referenced by InitGame(), and SV_CalcRoll().

◆ sv_rollspeed

cvar_t* sv_rollspeed

Definition at line 55 of file g_main.c.

Referenced by InitGame(), and SV_CalcRoll().

◆ timelimit

cvar_t* timelimit

Definition at line 40 of file g_main.c.

Referenced by CheckDMRules(), InitGame(), and StartServerActionFunc().

entity_state_s::old_origin
vec3_t old_origin
Definition: q_shared.h:1151
gi
game_import_t gi
Definition: g_main.c:25
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
UpdateChaseCam
void UpdateChaseCam(edict_t *ent)
Definition: g_chase.c:22
MZ_LOGIN
#define MZ_LOGIN
Definition: q_shared.h:641
game_export_t::SpawnEntities
void(* SpawnEntities)(char *mapname, char *entstring, char *spawnpoint)
Definition: game.h:192
WriteLevel
void WriteLevel(char *filename)
Definition: g_save.c:632
game_import_t::dprintf
void(* dprintf)(char *fmt,...)
Definition: game.h:106
edict_s::s
entity_state_t s
Definition: g_local.h:970
Cmd_Inven_f
void Cmd_Inven_f(edict_t *ent)
Definition: g_cmds.c:466
edict_s::groundentity
edict_t * groundentity
Definition: g_local.h:1079
game
game_locals_t game
Definition: g_main.c:23
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
PlayerTrail_Init
void PlayerTrail_Init(void)
Definition: p_trail.c:49
MoveClientToIntermission
void MoveClientToIntermission(edict_t *client)
Definition: p_hud.c:33
game_export_t::ReadGame
void(* ReadGame)(char *filename)
Definition: game.h:199
globals
game_export_t globals
Definition: g_main.c:26
dedicated
cvar_t * dedicated
Definition: common.c:47
client_persistant_t::spectator
qboolean spectator
Definition: g_local.h:867
game_export_t::edict_size
int edict_size
Definition: game.h:230
value
GLfloat value
Definition: qgl_win.c:63
GAME_API_VERSION
#define GAME_API_VERSION
Definition: game.h:23
YAW
#define YAW
Definition: q_shared.h:73
run_roll
cvar_t * run_roll
Definition: g_main.c:62
ClientBeginServerFrame
void ClientBeginServerFrame(edict_t *ent)
Definition: p_client.c:1765
Info_Validate
qboolean Info_Validate(char *s)
Definition: q_shared.c:1353
gclient_s::v_angle
vec3_t v_angle
Definition: g_local.h:927
edict_s::model
char * model
Definition: g_local.h:1004
game_locals_t::helpmessage1
char helpmessage1[512]
Definition: g_local.h:274
G_Spawn
edict_t * G_Spawn(void)
Definition: g_utils.c:420
pm
pmove_t * pm
Definition: pmove.c:48
Cmd_Give_f
void Cmd_Give_f(edict_t *ent)
Definition: g_cmds.c:152
pmove_t::watertype
int watertype
Definition: q_shared.h:548
sv_rollspeed
cvar_t * sv_rollspeed
Definition: g_main.c:55
svc_muzzleflash
@ svc_muzzleflash
Definition: qcommon.h:225
G_RunEntity
void G_RunEntity(edict_t *ent)
Definition: g_phys.c:932
CVAR_NOSET
#define CVAR_NOSET
Definition: q_shared.h:319
game_import_t::multicast
void(* multicast)(vec3_t origin, multicast_t to)
Definition: game.h:144
maxclients
cvar_t * maxclients
Definition: g_main.c:44
CheckNeedPass
void CheckNeedPass(void)
Definition: g_main.c:278
ClientThink
void ClientThink(edict_t *ent, usercmd_t *cmd)
Definition: p_client.c:1580
ClientUserinfoChanged
void ClientUserinfoChanged(edict_t *ent, char *userinfo)
Definition: p_client.c:1371
client_persistant_t::connected
qboolean connected
Definition: g_local.h:839
run_pitch
cvar_t * run_pitch
Definition: g_main.c:61
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
pmove_t::viewheight
float viewheight
Definition: q_shared.h:543
PMF_NO_PREDICTION
#define PMF_NO_PREDICTION
Definition: q_shared.h:487
Cmd_Use_f
void Cmd_Use_f(edict_t *ent)
Definition: g_cmds.c:396
game_import_t::cvar
cvar_t *(* cvar)(char *var_name, char *value, int flags)
Definition: game.h:162
PM_FREEZE
@ PM_FREEZE
Definition: q_shared.h:477
gclient_s::buttons
int buttons
Definition: g_local.h:901
game_export_t::edicts
struct edict_s * edicts
Definition: game.h:229
ClientConnect
qboolean ClientConnect(edict_t *ent, char *userinfo)
Definition: p_client.c:1440
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
password
cvar_t * password
Definition: g_main.c:41
MOVETYPE_NOCLIP
@ MOVETYPE_NOCLIP
Definition: g_local.h:191
game_export_t::Shutdown
void(* Shutdown)(void)
Definition: game.h:189
SPAWNFLAG_NOT_EASY
#define SPAWNFLAG_NOT_EASY
Definition: g_local.h:52
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1149
game_export_t::apiversion
int apiversion
Definition: game.h:183
edict_s::linkcount
int linkcount
Definition: g_local.h:977
edict_s::map
char * map
Definition: g_local.h:1065
gun_x
cvar_t * gun_x
Definition: g_main.c:57
game_export_t::max_edicts
int max_edicts
Definition: game.h:232
com_token
char com_token[MAX_TOKEN_CHARS]
Definition: q_shared.c:1063
cvar_s::string
char * string
Definition: q_shared.h:327
flood_msgs
cvar_t * flood_msgs
Definition: g_main.c:69
edict_s::inuse
qboolean inuse
Definition: g_local.h:976
ClientBegin
void ClientBegin(edict_t *ent)
Definition: p_client.c:1305
pmove_state_t::gravity
short gravity
Definition: q_shared.h:502
ExitLevel
void ExitLevel(void)
Definition: g_main.c:349
i
int i
Definition: q_shared.c:305
G_TouchTriggers
void G_TouchTriggers(edict_t *ent)
Definition: g_utils.c:475
Cmd_WeapLast_f
void Cmd_WeapLast_f(edict_t *ent)
Definition: g_cmds.c:595
ClientEndServerFrames
void ClientEndServerFrames(void)
Definition: g_main.c:177
G_Find
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
Definition: g_utils.c:45
pmove_t::waterlevel
int waterlevel
Definition: q_shared.h:549
SV_FilterPacket
qboolean SV_FilterPacket(char *from)
Definition: g_svcmds.c:123
maxspectators
cvar_t * maxspectators
Definition: g_main.c:45
game_export_t::Init
void(* Init)(void)
Definition: game.h:188
edict_s::client
struct gclient_s * client
Definition: g_local.h:971
game_import_t::sound
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
Definition: game.h:109
game_export_t::ClientThink
void(* ClientThink)(edict_t *ent, usercmd_t *cmd)
Definition: game.h:211
WriteClient
void WriteClient(FILE *f, gclient_t *client)
Definition: g_save.c:407
PITCH
#define PITCH
Definition: q_shared.h:72
Think_Weapon
void Think_Weapon(edict_t *ent)
Definition: p_weapon.c:282
FOFS
#define FOFS(x)
Definition: g_local.h:510
ClientUserinfoChanged
void ClientUserinfoChanged(edict_t *ent, char *userinfo)
Definition: p_client.c:1371
client_respawn_t::spectator
qboolean spectator
Definition: g_local.h:878
maxentities
cvar_t * maxentities
Definition: g_main.c:46
ShutdownGame
void ShutdownGame(void)
Definition: g_main.c:94
TAG_LEVEL
#define TAG_LEVEL
Definition: g_local.h:79
client_persistant_t::userinfo
char userinfo[MAX_INFO_STRING]
Definition: g_local.h:835
gun_y
cvar_t * gun_y
Definition: g_local.h:536
edict_s::mins
vec3_t mins
Definition: g_local.h:990
pmove_t::maxs
vec3_t maxs
Definition: q_shared.h:545
pmove_state_t::velocity
short velocity[3]
Definition: q_shared.h:499
player_state_t::fov
float fov
Definition: q_shared.h:1192
SPAWNFLAG_NOT_MEDIUM
#define SPAWNFLAG_NOT_MEDIUM
Definition: g_local.h:53
game_locals_t::spawnpoint
char spawnpoint[512]
Definition: g_local.h:283
g_edicts
edict_t * g_edicts
Definition: g_main.c:33
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:995
edict_s::groundentity_linkcount
int groundentity_linkcount
Definition: g_local.h:1080
password
cvar_t * password
Definition: g_main.c:41
IT_WEAPON
#define IT_WEAPON
Definition: g_local.h:216
game_export_t::ClientConnect
qboolean(* ClientConnect)(edict_t *ent, char *userinfo)
Definition: game.h:206
DF_FIXED_FOV
#define DF_FIXED_FOV
Definition: q_shared.h:1039
BUTTON_ATTACK
#define BUTTON_ATTACK
Definition: q_shared.h:511
edict_s::movetype
int movetype
Definition: g_local.h:1001
game_export_t::ClientDisconnect
void(* ClientDisconnect)(edict_t *ent)
Definition: game.h:209
BeginIntermission
void BeginIntermission(edict_t *targ)
Definition: p_hud.c:74
CVAR_SERVERINFO
#define CVAR_SERVERINFO
Definition: q_shared.h:318
game_export_t::ClientUserinfoChanged
void(* ClientUserinfoChanged)(edict_t *ent, char *userinfo)
Definition: game.h:208
FL_SWIM
#define FL_SWIM
Definition: g_local.h:60
j
GLint j
Definition: qgl_win.c:150
SelectPrevItem
void SelectPrevItem(edict_t *ent, int itflags)
Definition: g_cmds.c:98
G_InitEdict
void G_InitEdict(edict_t *e)
Definition: g_utils.c:401
ClientDisconnect
void ClientDisconnect(edict_t *ent)
Definition: p_client.c:1514
gclient_s::pers
client_persistant_t pers
Definition: g_local.h:890
level_locals_t::current_entity
edict_t * current_entity
Definition: g_local.h:339
va
char * va(char *format,...)
Definition: q_shared.c:1050
msg
cvar_t * msg
Definition: cl_main.c:83
game_locals_t::helpmessage2
char helpmessage2[512]
Definition: g_local.h:275
game_export_t::ClientCommand
void(* ClientCommand)(edict_t *ent)
Definition: game.h:210
Cmd_Noclip_f
void Cmd_Noclip_f(edict_t *ent)
Definition: g_cmds.c:364
PM_GIB
@ PM_GIB
Definition: q_shared.h:476
ReadClient
void ReadClient(FILE *f, gclient_t *client)
Definition: g_save.c:438
Cmd_God_f
void Cmd_God_f(edict_t *ent)
Definition: g_cmds.c:308
edict_s::svflags
int svflags
Definition: g_local.h:989
gi
game_import_t gi
Definition: g_main.c:25
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:985
game_import_t::cvar_set
cvar_t *(* cvar_set)(char *var_name, char *value)
Definition: game.h:163
gclient_s::weapon_thunk
qboolean weapon_thunk
Definition: g_local.h:905
edict_s::classname
char * classname
Definition: g_local.h:1011
ED_CallSpawn
void ED_CallSpawn(edict_t *ent)
Definition: g_spawn.c:278
Cmd_Players_f
void Cmd_Players_f(edict_t *ent)
Definition: g_cmds.c:693
pmove_t::trace
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
Definition: q_shared.h:552
edict_s
Definition: g_local.h:968
PMF_JUMP_HELD
#define PMF_JUMP_HELD
Definition: q_shared.h:482
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
pmove_state_t::pm_type
pmtype_t pm_type
Definition: q_shared.h:496
timelimit
cvar_t * timelimit
Definition: g_main.c:40
client_persistant_t::weapon
gitem_t * weapon
Definition: g_local.h:858
ReadLevel
void ReadLevel(char *filename)
Definition: g_save.c:686
Cmd_PutAway_f
void Cmd_PutAway_f(edict_t *ent)
Definition: g_cmds.c:663
edict_s::viewheight
int viewheight
Definition: g_local.h:1067
ROLL
#define ROLL
Definition: q_shared.h:74
gun_z
cvar_t * gun_z
Definition: g_local.h:536
pmove_t::groundentity
struct edict_s * groundentity
Definition: q_shared.h:547
game_import_t::cvar_forceset
cvar_t *(* cvar_forceset)(char *var_name, char *value)
Definition: game.h:164
game_import_t::configstring
void(* configstring)(int num, char *string)
Definition: game.h:116
player_state_t::viewangles
vec3_t viewangles
Definition: q_shared.h:1180
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
edict_s::spawnflags
int spawnflags
Definition: g_local.h:1012
player_state_t::pmove
pmove_state_t pmove
Definition: q_shared.h:1176
DF_SAME_LEVEL
#define DF_SAME_LEVEL
Definition: q_shared.h:1029
game_import_t::pointcontents
int(* pointcontents)(vec3_t point)
Definition: game.h:129
ServerCommand
void ServerCommand(void)
Definition: g_svcmds.c:282
maxclients
cvar_t * maxclients
Definition: g_main.c:44
t
GLdouble t
Definition: qgl_win.c:328
Cmd_Wave_f
void Cmd_Wave_f(edict_t *ent)
Definition: g_cmds.c:736
client_persistant_t::netname
char netname[16]
Definition: g_local.h:836
Info_ValueForKey
char * Info_ValueForKey(char *s, char *key)
Definition: q_shared.c:1253
MZ_LOGOUT
#define MZ_LOGOUT
Definition: q_shared.h:642
GetChaseTarget
void GetChaseTarget(edict_t *ent)
Definition: g_chase.c:159
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1117
edict_s::deadflag
int deadflag
Definition: g_local.h:1060
sv_maplist
cvar_t * sv_maplist
Definition: g_main.c:73
BUTTON_ANY
#define BUTTON_ANY
Definition: q_shared.h:513
SpawnEntities
void SpawnEntities(char *mapname, char *entities, char *spawnpoint)
Definition: g_spawn.c:522
client_respawn_t::cmd_angles
vec3_t cmd_angles
Definition: g_local.h:876
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:316
spectator_password
cvar_t * spectator_password
Definition: g_main.c:42
game_locals_t::clients
gclient_t * clients
Definition: g_local.h:279
edict_s::nextthink
float nextthink
Definition: g_local.h:1042
gclient_s::killer_yaw
float killer_yaw
Definition: g_local.h:917
cvar_s::value
float value
Definition: q_shared.h:331
ED_ParseEdict
char * ED_ParseEdict(char *data, edict_t *ent)
Definition: g_spawn.c:416
ReadLevelLocals
void ReadLevelLocals(FILE *f)
Definition: g_save.c:614
game
game_locals_t game
Definition: g_main.c:23
flood_persecond
cvar_t * flood_persecond
Definition: g_main.c:70
PM_trace
trace_t PM_trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
Definition: p_client.c:1547
flood_waitdelay
cvar_t * flood_waitdelay
Definition: g_main.c:71
PRINT_HIGH
#define PRINT_HIGH
Definition: q_shared.h:99
error
static int error(vorb *f, enum STBVorbisError e)
Definition: stb_vorbis.c:865
game_export_t::ServerCommand
void(* ServerCommand)(void)
Definition: game.h:219
pmove_state_t::delta_angles
short delta_angles[3]
Definition: q_shared.h:503
Cmd_WeapPrev_f
void Cmd_WeapPrev_f(edict_t *ent)
Definition: g_cmds.c:523
edict_t
struct edict_s edict_t
Definition: game.h:52
pm_passent
edict_t * pm_passent
Definition: p_client.c:1544
gclient_s::ps
player_state_t ps
Definition: g_local.h:886
edict_s::watertype
int watertype
Definition: g_local.h:1099
level_locals_t::nextmap
char nextmap[MAX_QPATH]
Definition: g_local.h:310
NULL
#define NULL
Definition: q_shared.h:67
Cmd_InvDrop_f
void Cmd_InvDrop_f(edict_t *ent)
Definition: g_cmds.c:622
globals
game_export_t globals
Definition: g_main.c:26
filterban
cvar_t * filterban
Definition: g_main.c:50
ReadEdict
void ReadEdict(FILE *f, edict_t *ent)
Definition: g_save.c:595
WriteLevelLocals
void WriteLevelLocals(FILE *f)
Definition: g_save.c:563
edict_s::solid
solid_t solid
Definition: g_local.h:992
CVAR_LATCH
#define CVAR_LATCH
Definition: q_shared.h:321
level
level_locals_t level
Definition: g_main.c:24
game_import_t::TagMalloc
void *(* TagMalloc)(int size, int tag)
Definition: game.h:157
Cmd_Score_f
void Cmd_Score_f(edict_t *ent)
Definition: p_hud.c:277
pmove_t::touchents
struct edict_s * touchents[MAXTOUCH]
Definition: q_shared.h:540
g_edicts
edict_t * g_edicts
Definition: g_main.c:33
game_export_t::ReadLevel
void(* ReadLevel)(char *filename)
Definition: game.h:204
pmove_t::numtouch
int numtouch
Definition: q_shared.h:539
Cmd_PlayerList_f
void Cmd_PlayerList_f(edict_t *ent)
Definition: g_cmds.c:872
GAMEVERSION
#define GAMEVERSION
Definition: g_local.h:33
EndDMLevel
void EndDMLevel(void)
Definition: g_main.c:219
PM_DEAD
@ PM_DEAD
Definition: q_shared.h:475
bob_up
cvar_t * bob_up
Definition: g_main.c:63
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1180
skill
cvar_t * skill
Definition: g_main.c:38
usercmd_s::upmove
short upmove
Definition: q_shared.h:522
SOLID_NOT
@ SOLID_NOT
Definition: game.h:35
level_locals_t::framenum
int framenum
Definition: g_local.h:305
Cmd_InvUse_f
void Cmd_InvUse_f(edict_t *ent)
Definition: g_cmds.c:497
game_import_t::Pmove
void(* Pmove)(pmove_t *pmove)
Definition: game.h:141
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1030
ERR_FATAL
#define ERR_FATAL
Definition: qcommon.h:743
M_CheckGround
void M_CheckGround(edict_t *ent)
Definition: g_monster.c:141
game_import_t::unlinkentity
void(* unlinkentity)(edict_t *ent)
Definition: game.h:139
s
static fixed16_t s
Definition: r_scan.c:30
game_locals_t::autosaved
qboolean autosaved
Definition: g_local.h:295
level_locals_t::exitintermission
int exitintermission
Definition: g_local.h:315
level_locals_t::time
float time
Definition: g_local.h:306
game_import_t::WriteShort
void(* WriteShort)(int c)
Definition: game.h:148
Cmd_Kill_f
void Cmd_Kill_f(edict_t *ent)
Definition: g_cmds.c:648
dmflags
cvar_t * dmflags
Definition: g_main.c:37
Cmd_Help_f
void Cmd_Help_f(edict_t *ent)
Definition: p_hud.c:347
game_import_t::error
void(* error)(char *fmt,...)
Definition: game.h:118
CheckDMRules
void CheckDMRules(void)
Definition: g_main.c:304
Info_SetValueForKey
void Info_SetValueForKey(char *s, char *key, char *value)
Definition: q_shared.c:1362
edict_s::light_level
int light_level
Definition: g_local.h:1106
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
coop
cvar_t * coop
Definition: g_main.c:36
G_RunFrame
void G_RunFrame(void)
Definition: g_main.c:381
game_export_t::RunFrame
void(* RunFrame)(void)
Definition: game.h:213
level_locals_t::intermissiontime
float intermissiontime
Definition: g_local.h:313
timelimit
cvar_t * timelimit
Definition: g_main.c:40
g_select_empty
cvar_t * g_select_empty
Definition: g_main.c:47
PM_SPECTATOR
@ PM_SPECTATOR
Definition: q_shared.h:473
game_import_t::AddCommandString
void(* AddCommandString)(char *text)
Definition: game.h:173
game_export_t::WriteLevel
void(* WriteLevel)(char *filename)
Definition: game.h:203
SPAWNFLAG_NOT_DEATHMATCH
#define SPAWNFLAG_NOT_DEATHMATCH
Definition: g_local.h:55
SPAWNFLAG_NOT_HARD
#define SPAWNFLAG_NOT_HARD
Definition: g_local.h:54
CreateTargetChangeLevel
edict_t * CreateTargetChangeLevel(char *map)
Definition: g_main.c:201
level_locals_t::changemap
char * changemap
Definition: g_local.h:314
InitGame
void InitGame(void)
Definition: g_save.c:153
TAG_GAME
#define TAG_GAME
Definition: g_local.h:78
bob_pitch
cvar_t * bob_pitch
Definition: g_main.c:64
PNOISE_SELF
#define PNOISE_SELF
Definition: g_local.h:182
ClientEndServerFrame
void ClientEndServerFrame(edict_t *ent)
Definition: p_view.c:958
sv_cheats
cvar_t * sv_cheats
Definition: g_main.c:67
ClientCommand
void ClientCommand(edict_t *ent)
Definition: g_cmds.c:908
gclient_s::oldbuttons
int oldbuttons
Definition: g_local.h:902
game_import_t::WriteByte
void(* WriteByte)(int c)
Definition: game.h:147
needpass
cvar_t * needpass
Definition: g_main.c:43
level
GLint level
Definition: qgl_win.c:116
bob_roll
cvar_t * bob_roll
Definition: g_main.c:65
SHORT2ANGLE
#define SHORT2ANGLE(x)
Definition: q_shared.h:1093
gclient_s::old_pmove
pmove_state_t old_pmove
Definition: g_local.h:892
edict_s::flags
int flags
Definition: g_local.h:1002
pmove_t::s
pmove_state_t s
Definition: q_shared.h:532
fraglimit
cvar_t * fraglimit
Definition: g_main.c:39
CVAR_USERINFO
#define CVAR_USERINFO
Definition: q_shared.h:317
ChaseNext
void ChaseNext(edict_t *ent)
Definition: g_chase.c:111
pmove_t::cmd
usercmd_t cmd
Definition: q_shared.h:535
edict_s::maxs
vec3_t maxs
Definition: g_local.h:990
COM_Parse
char * COM_Parse(char **data_p)
Definition: q_shared.c:1072
PlayerNoise
void PlayerNoise(edict_t *who, vec3_t where, int type)
Definition: p_weapon.c:58
SPAWNFLAG_NOT_COOP
#define SPAWNFLAG_NOT_COOP
Definition: g_local.h:56
game_import_t::FreeTags
void(* FreeTags)(int tag)
Definition: game.h:159
entity_state_s::modelindex
int modelindex
Definition: q_shared.h:1152
InitItems
void InitItems(void)
Definition: g_items.c:2186
FL_FLY
#define FL_FLY
Definition: g_local.h:59
pmove_t::mins
vec3_t mins
Definition: q_shared.h:545
ReadGame
void ReadGame(char *filename)
Definition: g_save.c:491
SVF_MONSTER
#define SVF_MONSTER
Definition: game.h:29
edict_s::touch
void(* touch)(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_local.h:1046
PutClientInServer
void PutClientInServer(edict_t *ent)
Definition: p_client.c:1097
sv_maplist
cvar_t * sv_maplist
Definition: g_main.c:73
Cmd_WeapNext_f
void Cmd_WeapNext_f(edict_t *ent)
Definition: g_cmds.c:559
SelectNextItem
void SelectNextItem(edict_t *ent, int itflags)
Definition: g_cmds.c:66
sv_rollangle
cvar_t * sv_rollangle
Definition: g_main.c:56
gclient_s::chase_target
edict_t * chase_target
Definition: g_local.h:963
pmove_state_t::origin
short origin[3]
Definition: q_shared.h:498
sv_gravity
cvar_t * sv_gravity
Definition: g_main.c:53
InitGame
void InitGame(void)
Definition: g_save.c:153
Cmd_Say_f
void Cmd_Say_f(edict_t *ent, qboolean team, qboolean arg0)
Definition: g_cmds.c:787
Cmd_Notarget_f
void Cmd_Notarget_f(edict_t *ent)
Definition: g_cmds.c:337
game_export_t::ClientBegin
void(* ClientBegin)(edict_t *ent)
Definition: game.h:207
G_FindTeams
void G_FindTeams(void)
Definition: g_spawn.c:472
ANGLE2SHORT
#define ANGLE2SHORT(x)
Definition: q_shared.h:1092
PM_NORMAL
@ PM_NORMAL
Definition: q_shared.h:472
sv_maxvelocity
cvar_t * sv_maxvelocity
Definition: g_main.c:52
pmove_t::viewangles
vec3_t viewangles
Definition: q_shared.h:542
dmflags
cvar_t * dmflags
Definition: g_main.c:37
edict_s::waterlevel
int waterlevel
Definition: g_local.h:1100
edict_s::delay
float delay
Definition: g_local.h:1094
spectator_password
cvar_t * spectator_password
Definition: g_main.c:42
client_persistant_t::hand
int hand
Definition: g_local.h:837
edict_s::area
link_t area
Definition: g_local.h:980
SaveClientData
void SaveClientData(void)
Definition: p_client.c:650
client_persistant_t::max_health
int max_health
Definition: g_local.h:844
game_locals_t::maxentities
int maxentities
Definition: g_local.h:287
fraglimit
cvar_t * fraglimit
Definition: g_main.c:39
level_locals_t::mapname
char mapname[MAX_QPATH]
Definition: g_local.h:309
WriteEdict
void WriteEdict(FILE *f, edict_t *ent)
Definition: g_save.c:531
gclient_s
Definition: g_local.h:883
InitClientResp
void InitClientResp(gclient_t *client)
Definition: p_client.c:633
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
game_export_t::WriteGame
void(* WriteGame)(char *filename, qboolean autosave)
Definition: game.h:198
pmove_t::pointcontents
int(* pointcontents)(vec3_t point)
Definition: q_shared.h:553
ClientBeginDeathmatch
void ClientBeginDeathmatch(edict_t *ent)
Definition: p_client.c:1268
gclient_s::latched_buttons
int latched_buttons
Definition: g_local.h:903
cl
client_state_t cl
Definition: cl_main.c:91
pmove_state_t::pm_flags
byte pm_flags
Definition: q_shared.h:500
MULTICAST_PVS
@ MULTICAST_PVS
Definition: q_shared.h:118
pmove_t::snapinitial
qboolean snapinitial
Definition: q_shared.h:536
AI_SetSightClient
void AI_SetSightClient(void)
Definition: g_ai.c:50
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
pmove_t
Definition: q_shared.h:529
IT_POWERUP
#define IT_POWERUP
Definition: g_local.h:221
Cmd_Drop_f
void Cmd_Drop_f(edict_t *ent)
Definition: g_cmds.c:432
InitClientPersistant
void InitClientPersistant(gclient_t *client)
Definition: p_client.c:607
WriteGame
void WriteGame(char *filename, qboolean autosave)
Definition: g_save.c:464
game_export_t::num_edicts
int num_edicts
Definition: game.h:231
gclient_s::resp
client_respawn_t resp
Definition: g_local.h:891
game_import_t::argv
char *(* argv)(int n)
Definition: game.h:168
edict_s::health
int health
Definition: g_local.h:1057
game_import_t::bprintf
void(* bprintf)(int printlevel, char *fmt,...)
Definition: game.h:105
game_locals_t::maxclients
int maxclients
Definition: g_local.h:286