01 Apr 2017

This commit is contained in:
g-cont 2017-04-01 00:00:00 +03:00 committed by Alibek Omarov
parent a03d5a2c48
commit 63c5715d3f
13 changed files with 40 additions and 18 deletions

View File

@ -210,7 +210,7 @@ typedef struct render_api_s
void (*GL_Reserved2)( void );
// Misc renderer functions
void (*GL_DrawParticles)( const struct ref_viewpass_s *rvp, qboolean trans_pass );
void (*GL_DrawParticles)( const struct ref_viewpass_s *rvp, qboolean trans_pass, float frametime );
void (*EnvShot)( const float *vieworg, const char *name, qboolean skyshot, int shotsize ); // creates a cubemap or skybox into gfx\env folder
int (*COM_CompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
void (*Host_Error)( const char *error, ... ); // cause Host Error

View File

@ -1232,7 +1232,8 @@ HSPRITE pfnSPR_LoadExt( const char *szPicName, uint texFlags )
{
model_t *spr;
spr = CL_LoadSpriteModel( szPicName, SPR_CLIENT, texFlags );
if(( spr = CL_LoadSpriteModel( szPicName, SPR_CLIENT, texFlags )) == NULL )
return 0;
return (spr - clgame.sprites); // return index
}
@ -1247,7 +1248,8 @@ HSPRITE pfnSPR_Load( const char *szPicName )
{
model_t *spr;
spr = CL_LoadSpriteModel( szPicName, SPR_HUDSPRITE, 0 );
if(( spr = CL_LoadSpriteModel( szPicName, SPR_HUDSPRITE, 0 )) == NULL )
return 0;
return (spr - clgame.sprites); // return index
}

View File

@ -853,7 +853,7 @@ void CL_WeaponAnim( int iAnim, int body );
void CL_ClearEffects( void );
void CL_ClearEfrags( void );
void CL_TestLights( void );
void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass );
void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass, float frametime );
void CL_FireCustomDecal( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags, float scale );
void CL_DecalShoot( int textureIndex, int entityIndex, int modelIndex, float *pos, int flags );
void CL_PlayerDecal( int textureIndex, int entityIndex, float *pos );

View File

@ -261,7 +261,7 @@ qboolean R_AddEntity( struct cl_entity_s *clent, int type )
if( clent->curstate.effects & EF_NODRAW )
return false; // done
if( clent->curstate.rendermode != kRenderNormal && clent->curstate.renderamt <= 0.0f )
if( !R_OpaqueEntity( clent ) && clent->curstate.renderamt <= 0.0f )
return true; // invisible
if( type == ET_FRAGMENTED )

View File

