05 Sep 2017

This commit is contained in:
g-cont 2017-09-05 00:00:00 +03:00 committed by Alibek Omarov
parent 8e6264beb1
commit 766bbdc8a8
12 changed files with 60 additions and 88 deletions

View File

@ -670,8 +670,14 @@ void CL_DeltaEntity( sizebuf_t *msg, frame_t *frame, int newnum, entity_state_t
return;
}
// interpolation must be reset
if( newent ) SETVISBIT( frame->flags, pack );
if( newent )
{
// interpolation must be reset
SETVISBIT( frame->flags, pack );
// release beams from previous entity
CL_KillDeadBeams( ent );
}
// add entity to packet
cls.next_client_entities++;
@ -968,7 +974,7 @@ void CL_LinkPlayers( frame_t *frame )
cl_entity_t *ent;
int i;
ent = CL_GetEntityByIndex( cl.viewentity );
ent = CL_GetLocalPlayer();
// apply muzzleflash to weaponmodel
if( ent && FBitSet( ent->curstate.effects, EF_MUZZLEFLASH ))
@ -1038,7 +1044,7 @@ void CL_LinkPlayers( frame_t *frame )
}
// apply local player effects if entity is not added
if( !local_added ) CL_AddEntityEffects( ent );
if( !local_added ) CL_AddEntityEffects( CL_GetLocalPlayer( ));
}
/*

View File

@ -1178,7 +1178,7 @@ static qboolean GL_UploadTexture( gltexture_t *tex, rgbdata_t *pic )
if( !ImageDXT( pic->type ) && !FBitSet( tex->flags, TF_NOMIPMAP|TF_SKYSIDE ))
data = GL_ApplyGamma( data, tex->width * tex->height * tex->depth, FBitSet( tex->flags, TF_NORMALMAP ));
if( !ImageDXT( pic->type ) && FBitSet( pic->flags, IMAGE_ONEBIT_ALPHA ))
if( !ImageDXT( pic->type ) && !FBitSet( tex->flags, TF_NOMIPMAP ) && FBitSet( pic->flags, IMAGE_ONEBIT_ALPHA ))
data = GL_ApplyFilter( data, tex->width, tex->height );
// mips will be auto-generated if desired

View File

@ -573,7 +573,8 @@ typedef enum
{
GLHW_GENERIC, // where everthing works the way it should
GLHW_RADEON, // where you don't have proper GLSL support
GLHW_NVIDIA // Geforce 8/9 class DX10 hardware
GLHW_NVIDIA, // Geforce 8/9 class DX10 hardware
GLHW_INTEL // Intel Mobile Graphics
} glHWType_t;
typedef struct

View File

@ -716,7 +716,7 @@ static void R_CheckFog( void )
if( RI.onlyClientDraw || cl.local.waterlevel < 2 || !RI.drawWorld || !RI.viewleaf )
{
if( RI.cached_waterlevel == 3 )
if( RI.cached_waterlevel == 3 && !RI.fogCustom )
{
// in some cases waterlevel jumps from 3 to 1. Catch it
RI.cached_waterlevel = cl.local.waterlevel;

View File

@ -20,7 +20,7 @@ GNU General Public License for more details.
#include "input.h"
#define VID_AUTOMODE "-1"
#define VID_DEFAULTMODE 2.0f
#define VID_DEFAULTMODE 3.0f
#define DISP_CHANGE_BADDUALVIEW -6 // MSVC 6.0 doesn't
#define num_vidmodes ARRAYSIZE( vidmode )
#define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_SYSMENU|WS_CAPTION|WS_VISIBLE)
@ -731,7 +731,7 @@ qboolean GL_CreateContext( void )
if(!( pwglMakeCurrent( glw_state.hDC, glw_state.hGLRC )))
return GL_DeleteContext();
if( !Sys_CheckParm( "-gldebug" ) || host.developer < D_INFO ) // debug bit the kills perfomance
if( !Sys_CheckParm( "-gldebug" ) || host.developer <= D_INFO ) // debug bit kill the perfomance
return true;
pwglCreateContextAttribsARB = GL_GetProcAddress( "wglCreateContextAttribsARB" );
@ -1434,7 +1434,7 @@ qboolean R_Init_OpenGL( void )
if( !opengl_dll.link )
return false;
if( Sys_CheckParm( "-gldebug" ) && host.developer >= 1 )
if( Sys_CheckParm( "-gldebug" ) && host.developer > D_INFO )
GL_CheckExtension( "OpenGL Internal ProcAddress", wglproc_funcs, NULL, GL_WGL_PROCADDRESS );
return VID_SetMode();
@ -1544,7 +1544,7 @@ void R_RenderInfo_f( void )
}
Msg( "\n" );
Msg( "%s [%i x %i]\n", vidmode[(int)vid_mode->value].desc, glState.width, glState.height );
Msg( "MODE: %s\n", vidmode[(int)vid_mode->value].desc );
Msg( "\n" );
Msg( "VERTICAL SYNC: %s\n", gl_vsync->value ? "enabled" : "disabled" );
Msg( "Color %d bits, Alpha %d bits, Depth %d bits, Stencil %d bits\n", glConfig.color_bits,
@ -1662,10 +1662,12 @@ void GL_InitExtensions( void )
glConfig.hardware_type = GLHW_RADEON;
else if( Q_stristr( glConfig.renderer_string, "radeon" ))
glConfig.hardware_type = GLHW_RADEON;
else if( Q_stristr( glConfig.renderer_string, "intel" ))
glConfig.hardware_type = GLHW_INTEL;
else glConfig.hardware_type = GLHW_GENERIC;
// initalize until base opengl functions loaded (old-context)
if( !Sys_CheckParm( "-gldebug" ) || host.developer < D_INFO )
if( !Sys_CheckParm( "-gldebug" ) || host.developer <= D_INFO )
GL_CheckExtension( "OpenGL Internal ProcAddress", wglproc_funcs, NULL, GL_WGL_PROCADDRESS );
// windows-specific extensions
@ -1743,7 +1745,8 @@ void GL_InitExtensions( void )
if( GL_Support( GL_ANISOTROPY_EXT ))
pglGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glConfig.max_texture_anisotropy );
GL_CheckExtension( "GL_EXT_texture_lod_bias", NULL, "gl_ext_texture_lod_bias", GL_TEXTURE_LOD_BIAS );
if( glConfig.hardware_type != GLHW_INTEL )
GL_CheckExtension( "GL_EXT_texture_lod_bias", NULL, "gl_ext_texture_lod_bias", GL_TEXTURE_LOD_BIAS );
if( GL_Support( GL_TEXTURE_LOD_BIAS ))
pglGetFloatv( GL_MAX_TEXTURE_LOD_BIAS_EXT, &glConfig.max_texture_lod_bias );

View File

@ -126,7 +126,6 @@ void Host_EndGame( const char *message, ... )
SV_Shutdown( false );
}
SV_Shutdown( false );
CL_Disconnect();
// recreate world if needs
@ -1018,6 +1017,9 @@ int EXPORT Host_Main( const char *progname, int bChangeGame, pfnChangeGame func
oldtime = Sys_DoubleTime() - 0.1;
if( host.type == HOST_DEDICATED && !SV_Active( ))
MsgDev( D_INFO, "type 'map <mapname>' to run server... (TAB-autocomplete is working too)\n" );
// main window message loop
while( !host.crashed )
{

View File

@ -1,33 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: engine - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\WINDOWS\TEMP\RSP964B.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Xash3D\xash.dll"
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Paranoia2\xash.dll"
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Area51\xash.dll"
copy \Xash3D\src_main\temp\engine\!release\xash.dll "D:\Quake\xash.dll"
]
Creating command line "C:\WINDOWS\TEMP\RSP964B.bat"
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!release\xash.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
Žâª § ­® ¢ ¤®áâ㯥.
‘ª®¯¨à®¢ ­® ä ©«®¢: 0.
Error executing c:\windows\system32\cmd.exe.
<h3>Results</h3>
xash.dll - 1 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -203,19 +203,19 @@ void SV_Map_f( void )
if( FBitSet( flags, MAP_INVALID_VERSION ))
{
Msg( "SV_NewMap: map %s is invalid or not supported\n", mapname );
MsgDev( D_ERROR, "map %s is invalid or not supported\n", mapname );
return;
}
if( !FBitSet( flags, MAP_IS_EXIST ))
{
Msg( "SV_NewMap: map %s doesn't exist\n", mapname );
MsgDev( D_ERROR, "map %s doesn't exist\n", mapname );
return;
}
if( !FBitSet( flags, MAP_HAS_SPAWNPOINT ))
{
Msg( "SV_NewMap: map %s doesn't have a valid spawnpoint\n", mapname );
MsgDev( D_ERROR, "map %s doesn't have a valid spawnpoint\n", mapname );
return;
}
@ -258,7 +258,7 @@ void SV_MapBackground_f( void )
if( sv.state == ss_active && !sv.background )
{
Msg( "SV_NewMap: can't set background map while game is active\n" );
MsgDev( D_ERROR, "can't set background map while game is active\n" );
return;
}
@ -270,19 +270,19 @@ void SV_MapBackground_f( void )
if( FBitSet( flags, MAP_INVALID_VERSION ))
{
Msg( "SV_NewMap: map %s is invalid or not supported\n", mapname );
MsgDev( D_ERROR, "map %s is invalid or not supported\n", mapname );
return;
}
if( !FBitSet( flags, MAP_IS_EXIST ))
{
Msg( "SV_NewMap: map %s doesn't exist\n", mapname );
MsgDev( D_ERROR, "map %s doesn't exist\n", mapname );
return;
}
// background maps allow without spawnpoints (just throw warning)
if( !FBitSet( flags, MAP_HAS_SPAWNPOINT ))
MsgDev( D_WARN, "SV_NewMap: map %s doesn't have a valid spawnpoint\n", mapname );
MsgDev( D_WARN, "map %s doesn't have a valid spawnpoint\n", mapname );
Q_strncpy( host.finalmsg, "", MAX_STRING );
SV_Shutdown( true );
@ -335,7 +335,13 @@ void SV_HazardCourse_f( void )
return;
}
Host_NewGame( GI->trainmap, false );
// special case for Gunman Chronicles: playing avi-file
if( FS_FileExists( va( "media/%s.avi", GI->trainmap ), false ))
{
Cbuf_AddText( va( "wait; movie %s\n", GI->trainmap ));
Host_EndGame( "The End" );
}
else Host_NewGame( GI->trainmap, false );
}
/*
@ -492,13 +498,13 @@ void SV_ChangeLevel_f( void )
if( FBitSet( flags, MAP_INVALID_VERSION ))
{
Msg( "SV_ChangeLevel: map %s is invalid or not supported\n", mapname );
MsgDev( D_ERROR, "map %s is invalid or not supported\n", mapname );
return;
}
if( !FBitSet( flags, MAP_IS_EXIST ))
{
Msg( "SV_ChangeLevel: map %s doesn't exist\n", mapname );
MsgDev( D_ERROR, "map %s doesn't exist\n", mapname );
return;
}
@ -508,15 +514,15 @@ void SV_ChangeLevel_f( void )
{
// NOTE: we find valid map but specified landmark it's doesn't exist
// run simple changelevel like in q1, throw warning
MsgDev( D_INFO, "SV_ChangeLevel: map %s is exist but doesn't contain\n", mapname );
MsgDev( D_INFO, "landmark with name %s. Run classic quake changelevel\n", Cmd_Argv( 2 ));
MsgDev( D_WARN, "map %s is exist but doesn't contain landmark with name %s. smooth transition disabled\n",
mapname, Cmd_Argv( 2 ));
c = 2; // reduce args
}
}
if( c >= 3 && !Q_stricmp( sv.name, Cmd_Argv( 1 )))
{
MsgDev( D_INFO, "SV_ChangeLevel: can't changelevel with same map. Ignored.\n" );
MsgDev( D_ERROR, "can't changelevel with same map. Ignored.\n" );
return;
}
@ -524,7 +530,7 @@ void SV_ChangeLevel_f( void )
{
if( sv_validate_changelevel->value )
{
MsgDev( D_INFO, "SV_ChangeLevel: map %s doesn't have a valid spawnpoint. Ignored.\n", mapname );
MsgDev( D_ERROR, "map %s doesn't have a valid spawnpoint. Ignored.\n", mapname );
return;
}
}
@ -534,15 +540,14 @@ void SV_ChangeLevel_f( void )
{
if( sv_validate_changelevel->value )
{
MsgDev( D_INFO, "SV_ChangeLevel: a infinite changelevel detected.\n" );
MsgDev( D_INFO, "Changelevel will be disabled until a next save\\restore.\n" );
MsgDev( D_WARN, "an infinite changelevel detected and will be disabled until a next save\\restore\n" );
return; // lock with svs.spawncount here
}
}
if( sv.state != ss_active )
{
MsgDev( D_INFO, "Only the server may changelevel\n" );
MsgDev( D_ERROR, "only the server may changelevel\n" );
return;
}

View File

@ -95,7 +95,7 @@ CVAR_DEFINE_AUTO( sv_skydir_z, "1", FCVAR_MOVEVARS|FCVAR_UNLOGGED, "sky rotation
CVAR_DEFINE_AUTO( sv_skyangle, "0", FCVAR_MOVEVARS|FCVAR_UNLOGGED, "skybox rotational angle (in degrees)" );
CVAR_DEFINE_AUTO( sv_skyspeed, "0", 0, "skybox rotational speed" );
CVAR_DEFINE( sv_spawntime, "host_spawntime", "0.8", FCVAR_ARCHIVE, "host.frametime on spawn new map (force to 0.1 if have problems or crashes)" );
CVAR_DEFINE( sv_spawntime, "host_spawntime", "0.1", FCVAR_ARCHIVE, "host.frametime on spawn new map (force to 0.8 if have problems)" );
CVAR_DEFINE( sv_changetime, "host_changetime", "0.001", FCVAR_ARCHIVE, "host.frametime on changelevel (force to 0.1 if have player stucks)" );
// obsolete cvars which we should keep because game DLL's will be relies on it

View File

@ -133,13 +133,15 @@ void SV_CheckVelocity( edict_t *ent )
{
if( IS_NAN( ent->v.velocity[i] ))
{
MsgDev( D_INFO, "Got a NaN velocity on %s\n", STRING( ent->v.classname ));
if( sv_check_errors->value )
MsgDev( D_INFO, "Got a NaN velocity on %s\n", STRING( ent->v.classname ));
ent->v.velocity[i] = 0.0f;
}
if( IS_NAN( ent->v.origin[i] ))
{
MsgDev( D_INFO, "Got a NaN origin on %s\n", STRING( ent->v.classname ));
if( sv_check_errors->value )
MsgDev( D_INFO, "Got a NaN origin on %s\n", STRING( ent->v.classname ));
ent->v.origin[i] = 0.0f;
}
}
@ -149,8 +151,10 @@ void SV_CheckVelocity( edict_t *ent )
if( wishspd > maxspd )
{
MsgDev( D_INFO, "Got a velocity too high on %s ( %.2f > %.2f )\n", STRING( ent->v.classname ), sqrt( wishspd ), sqrt( maxspd ));
wishspd = sv_maxvelocity.value / sqrt( wishspd );
wishspd = sqrt( wishspd );
if( sv_check_errors->value )
MsgDev( D_INFO, "Got a velocity too high on %s ( %.2f > %.2f )\n", STRING( ent->v.classname ), wishspd, sqrt( maxspd ));
wishspd = sv_maxvelocity.value / wishspd;
VectorScale( ent->v.velocity, wishspd, ent->v.velocity );
}
}

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: mainui - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
menu.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -62,7 +62,7 @@ UI_VidOptions_GetConfig
static void UI_VidOptions_GetConfig( void )
{
uiVidOptions.screenSize.curValue = RemapVal( CVAR_GET_FLOAT( "viewsize" ), 30.0f, 120.0f, 0.0f, 1.0f );
uiVidOptions.glareReduction.curValue = CVAR_GET_FLOAT( "brightness" );
uiVidOptions.glareReduction.curValue = RemapVal( CVAR_GET_FLOAT( "brightness" ), 0.0f, 3.0f, 0.0f, 1.0f );
uiVidOptions.gammaIntensity.curValue = RemapVal( CVAR_GET_FLOAT( "gamma" ), 1.8f, 3.0f, 0.0f, 1.0f );
PIC_SetGamma( uiVidOptions.hTestImage, 1.0f );
@ -78,7 +78,7 @@ UI_VidOptions_UpdateConfig
static void UI_VidOptions_UpdateConfig( void )
{
CVAR_SET_FLOAT( "viewsize", RemapVal( uiVidOptions.screenSize.curValue, 0.0f, 1.0f, 30.0f, 120.0f ));
CVAR_SET_FLOAT( "brightness", uiVidOptions.glareReduction.curValue );
CVAR_SET_FLOAT( "brightness", RemapVal( uiVidOptions.glareReduction.curValue, 0.0f, 1.0f, 0.0f, 3.0f ));
CVAR_SET_FLOAT( "gamma", RemapVal( uiVidOptions.gammaIntensity.curValue, 0.0f, 1.0f, 1.8f, 3.0f ));
PIC_SetGamma( uiVidOptions.hTestImage, 1.0f );
}
@ -86,7 +86,7 @@ static void UI_VidOptions_UpdateConfig( void )
static void UI_VidOptions_SetConfig( void )
{
CVAR_SET_FLOAT( "viewsize", RemapVal( uiVidOptions.screenSize.curValue, 0.0f, 1.0f, 30.0f, 120.0f ));
CVAR_SET_FLOAT( "brightness", uiVidOptions.glareReduction.curValue );
CVAR_SET_FLOAT( "brightness", RemapVal( uiVidOptions.glareReduction.curValue, 0.0f, 1.0f, 0.0f, 3.0f ));
CVAR_SET_FLOAT( "gamma", RemapVal( uiVidOptions.gammaIntensity.curValue, 0.0f, 1.0f, 1.8f, 3.0f ));
}