From 51da6d3abf355f580538913c8cb6ee6fcfd43ed8 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 24 Jan 2005 23:47:32 +0000 Subject: [PATCH] Fixed some warnings and stuph. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@829 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/Makefile | 8 +++++--- engine/client/cl_parse.c | 4 +++- engine/client/client.h | 1 + engine/client/console.c | 2 +- engine/client/m_master.c | 2 +- engine/client/merged.h | 2 ++ engine/client/renderer.c | 3 ++- engine/client/screen.h | 2 ++ engine/common/common.c | 11 +++++------ engine/common/common.h | 2 ++ engine/common/gl_q2bsp.c | 5 ++--- engine/common/plugin.c | 12 ++++++------ engine/common/protocol.h | 2 +- engine/gl/gl_alias.c | 2 +- engine/gl/gl_backend.c | 4 ++-- engine/gl/gl_ppl.c | 7 ------- engine/gl/gl_rmain.c | 11 ++++++----- engine/gl/gl_screen.c | 2 +- engine/gl/gl_shader.c | 3 ++- engine/gl/gl_vidcommon.c | 2 +- engine/gl/gl_warp.c | 4 ++-- engine/gl/glmod_doom.c | 18 +++--------------- engine/gl/glquake.h | 1 + engine/qclib/progslib.h | 2 +- engine/server/sv_ents.c | 2 +- engine/server/sv_main.c | 8 ++++++-- engine/server/sv_send.c | 2 +- engine/server/sv_user.c | 14 +++++++++++--- 28 files changed, 72 insertions(+), 66 deletions(-) diff --git a/engine/Makefile b/engine/Makefile index d1c397bf2..66dd0c69e 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -25,7 +25,8 @@ SERVER_DIR=$(BASE_DIR)/server COMMON_DIR=$(BASE_DIR)/common NQPROT_DIR=$(BASE_DIR)/nqnet HTTP_DIR=$(BASE_DIR)/http -LIBS_DIR=$(BASE_DIR)/libs +#LIBS_DIR=$(BASE_DIR)/libs +LIBS_DIR?=. PROGS_DIR=$(BASE_DIR)/qclib SNDCODEC_DIR=$(BASE_DIR)/sndcodec MP3_DIR=$(BASE_DIR)/../mp3/libmad @@ -330,6 +331,7 @@ SV_CFLAGS=$(SERVER_ONLY_CFLAGS) #specific targets override those defaults as needed. ifeq ($(FTE_TARGET),win32) + LIBS_DIR = $(BASE_DIR)/libs SV_EXE_NAME=../fteqwsv.exe SV_LDFLAGS=libs/zlib.lib -lwsock32 SV_DIR=sv_mingw @@ -438,8 +440,8 @@ endif #which is needed as windows sucks too much for the chaining to carry a full list. #god knows how gcc loads the list properly. #or at least I hope he does. It makes no sence to mortals. -$(OUT_DIR)/$(EXE_NAME): $(addprefix $(OUT_DIR)/, $(foreach ol, $(OBJS), $($(ol)))) - $(CC) $(WCFLAGS) -o $@ $(addprefix $(OUT_DIR)/, $(foreach ol, $(OBJS), $($(ol)))) $(LDFLAGS) $(CFLAGS) +$(OUT_DIR)/$(EXE_NAME): $(addprefix $(OUT_DIR)/, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol)))) + $(CC) $(WCFLAGS) -o $@ $(addprefix $(OUT_DIR)/, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol)))) $(LDFLAGS) $(CFLAGS) _out-rel: $(MAKE) $(OUT_DIR)/$(EXE_NAME) EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(WCFLAGS) $(RELEASE_CFLAGS)" LDFLAGS="$(BASELDFLAGS) $(LDFLAGS)" OBJS="$(OBJS)" diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index fa17e18eb..7510a2747 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -1593,12 +1593,14 @@ void CL_ParseServerData (void) Con_TPrintf (TLC_PC_PS_NL, 2, str); memset(cl.sound_name, 0, sizeof(cl.sound_name)); - if (cls.fteprotocolextensions & PEXT_PK3DOWNLOADS) +#ifdef PEXT_PK3DOWNLOADS + if (cls.fteprotocolextensions & PEXT_PK3DOWNLOADS) //instead of going for a soundlist, go for the pk3 list instead. The server will make us go for the soundlist after. { MSG_WriteByte (&cls.netchan.message, clc_stringcmd); MSG_WriteString (&cls.netchan.message, va("pk3list %i 0", cl.servercount, 0)); } else +#endif { // ask for the sound list next MSG_WriteByte (&cls.netchan.message, clc_stringcmd); diff --git a/engine/client/client.h b/engine/client/client.h index dd6aa32d9..4b9ac86ed 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -794,6 +794,7 @@ void Skin_Skins_f (void); void Skin_FlushSkin(char *name); void Skin_AllSkins_f (void); void Skin_NextDownload (void); +void Skin_FlushPlayers(void); #define RSSHOT_WIDTH 320 #define RSSHOT_HEIGHT 200 diff --git a/engine/client/console.c b/engine/client/console.c index 28817cc3b..9ce3a8c8c 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -1069,7 +1069,7 @@ void Con_DrawNotify (void) Draw_ColouredCharacter ( (x+skip)<<3, v, s[x]|mask); x++; } - Draw_ColouredCharacter ( (x+skip)<<3, v, 10+((int)(realtime*con_cursorspeed)&1)|M_COLOR_WHITE); + Draw_ColouredCharacter ( (x+skip)<<3, v, (10+((int)(realtime*con_cursorspeed)&1))|M_COLOR_WHITE); v += 8; } diff --git a/engine/client/m_master.c b/engine/client/m_master.c index 8db729471..00054047b 100644 --- a/engine/client/m_master.c +++ b/engine/client/m_master.c @@ -73,7 +73,7 @@ static void NM_Print (int cx, int cy, qbyte *str) { while (*str) { - Draw_ColouredCharacter (cx, cy, (*str)|128+M_COLOR_WHITE); + Draw_ColouredCharacter (cx, cy, (*str)|128|M_COLOR_WHITE); str++; cx += 8; } diff --git a/engine/client/merged.h b/engine/client/merged.h index 423749e55..3c64eeb90 100644 --- a/engine/client/merged.h +++ b/engine/client/merged.h @@ -108,6 +108,8 @@ extern int (*Mod_TagNumForName) (struct model_s *model, char *name); #undef FNC +void Draw_FunString(int x, int y, char *str); + #ifdef SERVERONLY #define Mod_Q1LeafPVS Mod_LeafPVS diff --git a/engine/client/renderer.c b/engine/client/renderer.c index 468ad8a8e..9291a8b91 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -176,6 +176,7 @@ cvar_t scr_allowsnap = {"scr_allowsnap", "1", NULL, CVAR_NOTFROMSERVER}; //oth cvar_t scr_chatmodecvar = {"scr_chatmode", "0"}; #ifdef Q3SHADERS +cvar_t gl_shadeq3 = {"gl_shadeq3", "1"}; //use if you want. extern cvar_t r_vertexlight; cvar_t gl_shadeq1 = {"gl_shadeq1", "0", NULL, CVAR_CHEAT}; //FIXME: :( cvar_t gl_shadeq1_name = {"gl_shadeq1_name", "*"}; @@ -339,6 +340,7 @@ void GLRenderer_Init(void) Cvar_Register (&r_vertexlight, GLRENDEREROPTIONS); Cvar_Register (&gl_shadeq1, GLRENDEREROPTIONS); Cvar_Register (&gl_shadeq1_name, GLRENDEREROPTIONS); + Cvar_Register (&gl_shadeq3, GLRENDEREROPTIONS); #endif } #endif @@ -1377,7 +1379,6 @@ qboolean R_ApplyRenderer (rendererstate_t *newr) host_basepal = (qbyte *)COM_LoadMallocFile ("gfx/palette.lmp"); if (!host_basepal) { - extern char com_basedir[MAX_OSPATH]; qbyte *pcx=NULL; host_basepal = BZ_Malloc(768); pcx = COM_LoadTempFile("pics/colormap.pcx"); diff --git a/engine/client/screen.h b/engine/client/screen.h index 6efcd2b7c..d1c529d3b 100644 --- a/engine/client/screen.h +++ b/engine/client/screen.h @@ -92,3 +92,5 @@ void SCR_ShowPic_Clear(void); //a header is better than none... void Draw_TextBox (int x, int y, int width, int lines); void SCR_ScreenShot (char *filename); + +void SCR_DrawTwoDimensional(int uimenu, qboolean nohud); diff --git a/engine/common/common.c b/engine/common/common.c index e09cbb5a6..c74e7c2ea 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -2301,12 +2301,11 @@ char com_basedir[MAX_OSPATH]; #ifdef _WIN32 #pragma comment( lib, "../libs/zlib.lib" ) #endif -#ifndef __linux__ -#define uShort ZLIBuShort -#define uLong ZLIBuLong -#else -//typedef unsigned short uShort; -#endif + +//#define uShort ZLIBuShort +//#define uLong ZLIBuLong + +#include #include "unzip.c" typedef struct zipfile_s diff --git a/engine/common/common.h b/engine/common/common.h index 0125603b7..6861ea831 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -162,6 +162,8 @@ void MSG_ReadData (void *data, int len); char *Q_strcpyline(char *out, char *in, int maxlen); //stops at '\n' (and '\r') +char *Q_strlwr(char *str); + #define Q_memset(d, f, c) memset((d), (f), (c)) #define Q_memcpy(d, s, c) memcpy((d), (s), (c)) #define Q_memcmp(m1, m2, c) memcmp((m1), (m2), (c)) diff --git a/engine/common/gl_q2bsp.c b/engine/common/gl_q2bsp.c index 3869809bf..3ae693b02 100644 --- a/engine/common/gl_q2bsp.c +++ b/engine/common/gl_q2bsp.c @@ -1296,7 +1296,6 @@ void CMod_LoadFaces (lump_t *l) int i, count, surfnum; int planenum, side; int ti; - extern qboolean r_usinglits; in = (void *)(cmod_base + l->fileofs); if (l->filelen % sizeof(*in)) @@ -2263,9 +2262,9 @@ void CModQ3_LoadRFaces (lump_t *l) mesh_t *mesh; - extern cvar_t gl_shaders; + extern cvar_t gl_shadeq3; - int shaders = 1;//0;//gl_shaders.value; + int shaders = gl_shadeq3.value; in = (void *)(mod_base + l->fileofs); diff --git a/engine/common/plugin.c b/engine/common/plugin.c index 38cd81432..c334350bd 100644 --- a/engine/common/plugin.c +++ b/engine/common/plugin.c @@ -156,7 +156,7 @@ static int EXPORT_FN Plug_SystemCalls(int arg, ...) plugin_t *Plug_Load(char *file) { plugin_t *newplug; - int argarray; + long argarray; for (newplug = plugs; newplug; newplug = newplug->next) { @@ -175,7 +175,7 @@ plugin_t *Plug_Load(char *file) newplug->next = plugs; plugs = newplug; - argarray = (int)"Plug_GetEngineFunction"; + argarray = (long)"Plug_GetEngineFunction"; VM_Call(newplug->vm, 0, Plug_FindBuiltin(NULL, ~0, &argarray)); if (newplug->reschange) @@ -496,7 +496,7 @@ int Plug_Draw_Fill(void *offset, unsigned int mask, const long *arg) y = VM_FLOAT(arg[1]); width = VM_FLOAT(arg[2]); height = VM_FLOAT(arg[3]); - switch(qrenderer) + switch(qrenderer) //FIXME: I don't want qrenderer seen outside the refresh { #ifdef RGLQUAKE case QR_OPENGL: @@ -510,11 +510,12 @@ int Plug_Draw_Fill(void *offset, unsigned int mask, const long *arg) qglEnable(GL_TEXTURE_2D); return 1; #endif + default: + break; } return 0; } -//hrm.... FIXME! int Plug_Draw_ColourP(void *offset, unsigned int mask, const long *arg) { qbyte *pal = host_basepal + VM_LONG(arg[0])*3; @@ -589,7 +590,6 @@ int Plug_Cvar_SetFloat(void *offset, unsigned int mask, const long *arg) int Plug_Cvar_GetFloat(void *offset, unsigned int mask, const long *arg) { char *name = VM_POINTER(arg[0]); - float value = VM_FLOAT(arg[1]); int ret; cvar_t *var = Cvar_Get(name, "", 0, "Plugin vars"); if (var) @@ -976,7 +976,7 @@ void Plug_Close_f(void) } for (plug = plugs; plug; plug = plug->next) { - if (!strcmp(plug->name, Cmd_Argv(1))) + if (!strcmp(plug->name, name)) { Plug_Close(plug); return; diff --git a/engine/common/protocol.h b/engine/common/protocol.h index 4d09a1252..20a95dab8 100644 --- a/engine/common/protocol.h +++ b/engine/common/protocol.h @@ -55,7 +55,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //#define PEXT_64PLAYERS 0x02000000 //Client is able to cope with 64 players. Wow. #define PEXT_SHOWPIC 0x04000000 #define PEXT_SETATTACHMENT 0x08000000 //md3 tags (needs networking, they need to lerp). -#define PEXT_PK3DOWNLOADS 0x10000000 //retrieve a list of pk3s/pk3s/paks for downloading (with optional URL and crcs) +//#define PEXT_PK3DOWNLOADS 0x10000000 //retrieve a list of pk3s/pk3s/paks for downloading (with optional URL and crcs) #ifdef _DEBUG #define PEXT_CHUNKEDDOWNLOADS 0x20000000 //alternate file download method. Hopefully it'll give quadroupled download speed, especially on higher pings. #endif diff --git a/engine/gl/gl_alias.c b/engine/gl/gl_alias.c index 0437a76ce..e563b31ea 100644 --- a/engine/gl/gl_alias.c +++ b/engine/gl/gl_alias.c @@ -3253,4 +3253,4 @@ void GLMod_LoadZymoticModel(model_t *mod, void *buffer) } #endif -#endif \ No newline at end of file +#endif diff --git a/engine/gl/gl_backend.c b/engine/gl/gl_backend.c index 6129fd60d..02cee5d05 100644 --- a/engine/gl/gl_backend.c +++ b/engine/gl/gl_backend.c @@ -2334,7 +2334,7 @@ void R_RenderMeshCombined ( meshbuffer_t *mb, shaderpass_t *pass ) break; case GL_DECAL: - // mimics Alpha-Blending in upper texture stage, but instead of multiplying the alpha-channel, they´re added + // mimics Alpha-Blending in upper texture stage, but instead of multiplying the alpha-channel, theyre added // this way it can be possible to use GL_DECAL in both texture-units, while still looking good // normal mutlitexturing would multiply the alpha-channel which looks ugly GL_TexEnv (GL_COMBINE_EXT); @@ -2757,4 +2757,4 @@ void R_FinishMeshBuffer ( meshbuffer_t *mb ) -#endif \ No newline at end of file +#endif diff --git a/engine/gl/gl_ppl.c b/engine/gl/gl_ppl.c index 16231e772..f8181f932 100644 --- a/engine/gl/gl_ppl.c +++ b/engine/gl/gl_ppl.c @@ -84,10 +84,6 @@ static unsigned int varray_i_polytotri[MAXARRAYVERTS]; //012 023 034 045... int varray_ic; int varray_vc; -#ifdef Q3SHADERS -static qboolean pplvarrayactive; -#endif - #define inline static extern qboolean varrayactive; //used by the backend @@ -1311,10 +1307,7 @@ static void PPL_BaseChain_Flat(msurface_t *first) static void PPL_BaseChain_NPR_Sketch(msurface_t *first) { - static vec_t wallcolour[4] = {0,0,0,1}; - static vec_t floorcolour[4] = {0,0,0,1}; msurface_t *s; - int iswall = -1; int vi=-10; int i; glRect_t *theRect; diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 65451162e..23e6c9ad0 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -949,17 +949,19 @@ void R_PolyBlend (void) //Con_Printf("R_PolyBlend(): %4.2f %4.2f %4.2f %4.2f\n",v_blend[0], v_blend[1], v_blend[2], v_blend[3]); - GL_DisableMultitexture(); + GL_DisableMultitexture(); qglDisable (GL_ALPHA_TEST); qglEnable (GL_BLEND); qglDisable (GL_DEPTH_TEST); qglDisable (GL_TEXTURE_2D); + + qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - qglLoadIdentity (); + qglLoadIdentity (); - qglRotatef (-90, 1, 0, 0); // put Z going up - qglRotatef (90, 0, 0, 1); // put Z going up + qglRotatef (-90, 1, 0, 0); // put Z going up + qglRotatef (90, 0, 0, 1); // put Z going up qglColor4fv (v_blend); @@ -1864,7 +1866,6 @@ void GLR_RenderView (void) // we check if we need to use any shaders - currently it's just waterwarp if ((gl_config.arb_shader_objects) && (r_waterwarp.value && r_viewleaf && r_viewleaf->contents <= Q1CONTENTS_WATER)) { - extern int char_texture; float vwidth = 1, vheight = 1; float vs, vt; diff --git a/engine/gl/gl_screen.c b/engine/gl/gl_screen.c index 773b0f7ec..90baf1f41 100644 --- a/engine/gl/gl_screen.c +++ b/engine/gl/gl_screen.c @@ -129,7 +129,7 @@ void GLSCR_UpdateScreen (void) static float old2dscale=1; int uimenu; #ifdef TEXTEDITOR - extern qboolean editormodal, editoractive; + extern qboolean editormodal; #endif qboolean nohud; RSpeedMark(); diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c index 3718bd460..a76cc530f 100644 --- a/engine/gl/gl_shader.c +++ b/engine/gl/gl_shader.c @@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include + //Spike: Marked code removal areas with FIZME //readd as porting progresses @@ -215,7 +216,7 @@ static char *Shader_ParseString ( char **ptr ) } token = COM_ParseExt ( ptr, false ); - strlwr ( token ); + Q_strlwr ( token ); return token; } diff --git a/engine/gl/gl_vidcommon.c b/engine/gl/gl_vidcommon.c index 5c958c485..4122ab70e 100644 --- a/engine/gl/gl_vidcommon.c +++ b/engine/gl/gl_vidcommon.c @@ -367,7 +367,7 @@ GLhandleARB GLSlang_CreateShader (char *shadersource, int shadertype) shader = qglCreateShaderObjectARB(type); - qglShaderSourceARB(shader, 1, &shadersource, NULL); + qglShaderSourceARB(shader, 1, (const GLcharARB**)&shadersource, NULL); qglCompileShaderARB(shader); qglGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &compiled); diff --git a/engine/gl/gl_warp.c b/engine/gl/gl_warp.c index 6b9a5f955..79cd5c5b4 100644 --- a/engine/gl/gl_warp.c +++ b/engine/gl/gl_warp.c @@ -986,7 +986,7 @@ void GLR_InitSky (texture_t *mt) ((qbyte *)&transpix)[3] = 0; sprintf(name, "%s_solid", mt->name); - strlwr(name); + Q_strlwr(name); solidskytexture = Mod_LoadReplacementTexture(name, true, false, true); if (!solidskytexture) solidskytexture = GL_LoadTexture32(name, 128, 128, trans, true, false); @@ -1011,7 +1011,7 @@ void GLR_InitSky (texture_t *mt) } sprintf(name, "%s_trans", mt->name); - strlwr(name); + Q_strlwr(name); alphaskytexture = Mod_LoadReplacementTexture(name, true, true, true); if (!alphaskytexture) alphaskytexture = GL_LoadTexture32(name, 128, 128, trans, true, true); diff --git a/engine/gl/glmod_doom.c b/engine/gl/glmod_doom.c index 941a7107e..c012dec22 100644 --- a/engine/gl/glmod_doom.c +++ b/engine/gl/glmod_doom.c @@ -1,18 +1,6 @@ #include "quakedef.h" #include "glquake.h" -#ifdef __linux__ -void strlwr(char *s) -{ - while(*s) - { - if (*s >= 'A' && *s <= 'Z') - *s -= 'A' + 'a'; - s++; - } -} -#endif - #ifdef DOOMWADS vec_t VectorNormalize2 (vec3_t v, vec3_t out); @@ -286,13 +274,13 @@ int Doom_LoadFlat(char *name) Doom_LoadPalette(); sprintf(texname, "flat-%-.8s", name); - strlwr(texname); + Q_strlwr(texname); tex = Mod_LoadReplacementTexture(texname, true, false, true); if (tex) return tex; sprintf(texname, "flats/%-.8s", name); - strlwr(texname); + Q_strlwr(texname); file = COM_LoadMallocFile(texname); if (file) { @@ -1136,7 +1124,7 @@ static int Doom_LoadPatchFromTexWad(char *name, void *texlump, unsigned short *w for (i = 0; i < tx->componantcount; i++, tc++) { strncpy(patch+8, pnames+4+8*tc->patchnum, 8); - strlwr(patch+8); + Q_strlwr(patch+8); patch[16] = '\0'; Doom_ExtractPName(tex, (doomimage_t *)COM_LoadTempFile(patch), tx->width, tx->height, tc->xoffset, tc->yoffset); diff --git a/engine/gl/glquake.h b/engine/gl/glquake.h index 8452bce92..4f965256d 100644 --- a/engine/gl/glquake.h +++ b/engine/gl/glquake.h @@ -255,6 +255,7 @@ extern qboolean gl_mtexable; void GL_DisableMultitexture(void); void GL_EnableMultitexture(void); +void GL_SelectTexture (GLenum target); // // vid_gl*.c diff --git a/engine/qclib/progslib.h b/engine/qclib/progslib.h index 8753b4969..93ea7d876 100644 --- a/engine/qclib/progslib.h +++ b/engine/qclib/progslib.h @@ -166,7 +166,7 @@ typedef struct progexterns_s { } progparms_t, progexterns_t; void QC_AddSharedVar(progfuncs_t *progfuncs, int start, int size); - +void QC_AddSharedFieldVar(progfuncs_t *progfuncs, int num); #if defined(QCLIBDLL_EXPORTS) __declspec(dllexport) diff --git a/engine/server/sv_ents.c b/engine/server/sv_ents.c index 9051b4e8c..9405b71fc 100644 --- a/engine/server/sv_ents.c +++ b/engine/server/sv_ents.c @@ -1821,7 +1821,7 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore continue; if (e >= 1024 && !(client->fteprotocolextensions & PEXT_ENTITYDBL2)) continue; - if (dement->modelindex >= 256 && !(client->fteprotocolextensions & PEXT_MODELDBL)) + if (/*dement->modelindex >= 256 &&*/ !(client->fteprotocolextensions & PEXT_MODELDBL)) continue; state = &pack->entities[pack->num_entities]; diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 763e1c413..435a12ce1 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -683,9 +683,9 @@ void SVC_Status (void) if (slots>12) Con_Printf ("5013 23 64 94 \"DeathBunny\" \"soldier\" 13 13\n"); if (slots>10) - Con_Printf ("5010 32 85 162 \"€ƒ‚²¥ÄOÎÅ\" \"hacker\" 13 13\n"); + Con_Printf ("5010 32 85 162 \"��\" \"hacker\" 13 13\n"); if (slots>8) - Con_Printf ("5011 32 85 162 \"ÁlòeaäùÄEÁÄ‘\" \"hacker\" 4 4\n"); + Con_Printf ("5011 32 85 162 \"��a���\" \"hacker\" 4 4\n"); */ SV_EndRedirect (); } @@ -3042,6 +3042,10 @@ void SV_InitLocal (void) // svs.fteprotocolextensions |= PEXT_64PLAYERS; svs.fteprotocolextensions |= PEXT_SHOWPIC; svs.fteprotocolextensions |= PEXT_SETATTACHMENT; + +#ifdef PEXT_PK3DOWNLOADS + svs.fteprotocolextensions |= PEXT_PK3DOWNLOADS; +#endif #ifdef PEXT_CHUNKEDDOWNLOADS svs.fteprotocolextensions |= PEXT_CHUNKEDDOWNLOADS; diff --git a/engine/server/sv_send.c b/engine/server/sv_send.c index aa81d47d1..7d3dd663f 100644 --- a/engine/server/sv_send.c +++ b/engine/server/sv_send.c @@ -1663,7 +1663,7 @@ void SV_SendMVDMessage(void) float min_fps; extern cvar_t sv_demofps; extern cvar_t sv_demoPings; - extern cvar_t sv_demoMaxSize; +// extern cvar_t sv_demoMaxSize; if (!sv.mvdrecording) return; diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index 492af6f8d..6a614e09b 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -563,9 +563,14 @@ void SVQ2_NextServer_f (void) void SV_PK3List_f (void) { +#ifndef PEXT_PK3DOWNLOADS + Con_Printf ("pk3list not valid -- It's not implemented!\n"); + return; +#else int crc; char *name; int i; + if (host_client->state != cs_connected) { //fixme: send prints instead @@ -585,7 +590,8 @@ void SV_PK3List_f (void) //NOTE: This doesn't go through ClientReliableWrite since it's before the user //spawns. These functions are written to not overflow - if (host_client->num_backbuf) { + if (host_client->num_backbuf) + { Con_Printf("WARNING %s: [SV_Soundlist] Back buffered (%d), clearing", host_client->name, host_client->netchan.message.cursize); host_client->num_backbuf = 0; SZ_Clear(&host_client->netchan.message); @@ -597,7 +603,7 @@ void SV_PK3List_f (void) return; } - for (i; ; i++) + for (; ; i++) { if (host_client->netchan.message.cursize < (MAX_QWMSGLEN/2)) { //user's buffer was too small @@ -612,12 +618,14 @@ void SV_PK3List_f (void) { MSG_WriteByte(&host_client->netchan.message, svc_stufftext); MSG_WriteString(&host_client->netchan.message, va("echo packfile %s\n", name)); - continue; //okay, that was all we could find. + continue; //try the next. } + //that's all folks, move on to sound. MSG_WriteByte(&host_client->netchan.message, svc_stufftext); MSG_WriteString(&host_client->netchan.message, va("soundlist %i 0\n", svs.spawncount)); return; } +#endif } /*