02 Apr 2017
This commit is contained in:
parent
63c5715d3f
commit
1043641af1
|
@ -371,7 +371,7 @@ static void CL_CopyEntityToPhysEnt( physent_t *pe, entity_state_t *state, qboole
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( pe->solid != SOLID_BSP && mod->type == mod_studio )
|
if( pe->solid != SOLID_BSP && Mod_GetType( state->modelindex ) == mod_studio )
|
||||||
pe->studiomodel = mod;
|
pe->studiomodel = mod;
|
||||||
else pe->model = mod;
|
else pe->model = mod;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ typedef struct
|
||||||
int realframecount; // not including viewpasses
|
int realframecount; // not including viewpasses
|
||||||
int framecount;
|
int framecount;
|
||||||
|
|
||||||
|
qboolean ignore_lightgamma;
|
||||||
qboolean fCustomRendering;
|
qboolean fCustomRendering;
|
||||||
qboolean fResetVis;
|
qboolean fResetVis;
|
||||||
|
|
||||||
|
|
|
@ -298,10 +298,18 @@ static qboolean R_RecursiveLightPoint( model_t *model, mnode_t *node, float p1f,
|
||||||
{
|
{
|
||||||
uint scale = tr.lightstylevalue[surf->styles[map]];
|
uint scale = tr.lightstylevalue[surf->styles[map]];
|
||||||
|
|
||||||
cv->r += LightToTexGamma( lm->r ) * scale;
|
if( tr.ignore_lightgamma )
|
||||||
cv->g += LightToTexGamma( lm->g ) * scale;
|
{
|
||||||
cv->b += LightToTexGamma( lm->b ) * scale;
|
cv->r += lm->r * scale;
|
||||||
|
cv->g += lm->g * scale;
|
||||||
|
cv->b += lm->b * scale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cv->r += LightToTexGamma( lm->r ) * scale;
|
||||||
|
cv->g += LightToTexGamma( lm->g ) * scale;
|
||||||
|
cv->b += LightToTexGamma( lm->b ) * scale;
|
||||||
|
}
|
||||||
lm += size; // skip to next lightmap
|
lm += size; // skip to next lightmap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type )
|
||||||
if( clent->curstate.effects & EF_NODRAW )
|
if( clent->curstate.effects & EF_NODRAW )
|
||||||
return false; // done
|
return false; // done
|
||||||
|
|
||||||
if( !R_OpaqueEntity( clent ) && clent->curstate.renderamt <= 0.0f )
|
if( clent->curstate.rendermode != kRenderNormal && clent->curstate.renderamt <= 0.0f )
|
||||||
return true; // invisible
|
return true; // invisible
|
||||||
|
|
||||||
if( type == ET_FRAGMENTED )
|
if( type == ET_FRAGMENTED )
|
||||||
|
|
|
@ -2865,8 +2865,8 @@ void GL_StudioSetRenderMode( int rendermode )
|
||||||
switch( rendermode )
|
switch( rendermode )
|
||||||
{
|
{
|
||||||
case kRenderNormal:
|
case kRenderNormal:
|
||||||
pglDepthMask( GL_TRUE );
|
// pglDepthMask( GL_TRUE );
|
||||||
pglDisable( GL_BLEND );
|
// pglDisable( GL_BLEND );
|
||||||
break;
|
break;
|
||||||
case kRenderTransColor:
|
case kRenderTransColor:
|
||||||
pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||||
|
@ -3468,6 +3468,12 @@ R_DrawViewModel
|
||||||
void R_DrawViewModel( void )
|
void R_DrawViewModel( void )
|
||||||
{
|
{
|
||||||
cl_entity_t *view = &clgame.viewent;
|
cl_entity_t *view = &clgame.viewent;
|
||||||
|
colorVec c;
|
||||||
|
|
||||||
|
tr.ignore_lightgamma = true;
|
||||||
|
c = R_LightPoint( view->origin );
|
||||||
|
tr.ignore_lightgamma = false;
|
||||||
|
cl.local.light_level = (c.r + c.g + c.b) / 3;
|
||||||
|
|
||||||
if( cl.local.thirdperson || RI.onlyClientDraw || r_drawviewmodel->value == 0 )
|
if( cl.local.thirdperson || RI.onlyClientDraw || r_drawviewmodel->value == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -62,7 +62,7 @@ Cvar_UpdateInfo
|
||||||
deal with userinfo etc
|
deal with userinfo etc
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
static qboolean Cvar_UpdateInfo( convar_t *var, const char *value )
|
static qboolean Cvar_UpdateInfo( convar_t *var, const char *value, qboolean notify )
|
||||||
{
|
{
|
||||||
if( FBitSet( var->flags, FCVAR_USERINFO ))
|
if( FBitSet( var->flags, FCVAR_USERINFO ))
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ static qboolean Cvar_UpdateInfo( convar_t *var, const char *value )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( FBitSet( var->flags, FCVAR_SERVER ))
|
if( FBitSet( var->flags, FCVAR_SERVER ) && notify )
|
||||||
{
|
{
|
||||||
if( !FBitSet( var->flags, FCVAR_UNLOGGED ))
|
if( !FBitSet( var->flags, FCVAR_UNLOGGED ))
|
||||||
{
|
{
|
||||||
|
@ -299,7 +299,7 @@ convar_t *Cvar_Get( const char *name, const char *value, int flags, const char *
|
||||||
var->next = find;
|
var->next = find;
|
||||||
|
|
||||||
// fill it cls.userinfo, svs.serverinfo
|
// fill it cls.userinfo, svs.serverinfo
|
||||||
Cvar_UpdateInfo( var, var->string );
|
Cvar_UpdateInfo( var, var->string, false );
|
||||||
|
|
||||||
// tell engine about changes
|
// tell engine about changes
|
||||||
Cvar_Changed( var );
|
Cvar_Changed( var );
|
||||||
|
@ -355,7 +355,7 @@ void Cvar_RegisterVariable( convar_t *var )
|
||||||
var->next = find;
|
var->next = find;
|
||||||
|
|
||||||
// fill it cls.userinfo, svs.serverinfo
|
// fill it cls.userinfo, svs.serverinfo
|
||||||
Cvar_UpdateInfo( var, var->string );
|
Cvar_UpdateInfo( var, var->string, false );
|
||||||
|
|
||||||
// tell engine about changes
|
// tell engine about changes
|
||||||
Cvar_Changed( var );
|
Cvar_Changed( var );
|
||||||
|
@ -424,7 +424,7 @@ void Cvar_DirectSet( convar_t *var, const char *value )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// fill it cls.userinfo, svs.serverinfo
|
// fill it cls.userinfo, svs.serverinfo
|
||||||
if( !Cvar_UpdateInfo( var, pszValue ))
|
if( !Cvar_UpdateInfo( var, pszValue, true ))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// and finally changed the cvar itself
|
// and finally changed the cvar itself
|
||||||
|
|
|
@ -281,9 +281,8 @@ void Host_Exec_f( void )
|
||||||
Q_strncat( txt, "\n", len + 2 );
|
Q_strncat( txt, "\n", len + 2 );
|
||||||
Mem_Free( f );
|
Mem_Free( f );
|
||||||
|
|
||||||
if( host.apply_game_config )
|
if( !host.apply_game_config )
|
||||||
MsgDev( D_INFO, "execing ^2%s^7", Cmd_Argv( 1 ));
|
MsgDev( D_INFO, "execing %s\n", Cmd_Argv( 1 ));
|
||||||
else MsgDev( D_INFO, "execing %s\n", Cmd_Argv( 1 ));
|
|
||||||
Cbuf_InsertText( txt );
|
Cbuf_InsertText( txt );
|
||||||
Mem_Free( txt );
|
Mem_Free( txt );
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ BSC32=bscmake.exe
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||||
# ADD LINK32 msvcrtd.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib mpeg_dbg.lib ../utils/vgui/lib/win32_vc6/vgui.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libcd.lib" /out:"..\temp\engine\!debug/xash.dll" /pdbtype:sept /libpath:"./common/soundlib"
|
# ADD LINK32 msvcrtd.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib mpeg_dbg.lib ../utils/vgui/lib/win32_vc6/vgui.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /out:"..\temp\engine\!debug/xash.dll" /pdbtype:sept /libpath:"./common/soundlib"
|
||||||
# SUBTRACT LINK32 /incremental:no /map /nodefaultlib
|
# SUBTRACT LINK32 /incremental:no /map /nodefaultlib
|
||||||
# Begin Custom Build
|
# Begin Custom Build
|
||||||
TargetDir=\Xash3D\src_main\temp\engine\!debug
|
TargetDir=\Xash3D\src_main\temp\engine\!debug
|
||||||
|
|
|
@ -2320,8 +2320,7 @@ void pfnServerExecute( void )
|
||||||
Cbuf_Execute();
|
Cbuf_Execute();
|
||||||
|
|
||||||
if( host.sv_cvars_restored > 0 )
|
if( host.sv_cvars_restored > 0 )
|
||||||
MsgDev( D_INFO, " (%i cvars)\n", host.sv_cvars_restored );
|
MsgDev( D_INFO, "server executing ^2config.cfg^7 (%i cvars)\n", host.sv_cvars_restored );
|
||||||
else MsgDev( D_INFO, "\n" );
|
|
||||||
|
|
||||||
host.apply_game_config = false;
|
host.apply_game_config = false;
|
||||||
svgame.config_executed = true;
|
svgame.config_executed = true;
|
||||||
|
|
Reference in New Issue