diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index b75705f17..6dc41ae32 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -1462,8 +1462,10 @@ void CL_QTVPoll (void) int sourcenum = 0; int streamid; - int numplayers; - int numviewers; + int numplayers = 0; + int numviewers = 0; + qboolean init_numplayers = false; + qboolean init_numviewers = false; char srchost[256]; @@ -1542,11 +1544,13 @@ void CL_QTVPoll (void) { //number of active players actually playing on that stream numplayers = atoi(colon); + init_numplayers = true; } else if (!strcmp(s, "SRCVIEWS")) { //number of people watching this stream on the proxy itself numviewers = atoi(colon); + init_numviewers = true; } else if (!strcmp(s, "SRCID")) { @@ -1562,7 +1566,10 @@ void CL_QTVPoll (void) MC_AddPicture(sourcesmenu, 16, 4, "gfx/qplaque.lmp"); MC_AddCenterPicture(sourcesmenu, 4, "gfx/p_option.lmp"); } - MC_AddConsoleCommand(sourcesmenu, 42, (sourcenum++)*8 + 32, va("%s (p%i, v%i)", srchost, numplayers, numviewers), va("qtvplay %i@%s\n", streamid, qtvhostname)); + if (init_numplayers == true && init_numviewers == true) + MC_AddConsoleCommand(sourcesmenu, 42, (sourcenum++)*8 + 32, va("%s (p%i, v%i)", srchost, numplayers, numviewers), va("qtvplay %i@%s\n", streamid, qtvhostname)); + //else + // FIXME: add error message here } //end of sourcelist entry diff --git a/engine/client/image.c b/engine/client/image.c index d715335f4..1a3282ab0 100644 --- a/engine/client/image.c +++ b/engine/client/image.c @@ -875,7 +875,6 @@ term_source (j_decompress_ptr cinfo) } -#define GLOBAL(x) x GLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, qbyte * infile, int maxlen) diff --git a/engine/client/render.h b/engine/client/render.h index e63d6d513..0bbaed5ac 100644 --- a/engine/client/render.h +++ b/engine/client/render.h @@ -428,6 +428,10 @@ void Media_RecordFrame (void); qboolean Media_PausedDemo (void); double Media_TweekCaptureFrameTime(double time); +void MYgluPerspective(double fovx, double fovy, double zNear, double zFar); + +void R_MarkLeaves (void); +void R_SetFrustum (void); void R_SetRenderer(int wanted); void RQ_Init(void); diff --git a/engine/common/log.c b/engine/common/log.c index 572aeda84..f6dcc91a1 100644 --- a/engine/common/log.c +++ b/engine/common/log.c @@ -6,12 +6,6 @@ void Log_Dir_Callback (struct cvar_s *var, char *oldvalue); void Log_Name_Callback (struct cvar_s *var, char *oldvalue); -typedef enum { - LOG_CONSOLE, - LOG_PLAYER, - LOG_TYPES -} logtype_t; - // cvars #define CONLOGGROUP "Console logging" cvar_t log_enable[LOG_TYPES] = { SCVARF("log_enable", "0", CVAR_NOTFROMSERVER), diff --git a/engine/server/server.h b/engine/server/server.h index df28dfeaa..15ee785ab 100644 --- a/engine/server/server.h +++ b/engine/server/server.h @@ -996,6 +996,7 @@ void SV_MulticastProtExt(vec3_t origin, multicast_t to, int dimension_mask, int void SV_StartSound (edict_t *entity, int channel, char *sample, int volume, float attenuation); +void SV_PrintToClient(client_t *cl, int level, char *string); void VARGS SV_ClientPrintf (client_t *cl, int level, char *fmt, ...); void VARGS SV_ClientTPrintf (client_t *cl, int level, translation_t text, ...); void VARGS SV_BroadcastPrintf (int level, char *fmt, ...); @@ -1025,6 +1026,9 @@ void VoteFlushAll(void); void SV_SetUpClientEdict (client_t *cl, edict_t *ent); void SV_UpdateToReliableMessages (void); +void SV_DarkPlacesDownloadChunk(client_t *cl, sizebuf_t *msg); +void SV_New_f (void); + //sv_master.c void SVM_Think(int port); @@ -1186,6 +1190,45 @@ void SV_ConSay_f(void); // // sv_mvd.c // +//qtv proxies are meant to send a small header now, bit like http +//this header gives supported version numbers and stuff +typedef struct mvdpendingdest_s { + qboolean error; //disables writers, quit ASAP. + int socket; + + char inbuffer[2048]; + char outbuffer[2048]; + + char challenge[64]; + qboolean hasauthed; + qboolean isreverse; + + int insize; + int outsize; + + struct mvdpendingdest_s *nextdest; +} mvdpendingdest_t; + +typedef struct mvddest_s { + qboolean error; //disables writers, quit ASAP. + qboolean droponmapchange; + + enum {DEST_NONE, DEST_FILE, DEST_BUFFEREDFILE, DEST_STREAM} desttype; + + int socket; + FILE *file; + + char name[MAX_QPATH]; + char path[MAX_QPATH]; + + char *cache; + int cacheused; + int maxcachesize; + + unsigned int totalsize; + + struct mvddest_s *nextdest; +} mvddest_t; void SV_MVDPings (void); void SV_MVDWriteToDisk(int type, int to, float time); void MVDWrite_Begin(qbyte type, int to, int size); @@ -1194,6 +1237,8 @@ void SV_MVDStop (int reason, qboolean mvdonly); void SV_MVDStop_f (void); void SV_MVDWritePackets (int num); void MVD_Init (void); +void SV_MVD_RunPendingConnections(void); +void SV_MVD_SendInitialGamestate(mvddest_t *dest); extern demo_t demo; // server demo struct @@ -1209,6 +1254,7 @@ char *SV_MVDNum(int num); //filename for demonum void SV_SendMVDMessage(void); qboolean SV_ReadMVD (void); void SV_FlushDemoSignon (void); +void DestFlush(qboolean compleate); // savegame.c void SV_FlushLevelCache(void); @@ -1240,3 +1286,19 @@ typedef struct char str[128]; } date_t; void SV_TimeOfDay(date_t *date); + +// +// log.c +// +typedef enum { + LOG_CONSOLE, + LOG_PLAYER, + LOG_TYPES +} logtype_t; +void Log_Dir_Callback (struct cvar_s *var, char *oldvalue); +void Log_Name_Callback (struct cvar_s *var, char *oldvalue); +void Log_String (logtype_t lognum, char *s); +void Con_Log (char *s); +void SV_LogPlayer(client_t *cl, char *msg); +void Log_Logfile_f (void); +void Log_Init(void); diff --git a/engine/server/sv_mvd.c b/engine/server/sv_mvd.c index 65e80cefa..c49dddb87 100644 --- a/engine/server/sv_mvd.c +++ b/engine/server/sv_mvd.c @@ -30,45 +30,6 @@ void SV_MVDStop_f (void); #define demo_size_padding 0x1000 -//qtv proxies are meant to send a small header now, bit like http -//this header gives supported version numbers and stuff -typedef struct mvdpendingdest_s { - qboolean error; //disables writers, quit ASAP. - int socket; - - char inbuffer[2048]; - char outbuffer[2048]; - - char challenge[64]; - qboolean hasauthed; - qboolean isreverse; - - int insize; - int outsize; - - struct mvdpendingdest_s *nextdest; -} mvdpendingdest_t; - -typedef struct mvddest_s { - qboolean error; //disables writers, quit ASAP. - qboolean droponmapchange; - - enum {DEST_NONE, DEST_FILE, DEST_BUFFEREDFILE, DEST_STREAM} desttype; - - int socket; - FILE *file; - - char name[MAX_QPATH]; - char path[MAX_QPATH]; - - char *cache; - int cacheused; - int maxcachesize; - - unsigned int totalsize; - - struct mvddest_s *nextdest; -} mvddest_t; mvddest_t *singledest; mvddest_t *SV_InitStream(int socket);