Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
|
static void | MVD_UpdateClient (mvd_client_t *client) |
|
static void | MVD_LayoutClients (mvd_client_t *client) |
|
static int | MVD_CountClients (mvd_t *mvd) |
|
static void | MVD_LayoutChannels (mvd_client_t *client) |
|
static int | clamp_menu_cursor (mvd_client_t *client) |
|
static void | MVD_LayoutMenu (mvd_client_t *client) |
|
static void | MVD_LayoutScores (mvd_client_t *client) |
|
static void | MVD_LayoutFollow (mvd_client_t *client) |
|
static void | MVD_SetNewLayout (mvd_client_t *client, mvd_layout_t type) |
|
static void | MVD_SetDefaultLayout (mvd_client_t *client) |
|
static void | MVD_ToggleLayout (mvd_client_t *client, mvd_layout_t type) |
|
static void | MVD_SetFollowLayout (mvd_client_t *client) |
|
static void | MVD_UpdateLayouts (mvd_t *mvd) |
|
static void | write_cs_list (mvd_client_t *client, mvd_cs_t *cs) |
|
static void | MVD_FollowStop (mvd_client_t *client) |
|
static void | MVD_FollowStart (mvd_client_t *client, mvd_player_t *target) |
|
static qboolean | MVD_TestTarget (mvd_client_t *client, mvd_player_t *target) |
|
static mvd_player_t * | MVD_FollowNext (mvd_client_t *client, mvd_player_t *from) |
|
static mvd_player_t * | MVD_FollowPrev (mvd_client_t *client, mvd_player_t *from) |
|
static mvd_player_t * | MVD_MostFollowed (mvd_t *mvd) |
|
static void | MVD_UpdateTarget (mvd_client_t *client) |
|
void | MVD_BroadcastPrintf (mvd_t *mvd, int level, int mask, const char *fmt,...) |
|
static void | MVD_SetServerState (client_t *cl, mvd_t *mvd) |
|
void | MVD_SwitchChannel (mvd_client_t *client, mvd_t *mvd) |
|
static qboolean | MVD_PartFilter (mvd_client_t *client) |
|
static void | MVD_TrySwitchChannel (mvd_client_t *client, mvd_t *mvd) |
|
static void | MVD_Admin_f (mvd_client_t *client) |
|
static void | MVD_Forward_f (mvd_client_t *client) |
|
static void | MVD_Say_f (mvd_client_t *client, int argnum) |
|
static void | MVD_Observe_f (mvd_client_t *client) |
|
static mvd_player_t * | MVD_SetPlayer (mvd_client_t *client, const char *s) |
|
static void | MVD_Follow_f (mvd_client_t *client) |
|
static qboolean | count_chase_bits (mvd_client_t *client) |
|
static void | MVD_AutoFollow_f (mvd_client_t *client) |
|
static void | MVD_Invuse_f (mvd_client_t *client) |
|
static void | MVD_Join_f (mvd_client_t *client) |
|
static void | print_channel (client_t *cl, mvd_t *mvd) |
|
static void | mvd_channel_list_f (mvd_client_t *client) |
|
static void | MVD_Clients_f (mvd_client_t *client) |
|
static void | MVD_Commands_f (mvd_client_t *client) |
|
static void | MVD_GameClientCommand (edict_t *ent) |
|
void | MVD_FreePlayer (mvd_player_t *player) |
|
static void | reset_unicast_strings (mvd_t *mvd, int index) |
|
static void | set_player_name (mvd_t *mvd, int index) |
|
static void | update_player_name (mvd_t *mvd, int index) |
|
void | MVD_SetPlayerNames (mvd_t *mvd) |
|
void | MVD_UpdateConfigstring (mvd_t *mvd, int index) |
|
void | MVD_LinkEdict (mvd_t *mvd, edict_t *ent) |
|
void | MVD_RemoveClient (client_t *client) |
|
static void | MVD_GameInit (void) |
|
static void | MVD_GameShutdown (void) |
|
static void | MVD_GameSpawnEntities (const char *mapname, const char *entstring, const char *spawnpoint) |
|
static void | MVD_GameWriteGame (const char *filename, qboolean autosave) |
|
static void | MVD_GameReadGame (const char *filename) |
|
static void | MVD_GameWriteLevel (const char *filename) |
|
static void | MVD_GameReadLevel (const char *filename) |
|
static qboolean | MVD_GameClientConnect (edict_t *ent, char *userinfo) |
|
static void | MVD_GameClientBegin (edict_t *ent) |
|
static void | MVD_GameClientUserinfoChanged (edict_t *ent, char *userinfo) |
|
void | MVD_GameClientNameChanged (edict_t *ent, const char *name) |
|
void | MVD_GameClientDrop (edict_t *ent, const char *prefix, const char *reason) |
|
static void | MVD_GameClientDisconnect (edict_t *ent) |
|
static mvd_player_t * | MVD_HitPlayer (mvd_client_t *client) |
|
static trace_t q_gameabi | MVD_Trace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end) |
|
static int | MVD_PointContents (vec3_t p) |
|
static void | MVD_GameClientThink (edict_t *ent, usercmd_t *cmd) |
|
static void | MVD_IntermissionStart (mvd_t *mvd) |
|
static void | MVD_IntermissionStop (mvd_t *mvd) |
|
static void | MVD_NotifyClient (mvd_client_t *client) |
|
void | MVD_UpdateClients (mvd_t *mvd) |
|
static void | MVD_WriteDemoMessage (mvd_t *mvd) |
|
static void | MVD_GameRunFrame (void) |
|
static void | MVD_GameServerCommand (void) |
|
void | MVD_PrepWorldFrame (void) |
|
◆ DEFAULT
#define DEFAULT "\xC4\xE5\xE6\xE1\xF5\xEC\xF4" |
◆ MENU_ITEMS
◆ NO
◆ PAGE_CLIENTS
◆ VER_OFS
#define VER_OFS (272 - (int)(sizeof(VERSION_STRING) - 1) * CHAR_WIDTH) |
◆ YES
#define YES "\xD9\xE5\xF3" |
◆ clamp_menu_cursor()
◆ count_chase_bits()
Definition at line 1118 of file game.c.
1121 int i, j, count = 0;
1123 for (i = 0; i < (
mvd->maxclients + CHAR_BIT - 1) / CHAR_BIT; i++)
1125 for (j = 0; j < 8; j++)
Referenced by MVD_AutoFollow_f().
◆ MVD_Admin_f()
◆ MVD_AutoFollow_f()
Definition at line 1132 of file game.c.
1141 "[MVD] Please enter a channel first.\n");
1145 if (
mvd->intermission)
1152 "[MVD] Auto chasing is %s (%d target%s).\n",
1153 client->
chase_auto ?
"ON" :
"OFF", i, i == 1 ?
"" :
"s");
1158 if (!strcmp(s,
"add") || !strcmp(s,
"rm") || !strcmp(s,
"del")) {
1161 "Usage: %s %s <wildcard> [...]\n",
1166 for (i = 2; i < argc; i++) {
1168 for (j = 0; j <
mvd->maxclients; j++) {
1193 if (!strcmp(s,
"set")) {
1196 for (i = 2; i < argc; i++) {
1207 if (!strcmp(s,
"list")) {
1212 for (i = 0; i <
mvd->maxclients; i++) {
1220 len = strlen(player->
name);
1224 if (total + len + 2 >=
sizeof(buffer))
1228 buffer[total + 0] =
',';
1229 buffer[total + 1] =
' ';
1233 memcpy(buffer + total, player->
name, len);
1240 "[MVD] Auto chasing %s\n", buffer);
1243 "[MVD] Auto chase list is empty.\n");
1247 if (!strcmp(s,
"on")) {
1250 "[MVD] Please add auto chase targets first.\n");
1262 if (!strcmp(s,
"off")) {
1268 "[MVD] Usage: %s <add|rm|set|list|on|off> [...]\n",
Referenced by MVD_GameClientCommand().
◆ MVD_BroadcastPrintf()
void MVD_BroadcastPrintf |
( |
mvd_t * |
mvd, |
|
|
int |
level, |
|
|
int |
mask, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 707 of file game.c.
710 char text[MAX_STRING_CHARS];
715 va_start(argptr, fmt);
716 len =
Q_vsnprintf(text,
sizeof(text), fmt, argptr);
719 if (len >=
sizeof(text)) {
720 Com_WPrintf(
"%s: overflow\n", __func__);
727 while ((s = strstr(text,
"!version")) != NULL) {
734 MSG_WriteData(text, len + 1);
741 if (level < cl->messagelevel) {
744 if (
other->uf & mask) {
Referenced by MVD_GameClientBegin(), MVD_GameClientDisconnect(), MVD_GameClientDrop(), MVD_GameClientNameChanged(), and MVD_TrySwitchChannel().
◆ mvd_channel_list_f()
Definition at line 1388 of file game.c.
1393 "id name map spc plr who is playing\n"
1394 "-- ------------ -------- --- --- --------------\n");
Referenced by MVD_GameClientCommand().
◆ MVD_Clients_f()
◆ MVD_Commands_f()
Definition at line 1409 of file game.c.
1412 "chase [player_id] toggle chasecam mode\n"
1413 "autochase <...> control automatic chasecam\n"
1414 "observe toggle observer mode\n"
1415 "menu show main menu\n"
1416 "score show scoreboard\n"
1417 "oldscore show previous scoreboard\n"
1418 "channels list active channels\n"
1419 "join [channel_id] join specified channel\n"
1420 "leave go to the Waiting Room\n"
Referenced by MVD_GameClientCommand().
◆ MVD_CountClients()
static int MVD_CountClients |
( |
mvd_t * |
mvd | ) |
|
|
static |
◆ MVD_Follow_f()
Definition at line 1042 of file game.c.
1051 "[MVD] Please enter a channel first.\n");
1055 if (
mvd->intermission) {
1088 "[MVD] Previous chase target is not active.\n");
1092 "[MVD] You have no previous chase target.\n");
1097 "[MVD] Unknown chase target '%s'. Valid targets are: "
1098 "q[uad]/i[nvulner]/r[ed_flag]/b[lue_flag]/p[revious_target].\n", s);
1102 "[MVD] Chasing players with '%s' powerup.\n", s);
Referenced by MVD_GameClientCommand().
◆ MVD_FollowNext()
◆ MVD_FollowPrev()
◆ MVD_FollowStart()
◆ MVD_FollowStop()
◆ MVD_Forward_f()
Definition at line 862 of file game.c.
866 if (!client->
admin) {
868 "[MVD] You don't have admin status.\n");
872 if (!
mvd->forward_cmd) {
874 "[MVD] This channel does not support command forwarding.\n");
878 mvd->forward_cmd(client);
Referenced by MVD_GameClientCommand().
◆ MVD_FreePlayer()
◆ MVD_GameClientBegin()
static void MVD_GameClientBegin |
( |
edict_t * |
ent | ) |
|
|
static |
Definition at line 1840 of file game.c.
1849 memset(&client->
ps, 0,
sizeof(client->
ps));
1857 if (NET_IsLocalAddress(&client->
cl->
netchan->remote_address))
1867 "[MVD] %s entered the channel\n", client->
cl->
name);
1870 }
else if (
mvd->flags & MVF_SINGLEPOV) {
1881 if (
mvd->intermission) {
1886 }
else if (target && target->
inuse) {
1891 VectorScale(
mvd->spawnOrigin, 8, client->
ps.pmove.origin);
1892 VectorCopy(
mvd->spawnAngles, client->
ps.viewangles);
◆ MVD_GameClientCommand()
static void MVD_GameClientCommand |
( |
edict_t * |
ent | ) |
|
|
static |
Definition at line 1424 of file game.c.
1441 if (!strcmp(cmd,
"!mvdadmin")) {
1445 if (!strcmp(cmd,
"fwd")) {
1449 if (!strcmp(cmd,
"say") || !strcmp(cmd,
"say_team")) {
1453 if (!strcmp(cmd,
"follow") || !strcmp(cmd,
"chase")) {
1457 if (!strcmp(cmd,
"autofollow") || !strcmp(cmd,
"autochase")) {
1461 if (!strcmp(cmd,
"observe") || !strcmp(cmd,
"spectate") ||
1462 !strcmp(cmd,
"observer") || !strcmp(cmd,
"spectator") ||
1463 !strcmp(cmd,
"obs") || !strcmp(cmd,
"spec")) {
1467 if (!strcmp(cmd,
"inven") || !strcmp(cmd,
"menu")) {
1471 if (!strcmp(cmd,
"invnext")) {
1481 if (!strcmp(cmd,
"invprev")) {
1491 if (!strcmp(cmd,
"invuse")) {
1495 if (!strcmp(cmd,
"help") || !strcmp(cmd,
"score")) {
1499 if (!strcmp(cmd,
"oldscore") || !strcmp(cmd,
"oldscores") ||
1500 !strcmp(cmd,
"lastscore") || !strcmp(cmd,
"lastscores")) {
1504 if (!strcmp(cmd,
"putaway")) {
1508 if (!strcmp(cmd,
"channels")) {
1512 if (!strcmp(cmd,
"clients") || !strcmp(cmd,
"players")) {
1516 if (!strcmp(cmd,
"join")) {
1520 if (!strcmp(cmd,
"leave")) {
1524 if (!strcmp(cmd,
"commands")) {
◆ MVD_GameClientConnect()
static qboolean MVD_GameClientConnect |
( |
edict_t * |
ent, |
|
|
char * |
userinfo |
|
) |
| |
|
static |
◆ MVD_GameClientDisconnect()
static void MVD_GameClientDisconnect |
( |
edict_t * |
ent | ) |
|
|
static |
Definition at line 1947 of file game.c.
1954 "[MVD] %s disconnected\n",
cl->name);
◆ MVD_GameClientDrop()
void MVD_GameClientDrop |
( |
edict_t * |
ent, |
|
|
const char * |
prefix, |
|
|
const char * |
reason |
|
) |
| |
◆ MVD_GameClientNameChanged()
void MVD_GameClientNameChanged |
( |
edict_t * |
ent, |
|
|
const char * |
name |
|
) |
| |
◆ MVD_GameClientThink()
static void MVD_GameClientThink |
( |
edict_t * |
ent, |
|
|
usercmd_t * |
cmd |
|
) |
| |
|
static |
Definition at line 2030 of file game.c.
2033 usercmd_t *old = &client->
lastcmd;
2036 if (cmd->buttons != old->buttons
2037 || cmd->forwardmove != old->forwardmove
2038 || cmd->sidemove != old->sidemove
2039 || cmd->upmove != old->upmove) {
2044 if ((cmd->buttons & ~old->buttons) & BUTTON_ATTACK) {
2056 if (cmd->upmove >= 10) {
2064 }
else if (cmd->upmove <= -10) {
2076 memset(&
pm, 0,
sizeof(
pm));
2079 pm.s = client->
ps.pmove;
2084 client->
ps.pmove =
pm.s;
2085 if (
pm.s.pm_type != PM_FREEZE) {
2086 VectorCopy(
pm.viewangles, client->
ps.viewangles);
◆ MVD_GameClientUserinfoChanged()
static void MVD_GameClientUserinfoChanged |
( |
edict_t * |
ent, |
|
|
char * |
userinfo |
|
) |
| |
|
static |
Definition at line 1904 of file game.c.
1914 }
else if (fov > 160) {
1919 client->
ps.fov = fov;
◆ MVD_GameInit()
Definition at line 1696 of file game.c.
1700 cvar_t *mvd_default_map;
1701 char buffer[MAX_QPATH];
1707 Com_Printf(
"----- MVD_GameInit -----\n");
1716 mvd_default_map =
Cvar_Get(
"mvd_default_map",
"q2dm1", CVAR_LATCH);
1725 sizeof(edict_t), TAG_MVD);
1733 edicts[i + 1].client = (gclient_t *)&
mvd_clients[i];
1737 mvd_ge.edict_size =
sizeof(edict_t);
1742 "maps/%s.bsp", mvd_default_map->string);
1746 Com_EPrintf(
"Couldn't load %s for the Waiting Room: %s\n",
1748 Cvar_Reset(mvd_default_map);
1749 strcpy(buffer,
"maps/q2dm1.bsp");
1750 checksum = 80717714;
1751 VectorSet(
mvd->spawnOrigin, 984, 192, 784);
1752 VectorSet(
mvd->spawnAngles, 25, 72, 0);
1756 checksum = bsp->checksum;
1760 strcpy(
mvd->name,
"Waiting Room");
1761 Cvar_VariableStringBuffer(
"game",
mvd->gamedir,
sizeof(
mvd->gamedir));
1762 Q_strlcpy(
mvd->mapname, mvd_default_map->string,
sizeof(
mvd->mapname));
1765 strcpy(
mvd->configstrings[CS_NAME],
"Waiting Room");
1766 strcpy(
mvd->configstrings[CS_SKY],
"unit1_");
1767 strcpy(
mvd->configstrings[CS_MAXCLIENTS],
"8");
1768 sprintf(
mvd->configstrings[CS_MAPCHECKSUM],
"%d", checksum);
1769 strcpy(
mvd->configstrings[CS_MODELS + 1], buffer);
1770 strcpy(
mvd->configstrings[CS_LIGHTS],
"m");
1773 mvd->pm_type = PM_FREEZE;
◆ MVD_GameReadGame()
static void MVD_GameReadGame |
( |
const char * |
filename | ) |
|
|
static |
◆ MVD_GameReadLevel()
static void MVD_GameReadLevel |
( |
const char * |
filename | ) |
|
|
static |
◆ MVD_GameRunFrame()
Definition at line 2220 of file game.c.
2231 if (!
mvd->read_frame(
mvd)) {
2236 if (
mvd->demorecording) {
2242 numplayers +=
mvd->numplayers;
◆ MVD_GameServerCommand()
static void MVD_GameServerCommand |
( |
void |
| ) |
|
|
static |
◆ MVD_GameShutdown()
Definition at line 1786 of file game.c.
1788 Com_Printf(
"----- MVD_GameShutdown -----\n");
◆ MVD_GameSpawnEntities()
static void MVD_GameSpawnEntities |
( |
const char * |
mapname, |
|
|
const char * |
entstring, |
|
|
const char * |
spawnpoint |
|
) |
| |
|
static |
◆ MVD_GameWriteGame()
static void MVD_GameWriteGame |
( |
const char * |
filename, |
|
|
qboolean |
autosave |
|
) |
| |
|
static |
◆ MVD_GameWriteLevel()
static void MVD_GameWriteLevel |
( |
const char * |
filename | ) |
|
|
static |
◆ MVD_HitPlayer()
Definition at line 1960 of file game.c.
1973 if (
mvd->intermission)
1976 VectorMA(client->
ps.viewoffset, 0.125f, client->
ps.pmove.origin, start);
1978 VectorMA(start, 8192,
forward, end);
1980 if (
mvd->cm.cache) {
1982 mvd->cm.cache->nodes, CONTENTS_SOLID);
1983 fraction = trace.fraction;
1989 for (i = 0; i <
mvd->maxclients; i++) {
1994 ent = &
mvd->edicts[i + 1];
1998 if (ent->solid != SOLID_BBOX)
2005 if (trace.fraction < fraction) {
2006 fraction = trace.fraction;
Referenced by MVD_GameClientThink().
◆ MVD_IntermissionStart()
static void MVD_IntermissionStart |
( |
mvd_t * |
mvd | ) |
|
|
static |
◆ MVD_IntermissionStop()
static void MVD_IntermissionStop |
( |
mvd_t * |
mvd | ) |
|
|
static |
◆ MVD_Invuse_f()
Definition at line 1272 of file game.c.
1275 int uf = client->
uf;
1296 client->
uf ^= UF_MUTE_OBSERVERS;
1299 client->
uf ^= UF_MUTE_MISC;
1302 client->
uf ^= UF_MUTE_PLAYERS;
1305 client->
uf &= ~(UF_LOCALFOV | UF_PLAYERFOV);
1306 if (uf & UF_LOCALFOV)
1307 client->
uf |= UF_PLAYERFOV;
1308 else if (!(uf & UF_PLAYERFOV))
1309 client->
uf |= UF_LOCALFOV;
1315 if (uf != client->
uf) {
Referenced by MVD_GameClientCommand().
◆ MVD_Join_f()
◆ MVD_LayoutChannels()
Definition at line 148 of file game.c.
150 static const char header[] =
151 "xv 32 yv 8 picn inventory "
152 "xv %d yv 172 string2 " VERSION_STRING
" "
153 "xv 0 yv 32 cstring \"\020Channel Chooser\021\""
154 "xv 64 yv 48 string2 \"Name Map S/P\""
155 "yv 56 string \"------------ ------- ---\" xv 56 ";
156 static const char nochans[] =
157 "yv 72 string \" No active channels.\""
158 "yv 80 string \" Please wait until players\""
159 "yv 88 string \" connect.\""
161 static const char inactive[] =
162 "yv 72 string \" Traffic saving mode.\""
163 "yv 80 string \" Press any key to wake\""
164 "yv 88 string \" this server up.\""
166 char layout[MAX_STRING_CHARS];
167 char buffer[MAX_QPATH];
188 "yv %d string%s \"%c%-12.12s %-7.7s %d/%d\" ", y,
189 mvd == client->
mvd ?
"2" :
"",
193 if (len >=
sizeof(buffer)) {
196 if (total + len >=
sizeof(
layout)) {
199 memcpy(
layout + total, buffer, len);
211 memcpy(
layout + total, nochans,
sizeof(nochans) - 1);
212 total +=
sizeof(nochans) - 1;
214 memcpy(
layout + total, inactive,
sizeof(inactive) - 1);
215 total +=
sizeof(inactive) - 1;
223 MSG_WriteData(
layout, total + 1);
Referenced by MVD_UpdateLayouts().
◆ MVD_LayoutClients()
Definition at line 58 of file game.c.
60 static const char header[] =
61 "xv 16 yv 0 string2 \" Name RTT Status\"";
62 char layout[MAX_STRING_CHARS];
63 char buffer[MAX_QPATH];
64 char *status1, *status2;
68 int y, i, prestep, flags;
82 memcpy(
layout, header,
sizeof(header) - 1);
83 total =
sizeof(header) - 1;
96 status2 =
cl->target->name;
98 status1 =
"observing";
102 "yv %d string \"%3d %-15.15s %3d %s%s\"",
103 y, i,
cl->cl->name,
cl->ping, status1, status2);
104 if (len >=
sizeof(buffer)) {
107 if (total + len >=
sizeof(
layout)) {
110 memcpy(
layout + total, buffer, len);
129 MSG_WriteData(
layout, total + 1);
Referenced by MVD_UpdateLayouts().
◆ MVD_LayoutFollow()
◆ MVD_LayoutMenu()
Definition at line 244 of file game.c.
246 static const char format[] =
247 "xv 32 yv 8 picn inventory "
248 "xv 0 yv 32 cstring \"\020Main Menu\021\" xv 56 "
249 "yv 48 string2 \"%c%s in-eyes mode\""
250 "yv 56 string2 \"%cShow scoreboard\""
251 "yv 64 string2 \"%cShow spectators (%d)\""
252 "yv 72 string2 \"%cShow channels (%d)\""
253 "yv 80 string2 \"%cLeave this channel\""
254 "yv 96 string \"%cIgnore spectator chat: %s\""
255 "yv 104 string \"%cIgnore connect msgs: %s\""
256 "yv 112 string \"%cIgnore player chat: %s\""
257 "yv 120 string \"%cIgnore player FOV: %7s\""
258 "yv 128 string \" (use 'set uf %d u' in cfg)\""
259 "yv 144 string2 \"%cExit menu\""
260 "%s xv %d yv 172 string2 " VERSION_STRING;
261 char layout[MAX_STRING_CHARS];
265 memset(cur, 0x20,
sizeof(cur));
269 cur[0], client->
target ?
"Leave" :
"Enter", cur[1],
272 cur[5], (client->
uf & UF_MUTE_OBSERVERS) ?
YES :
NO,
273 cur[6], (client->
uf & UF_MUTE_MISC) ?
YES :
NO,
274 cur[7], (client->
uf & UF_MUTE_PLAYERS) ?
YES :
NO,
275 cur[8], (client->
uf & UF_LOCALFOV) ?
YES :
279 "xv 0 yv 160 cstring [BUFFERING]" :
"",
284 MSG_WriteData(
layout, total + 1);
Referenced by MVD_UpdateLayouts().
◆ MVD_LayoutScores()
◆ MVD_LinkEdict()
void MVD_LinkEdict |
( |
mvd_t * |
mvd, |
|
|
edict_t * |
ent |
|
) |
| |
Definition at line 1652 of file game.c.
1656 bsp_t *cache =
mvd->cm.cache;
1662 if (ent->s.solid == PACKED_BSP) {
1663 index = ent->s.modelindex;
1664 if (index < 1 || index > cache->nummodels) {
1665 Com_WPrintf(
"%s: entity %d: bad inline model index: %d\n",
1666 __func__, ent->s.number, index);
1669 cm = &cache->models[index - 1];
1670 VectorCopy(cm->mins, ent->mins);
1671 VectorCopy(cm->maxs, ent->maxs);
1672 ent->solid = SOLID_BSP;
1673 }
else if (ent->s.solid) {
1674 MSG_UnpackSolid16(ent->s.solid, ent->mins, ent->maxs);
1675 ent->solid = SOLID_BBOX;
1677 VectorClear(ent->mins);
1678 VectorClear(ent->maxs);
1679 ent->solid = SOLID_NOT;
Referenced by MVD_ParsePacketEntities(), MVD_PlayerToEntityStates(), and MVD_Seek_f().
◆ MVD_MostFollowed()
Definition at line 575 of file game.c.
577 int count[MAX_CLIENTS];
580 int i, maxcount = -1;
582 memset(count, 0,
sizeof(count));
590 if (player->
inuse && player !=
mvd->
dummy && maxcount < count[i]) {
Referenced by MVD_GameClientBegin().
◆ MVD_NotifyClient()
Definition at line 2149 of file game.c.
2160 if (!
mvd->cm.cache) {
2162 "[MVD] GTV server doesn't have this map!\n");
2168 "[MVD] Buffering data, please wait...\n");
Referenced by MVD_UpdateClients().
◆ MVD_Observe_f()
◆ MVD_PartFilter()
◆ MVD_PointContents()
static int MVD_PointContents |
( |
vec3_t |
p | ) |
|
|
static |
◆ MVD_PrepWorldFrame()
Definition at line 2263 of file game.c.
2271 for (i = 1; i <
mvd->pool.num_edicts; i++) {
2272 ent = &
mvd->edicts[i];
2276 if (!(ent->s.renderfx & RF_BEAM)) {
2277 VectorCopy(ent->s.origin, ent->s.old_origin);
Referenced by SV_PrepWorldFrame().
◆ MVD_RemoveClient()
◆ MVD_Say_f()
Definition at line 881 of file game.c.
886 char text[150], hightext[150];
893 "[MVD] Spectators may not talk on this server.\n");
896 if (client->
uf & UF_MUTE_OBSERVERS) {
898 "[MVD] Please turn off ignore mode first.\n");
906 "[MVD] You can't talk for %u more seconds.\n",
907 (delay - delta) / 1000);
916 if (delta < treshold) {
918 "[MVD] You can't talk for %u seconds.\n", delay / 1000);
927 Q_snprintf(text,
sizeof(text),
"[MVD] %s: %s",
931 for (i = 0; text[i]; i++)
932 hightext[i] = text[i] | 128;
940 if (!client->
admin && (
other->uf & UF_MUTE_OBSERVERS)) {
944 if (
cl->protocol == PROTOCOL_VERSION_Q2PRO &&
945 cl->version >= PROTOCOL_VERSION_Q2PRO_SERVER_STATE) {
Referenced by MVD_GameClientCommand().
◆ MVD_SetDefaultLayout()
◆ MVD_SetFollowLayout()
◆ MVD_SetNewLayout()
◆ MVD_SetPlayer()
Definition at line 986 of file game.c.
995 if (i < 0 || i >=
mvd->maxclients) {
997 "[MVD] Player slot number %d is invalid.\n", i);
1004 "[MVD] Player slot number %d is not active.\n", i);
1018 if (!Q_stricmp(player->
name, s)) {
1021 if (Q_stristr(player->
name, s)) {
1029 "[MVD] No players matching '%s' found.\n", s);
1035 "[MVD] '%s' matches multiple players.\n", s);
Referenced by MVD_Follow_f().
◆ MVD_SetPlayerNames()
◆ MVD_SetServerState()
◆ MVD_SwitchChannel()
◆ MVD_TestTarget()
◆ MVD_ToggleLayout()
◆ MVD_Trace()
static trace_t q_gameabi MVD_Trace |
( |
vec3_t |
start, |
|
|
vec3_t |
mins, |
|
|
vec3_t |
maxs, |
|
|
vec3_t |
end |
|
) |
| |
|
static |
◆ MVD_TrySwitchChannel()
◆ MVD_UpdateClient()
Definition at line 649 of file game.c.
658 for (i = 0; i < MAX_STATS; i++) {
659 client->
ps.stats[i] =
mvd->
dummy->ps.stats[i];
664 client->
ps = target->
ps;
665 if ((client->
uf & UF_LOCALFOV) || (!(client->
uf & UF_PLAYERFOV)
666 && client->
ps.fov >= 90)) {
667 client->
ps.fov = client->
fov;
669 client->
ps.pmove.pm_flags |= PMF_NO_PREDICTION;
670 client->
ps.pmove.pm_type = PM_FREEZE;
676 for (i = 0; i < MAX_STATS; i++) {
678 client->
ps.stats[i] =
mvd->
dummy->ps.stats[i];
691 client->
ps.stats[STAT_FRAGS] = 0;
694 client->
ps.stats[STAT_FRAGS] =
mvd->id;
Referenced by MVD_FollowStart(), MVD_FollowStop(), MVD_GameClientBegin(), and MVD_UpdateClients().
◆ MVD_UpdateClients()
◆ MVD_UpdateConfigstring()
◆ MVD_UpdateLayouts()
◆ MVD_UpdateTarget()
◆ MVD_WriteDemoMessage()
static void MVD_WriteDemoMessage |
( |
mvd_t * |
mvd | ) |
|
|
static |
◆ print_channel()
Definition at line 1351 of file game.c.
1354 char buffer[MAX_QPATH];
1359 for (i = 0; i <
mvd->maxclients; i++) {
1364 len = strlen(player->
name);
1368 if (total + len + 2 >=
sizeof(buffer)) {
1372 buffer[total + 0] =
',';
1373 buffer[total + 1] =
' ';
1376 memcpy(buffer + total, player->
name, len);
1382 "%2d %-12.12s %-8.8s %3d %3d %s\n",
mvd->id,
1385 mvd->numplayers, buffer);
Referenced by mvd_channel_list_f().
◆ reset_unicast_strings()
static void reset_unicast_strings |
( |
mvd_t * |
mvd, |
|
|
int |
index |
|
) |
| |
|
static |
Definition at line 1551 of file game.c.
1557 for (i = 0; i <
mvd->maxclients; i++) {
1561 if (cs->
index == index) {
1562 Com_DPrintf(
"%s: reset %d on %d\n", __func__, index, i);
Referenced by MVD_UpdateConfigstring().
◆ set_player_name()
◆ update_player_name()
◆ write_cs_list()
◆ mvd_admin_password
cvar_t* mvd_admin_password |
|
static |
◆ mvd_chase_prefix
◆ mvd_clients
◆ mvd_dummy
◆ mvd_filter_version
cvar_t* mvd_filter_version |
|
static |
◆ mvd_flood_msgs
◆ mvd_flood_mute
◆ mvd_flood_persecond
cvar_t* mvd_flood_persecond |
|
static |
◆ mvd_flood_waitdelay
cvar_t* mvd_flood_waitdelay |
|
static |
◆ mvd_freeze_hack
◆ mvd_ge
◆ mvd_numplayers
◆ mvd_part_filter
◆ mvd_stats_hack
◆ mvd_stats_score
static cvar_t * mvd_chase_prefix
static void MVD_LayoutScores(mvd_client_t *client)
static void MVD_Commands_f(mvd_client_t *client)
static void MVD_GameReadGame(const char *filename)
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
cvar_t * Cvar_Set(const char *var_name, const char *value)
void CM_BoxTrace(trace_t *trace, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, mnode_t *headnode, int brushmask)
static cvar_t * mvd_filter_version
static void set_player_name(mvd_t *mvd, int index)
static void MVD_Invuse_f(mvd_client_t *client)
player_packed_t * players
byte chase_bitmap[MAX_CLIENTS/CHAR_BIT]
unsigned mvd_last_activity
static cvar_t * mvd_part_filter
static void MVD_TrySwitchChannel(mvd_client_t *client, mvd_t *mvd)
mvd_t * MVD_SetChannel(int arg)
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
static void MVD_Forward_f(mvd_client_t *client)
static void MVD_LayoutChannels(mvd_client_t *client)
static qboolean count_chase_bits(mvd_client_t *client)
static void MVD_GameInit(void)
static void MVD_GameClientThink(edict_t *ent, usercmd_t *cmd)
static mvd_player_t * MVD_HitPlayer(mvd_client_t *client)
static qboolean MVD_PartFilter(mvd_client_t *client)
void MVD_StopRecord(mvd_t *mvd)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
static void mvd_channel_list_f(mvd_client_t *client)
const char * Q_ErrorString(qerror_t error)
static qboolean MVD_TestTarget(mvd_client_t *client, mvd_player_t *target)
static cvar_t * mvd_flood_waitdelay
mvd_client_t * mvd_clients
static void MVD_GameShutdown(void)
static void MVD_UpdateTarget(mvd_client_t *client)
static void MVD_GameClientDisconnect(edict_t *ent)
static void MVD_SetServerState(client_t *cl, mvd_t *mvd)
static cvar_t * mvd_freeze_hack
static void MVD_UpdateLayouts(mvd_t *mvd)
static void MVD_SetFollowLayout(mvd_client_t *client)
mnode_t * CM_HeadnodeForBox(vec3_t mins, vec3_t maxs)
static void MVD_GameRunFrame(void)
#define SV_InfoSet(var, val)
layout(set=GOD_RAYS_DESC_SET_IDX, binding=0) uniform sampler2DArray TEX_SHADOW_MAP
size_t Q_vsnprintf(char *dest, size_t size, const char *fmt, va_list argptr)
static mvd_player_t * MVD_FollowNext(mvd_client_t *client, mvd_player_t *from)
static void MVD_GameWriteGame(const char *filename, qboolean autosave)
#define FOR_EACH_MVD(mvd)
void MSG_WriteByte(int c)
static void MVD_GameReadLevel(const char *filename)
static void MVD_LayoutMenu(mvd_client_t *client)
static void MVD_AutoFollow_f(mvd_client_t *client)
static void MVD_GameServerCommand(void)
void SV_ClientAddMessage(client_t *client, int flags)
void MVD_ParseEntityString(mvd_t *mvd, const char *data)
static void MVD_GameClientCommand(edict_t *ent)
static void MVD_FollowStop(mvd_client_t *client)
static void MVD_Admin_f(mvd_client_t *client)
char * Cmd_ArgsFrom(int from)
void BSP_Free(bsp_t *bsp)
static void MVD_GameClientUserinfoChanged(edict_t *ent, char *userinfo)
static void MVD_SetNewLayout(mvd_client_t *client, mvd_layout_t type)
void PF_Pmove(pmove_t *pm)
void Com_EndRedirect(void)
char * Info_ValueForKey(const char *s, const char *key)
char * va(const char *format,...)
static int MVD_PointContents(vec3_t p)
void SV_ClientCommand(client_t *client, const char *fmt,...)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
static cvar_t * mvd_stats_score
size_t Q_strlcpy(char *dst, const char *src, size_t size)
static void MVD_SetDefaultLayout(mvd_client_t *client)
static cvar_t * mvd_flood_mute
static int MVD_CountClients(mvd_t *mvd)
void * Z_ReservedAllocz(size_t size)
void MVD_BroadcastPrintf(mvd_t *mvd, int level, int mask, const char *fmt,...)
void MSG_WriteShort(int c)
static void print_channel(client_t *cl, mvd_t *mvd)
static void MVD_FollowStart(mvd_client_t *client, mvd_player_t *target)
void SV_LinkEdict(cm_t *cm, edict_t *ent)
void CM_TransformedBoxTrace(trace_t *trace, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, mnode_t *headnode, int brushmask, vec3_t origin, vec3_t angles)
static int mvd_numplayers
static void MVD_NotifyClient(mvd_client_t *client)
qboolean Com_WildCmpEx(const char *filter, const char *string, int term, qboolean ignorecase)
#define FOR_EACH_MVDCL(cl, mvd)
static mvd_player_t * MVD_FollowPrev(mvd_client_t *client, mvd_player_t *from)
void Z_TagReserve(size_t size, memtag_t tag)
static void MVD_ToggleLayout(mvd_client_t *client, mvd_layout_t type)
static cvar_t * mvd_stats_hack
ssize_t FS_Write(const void *buf, size_t len, qhandle_t f)
unsigned floodSamples[FLOOD_SAMPLES]
static void reset_unicast_strings(mvd_t *mvd, int index)
qboolean COM_IsUint(const char *s)
void MSG_WriteString(const char *string)
static void MVD_UpdateClient(mvd_client_t *client)
static void MVD_IntermissionStart(mvd_t *mvd)
int Cvar_ClampInteger(cvar_t *var, int min, int max)
static cvar_t * mvd_flood_msgs
void SV_ClientPrintf(client_t *client, int level, const char *fmt,...)
static void MVD_WriteDemoMessage(mvd_t *mvd)
static void update_player_name(mvd_t *mvd, int index)
static void MVD_GameWriteLevel(const char *filename)
static mvd_player_t * MVD_MostFollowed(mvd_t *mvd)
static void MVD_IntermissionStop(mvd_t *mvd)
static void MVD_GameClientBegin(edict_t *ent)
qerror_t BSP_Load(const char *name, bsp_t **bsp_p)
static void MVD_LayoutFollow(mvd_client_t *client)
static void MVD_Say_f(mvd_client_t *client, int argnum)
static cvar_t * mvd_admin_password
static void MVD_Join_f(mvd_client_t *client)
static void MVD_GameSpawnEntities(const char *mapname, const char *entstring, const char *spawnpoint)
static cvar_t * mvd_flood_persecond
static void MVD_Observe_f(mvd_client_t *client)
static void MVD_LayoutClients(mvd_client_t *client)
void MVD_SwitchChannel(mvd_client_t *client, mvd_t *mvd)
static void MVD_Clients_f(mvd_client_t *client)
size_t Q_scnprintf(char *dest, size_t size, const char *fmt,...)
static trace_t q_gameabi MVD_Trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
static void MVD_Follow_f(mvd_client_t *client)
static mvd_player_t * MVD_SetPlayer(mvd_client_t *client, const char *s)
#define MVD_InfoSet(var, val)
static int clamp_menu_cursor(mvd_client_t *client)
void SZ_Clear(sizebuf_t *buf)
void SV_ClientReset(client_t *client)
#define SV_ClientRedirect()
static qboolean MVD_GameClientConnect(edict_t *ent, char *userinfo)
static void write_cs_list(mvd_client_t *client, mvd_cs_t *cs)
char name[MAX_CLIENT_NAME]