From 86d09135a4318beea301536b3bb46f6ba2cffc3a Mon Sep 17 00:00:00 2001 From: g-cont Date: Sat, 13 Dec 2014 00:00:00 +0300 Subject: [PATCH] 13 Dec 2014 --- change.log | 15 ++++++++++++++- common/render_api.h | 1 + engine/client/gl_backend.c | 10 ++-------- engine/client/gl_rmain.c | 2 ++ engine/client/gl_vidnt.c | 3 +++ engine/common/build.c | 4 ++-- engine/common/model.c | 7 ++++++- engine/server/sv_save.c | 13 ++++--------- 8 files changed, 34 insertions(+), 21 deletions(-) diff --git a/change.log b/change.log index dc066ebd..34c13223 100644 --- a/change.log +++ b/change.log @@ -1,3 +1,17 @@ +build 2867 + +Client: another extension for EventAPI: function EV_SoundForIndex to get soundpath from soundindex +Render: RenderAPI update. New flag TF_NOCOMPARE to disable comparing for depth-textures and PARM_CLIENT_ACTIVE (self-explanatory) +Server: PhysicAPI update. Add support for file searching. +Client: fix a little bug in CL_AddVisibleEntity +Client: check rectangles right for hud.txt +Client: fix demoplaying in background mode (changelevel etc) +Client: fix SOLID_CUSTOM support in client trace +Render: create debug context for powerful OpenGL debugging +Render: fix bug with kRenderWorldGlow +Sound: add two new cmds: spk and speak like in GoldSrc +GameUI: fix buttons bmp loader + build 2664 Engine: restore right ordering of arguments of SV_StudioSetupBones export @@ -25,7 +39,6 @@ Server: fix some bugs in PVS calculation on server GameUI: enable auto-refresh of actual multiplayer maps list GameUI: update 3D playermodel preview for 16:9 screen aspect - build 2636 Engine: added internal loader for deluxemap data (.dlit file that produces VHLT) diff --git a/common/render_api.h b/common/render_api.h index 70805b42..47858021 100644 --- a/common/render_api.h +++ b/common/render_api.h @@ -61,6 +61,7 @@ GNU General Public License for more details. #define PARM_ACTIVE_TMU 27 // for debug #define PARM_CACHEFRAME 28 #define PARM_MAX_IMAGE_UNITS 29 +#define PARM_CLIENT_ACTIVE 30 enum { diff --git a/engine/client/gl_backend.c b/engine/client/gl_backend.c index 41238b9f..abedf935 100644 --- a/engine/client/gl_backend.c +++ b/engine/client/gl_backend.c @@ -700,11 +700,8 @@ rebuild_page: pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f ); GL_Bind( GL_TEXTURE0, i ); // NOTE: don't use image->texnum here, because skybox has a 'wrong' indexes - if( image->texType == TEX_DEPTHMAP ) - { + if(( image->flags & TF_DEPTHMAP ) && !( image->flags & TF_NOCOMPARE )) pglTexParameteri( image->target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE ); - pglTexParameteri( image->target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE ); - } pglBegin( GL_QUADS ); pglTexCoord2f( 0, 0 ); @@ -723,11 +720,8 @@ rebuild_page: pglVertex2f( x, y + h ); pglEnd(); - if( image->texType == TEX_DEPTHMAP ) - { + if(( image->flags & TF_DEPTHMAP ) && !( image->flags & TF_NOCOMPARE )) pglTexParameteri( image->target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB ); - pglTexParameteri( image->target, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY ); - } FS_FileBase( image->name, shortname ); if( Q_strlen( shortname ) > 18 ) diff --git a/engine/client/gl_rmain.c b/engine/client/gl_rmain.c index 393f7f14..e4d63620 100644 --- a/engine/client/gl_rmain.c +++ b/engine/client/gl_rmain.c @@ -1468,6 +1468,8 @@ static int GL_RenderGetParm( int parm, int arg ) return world.load_sequence; case PARM_MAX_IMAGE_UNITS: return GL_MaxTextureUnits(); + case PARM_CLIENT_ACTIVE: + return (cls.state == ca_active); } return 0; } diff --git a/engine/client/gl_vidnt.c b/engine/client/gl_vidnt.c index 8a3742d4..2158a0a1 100644 --- a/engine/client/gl_vidnt.c +++ b/engine/client/gl_vidnt.c @@ -691,6 +691,9 @@ qboolean GL_CreateContext( void ) if(!( pwglMakeCurrent( glw_state.hDC, glw_state.hGLRC ))) return GL_DeleteContext(); + if( host.developer <= 1 ) + return true; + pwglCreateContextAttribsARB = GL_GetProcAddress( "wglCreateContextAttribsARB" ); if( pwglCreateContextAttribsARB != NULL ) diff --git a/engine/common/build.c b/engine/common/build.c index 7c76fba8..68823ba0 100644 --- a/engine/common/build.c +++ b/engine/common/build.c @@ -23,7 +23,7 @@ static char mond[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int Q_buildnum( void ) { // do not touch this! Only author of Xash3D can increase buildnumbers! -#if 1 +#if 0 int m = 0, d = 0, y = 0; static int b = 0; @@ -48,6 +48,6 @@ int Q_buildnum( void ) return b; #else - return 2748; + return 2867; #endif } \ No newline at end of file diff --git a/engine/common/model.c b/engine/common/model.c index f5451203..39ae45d0 100644 --- a/engine/common/model.c +++ b/engine/common/model.c @@ -1852,7 +1852,12 @@ static void Mod_LoadSurfaces( const dlump_t *l ) out->flags |= (SURF_DRAWTILED|SURF_DRAWSKY); if(( tex->name[0] == '*' && Q_stricmp( tex->name, "*default" )) || tex->name[0] == '!' ) - out->flags |= (SURF_DRAWTURB|SURF_DRAWTILED|SURF_NOCULL); + { + out->flags |= (SURF_DRAWTURB|SURF_DRAWTILED); + + if( !( host.features & ENGINE_BUILD_SURFMESHES )) + out->flags |= SURF_NOCULL; + } if( !Q_strncmp( tex->name, "water", 5 ) || !Q_strnicmp( tex->name, "laser", 5 )) out->flags |= (SURF_DRAWTURB|SURF_DRAWTILED|SURF_NOCULL); diff --git a/engine/server/sv_save.c b/engine/server/sv_save.c index 7fa0ebf0..37d71b3e 100644 --- a/engine/server/sv_save.c +++ b/engine/server/sv_save.c @@ -2120,11 +2120,9 @@ qboolean SV_LoadGame( const char *pName ) Q_snprintf( name, sizeof( name ), "save/%s.sav", pName ); - // reset all multiplayer cvars - Cvar_FullSet( "coop", "0", CVAR_LATCH ); - Cvar_FullSet( "teamplay", "0", CVAR_LATCH ); - Cvar_FullSet( "deathmatch", "0", CVAR_LATCH ); - Cvar_FullSet( "maxplayers", "1", CVAR_LATCH ); + // silently ignore if missed + if( !FS_FileExists( name, true )) + return false; // init network stuff NET_Config ( false ); // close network sockets @@ -2133,10 +2131,6 @@ qboolean SV_LoadGame( const char *pName ) SV_Shutdown( true ); sv.background = false; - // silently ignore if missed - if( !FS_FileExists( name, true )) - return false; - SCR_BeginLoadingPlaque ( false ); MsgDev( D_INFO, "Loading game from %s...\n", name ); @@ -2168,6 +2162,7 @@ qboolean SV_LoadGame( const char *pName ) Cvar_FullSet( "coop", "0", CVAR_LATCH ); Cvar_FullSet( "teamplay", "0", CVAR_LATCH ); Cvar_FullSet( "deathmatch", "0", CVAR_LATCH ); + Cvar_FullSet( "maxplayers", "1", CVAR_LATCH ); return Host_NewGame( gameHeader.mapName, true ); }