icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
46 Com_Printf (
"Only dedicated servers use masters.\n");
104 if (s[0] >=
'0' && s[0] <=
'9')
117 Com_Printf (
"Client %i is not active\n", idnum);
128 if (!strcmp(
cl->name, s))
136 Com_Printf (
"Userid %s is not on the server\n", s);
200 f1 = fopen (src,
"rb");
203 f2 = fopen (dst,
"wb");
215 fwrite (
buffer, 1, l, f2);
234 Com_DPrintf(
"SV_CopySaveGame(%s, %s)\n", src, dst);
254 strcpy (
name+len, found+len);
261 strcpy (
name+l-3,
"sv2");
263 strcpy (name2+l-3,
"sv2");
286 f = fopen(
name,
"wb");
314 f = fopen(
name,
"rb");
343 Com_DPrintf(
"SV_WriteServerFile(%s)\n", autosave ?
"true" :
"false");
346 f = fopen (
name,
"wb");
353 memset (comment, 0,
sizeof(comment));
358 newtime = localtime (&aclock);
359 Com_sprintf (comment,
sizeof(comment),
"%2i:%i%i %2i/%2i ", newtime->tm_hour
360 , newtime->tm_min/10, newtime->tm_min%10,
361 newtime->tm_mon+1, newtime->tm_mday);
369 fwrite (comment, 1,
sizeof(comment), f);
380 if (strlen(var->
name) >=
sizeof(
name)-1
381 || strlen(var->
string) >=
sizeof(
string)-1)
387 memset (
string, 0,
sizeof(
string));
389 strcpy (
string, var->
string);
391 fwrite (
string, 1,
sizeof(
string), f);
417 f = fopen (
name,
"rb");
424 FS_Read (comment,
sizeof(comment), f);
427 FS_Read (mapcmd,
sizeof(mapcmd), f);
433 if (!fread (
name, 1,
sizeof(
name), f))
435 FS_Read (
string,
sizeof(
string), f);
522 savedInuse[
i] =
cl->edict->inuse;
523 cl->edict->inuse =
false;
530 cl->edict->inuse = savedInuse[
i];
564 if (!strstr (map,
"."))
566 Com_sprintf (expanded,
sizeof(expanded),
"maps/%s.bsp", map);
609 if (strstr (dir,
"..") || strstr (dir,
"/") || strstr (dir,
"\\") )
616 f = fopen (
name,
"rb");
647 Com_Printf (
"You must be in a game to save.\n");
659 Com_Printf (
"Can't savegame in a deathmatch\n");
663 if (!strcmp (
Cmd_Argv(1),
"current"))
671 Com_Printf (
"\nCan't savegame while dead!\n");
676 if (strstr (dir,
"..") || strstr (dir,
"/") || strstr (dir,
"\\") )
750 Com_Printf (
"num score ping name lastmsg address qport \n");
751 Com_Printf (
"--- ----- ---- --------------- ------- --------------------- ------\n");
765 ping =
cl->ping < 9999 ?
cl->ping : 9999;
770 l = 16 - strlen(
cl->name);
771 for (
j=0 ;
j<l ;
j++)
779 for (
j=0 ;
j<l ;
j++)
804 strcpy (text,
"console: ");
885 byte buf_data[32768];
904 Com_Printf (
"You must be in a level to record.\n");
928 SZ_Init (&buf, buf_data,
sizeof(buf_data));
void FS_Read(void *buffer, int len, FILE *f)
void(* ReadGame)(char *filename)
void SV_Serverinfo_f(void)
void SV_WipeSavegame(char *savename)
void CM_WritePortalState(FILE *f)
void SV_ServerRecord_f(void)
struct gclient_s * client
void MSG_WriteLong(sizebuf_t *sb, int c)
void SV_BroadcastPrintf(int level, char *fmt,...)
void SV_CopySaveGame(char *src, char *dst)
char * NET_AdrToString(netadr_t a)
void SZ_Init(sizebuf_t *buf, byte *data, int length)
void FS_CreatePath(char *path)
qboolean NET_StringToAdr(char *s, netadr_t *a)
char * va(char *format,...)
cvar_t * Cvar_ForceSet(char *var_name, char *value)
byte demo_multicast_buf[MAX_MSGLEN]
char * Sys_FindFirst(char *path, unsigned musthave, unsigned canthave)
void SV_KillServer_f(void)
void SV_Heartbeat_f(void)
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
void SV_WriteServerFile(qboolean autosave)
int FS_LoadFile(char *path, void **buffer)
void SV_ReadServerFile(void)
void SV_DropClient(client_t *drop)
void(* ServerCommand)(void)
netadr_t master_adr[MAX_MASTERS]
void MSG_WriteString(sizebuf_t *sb, char *s)
void MSG_WriteShort(sizebuf_t *sb, int c)
void(* ReadLevel)(char *filename)
void MSG_WriteByte(sizebuf_t *sb, int c)
void SV_SetMaster_f(void)
void CM_ReadPortalState(FILE *f)
#define MAX_CONFIGSTRINGS
void NET_Config(qboolean multiplayer)
void SV_Shutdown(char *finalmsg, qboolean reconnect)
void SV_ClientPrintf(client_t *cl, int level, char *fmt,...)
char * Sys_FindNext(unsigned musthave, unsigned canthave)
void(* WriteLevel)(char *filename)
void CopyFile(char *src, char *dst)
void SV_ServerCommand_f(void)
void SV_WriteLevelFile(void)
char mapcmd[MAX_TOKEN_CHARS]
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
cvar_t * Cvar_Set(char *var_name, char *value)
void Com_DPrintf(char *fmt,...)
void Com_Printf(char *fmt,...)
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
void SV_ReadLevelFile(void)
char * Cvar_VariableString(char *var_name)
qboolean SV_SetPlayer(void)
void SV_ServerStop_f(void)
void(* WriteGame)(char *filename, qboolean autosave)
void SV_Map(qboolean attractloop, char *levelstring, qboolean loadgame)
char userinfo[MAX_INFO_STRING]
char * Cvar_Serverinfo(void)
void Com_sprintf(char *dest, int size, char *fmt,...)
float Cvar_VariableValue(char *var_name)
void SV_InitOperatorCommands(void)