diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7a7358925..ccc138386 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3959,6 +3959,8 @@ consvar_t cv_netticbuffer = {"netticbuffer", "1", CV_SAVE, netticbuffer_cons_t, static void Joinable_OnChange(void); +consvar_t cv_joinrefusemessage = {"joinrefusemessage", "The server is not accepting joins for the moment.", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}; + consvar_t cv_allownewplayer = {"allowjoin", "On", CV_SAVE|CV_CALL, CV_OnOff, Joinable_OnChange, 0, NULL, NULL, 0, 0, NULL}; #ifdef VANILLAJOINNEXTROUND @@ -4586,7 +4588,7 @@ static void HandleConnect(SINT8 node) } else if (!cv_allownewplayer.value && node) { - SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment.")); + SV_SendRefuse(node, M_GetText(cv_joinrefusemessage.string)); } else if (connectedplayers >= maxplayers) { diff --git a/src/d_clisrv.h b/src/d_clisrv.h index b969fff9d..13c2bc353 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -567,7 +567,7 @@ extern consvar_t #ifdef VANILLAJOINNEXTROUND cv_joinnextround, #endif - cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; + cv_netticbuffer, cv_allownewplayer, cv_joinrefusemessage, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; extern consvar_t cv_connectawaittime; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index b387e5a6e..c296cd58d 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -817,6 +817,7 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_httpsource); #ifndef NONET CV_RegisterVar(&cv_allownewplayer); + CV_RegisterVar(&cv_joinrefusemessage); CV_RegisterVar(&cv_chatlogsize); #ifdef VANILLAJOINNEXTROUND CV_RegisterVar(&cv_joinnextround); diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index fcfd49f80..680c5dea0 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -566,7 +566,7 @@ void HWR_LoadTextures(size_t pnumtextures) GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore) { GLMapTexture_t *grtex; - + if (tex < 0 || tex >= (signed)gr_numtextures) { #ifdef PARANOIA @@ -575,7 +575,7 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore) tex = 0; #endif } - + grtex = &gr_textures[tex*2 + (encoremap && !noencore ? 0 : 1)]; if (!grtex->mipmap.data && !grtex->mipmap.downloaded) @@ -584,6 +584,7 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore) // If hardware does not have the texture, then call pfnSetTexture to upload it if (!grtex->mipmap.downloaded) HWD.pfnSetTexture(&grtex->mipmap); + HWR_SetCurrentTexture(&grtex->mipmap); // The system-memory data can be purged now. @@ -592,7 +593,6 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore) return grtex; } - static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum) { #ifdef GLENCORE @@ -601,7 +601,6 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum) #endif size_t size, pflatsize; - // setup the texture info grMipmap->format = GL_TEXFMT_P_8; grMipmap->flags = TF_WRAPXY|TF_CHROMAKEYED; @@ -647,7 +646,6 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum) #endif } - // Download a Doom 'flat' to the hardware cache and make it ready for use void HWR_GetFlat(lumpnum_t flatlumpnum, boolean noencoremap) {