@ -655,7 +655,7 @@ CL_DrawParticlesExternal
allow to draw effects from custom renderer
===============
*/
void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass )
void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass, float frametime )
{
ref_instance_t oldRI = RI;
@ -666,6 +666,7 @@ void CL_DrawParticlesExternal( const ref_viewpass_t *rvp, qboolean trans_pass )
// setup PVS for frame
memcpy( RI.visbytes, tr.visbytes, world.visbytes );
tr.frametime = frametime;
if( trans_pass == false )
{

View File

@ -1610,8 +1610,8 @@ void GL_InitCommands( void )
// make sure gl_vsync is checked after vid_restart
SetBits( gl_vsync->flags, FCVAR_CHANGED );
vid_gamma = Cvar_Get( "gamma", "1.0", FCVAR_RENDERINFO, "gamma amount" );
vid_brightness = Cvar_Get( "brightness", "1.0", FCVAR_RENDERINFO, "brighntess factor" );
vid_gamma = Cvar_Get( "gamma", "1.0", FCVAR_ARCHIVE, "gamma amount" );
vid_brightness = Cvar_Get( "brightness", "1.0", FCVAR_ARCHIVE, "brighntess factor" );
vid_mode = Cvar_Get( "vid_mode", VID_AUTOMODE, FCVAR_RENDERINFO|FCVAR_VIDRESTART, "display resolution mode" );
vid_fullscreen = Cvar_Get( "fullscreen", "0", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "set in 1 to enable fullscreen mode" );
vid_displayfrequency = Cvar_Get ( "vid_displayfrequency", "0", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "fullscreen refresh rate" );

View File

@ -333,6 +333,7 @@ typedef struct host_parm_s
qboolean force_draw_version; // used when fraps is loaded
qboolean write_to_clipboard; // put image to clipboard instead of disk
qboolean apply_game_config; // when true apply only to game cvars and ignore all other commands
qboolean config_executed; // a bit who indicated was config.cfg already executed e.g. from valve.rc
int sv_cvars_restored; // count of restored server cvars
qboolean crashed; // set to true if crashed

View File

@ -272,6 +272,9 @@ void Host_Exec_f( void )
return;
}
if( !Q_stricmp( "config.cfg", Cmd_Argv( 1 )))
host.config_executed = true;
// adds \n\0 at end of the file
txt = Z_Malloc( len + 2 );
memcpy( txt, f, len );
@ -778,6 +781,7 @@ void Host_InitCommon( const char *hostname, qboolean bChangeGame )
host.change_game = bChangeGame;
host.state = HOST_INIT; // initialzation started
host.developer = host.old_developer = 0;
host.config_executed = false;
Memory_Init(); // init memory subsystem
@ -994,8 +998,12 @@ int EXPORT Host_Main( const char *progname, int bChangeGame, pfnChangeGame func
Con_ShowConsole( false ); // hide console
// execute startup config and cmdline
Cbuf_AddText( va( "exec %s.rc\n", SI.ModuleName ));
Cbuf_AddText( "exec config.cfg\n" );
Cbuf_Execute();
if( !host.config_executed )
{
Cbuf_AddText( "exec config.cfg\n" );
Cbuf_Execute();
}
break;
case HOST_DEDICATED:
// allways parse commandline in dedicated-mode

View File

@ -129,6 +129,9 @@ void Netchan_ReportFlow( netchan_t *chan )
char incoming[CS_SIZE];
char outgoing[CS_SIZE];
if( CL_IsPlaybackDemo( ))
return;
ASSERT( chan != NULL );
Q_strcpy( incoming, Q_pretifymem((float)chan->flow[FLOW_INCOMING].totalbytes, 3 ));

Binary file not shown.

Binary file not shown.

View File

@ -44,7 +44,6 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "common" /I "common/imagelib" /I "common/soundlib" /I "server" /I "client" /I "client/vgui" /I "../common" /I "../game_shared" /I "../pm_shared" /I "../utils/vgui/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# SUBTRACT CPP /Fr /YX
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@ -65,6 +64,7 @@ BuildCmds= \
copy $(TargetDir)\xash.dll "D:\Xash3D\xash.dll" \
copy $(TargetDir)\xash.dll "D:\Paranoia2\xash.dll" \
copy $(TargetDir)\xash.dll "D:\Area51\xash.dll" \
copy $(TargetDir)\xash.dll "D:\Quake\xash.dll" \
"D:\Xash3D\xash.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
@ -75,6 +75,9 @@ BuildCmds= \
"D:\Area51\xash.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"D:\Quake\xash.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "engine - Win32 Debug"
@ -113,6 +116,7 @@ BuildCmds= \
copy $(TargetDir)\xash.dll "D:\Xash3D\xash.dll" \
copy $(TargetDir)\xash.dll "D:\Paranoia2\xash.dll" \
copy $(TargetDir)\xash.dll "D:\Area51\xash.dll" \
copy $(TargetDir)\xash.dll "D:\Quake\xash.dll" \
"D:\Xash3D\xash.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
@ -123,6 +127,9 @@ BuildCmds= \
"D:\Area51\xash.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"D:\Quake\xash.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF

View File

@ -2388,17 +2388,17 @@ void pfnParticleEffect( const float *org, const float *dir, float color, float c
if( MSG_GetNumBytesLeft( &sv.datagram ) < 16 )
return;
MSG_BeginServerCmd( &sv.multicast, svc_particle );
MSG_WriteVec3Coord( &sv.multicast, org );
MSG_BeginServerCmd( &sv.datagram, svc_particle );
MSG_WriteVec3Coord( &sv.datagram, org );
v = bound( -128, dir[0] * 16.0f, 127 );
MSG_WriteChar( &sv.multicast, v );
MSG_WriteChar( &sv.datagram, v );
v = bound( -128, dir[1] * 16.0f, 127 );
MSG_WriteChar( &sv.multicast, v );
MSG_WriteChar( &sv.datagram, v );
v = bound( -128, dir[2] * 16.0f, 127 );
MSG_WriteChar( &sv.multicast, v );
MSG_WriteByte( &sv.multicast, count );
MSG_WriteByte( &sv.multicast, color );
MSG_WriteByte( &sv.multicast, 0 );
MSG_WriteChar( &sv.datagram, v );
MSG_WriteByte( &sv.datagram, count );
MSG_WriteByte( &sv.datagram, color );
MSG_WriteByte( &sv.datagram, 0 );
}
/*