31 Jul 2010
This commit is contained in:
parent
ee16654d23
commit
a152abab5c
|
@ -18,14 +18,15 @@ client\hud\
|
||||||
client\global\
|
client\global\
|
||||||
common\
|
common\
|
||||||
game_shared\
|
game_shared\
|
||||||
|
game_launch\
|
||||||
gameui\
|
gameui\
|
||||||
engine\
|
engine\
|
||||||
engine\client\
|
engine\client\
|
||||||
engine\server\
|
engine\server\
|
||||||
engine\common\
|
engine\common\
|
||||||
platform\
|
launch\
|
||||||
platform\imagelib\
|
launch\imagelib\
|
||||||
platform\soundlib\
|
launch\soundlib\
|
||||||
physic\
|
physic\
|
||||||
public\
|
public\
|
||||||
server\
|
server\
|
||||||
|
|
|
@ -105,7 +105,7 @@ inline void *GET_PRIVATE( edict_t *pent )
|
||||||
// NOTE: Xash3D using custom StringTable System that using safety methods for access to strings
|
// NOTE: Xash3D using custom StringTable System that using safety methods for access to strings
|
||||||
// and never make duplicated strings, so it make no differences between ALLOC_STRING and MAKE_STRING
|
// and never make duplicated strings, so it make no differences between ALLOC_STRING and MAKE_STRING
|
||||||
// leave macros as legacy
|
// leave macros as legacy
|
||||||
// if you want using classical half-life strings for some reasons, please set sys_sharedstrings into "1" in vars.rc
|
// if you want using classical half-life strings for some reasons, please set sys_sharedstrings into "1" in config.cfg
|
||||||
// and get back original strings code from gold source SDK.
|
// and get back original strings code from gold source SDK.
|
||||||
#define ALLOC_STRING (*g_engfuncs.pfnAllocString)
|
#define ALLOC_STRING (*g_engfuncs.pfnAllocString)
|
||||||
#define MAKE_STRING (*g_engfuncs.pfnAllocString)
|
#define MAKE_STRING (*g_engfuncs.pfnAllocString)
|
||||||
|
|
|
@ -481,7 +481,7 @@ void GameDLLInit( void )
|
||||||
CVAR_REGISTER_SKILL ( sk_player_leg3 );
|
CVAR_REGISTER_SKILL ( sk_player_leg3 );
|
||||||
// END REGISTER CVARS FOR SKILL LEVEL STUFF
|
// END REGISTER CVARS FOR SKILL LEVEL STUFF
|
||||||
|
|
||||||
SERVER_COMMAND( "exec skill.rc\n" );
|
SERVER_COMMAND( "exec skill.cfg\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform any shutdown operations
|
// perform any shutdown operations
|
||||||
|
|
|
@ -315,7 +315,7 @@ void CGameRules::RefreshSkillData ( void )
|
||||||
|
|
||||||
CGameRules *InstallGameRules( void )
|
CGameRules *InstallGameRules( void )
|
||||||
{
|
{
|
||||||
SERVER_COMMAND( "exec game.rc\n" );
|
SERVER_COMMAND( "exec game.cfg\n" );
|
||||||
g_engfuncs.pfnServerExecute(); // stupid fucking winspool.h AGRHHH!!!!
|
g_engfuncs.pfnServerExecute(); // stupid fucking winspool.h AGRHHH!!!!
|
||||||
|
|
||||||
if ( !gpGlobals->deathmatch )
|
if ( !gpGlobals->deathmatch )
|
||||||
|
|
10
change.log
10
change.log
|
@ -1,5 +1,15 @@
|
||||||
build ????
|
build ????
|
||||||
|
|
||||||
|
Engine: enable server.cfg, listenserver.cfg, mapcycle.txt etc
|
||||||
|
|
||||||
|
build 1270
|
||||||
|
|
||||||
|
SDK: Shared launcher code
|
||||||
|
Engine: Partially fix bmodel interpolation
|
||||||
|
Engine: use standard .cfg files instead of .rc files
|
||||||
|
|
||||||
|
build 1269
|
||||||
|
|
||||||
Render: cut invisible water polygons
|
Render: cut invisible water polygons
|
||||||
Render: implement EF_NOWATERCSG for control func_water backface culling
|
Render: implement EF_NOWATERCSG for control func_water backface culling
|
||||||
Tools: fix wadlib and spritegen round bugs
|
Tools: fix wadlib and spritegen round bugs
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#define CVARDEF_H
|
#define CVARDEF_H
|
||||||
|
|
||||||
// cvar flags
|
// cvar flags
|
||||||
#define FCVAR_ARCHIVE BIT(0) // set to cause it to be saved to vars.rc
|
#define FCVAR_ARCHIVE BIT(0) // set to cause it to be saved to config.cfg
|
||||||
#define FCVAR_USERINFO BIT(1) // added to userinfo when changed
|
#define FCVAR_USERINFO BIT(1) // added to userinfo when changed
|
||||||
#define FCVAR_SERVERINFO BIT(2) // added to serverinfo when changed
|
#define FCVAR_SERVERINFO BIT(2) // added to serverinfo when changed
|
||||||
#define FCVAR_LATCH BIT(3) // create latched cvar
|
#define FCVAR_LATCH BIT(3) // create latched cvar
|
||||||
|
|
|
@ -129,7 +129,7 @@ typedef struct ui_enginefuncs_s
|
||||||
|
|
||||||
// engine launcher
|
// engine launcher
|
||||||
void (*pfnShellExecute)( const char *name, const char *args, bool closeEngine );
|
void (*pfnShellExecute)( const char *name, const char *args, bool closeEngine );
|
||||||
void (*pfnWriteServerConfig)( void );
|
void (*pfnWriteServerConfig)( const char *name );
|
||||||
void (*pfnChangeInstance)( const char *newInstance, const char *szFinalMessage );
|
void (*pfnChangeInstance)( const char *newInstance, const char *szFinalMessage );
|
||||||
void (*pfnChangeVideo)( const char *dllName );
|
void (*pfnChangeVideo)( const char *dllName );
|
||||||
void (*pfnChangeAudio)( const char *dllName );
|
void (*pfnChangeAudio)( const char *dllName );
|
||||||
|
|
13
debug.bat
13
debug.bat
|
@ -20,7 +20,7 @@ if errorlevel 1 set BUILD_ERROR=1
|
||||||
%MSDEV% gameui/gameui.dsp %CONFIG%"gameui - Win32 Debug" %build_target%
|
%MSDEV% gameui/gameui.dsp %CONFIG%"gameui - Win32 Debug" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
%MSDEV% platform/platform.dsp %CONFIG%"platform - Win32 Debug" %build_target%
|
%MSDEV% launch/launch.dsp %CONFIG%"launch - Win32 Debug" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
%MSDEV% physic/physic.dsp %CONFIG%"physic - Win32 Debug" %build_target%
|
%MSDEV% physic/physic.dsp %CONFIG%"physic - Win32 Debug" %build_target%
|
||||||
|
@ -29,9 +29,6 @@ if errorlevel 1 set BUILD_ERROR=1
|
||||||
%MSDEV% vid_gl/vid_gl.dsp %CONFIG%"vid_gl - Win32 Debug" %build_target%
|
%MSDEV% vid_gl/vid_gl.dsp %CONFIG%"vid_gl - Win32 Debug" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
%MSDEV% spirit/spirit.dsp %CONFIG%"spirit - Win32 Debug" %build_target%
|
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
|
||||||
|
|
||||||
%MSDEV% snd_dx/snd_dx.dsp %CONFIG%"snd_dx - Win32 Debug" %build_target%
|
%MSDEV% snd_dx/snd_dx.dsp %CONFIG%"snd_dx - Win32 Debug" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
|
@ -61,16 +58,14 @@ if exist bshift\bshift.plg del /f /q bshift\bshift.plg
|
||||||
if exist client\client.plg del /f /q client\client.plg
|
if exist client\client.plg del /f /q client\client.plg
|
||||||
if exist engine\engine.plg del /f /q engine\engine.plg
|
if exist engine\engine.plg del /f /q engine\engine.plg
|
||||||
if exist gameui\gameui.plg del /f /q gameui\gameui.plg
|
if exist gameui\gameui.plg del /f /q gameui\gameui.plg
|
||||||
if exist platform\platform.plg del /f /q platform\platform.plg
|
if exist launch\launch.plg del /f /q launch\launch.plg
|
||||||
if exist physic\physic.plg del /f /q physic\physic.plg
|
if exist physic\physic.plg del /f /q physic\physic.plg
|
||||||
if exist spirit\spirit.plg del /f /q spirit\spirit.plg
|
|
||||||
if exist vid_gl\vid_gl.plg del /f /q vid_gl\vid_gl.plg
|
if exist vid_gl\vid_gl.plg del /f /q vid_gl\vid_gl.plg
|
||||||
if exist viewer\viewer.plg del /f /q viewer\viewer.plg
|
if exist viewer\viewer.plg del /f /q viewer\viewer.plg
|
||||||
if exist snd_dx\snd_dx.plg del /f /q snd_dx\snd_dx.plg
|
if exist snd_dx\snd_dx.plg del /f /q snd_dx\snd_dx.plg
|
||||||
if exist xtools\xtools.plg del /f /q xtools\xtools.plg
|
if exist xtools\xtools.plg del /f /q xtools\xtools.plg
|
||||||
|
|
||||||
|
echo
|
||||||
echo Build succeeded!
|
echo Build succeeded!
|
||||||
echo Please wait. Xash is now loading
|
echo
|
||||||
cd D:\Xash3D\
|
|
||||||
hl.exe -log -dev 3 +loadquick
|
|
||||||
:done
|
:done
|
|
@ -248,6 +248,12 @@ void CL_ParseFrame( sizebuf_t *msg )
|
||||||
else cl.frame.valid = true; // valid delta parse
|
else cl.frame.valid = true; // valid delta parse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clamp time
|
||||||
|
if( cl.time > cl.frame.servertime )
|
||||||
|
cl.time = cl.frame.servertime;
|
||||||
|
else if( cl.time < cl.frame.servertime - cl.serverframetime )
|
||||||
|
cl.time = cl.frame.servertime - cl.serverframetime;
|
||||||
|
|
||||||
// read packet entities
|
// read packet entities
|
||||||
cmd = MSG_ReadByte( msg );
|
cmd = MSG_ReadByte( msg );
|
||||||
if( cmd != svc_packetentities ) Host_Error("CL_ParseFrame: not packetentities[%d]\n", cmd );
|
if( cmd != svc_packetentities ) Host_Error("CL_ParseFrame: not packetentities[%d]\n", cmd );
|
||||||
|
@ -330,6 +336,21 @@ void CL_AddEntities( void )
|
||||||
if( cls.state != ca_active )
|
if( cls.state != ca_active )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if( cl.time > cl.frame.servertime )
|
||||||
|
{
|
||||||
|
cl.time = cl.frame.servertime;
|
||||||
|
cl.lerpFrac = 1.0f;
|
||||||
|
}
|
||||||
|
else if( cl.time < cl.frame.servertime - cl.serverframetime )
|
||||||
|
{
|
||||||
|
cl.time = cl.frame.servertime - cl.serverframetime;
|
||||||
|
cl.lerpFrac = 0;
|
||||||
|
}
|
||||||
|
else cl.lerpFrac = 1.0f - ( cl.frame.servertime - cl.time ) * (float)( cl.serverframetime * 0.0001f );
|
||||||
|
|
||||||
|
if( cl.refdef.paused )
|
||||||
|
cl.lerpFrac = 1.0f;
|
||||||
|
|
||||||
cl.render_flags = 0;
|
cl.render_flags = 0;
|
||||||
|
|
||||||
clgame.dllFuncs.pfnStartFrame(); // new frame has begin
|
clgame.dllFuncs.pfnStartFrame(); // new frame has begin
|
||||||
|
|
|
@ -18,7 +18,6 @@ cvar_t *cl_nodelta;
|
||||||
cvar_t *cl_crosshair;
|
cvar_t *cl_crosshair;
|
||||||
cvar_t *cl_shownet;
|
cvar_t *cl_shownet;
|
||||||
cvar_t *cl_showmiss;
|
cvar_t *cl_showmiss;
|
||||||
cvar_t *cl_lightstyle_lerping;
|
|
||||||
cvar_t *userinfo;
|
cvar_t *userinfo;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -438,7 +437,9 @@ void CL_Crashed_f( void )
|
||||||
// stop any downloads
|
// stop any downloads
|
||||||
if( cls.download ) FS_Close( cls.download );
|
if( cls.download ) FS_Close( cls.download );
|
||||||
|
|
||||||
|
Host_WriteOpenGLConfig();
|
||||||
Host_WriteConfig(); // write config
|
Host_WriteConfig(); // write config
|
||||||
|
|
||||||
if( re ) re->RestoreGamma();
|
if( re ) re->RestoreGamma();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,11 +827,6 @@ void CL_ReadPackets( void )
|
||||||
CL_ReadDemoMessage();
|
CL_ReadDemoMessage();
|
||||||
else CL_ReadNetMessage();
|
else CL_ReadNetMessage();
|
||||||
|
|
||||||
cl.time = bound( cl.frame.servertime - cl.serverframetime, cl.time, cl.frame.servertime );
|
|
||||||
|
|
||||||
if( cl.refdef.paused ) cl.lerpFrac = 1.0f;
|
|
||||||
else cl.lerpFrac = 1.0 - (cl.frame.servertime - cl.time) / (float)cl.serverframetime;
|
|
||||||
|
|
||||||
// singleplayer never has connection timeout
|
// singleplayer never has connection timeout
|
||||||
if( NET_IsLocalAddress( cls.netchan.remote_address ))
|
if( NET_IsLocalAddress( cls.netchan.remote_address ))
|
||||||
return;
|
return;
|
||||||
|
@ -1089,7 +1085,6 @@ void CL_InitLocal( void )
|
||||||
userinfo = Cvar_Get( "@userinfo", "0", CVAR_READ_ONLY, "" ); // use ->modified value only
|
userinfo = Cvar_Get( "@userinfo", "0", CVAR_READ_ONLY, "" ); // use ->modified value only
|
||||||
cl_showfps = Cvar_Get( "cl_showfps", "1", CVAR_ARCHIVE, "show client fps" );
|
cl_showfps = Cvar_Get( "cl_showfps", "1", CVAR_ARCHIVE, "show client fps" );
|
||||||
cl_lw = Cvar_Get( "cl_lw", "1", CVAR_ARCHIVE|CVAR_USERINFO, "enable client weapon predicting" );
|
cl_lw = Cvar_Get( "cl_lw", "1", CVAR_ARCHIVE|CVAR_USERINFO, "enable client weapon predicting" );
|
||||||
cl_lightstyle_lerping = Cvar_Get( "cl_lightstyle_lerping", "0", CVAR_ARCHIVE, "enables animated light lerping (perfomance option)" );
|
|
||||||
cl_smooth = Cvar_Get ("cl_smooth", "1", 0, "smooth up stair climbing and interpolate position in multiplayer" );
|
cl_smooth = Cvar_Get ("cl_smooth", "1", 0, "smooth up stair climbing and interpolate position in multiplayer" );
|
||||||
|
|
||||||
// register our commands
|
// register our commands
|
||||||
|
@ -1248,7 +1243,7 @@ void CL_Init( void )
|
||||||
===============
|
===============
|
||||||
CL_Shutdown
|
CL_Shutdown
|
||||||
|
|
||||||
FIXME: this is a callback from Sys_Quit and Host_Error. It would be better
|
FIXME: this is a callback from Sys_Quit and Host_Error. It would be better
|
||||||
to run quit through here before the final handoff to the sys code.
|
to run quit through here before the final handoff to the sys code.
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
|
@ -1258,8 +1253,9 @@ void CL_Shutdown( void )
|
||||||
if( host.state == HOST_ERROR ) return;
|
if( host.state == HOST_ERROR ) return;
|
||||||
if( !cls.initialized ) return;
|
if( !cls.initialized ) return;
|
||||||
|
|
||||||
Host_WriteConfig();
|
Host_WriteOpenGLConfig ();
|
||||||
CL_UnloadProgs();
|
Host_WriteConfig ();
|
||||||
SCR_Shutdown();
|
CL_UnloadProgs ();
|
||||||
|
SCR_Shutdown ();
|
||||||
cls.initialized = false;
|
cls.initialized = false;
|
||||||
}
|
}
|
|
@ -92,42 +92,19 @@ light animations
|
||||||
void CL_RunLightStyles( void )
|
void CL_RunLightStyles( void )
|
||||||
{
|
{
|
||||||
int i, ofs;
|
int i, ofs;
|
||||||
float l, oldval, curval;
|
|
||||||
clightstyle_t *ls;
|
clightstyle_t *ls;
|
||||||
|
float l;
|
||||||
|
|
||||||
if( cls.state != ca_active ) return;
|
if( cls.state != ca_active ) return;
|
||||||
|
|
||||||
if( cl_lightstyle_lerping->integer )
|
ofs = cl.time / 100;
|
||||||
{
|
if( ofs == lastofs ) return;
|
||||||
ofs = cl.frame.servertime / 100;
|
lastofs = ofs;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ofs = cl.time / 100;
|
|
||||||
if( ofs == lastofs ) return;
|
|
||||||
lastofs = ofs;
|
|
||||||
}
|
|
||||||
|
|
||||||
for( i = 0, ls = cl_lightstyle; i < MAX_LIGHTSTYLES; i++, ls++ )
|
for( i = 0, ls = cl_lightstyle; i < MAX_LIGHTSTYLES; i++, ls++ )
|
||||||
{
|
{
|
||||||
if( ls->length == 0 ) l = 0.0f;
|
if( ls->length == 0 ) l = 0.0f;
|
||||||
else if( ls->length == 1 ) l = ls->map[0];
|
else if( ls->length == 1 ) l = ls->map[0];
|
||||||
else if( cl_lightstyle_lerping->integer )
|
|
||||||
{
|
|
||||||
int curnum = (ofs % ls->length);
|
|
||||||
int oldnum = curnum - 1;
|
|
||||||
|
|
||||||
// sequence is ends ?
|
|
||||||
if( oldnum < 0 )
|
|
||||||
oldnum += ls->length;
|
|
||||||
|
|
||||||
oldval = ls->map[oldnum];
|
|
||||||
curval = ls->map[curnum];
|
|
||||||
|
|
||||||
// don't lerping fast sequences
|
|
||||||
if( fabs( curval - oldval ) >= 1.0f ) l = curval;
|
|
||||||
else l = oldval + cl.lerpFrac * (curval - oldval);
|
|
||||||
}
|
|
||||||
else l = ls->map[ofs%ls->length];
|
else l = ls->map[ofs%ls->length];
|
||||||
|
|
||||||
VectorSet( ls->value, l, l, l );
|
VectorSet( ls->value, l, l, l );
|
||||||
|
|
|
@ -355,7 +355,6 @@ extern cvar_t *cl_showmiss;
|
||||||
extern cvar_t *cl_testlights;
|
extern cvar_t *cl_testlights;
|
||||||
extern cvar_t *cl_allow_levelshots;
|
extern cvar_t *cl_allow_levelshots;
|
||||||
extern cvar_t *cl_levelshot_name;
|
extern cvar_t *cl_levelshot_name;
|
||||||
extern cvar_t *cl_lightstyle_lerping;
|
|
||||||
extern cvar_t *scr_centertime;
|
extern cvar_t *scr_centertime;
|
||||||
extern cvar_t *scr_download;
|
extern cvar_t *scr_download;
|
||||||
extern cvar_t *scr_loading;
|
extern cvar_t *scr_loading;
|
||||||
|
|
|
@ -123,8 +123,8 @@ int Host_CompareFileTime( long ft1, long ft2 );
|
||||||
bool Host_NewGame( const char *mapName, bool loadGame );
|
bool Host_NewGame( const char *mapName, bool loadGame );
|
||||||
void Host_EndGame( const char *message, ... );
|
void Host_EndGame( const char *message, ... );
|
||||||
void Host_AbortCurrentFrame( void );
|
void Host_AbortCurrentFrame( void );
|
||||||
void Host_WriteDefaultConfig( void );
|
void Host_WriteServerConfig( const char *name );
|
||||||
void Host_WriteServerConfig( void );
|
void Host_WriteOpenGLConfig( void );
|
||||||
void Host_WriteConfig( void );
|
void Host_WriteConfig( void );
|
||||||
bool Host_IsLocalGame( void );
|
bool Host_IsLocalGame( void );
|
||||||
void Host_ShutdownServer( void );
|
void Host_ShutdownServer( void );
|
||||||
|
|
|
@ -607,7 +607,7 @@ bool Cmd_CheckMapsList( bool fRefresh )
|
||||||
file_t *f;
|
file_t *f;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if( FS_FileExists( "†scripts/maps.lst" ) && !fRefresh )
|
if( FS_FileExists( "†maps.lst" ) && !fRefresh )
|
||||||
return true; // exist
|
return true; // exist
|
||||||
|
|
||||||
t = FS_Search( "maps/*.bsp", false );
|
t = FS_Search( "maps/*.bsp", false );
|
||||||
|
@ -709,7 +709,7 @@ bool Cmd_CheckMapsList( bool fRefresh )
|
||||||
if( t ) Mem_Free( t ); // free search result
|
if( t ) Mem_Free( t ); // free search result
|
||||||
|
|
||||||
// write generated maps.lst
|
// write generated maps.lst
|
||||||
if( FS_WriteFile( "scripts/maps.lst", buffer, com.strlen( buffer )))
|
if( FS_WriteFile( "maps.lst", buffer, com.strlen( buffer )))
|
||||||
{
|
{
|
||||||
if( buffer ) Mem_Free( buffer );
|
if( buffer ) Mem_Free( buffer );
|
||||||
return true;
|
return true;
|
||||||
|
@ -748,16 +748,22 @@ with the archive flag set to true.
|
||||||
|
|
||||||
static void Cmd_WriteCvar(const char *name, const char *string, const char *desc, void *f )
|
static void Cmd_WriteCvar(const char *name, const char *string, const char *desc, void *f )
|
||||||
{
|
{
|
||||||
if( !desc ) return; // ignore cvars without description (fantom variables)
|
if( !desc || !*desc ) return; // ignore cvars without description (fantom variables)
|
||||||
FS_Printf(f, "seta %s \"%s\"\n", name, string );
|
FS_Printf(f, "seta %s \"%s\"\n", name, string );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_WriteServerCvar(const char *name, const char *string, const char *desc, void *f )
|
static void Cmd_WriteServerCvar(const char *name, const char *string, const char *desc, void *f )
|
||||||
{
|
{
|
||||||
if( !desc ) return; // ignore cvars without description (fantom variables)
|
if( !desc || !*desc ) return; // ignore cvars without description (fantom variables)
|
||||||
FS_Printf(f, "sets %s \"%s\"\n", name, string );
|
FS_Printf(f, "sets %s \"%s\"\n", name, string );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Cmd_WriteOpenGLCvar( const char *name, const char *string, const char *desc, void *f )
|
||||||
|
{
|
||||||
|
if( !desc || !*desc ) return; // ignore cvars without description (fantom variables)
|
||||||
|
FS_Printf( f, "setr %s \"%s\"\n", name, string );
|
||||||
|
}
|
||||||
|
|
||||||
static void Cmd_WriteHelp(const char *name, const char *unused, const char *desc, void *f )
|
static void Cmd_WriteHelp(const char *name, const char *unused, const char *desc, void *f )
|
||||||
{
|
{
|
||||||
if( !desc ) return; // ignore fantom cmds
|
if( !desc ) return; // ignore fantom cmds
|
||||||
|
@ -777,11 +783,16 @@ void Cmd_WriteServerVariables( file_t *f )
|
||||||
Cvar_LookupVars( CVAR_SERVERINFO, NULL, f, Cmd_WriteServerCvar );
|
Cvar_LookupVars( CVAR_SERVERINFO, NULL, f, Cmd_WriteServerCvar );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Cmd_WriteOpenGLVariables( file_t *f )
|
||||||
|
{
|
||||||
|
Cvar_LookupVars( CVAR_RENDERINFO, NULL, f, Cmd_WriteOpenGLCvar );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
Host_WriteConfig
|
Host_WriteConfig
|
||||||
|
|
||||||
Writes key bindings and archived cvars to vars.rc
|
Writes key bindings and archived cvars to config.cfg
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void Host_WriteConfig( void )
|
void Host_WriteConfig( void )
|
||||||
|
@ -790,106 +801,68 @@ void Host_WriteConfig( void )
|
||||||
|
|
||||||
if( !cls.initialized ) return;
|
if( !cls.initialized ) return;
|
||||||
|
|
||||||
f = FS_Open( "config/keys.rc", "w" );
|
f = FS_Open( "config.cfg", "w" );
|
||||||
if( f )
|
|
||||||
{
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
|
||||||
FS_Printf( f, "//\t\t\tkeys.rc - current key bindings\n" );
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
Key_WriteBindings( f );
|
|
||||||
FS_Close( f );
|
|
||||||
}
|
|
||||||
else MsgDev( D_ERROR, "Couldn't write keys.rc.\n" );
|
|
||||||
|
|
||||||
f = FS_Open( "config/vars.rc", "w" );
|
|
||||||
if( f )
|
if( f )
|
||||||
{
|
{
|
||||||
FS_Printf( f, "//=======================================================================\n");
|
FS_Printf( f, "//=======================================================================\n");
|
||||||
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
||||||
FS_Printf( f, "//\t\t\tvars.rc - archive of cvars\n" );
|
FS_Printf( f, "//\t\t\tconfig.cfg - archive of cvars\n" );
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
Cmd_WriteVariables(f);
|
|
||||||
FS_Close (f);
|
|
||||||
}
|
|
||||||
else MsgDev( D_ERROR, "Couldn't write vars.rc.\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
Host_WriteConfig
|
|
||||||
|
|
||||||
Writes key bindings and archived cvars to vars.def and keys.def
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
void Host_WriteDefaultConfig( void )
|
|
||||||
{
|
|
||||||
file_t *f;
|
|
||||||
bool hasChanged = false;
|
|
||||||
|
|
||||||
if( !cls.initialized ) return;
|
|
||||||
|
|
||||||
if( !FS_FileExists( "config/keys.def" )) Cmd_ExecuteString( "resetkeys\n" );
|
|
||||||
if( !FS_FileExists( "config/vars.def" )) Cmd_ExecuteString( "unsetall\n" );
|
|
||||||
|
|
||||||
if( !FS_FileExists( "config/keys.def" ) && (f = FS_Open( "config/keys.def", "w" )) != NULL )
|
|
||||||
{
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
|
||||||
FS_Printf( f, "//\t\t\tkeys.def - default key bindings\n" );
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
FS_Printf( f, "//=======================================================================\n" );
|
||||||
Key_WriteBindings( f );
|
Key_WriteBindings( f );
|
||||||
FS_Close( f );
|
|
||||||
hasChanged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !FS_FileExists( "config/vars.def" ) && (f = FS_Open( "config/vars.def", "w" )) != NULL )
|
|
||||||
{
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
|
||||||
FS_Printf( f, "//\t\t\tvars.def - archive of default cvar states\n" );
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
Cmd_WriteVariables( f );
|
Cmd_WriteVariables( f );
|
||||||
FS_Close( f );
|
FS_Close( f );
|
||||||
hasChanged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( hasChanged )
|
|
||||||
{
|
|
||||||
// restart user config
|
|
||||||
Cbuf_AddText( "exec keys.rc\n" );
|
|
||||||
Cbuf_AddText( "exec vars.rc\n" );
|
|
||||||
Cbuf_Execute();
|
|
||||||
}
|
}
|
||||||
|
else MsgDev( D_ERROR, "Couldn't write config.cfg.\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
Host_WriteServerConfig
|
Host_WriteServerConfig
|
||||||
|
|
||||||
save serverinfo variables into server.rc (using for dedicated server too)
|
save serverinfo variables into server.cfg (using for dedicated server too)
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
void Host_WriteServerConfig( void )
|
void Host_WriteServerConfig( const char *name )
|
||||||
{
|
{
|
||||||
file_t *f;
|
file_t *f;
|
||||||
|
|
||||||
SV_InitGameProgs(); // collect user variables
|
SV_InitGameProgs(); // collect user variables
|
||||||
|
|
||||||
if(( f = FS_Open( "config/server.rc", "w" )) != NULL )
|
if(( f = FS_Open( name, "w" )) != NULL )
|
||||||
{
|
{
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
FS_Printf( f, "//=======================================================================\n" );
|
||||||
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
||||||
FS_Printf( f, "//\t\t\tserver.rc - server temporare config\n" );
|
FS_Printf( f, "//\t\t\tserver.cfg - server temporare config\n" );
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
FS_Printf( f, "//=======================================================================\n" );
|
||||||
Cmd_WriteServerVariables( f );
|
Cmd_WriteServerVariables( f );
|
||||||
|
|
||||||
// add default map if exist
|
|
||||||
if( com.strlen( Cvar_VariableString( "defaultmap" )) != 0 )
|
|
||||||
FS_Printf( f, "map %s\n", Cvar_VariableString( "defaultmap" ));
|
|
||||||
FS_Close( f );
|
FS_Close( f );
|
||||||
}
|
}
|
||||||
else MsgDev( D_ERROR, "Couldn't write server.rc.\n" );
|
else MsgDev( D_ERROR, "Couldn't write %s.\n", name );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
Host_WriteOpenGLConfig
|
||||||
|
|
||||||
|
save renderinfo variables into opengl.cfg
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
void Host_WriteOpenGLConfig( void )
|
||||||
|
{
|
||||||
|
file_t *f;
|
||||||
|
|
||||||
|
f = FS_Open( "opengl.cfg", "w" );
|
||||||
|
if( f )
|
||||||
|
{
|
||||||
|
FS_Printf( f, "//=======================================================================\n" );
|
||||||
|
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
||||||
|
FS_Printf( f, "//\t\t opengl.cfg - archive of opengl extension cvars\n");
|
||||||
|
FS_Printf( f, "//=======================================================================\n" );
|
||||||
|
Cmd_WriteOpenGLVariables( f );
|
||||||
|
FS_Close( f );
|
||||||
|
}
|
||||||
|
else MsgDev( D_ERROR, "can't update opengl.cfg.\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Key_EnumCmds_f( void )
|
void Key_EnumCmds_f( void )
|
||||||
|
|
|
@ -436,7 +436,7 @@ void Key_Init( void )
|
||||||
Cmd_AddCommand( "bindlist", Key_Bindlist_f, "display current key bindings" );
|
Cmd_AddCommand( "bindlist", Key_Bindlist_f, "display current key bindings" );
|
||||||
Cmd_AddCommand( "makehelp", Key_EnumCmds_f, "write help.txt that contains all console cvars and cmds" );
|
Cmd_AddCommand( "makehelp", Key_EnumCmds_f, "write help.txt that contains all console cvars and cmds" );
|
||||||
|
|
||||||
// setup hardcode binding. "unbindall" from keys.rc will be reset it
|
// setup hardcode binding. "unbindall" from config.cfg will be reset it
|
||||||
for( kn = keynames; kn->name; kn++ ) Key_SetBinding( kn->keynum, kn->binding );
|
for( kn = keynames; kn->name; kn++ ) Key_SetBinding( kn->keynum, kn->binding );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ static net_field_t ent_fields[] =
|
||||||
{ ES_FIELD(health), NET_FLOAT, false }, // client health
|
{ ES_FIELD(health), NET_FLOAT, false }, // client health
|
||||||
{ ES_FIELD(iStepLeft), NET_LONG, false }, // client footsteps
|
{ ES_FIELD(iStepLeft), NET_LONG, false }, // client footsteps
|
||||||
{ ES_FIELD(flFallVelocity), NET_FLOAT, false }, // client fallvelocity
|
{ ES_FIELD(flFallVelocity), NET_FLOAT, false }, // client fallvelocity
|
||||||
|
{ ES_FIELD(localtime), NET_FLOAT, false }, // push localtime
|
||||||
// revision 6. reserve for 5 fields without enlarge null_msg_size
|
// revision 6. reserve for 5 fields without enlarge null_msg_size
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
|
@ -776,8 +776,7 @@ void Host_Init( const int argc, const char **argv )
|
||||||
if( host.type != HOST_DEDICATED )
|
if( host.type != HOST_DEDICATED )
|
||||||
{
|
{
|
||||||
// get user configuration
|
// get user configuration
|
||||||
Cbuf_AddText( "exec keys.rc\n" );
|
Cbuf_AddText( "exec config.cfg\n" );
|
||||||
Cbuf_AddText( "exec vars.rc\n" );
|
|
||||||
Cbuf_Execute();
|
Cbuf_Execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +795,7 @@ void Host_Init( const int argc, const char **argv )
|
||||||
host_cheats = Cvar_Get( "sv_cheats", "0", CVAR_LATCH, "allow cheat variables to enable" );
|
host_cheats = Cvar_Get( "sv_cheats", "0", CVAR_LATCH, "allow cheat variables to enable" );
|
||||||
host_maxfps = Cvar_Get( "fps_max", "72", CVAR_ARCHIVE, "host fps upper limit" );
|
host_maxfps = Cvar_Get( "fps_max", "72", CVAR_ARCHIVE, "host fps upper limit" );
|
||||||
host_framerate = Cvar_Get( "host_framerate", "0", 0, "locks frame timing to this value in seconds" );
|
host_framerate = Cvar_Get( "host_framerate", "0", 0, "locks frame timing to this value in seconds" );
|
||||||
host_serverstate = Cvar_Get( "host_serverstate", "0", CVAR_SERVERINFO, "displays current server state" );
|
host_serverstate = Cvar_Get( "host_serverstate", "0", 0, "displays current server state" );
|
||||||
|
|
||||||
s = va( "Xash3D %i/%g (hw build ^3%i^7)", PROTOCOL_VERSION, SI->version, com_buildnum( ));
|
s = va( "Xash3D %i/%g (hw build ^3%i^7)", PROTOCOL_VERSION, SI->version, com_buildnum( ));
|
||||||
Cvar_Get( "version", s, CVAR_INIT, "engine current version" );
|
Cvar_Get( "version", s, CVAR_INIT, "engine current version" );
|
||||||
|
@ -820,13 +819,16 @@ void Host_Init( const int argc, const char **argv )
|
||||||
SV_Init();
|
SV_Init();
|
||||||
CL_Init();
|
CL_Init();
|
||||||
|
|
||||||
Host_WriteDefaultConfig ();
|
|
||||||
|
|
||||||
if( host.type == HOST_DEDICATED )
|
if( host.type == HOST_DEDICATED )
|
||||||
{
|
{
|
||||||
Cmd_AddCommand( "quit", Sys_Quit, "quit the game" );
|
Cmd_AddCommand( "quit", Sys_Quit, "quit the game" );
|
||||||
Cmd_AddCommand( "exit", Sys_Quit, "quit the game" );
|
Cmd_AddCommand( "exit", Sys_Quit, "quit the game" );
|
||||||
Cbuf_AddText( "exec server.rc\n" ); // dedicated servers using settings from server.rc file
|
|
||||||
|
// dedicated servers using settings from server.cfg file
|
||||||
|
Cbuf_AddText( va( "exec %s\n", Cvar_VariableString( "servercfgfile" )));
|
||||||
|
Cbuf_Execute();
|
||||||
|
|
||||||
|
Cbuf_AddText( va( "map %s\n", Cvar_VariableString( "defaultmap" )));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -279,7 +279,7 @@ void SV_CalcFrameTime( void )
|
||||||
if( Host_IsLocalGame( ))
|
if( Host_IsLocalGame( ))
|
||||||
{
|
{
|
||||||
// don't allow really short or long frames
|
// don't allow really short or long frames
|
||||||
sv.frametime = bound( 10, host.frametime, 100 );
|
sv.frametime = bound( 16, host.frametime, 100 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -626,9 +626,12 @@ void SV_Init( void )
|
||||||
Cvar_Get ("fraglimit", "0", CVAR_SERVERINFO, "multiplayer fraglimit" );
|
Cvar_Get ("fraglimit", "0", CVAR_SERVERINFO, "multiplayer fraglimit" );
|
||||||
Cvar_Get ("timelimit", "0", CVAR_SERVERINFO, "multiplayer timelimit" );
|
Cvar_Get ("timelimit", "0", CVAR_SERVERINFO, "multiplayer timelimit" );
|
||||||
Cvar_Get ("protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO|CVAR_INIT, "displays server protocol version" );
|
Cvar_Get ("protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO|CVAR_INIT, "displays server protocol version" );
|
||||||
Cvar_Get ("defaultmap", "", 0, "holds the multiplayer mapname" );
|
Cvar_Get ("defaultmap", "", CVAR_SERVERINFO, "holds the multiplayer mapname" );
|
||||||
Cvar_Get ("showtriggers", "0", CVAR_LATCH, "debug cvar shows triggers" );
|
Cvar_Get ("showtriggers", "0", CVAR_LATCH, "debug cvar shows triggers" );
|
||||||
Cvar_Get ("sv_aim", "0", CVAR_ARCHIVE, "enable auto-aiming" );
|
Cvar_Get ("sv_aim", "0", CVAR_ARCHIVE, "enable auto-aiming" );
|
||||||
|
Cvar_Get ("mapcyclefile", "mapcycle.txt", 0, "name of multiplayer map cycle configuration file" );
|
||||||
|
Cvar_Get ( "servercfgfile","server.cfg", 0, "name of dedicated server configuration file" );
|
||||||
|
Cvar_Get ( "lservercfgfile","listenserver.cfg", 0, "name of listen server configuration file" );
|
||||||
|
|
||||||
// half-life shared variables
|
// half-life shared variables
|
||||||
sv_zmax = Cvar_Get ("sv_zmax", "0", 0, "zfar server value" );
|
sv_zmax = Cvar_Get ("sv_zmax", "0", 0, "zfar server value" );
|
||||||
|
|
|
@ -35,16 +35,16 @@ int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
|
||||||
{
|
{
|
||||||
HINSTANCE hmain;
|
HINSTANCE hmain;
|
||||||
|
|
||||||
if(( hmain = LoadLibrary( "bin\\platform.dll" )) == NULL )
|
if(( hmain = LoadLibrary( "bin\\launch.dll" )) == NULL )
|
||||||
{
|
{
|
||||||
Sys_Error( "Unable to load the platform.dll" );
|
Sys_Error( "Unable to load the launch.dll" );
|
||||||
}
|
}
|
||||||
|
|
||||||
pfnExecute mainFunc;
|
pfnExecute mainFunc;
|
||||||
|
|
||||||
if(( mainFunc = (pfnExecute)GetProcAddress( hmain, "CreateAPI" )) == NULL )
|
if(( mainFunc = (pfnExecute)GetProcAddress( hmain, "CreateAPI" )) == NULL )
|
||||||
{
|
{
|
||||||
Sys_Error( "Unable to find entry point in platform.dll" );
|
Sys_Error( "Unable to find entry point in launch.dll" );
|
||||||
}
|
}
|
||||||
|
|
||||||
return mainFunc( GAME_PATH, false );
|
return mainFunc( GAME_PATH, false );
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -274,20 +274,15 @@ void UI_DrawMouseCursor( void )
|
||||||
{
|
{
|
||||||
item = (menuCommon_s *)uiStatic.menuActive->items[i];
|
item = (menuCommon_s *)uiStatic.menuActive->items[i];
|
||||||
|
|
||||||
if( item->flags & (QMF_INACTIVE|QMF_HIDDEN))
|
if ( item->flags & (QMF_INACTIVE|QMF_HIDDEN))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( !UI_CursorInRect( item->x, item->y, item->width, item->height ))
|
if ( !UI_CursorInRect( item->x, item->y, item->width, item->height ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( item->flags & QMF_GRAYED )
|
if ( !(item->flags & QMF_GRAYED) && item->type == QMTYPE_FIELD )
|
||||||
{
|
{
|
||||||
hCursor = PIC_Load( UI_CURSOR_DISABLED );
|
hCursor = PIC_Load( UI_CURSOR_TYPING );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( item->type == QMTYPE_FIELD )
|
|
||||||
hCursor = PIC_Load( UI_CURSOR_TYPING );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1118,7 +1113,6 @@ void UI_Precache( void )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PIC_Load( UI_CURSOR_NORMAL );
|
PIC_Load( UI_CURSOR_NORMAL );
|
||||||
PIC_Load( UI_CURSOR_DISABLED );
|
|
||||||
PIC_Load( UI_CURSOR_TYPING );
|
PIC_Load( UI_CURSOR_TYPING );
|
||||||
PIC_Load( UI_LEFTARROW );
|
PIC_Load( UI_LEFTARROW );
|
||||||
PIC_Load( UI_LEFTARROWFOCUS );
|
PIC_Load( UI_LEFTARROWFOCUS );
|
||||||
|
|
|
@ -27,7 +27,6 @@ struct netadr_s
|
||||||
|
|
||||||
#define ART_BACKGROUND "gfx/shell/splash"
|
#define ART_BACKGROUND "gfx/shell/splash"
|
||||||
#define UI_CURSOR_NORMAL "gfx/shell/cursor"
|
#define UI_CURSOR_NORMAL "gfx/shell/cursor"
|
||||||
#define UI_CURSOR_DISABLED "gfx/shell/denied"
|
|
||||||
#define UI_CURSOR_TYPING "gfx/shell/typing"
|
#define UI_CURSOR_TYPING "gfx/shell/typing"
|
||||||
#define UI_SLIDER_MAIN "gfx/shell/slider"
|
#define UI_SLIDER_MAIN "gfx/shell/slider"
|
||||||
#define UI_LEFTARROW "gfx/shell/larrowdefault"
|
#define UI_LEFTARROW "gfx/shell/larrowdefault"
|
||||||
|
|
|
@ -141,7 +141,8 @@ static void UI_Controls_Callback( void *self, int event )
|
||||||
UI_PopMenu();
|
UI_PopMenu();
|
||||||
break;
|
break;
|
||||||
case ID_DEFAULTS:
|
case ID_DEFAULTS:
|
||||||
CLIENT_COMMAND( TRUE, "exec keys.def\n" );
|
//FIXME
|
||||||
|
// CLIENT_COMMAND( TRUE, "exec keys.def\n" );
|
||||||
UI_Controls_GetKeysList (); // reload all buttons
|
UI_Controls_GetKeysList (); // reload all buttons
|
||||||
break;
|
break;
|
||||||
case ID_ADVANCED:
|
case ID_ADVANCED:
|
||||||
|
|
|
@ -93,17 +93,27 @@ static void UI_CreateGame_Begin( void )
|
||||||
CVAR_SET_STRING( "sv_hostname", uiCreateGame.hostName.buffer );
|
CVAR_SET_STRING( "sv_hostname", uiCreateGame.hostName.buffer );
|
||||||
CVAR_SET_STRING( "defaultmap", uiCreateGame.mapName[uiCreateGame.mapsList.curItem] );
|
CVAR_SET_STRING( "defaultmap", uiCreateGame.mapName[uiCreateGame.mapsList.curItem] );
|
||||||
|
|
||||||
HOST_WRITECONFIG ();
|
|
||||||
|
|
||||||
// all done, start server
|
// all done, start server
|
||||||
if( uiCreateGame.dedicatedServer.enabled )
|
if( uiCreateGame.dedicatedServer.enabled )
|
||||||
{
|
{
|
||||||
|
HOST_WRITECONFIG ( CVAR_GET_STRING( "servercfgfile" ));
|
||||||
|
|
||||||
char cmd[128];
|
char cmd[128];
|
||||||
sprintf( cmd, "#%s", gMenu.m_gameinfo.gamefolder );
|
sprintf( cmd, "#%s", gMenu.m_gameinfo.gamefolder );
|
||||||
|
|
||||||
|
// NOTE: dedicated server will be executed "defaultmap"
|
||||||
|
// from engine after restarting
|
||||||
HOST_CHANGEGAME( cmd, "Starting dedicated server...\n" );
|
HOST_CHANGEGAME( cmd, "Starting dedicated server...\n" );
|
||||||
}
|
}
|
||||||
else CLIENT_COMMAND( FALSE, "exec server.rc\n" );
|
else
|
||||||
|
{
|
||||||
|
HOST_WRITECONFIG ( CVAR_GET_STRING( "lservercfgfile" ));
|
||||||
|
|
||||||
|
char cmd[128];
|
||||||
|
sprintf( cmd, "exec %s\nmap %s\n", CVAR_GET_STRING( "lservercfgfile" ), CVAR_GET_STRING( "defaultmap" ));
|
||||||
|
|
||||||
|
CLIENT_COMMAND( FALSE, cmd );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UI_PromptDialog( void )
|
static void UI_PromptDialog( void )
|
||||||
|
@ -170,7 +180,7 @@ static void UI_CreateGame_GetMapsList( void )
|
||||||
char *afile;
|
char *afile;
|
||||||
|
|
||||||
// HACKHACK: symbol '†' allow lookup only gamedir not basedir
|
// HACKHACK: symbol '†' allow lookup only gamedir not basedir
|
||||||
if( !CHECK_MAP_LIST( FALSE ) || (afile = (char *)LOAD_FILE( "†scripts/maps.lst", NULL )) == NULL )
|
if( !CHECK_MAP_LIST( FALSE ) || (afile = (char *)LOAD_FILE( "†maps.lst", NULL )) == NULL )
|
||||||
{
|
{
|
||||||
uiCreateGame.done.generic.flags |= QMF_GRAYED;
|
uiCreateGame.done.generic.flags |= QMF_GRAYED;
|
||||||
uiCreateGame.mapsList.itemNames = (const char **)uiCreateGame.mapsDescriptionPtr;
|
uiCreateGame.mapsList.itemNames = (const char **)uiCreateGame.mapsDescriptionPtr;
|
||||||
|
|
|
@ -270,7 +270,7 @@ Cmd_Exec_f
|
||||||
*/
|
*/
|
||||||
void Cmd_Exec_f( void )
|
void Cmd_Exec_f( void )
|
||||||
{
|
{
|
||||||
string rcpath;
|
string cfgpath;
|
||||||
size_t len;
|
size_t len;
|
||||||
char *f;
|
char *f;
|
||||||
|
|
||||||
|
@ -280,17 +280,17 @@ void Cmd_Exec_f( void )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
com.snprintf( rcpath, MAX_STRING, "config/%s", Cmd_Argv( 1 ));
|
com.strncpy( cfgpath, Cmd_Argv( 1 ), MAX_STRING );
|
||||||
FS_DefaultExtension( rcpath, ".rc" ); // append as default
|
FS_DefaultExtension( cfgpath, ".cfg" ); // append as default
|
||||||
|
|
||||||
f = FS_LoadFile( rcpath, &len );
|
f = FS_LoadFile( cfgpath, &len );
|
||||||
if( !f )
|
if( !f )
|
||||||
{
|
{
|
||||||
MsgDev( D_WARN, "couldn't exec %s\n", Cmd_Argv( 1 ));
|
MsgDev( D_NOTE, "couldn't exec %s\n", Cmd_Argv( 1 ));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MsgDev( D_LOAD, "execing %s\n", Cmd_Argv( 1 ));
|
MsgDev( D_INFO, "execing %s\n", Cmd_Argv( 1 ));
|
||||||
Cbuf_InsertText( f );
|
Cbuf_InsertText( f );
|
||||||
Mem_Free( f );
|
Mem_Free( f );
|
||||||
}
|
}
|
||||||
|
@ -628,7 +628,7 @@ void Cmd_Init( void )
|
||||||
Cmd_AddCommand ("echo", Cmd_Echo_f, "print a message to the console (useful in scripts)" );
|
Cmd_AddCommand ("echo", Cmd_Echo_f, "print a message to the console (useful in scripts)" );
|
||||||
Cmd_AddCommand ("wait", Cmd_Wait_f, "make script execution wait for some rendered frames" );
|
Cmd_AddCommand ("wait", Cmd_Wait_f, "make script execution wait for some rendered frames" );
|
||||||
Cmd_AddCommand ("cmdlist", Cmd_List_f, "display all console commands beginning with the specified prefix" );
|
Cmd_AddCommand ("cmdlist", Cmd_List_f, "display all console commands beginning with the specified prefix" );
|
||||||
Cmd_AddCommand ("stuffcmds", Cmd_StuffCmds_f, "execute commandline parameters (must be present in init.rc script)" );
|
Cmd_AddCommand ("stuffcmds", Cmd_StuffCmds_f, "execute commandline parameters (must be present in valve.rc script)" );
|
||||||
|
|
||||||
Memory_Init_Commands(); // memlib stats
|
Memory_Init_Commands(); // memlib stats
|
||||||
}
|
}
|
|
@ -395,7 +395,7 @@ destroy win32 console
|
||||||
void Con_DestroyConsole( void )
|
void Con_DestroyConsole( void )
|
||||||
{
|
{
|
||||||
// last text message into console or log
|
// last text message into console or log
|
||||||
MsgDev( D_NOTE, "Sys_FreeLibrary: Unloading platform.dll\n" );
|
MsgDev( D_NOTE, "Sys_FreeLibrary: Unloading launch.dll\n" );
|
||||||
|
|
||||||
Sys_CloseLog();
|
Sys_CloseLog();
|
||||||
if( Sys.hooked_out ) return;
|
if( Sys.hooked_out ) return;
|
|
@ -937,7 +937,7 @@ void Cvar_Init( void )
|
||||||
Cmd_AddCommand ("setu", Cvar_SetU_f, "create or change the value of a userinfo variable" );
|
Cmd_AddCommand ("setu", Cvar_SetU_f, "create or change the value of a userinfo variable" );
|
||||||
Cmd_AddCommand ("setp", Cvar_SetP_f, "create or change the value of a physicinfo variable" );
|
Cmd_AddCommand ("setp", Cvar_SetP_f, "create or change the value of a physicinfo variable" );
|
||||||
Cmd_AddCommand ("setr", Cvar_SetR_f, "create or change the value of a renderinfo variable" );
|
Cmd_AddCommand ("setr", Cvar_SetR_f, "create or change the value of a renderinfo variable" );
|
||||||
Cmd_AddCommand ("seta", Cvar_SetA_f, "create or change the value of a console variable that will be saved to vars.rc" );
|
Cmd_AddCommand ("seta", Cvar_SetA_f, "create or change the value of a console variable that will be saved to config.cfg" );
|
||||||
Cmd_AddCommand ("reset", Cvar_Reset_f, "reset any type variable to initial value" );
|
Cmd_AddCommand ("reset", Cvar_Reset_f, "reset any type variable to initial value" );
|
||||||
Cmd_AddCommand ("latch", Cvar_Latched_f, "apply latched values" );
|
Cmd_AddCommand ("latch", Cvar_Latched_f, "apply latched values" );
|
||||||
Cmd_AddCommand ("vidlatch", Cvar_LatchedVideo_f, "apply latched values for video subsystem" );
|
Cmd_AddCommand ("vidlatch", Cvar_LatchedVideo_f, "apply latched values for video subsystem" );
|
|
@ -3471,7 +3471,7 @@ static void FS_BuildPath( char *pPath, char *pOut )
|
||||||
{
|
{
|
||||||
// set working directory
|
// set working directory
|
||||||
SetCurrentDirectory ( pPath );
|
SetCurrentDirectory ( pPath );
|
||||||
com.sprintf( pOut, "%s\\bin\\platform.dll", pPath );
|
com.sprintf( pOut, "%s\\bin\\launch.dll", pPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
void FS_UpdateEnvironmentVariables( void )
|
void FS_UpdateEnvironmentVariables( void )
|
|
@ -1,24 +1,24 @@
|
||||||
# Microsoft Developer Studio Project File - Name="platform" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="launch" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
|
||||||
CFG=platform - Win32 Debug
|
CFG=launch - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "platform.mak".
|
!MESSAGE NMAKE /f "launch.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "platform.mak" CFG="platform - Win32 Debug"
|
!MESSAGE NMAKE /f "launch.mak" CFG="launch - Win32 Debug"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "platform - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
!MESSAGE "launch - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
!MESSAGE "platform - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
!MESSAGE "launch - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
|
@ -29,7 +29,7 @@ CPP=cl.exe
|
||||||
MTL=midl.exe
|
MTL=midl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "platform - Win32 Release"
|
!IF "$(CFG)" == "launch - Win32 Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
@ -38,8 +38,8 @@ RSC=rc.exe
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "..\temp\platform\!release"
|
# PROP Output_Dir "..\temp\launch\!release"
|
||||||
# PROP Intermediate_Dir "..\temp\platform\!release"
|
# PROP Intermediate_Dir "..\temp\launch\!release"
|
||||||
# PROP Ignore_Export_Lib 1
|
# PROP Ignore_Export_Lib 1
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LAUNCH_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LAUNCH_EXPORTS" /YX /FD /c
|
||||||
|
@ -56,16 +56,16 @@ 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 /dll /machine:I386 /opt:nowin98
|
# 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 /dll /machine:I386 /opt:nowin98
|
||||||
# ADD LINK32 zlib.lib png.lib jpg.lib ogg.lib vorbis.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib /nologo /dll /pdb:none /machine:I386 /nodefaultlib:"libc" /nodefaultlib:"libcmt" /libpath:"./imagelib" /libpath:"./soundlib" /opt:nowin98
|
# ADD LINK32 zlib.lib png.lib jpg.lib ogg.lib vorbis.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib /nologo /dll /pdb:none /machine:I386 /nodefaultlib:"libc" /nodefaultlib:"libcmt" /libpath:"./imagelib" /libpath:"./soundlib" /opt:nowin98
|
||||||
# Begin Custom Build
|
# Begin Custom Build
|
||||||
TargetDir=\Xash3D\src_main\temp\platform\!release
|
TargetDir=\Xash3D\src_main\temp\launch\!release
|
||||||
InputPath=\Xash3D\src_main\temp\platform\!release\platform.dll
|
InputPath=\Xash3D\src_main\temp\launch\!release\launch.dll
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
|
|
||||||
"D:\Xash3D\bin\platform.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"D:\Xash3D\bin\launch.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
copy $(TargetDir)\platform.dll "D:\Xash3D\bin\platform.dll"
|
copy $(TargetDir)\launch.dll "D:\Xash3D\bin\launch.dll"
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "platform - Win32 Debug"
|
!ELSEIF "$(CFG)" == "launch - Win32 Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
@ -74,8 +74,8 @@ SOURCE="$(InputPath)"
|
||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "..\temp\platform\!debug"
|
# PROP Output_Dir "..\temp\launch\!debug"
|
||||||
# PROP Intermediate_Dir "..\temp\platform\!debug"
|
# PROP Intermediate_Dir "..\temp\launch\!debug"
|
||||||
# PROP Ignore_Export_Lib 1
|
# PROP Ignore_Export_Lib 1
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LAUNCH_EXPORTS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LAUNCH_EXPORTS" /YX /FD /GZ /c
|
||||||
|
@ -92,12 +92,12 @@ 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 /dll /debug /machine:I386 /pdbtype:sept
|
# 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 /dll /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 zlib.lib png.lib jpg.lib ogg.lib vorbis.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libc" /pdbtype:sept /libpath:"./imagelib" /libpath:"./soundlib"
|
# ADD LINK32 zlib.lib png.lib jpg.lib ogg.lib vorbis.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmt" /nodefaultlib:"libc" /pdbtype:sept /libpath:"./imagelib" /libpath:"./soundlib"
|
||||||
# Begin Custom Build
|
# Begin Custom Build
|
||||||
TargetDir=\Xash3D\src_main\temp\platform\!debug
|
TargetDir=\Xash3D\src_main\temp\launch\!debug
|
||||||
InputPath=\Xash3D\src_main\temp\platform\!debug\platform.dll
|
InputPath=\Xash3D\src_main\temp\launch\!debug\launch.dll
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
|
|
||||||
"D:\Xash3D\bin\platform.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"D:\Xash3D\bin\launch.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
copy $(TargetDir)\platform.dll "D:\Xash3D\bin\platform.dll"
|
copy $(TargetDir)\launch.dll "D:\Xash3D\bin\launch.dll"
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ SOURCE="$(InputPath)"
|
||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
# Name "platform - Win32 Release"
|
# Name "launch - Win32 Release"
|
||||||
# Name "platform - Win32 Debug"
|
# Name "launch - Win32 Debug"
|
||||||
# Begin Group "Source Files"
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
|
@ -1,6 +1,6 @@
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// Copyright XashXT Group 2007 ©
|
// Copyright XashXT Group 2007 ©
|
||||||
// launch.h - platform.dll main header
|
// launch.h - launch.dll main header
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#ifndef LAUNCHER_H
|
#ifndef LAUNCHER_H
|
||||||
#define LAUNCHER_H
|
#define LAUNCHER_H
|
|
@ -372,7 +372,7 @@ void Sys_LookupInstance( void )
|
||||||
CloseHandle( Sys.hMutex );
|
CloseHandle( Sys.hMutex );
|
||||||
Sys.hMutex = CreateSemaphore( NULL, 0, 1, "Xash Dedicated Server" );
|
Sys.hMutex = CreateSemaphore( NULL, 0, 1, "Xash Dedicated Server" );
|
||||||
if( !Sys.developer ) Sys.developer = 3; // otherwise we see empty console
|
if( !Sys.developer ) Sys.developer = 3; // otherwise we see empty console
|
||||||
com_sprintf( Sys.log_path, "dedicated.log", com_timestamp( TIME_FILENAME )); // logs folder
|
com_sprintf( Sys.log_path, "bin/%s.log", com_timestamp( TIME_FILENAME )); // logs folder
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -382,7 +382,7 @@ void Sys_LookupInstance( void )
|
||||||
if( Sys.developer < D_WARN )
|
if( Sys.developer < D_WARN )
|
||||||
Sys.con_showalways = false;
|
Sys.con_showalways = false;
|
||||||
|
|
||||||
com_sprintf( Sys.log_path, "engine.log", com_timestamp( TIME_FILENAME )); // logs folder
|
com_sprintf( Sys.log_path, "bin/%s.log", com_timestamp( TIME_FILENAME )); // logs folder
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys.linked_dll = &engine_dll; // pointer to engine.dll info
|
Sys.linked_dll = &engine_dll; // pointer to engine.dll info
|
||||||
|
@ -487,7 +487,8 @@ void Sys_CreateInstance( void )
|
||||||
{
|
{
|
||||||
case HOST_NORMAL:
|
case HOST_NORMAL:
|
||||||
Con_ShowConsole( false ); // hide console
|
Con_ShowConsole( false ); // hide console
|
||||||
Cbuf_AddText( "exec init.rc\n" ); // execute startup config and cmdline
|
Cbuf_AddText( "exec opengl.cfg\n" ); // openGL configuration
|
||||||
|
Cbuf_AddText( "exec valve.rc\n" ); // execute startup config and cmdline
|
||||||
case HOST_DEDICATED:
|
case HOST_DEDICATED:
|
||||||
Cbuf_Execute();
|
Cbuf_Execute();
|
||||||
// if stuffcmds wasn't run, then init.rc is probably missing, use default
|
// if stuffcmds wasn't run, then init.rc is probably missing, use default
|
||||||
|
@ -1010,7 +1011,7 @@ void Sys_Init( void )
|
||||||
Sys_MergeCommandLine( GetCommandLine());
|
Sys_MergeCommandLine( GetCommandLine());
|
||||||
|
|
||||||
// first text message into console or log
|
// first text message into console or log
|
||||||
MsgDev( D_NOTE, "Sys_LoadLibrary: Loading platform.dll - ok\n" );
|
MsgDev( D_NOTE, "Sys_LoadLibrary: Loading launch.dll - ok\n" );
|
||||||
|
|
||||||
if( com.strlen( Sys.fmessage ) && !Sys.con_showcredits )
|
if( com.strlen( Sys.fmessage ) && !Sys.con_showcredits )
|
||||||
{
|
{
|
|
@ -22,5 +22,4 @@ makefile.nmake
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
cd xwad
|
cd xwad
|
||||||
makefile.nmake
|
makefile.nmake
|
||||||
pause
|
|
|
@ -100,11 +100,11 @@ enum
|
||||||
// cvar flags
|
// cvar flags
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
CVAR_ARCHIVE = BIT(0), // set to cause it to be saved to vars.rc
|
CVAR_ARCHIVE = BIT(0), // set to cause it to be saved to config.cfg
|
||||||
CVAR_USERINFO = BIT(1), // added to userinfo when changed
|
CVAR_USERINFO = BIT(1), // added to userinfo when changed
|
||||||
CVAR_SERVERINFO = BIT(2), // added to serverinfo when changed
|
CVAR_SERVERINFO = BIT(2), // added to serverinfo when changed
|
||||||
CVAR_PHYSICINFO = BIT(3), // added to physinfo when changed
|
CVAR_PHYSICINFO = BIT(3), // added to physinfo when changed
|
||||||
CVAR_RENDERINFO = BIT(4), // save to a seperate config called opengl.rc
|
CVAR_RENDERINFO = BIT(4), // save to a seperate config called opengl.cfg
|
||||||
CVAR_CHEAT = BIT(5), // can not be changed if cheats are disabled
|
CVAR_CHEAT = BIT(5), // can not be changed if cheats are disabled
|
||||||
CVAR_INIT = BIT(6), // don't allow change from console at all, but can be set from the command line
|
CVAR_INIT = BIT(6), // don't allow change from console at all, but can be set from the command line
|
||||||
CVAR_LATCH = BIT(7), // save changes until server restart
|
CVAR_LATCH = BIT(7), // save changes until server restart
|
||||||
|
|
13
release.bat
13
release.bat
|
@ -20,7 +20,7 @@ if errorlevel 1 set BUILD_ERROR=1
|
||||||
%MSDEV% gameui/gameui.dsp %CONFIG%"gameui - Win32 Release" %build_target%
|
%MSDEV% gameui/gameui.dsp %CONFIG%"gameui - Win32 Release" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
%MSDEV% platform/platform.dsp %CONFIG%"platform - Win32 Release" %build_target%
|
%MSDEV% launch/launch.dsp %CONFIG%"launch - Win32 Release" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
%MSDEV% physic/physic.dsp %CONFIG%"physic - Win32 Release" %build_target%
|
%MSDEV% physic/physic.dsp %CONFIG%"physic - Win32 Release" %build_target%
|
||||||
|
@ -29,9 +29,6 @@ if errorlevel 1 set BUILD_ERROR=1
|
||||||
%MSDEV% vid_gl/vid_gl.dsp %CONFIG%"vid_gl - Win32 Release" %build_target%
|
%MSDEV% vid_gl/vid_gl.dsp %CONFIG%"vid_gl - Win32 Release" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
%MSDEV% spirit/spirit.dsp %CONFIG%"spirit - Win32 Release" %build_target%
|
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
|
||||||
|
|
||||||
%MSDEV% snd_dx/snd_dx.dsp %CONFIG%"snd_dx - Win32 Release" %build_target%
|
%MSDEV% snd_dx/snd_dx.dsp %CONFIG%"snd_dx - Win32 Release" %build_target%
|
||||||
if errorlevel 1 set BUILD_ERROR=1
|
if errorlevel 1 set BUILD_ERROR=1
|
||||||
|
|
||||||
|
@ -61,15 +58,13 @@ if exist bshift\bshift.plg del /f /q bshift\bshift.plg
|
||||||
if exist client\client.plg del /f /q client\client.plg
|
if exist client\client.plg del /f /q client\client.plg
|
||||||
if exist engine\engine.plg del /f /q engine\engine.plg
|
if exist engine\engine.plg del /f /q engine\engine.plg
|
||||||
if exist gameui\gameui.plg del /f /q gameui\gameui.plg
|
if exist gameui\gameui.plg del /f /q gameui\gameui.plg
|
||||||
if exist platform\platform.plg del /f /q platform\platform.plg
|
if exist launch\launch.plg del /f /q launch\launch.plg
|
||||||
if exist physic\physic.plg del /f /q physic\physic.plg
|
if exist physic\physic.plg del /f /q physic\physic.plg
|
||||||
if exist vid_gl\vid_gl.plg del /f /q vid_gl\vid_gl.plg
|
if exist vid_gl\vid_gl.plg del /f /q vid_gl\vid_gl.plg
|
||||||
if exist spirit\spirit.plg del /f /q spirit\spirit.plg
|
|
||||||
if exist snd_dx\snd_dx.plg del /f /q snd_dx\snd_dx.plg
|
if exist snd_dx\snd_dx.plg del /f /q snd_dx\snd_dx.plg
|
||||||
if exist xtools\xtools.plg del /f /q xtools\xtools.plg
|
if exist xtools\xtools.plg del /f /q xtools\xtools.plg
|
||||||
|
|
||||||
|
echo
|
||||||
echo Build succeeded!
|
echo Build succeeded!
|
||||||
echo Please wait. Xash is now loading
|
echo
|
||||||
cd D:\Xash3D\
|
|
||||||
xash.exe -dev 3 -log +map newmap
|
|
||||||
:done
|
:done
|
|
@ -487,7 +487,7 @@ void GameDLLInit( void )
|
||||||
CVAR_REGISTER_SKILL ( sk_player_leg3 );
|
CVAR_REGISTER_SKILL ( sk_player_leg3 );
|
||||||
// END REGISTER CVARS FOR SKILL LEVEL STUFF
|
// END REGISTER CVARS FOR SKILL LEVEL STUFF
|
||||||
|
|
||||||
SERVER_COMMAND( "exec skill.rc\n" );
|
SERVER_COMMAND( "exec skill.cfg\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform any shutdown operations
|
// perform any shutdown operations
|
||||||
|
|
|
@ -316,7 +316,7 @@ void CGameRules::RefreshSkillData ( void )
|
||||||
|
|
||||||
CGameRules *InstallGameRules( void )
|
CGameRules *InstallGameRules( void )
|
||||||
{
|
{
|
||||||
SERVER_COMMAND( "exec game.rc\n" );
|
SERVER_COMMAND( "exec game.cfg\n" );
|
||||||
g_engfuncs.pfnServerExecute(); // stupid fucking winspool.h AGRHHH!!!!
|
g_engfuncs.pfnServerExecute(); // stupid fucking winspool.h AGRHHH!!!!
|
||||||
|
|
||||||
if ( !gpGlobals->deathmatch )
|
if ( !gpGlobals->deathmatch )
|
||||||
|
|
|
@ -327,12 +327,12 @@ bool R_SetPixelformat( void )
|
||||||
// share this extension so engine can grab them
|
// share this extension so engine can grab them
|
||||||
GL_SetExtension( R_HARDWARE_GAMMA_CONTROL, glConfig.deviceSupportsGamma );
|
GL_SetExtension( R_HARDWARE_GAMMA_CONTROL, glConfig.deviceSupportsGamma );
|
||||||
|
|
||||||
savedGamma = FS_LoadFile( "config/gamma.rc", &gamma_size );
|
savedGamma = FS_LoadFile( "gamma.dat", &gamma_size );
|
||||||
if( !savedGamma || gamma_size != sizeof( glState.stateRamp ))
|
if( !savedGamma || gamma_size != sizeof( glState.stateRamp ))
|
||||||
{
|
{
|
||||||
// saved gamma not found or corrupted file
|
// saved gamma not found or corrupted file
|
||||||
FS_WriteFile( "config/gamma.rc", glState.stateRamp, sizeof(glState.stateRamp));
|
FS_WriteFile( "gamma.dat", glState.stateRamp, sizeof(glState.stateRamp));
|
||||||
MsgDev( D_NOTE, "gamma.rc initialized\n" );
|
MsgDev( D_NOTE, "gamma.dat initialized\n" );
|
||||||
if( savedGamma ) Mem_Free( savedGamma );
|
if( savedGamma ) Mem_Free( savedGamma );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -351,7 +351,7 @@ bool R_SetPixelformat( void )
|
||||||
// run additional check to make sure it
|
// run additional check to make sure it
|
||||||
if( memcmp( savedGamma, glState.stateRamp, sizeof( glState.stateRamp )))
|
if( memcmp( savedGamma, glState.stateRamp, sizeof( glState.stateRamp )))
|
||||||
{
|
{
|
||||||
// yes, current gamma it's totally wrong, restore it from gamma.rc
|
// yes, current gamma it's totally wrong, restore it from gamma.dat
|
||||||
MsgDev( D_NOTE, "R_SetPixelformat: restore original gamma after crash\n" );
|
MsgDev( D_NOTE, "R_SetPixelformat: restore original gamma after crash\n" );
|
||||||
Mem_Copy( glState.stateRamp, savedGamma, sizeof( glState.gammaRamp ));
|
Mem_Copy( glState.stateRamp, savedGamma, sizeof( glState.gammaRamp ));
|
||||||
}
|
}
|
||||||
|
@ -364,13 +364,13 @@ bool R_SetPixelformat( void )
|
||||||
}
|
}
|
||||||
else if( !memcmp( glState.gammaRamp, savedGamma, sizeof( glState.stateRamp )))
|
else if( !memcmp( glState.gammaRamp, savedGamma, sizeof( glState.stateRamp )))
|
||||||
{
|
{
|
||||||
// saved gamma is equal render gamma, probably gamma.rc writed after crash
|
// saved gamma is equal render gamma, probably gamma.dat writed after crash
|
||||||
// run additional check to make sure it
|
// run additional check to make sure it
|
||||||
if( memcmp( savedGamma, glState.stateRamp, sizeof( glState.stateRamp )))
|
if( memcmp( savedGamma, glState.stateRamp, sizeof( glState.stateRamp )))
|
||||||
{
|
{
|
||||||
// yes, saved gamma it's totally wrong, get origianl gamma from screen
|
// yes, saved gamma it's totally wrong, get origianl gamma from screen
|
||||||
MsgDev( D_NOTE, "R_SetPixelformat: merge gamma.rc after crash\n" );
|
MsgDev( D_NOTE, "R_SetPixelformat: merge gamma.dat after crash\n" );
|
||||||
FS_WriteFile( "config/gamma.rc", glState.stateRamp, sizeof( glState.stateRamp ));
|
FS_WriteFile( "gamma.dat", glState.stateRamp, sizeof( glState.stateRamp ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -607,42 +607,6 @@ void GL_InitCommands( void )
|
||||||
if( r_lighting_modulate->value < 1.0f ) Cvar_Set( "r_lighting_modulate", "1" );
|
if( r_lighting_modulate->value < 1.0f ) Cvar_Set( "r_lighting_modulate", "1" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
============
|
|
||||||
GL_WriteVariables
|
|
||||||
|
|
||||||
Appends lines containing "setr variable value" for all variables
|
|
||||||
with the renderinfo flag set to true.
|
|
||||||
============
|
|
||||||
*/
|
|
||||||
static void GL_WriteCvar( const char *name, const char *string, const char *desc, void *f )
|
|
||||||
{
|
|
||||||
if( !desc || !*desc ) return; // ignore cvars without description (fantom variables)
|
|
||||||
FS_Printf( f, "setr %s \"%s\"\n", name, string );
|
|
||||||
}
|
|
||||||
|
|
||||||
void GL_WriteVariables( file_t *f )
|
|
||||||
{
|
|
||||||
Cvar_LookupVars( CVAR_RENDERINFO, NULL, f, GL_WriteCvar );
|
|
||||||
}
|
|
||||||
|
|
||||||
void GL_UpdateConfig( void )
|
|
||||||
{
|
|
||||||
file_t *f;
|
|
||||||
|
|
||||||
f = FS_Open( "config/opengl.rc", "w" );
|
|
||||||
if( f )
|
|
||||||
{
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
FS_Printf( f, "//\t\t\tCopyright XashXT Group %s ©\n", timestamp( TIME_YEAR_ONLY ));
|
|
||||||
FS_Printf( f, "//\t\t opengl.rc - archive of opengl extension cvars\n");
|
|
||||||
FS_Printf( f, "//=======================================================================\n" );
|
|
||||||
GL_WriteVariables( f );
|
|
||||||
FS_Close( f );
|
|
||||||
}
|
|
||||||
else MsgDev( D_ERROR, "can't update opengl.rc.\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
void GL_RemoveCommands( void )
|
void GL_RemoveCommands( void )
|
||||||
{
|
{
|
||||||
Cmd_RemoveCommand( "modellist" );
|
Cmd_RemoveCommand( "modellist" );
|
||||||
|
@ -672,7 +636,6 @@ void GL_InitBackend( void )
|
||||||
void GL_ShutdownBackend( void )
|
void GL_ShutdownBackend( void )
|
||||||
{
|
{
|
||||||
GL_RemoveCommands();
|
GL_RemoveCommands();
|
||||||
GL_UpdateConfig();
|
|
||||||
|
|
||||||
Mem_FreePool( &r_temppool );
|
Mem_FreePool( &r_temppool );
|
||||||
}
|
}
|
||||||
|
@ -891,9 +854,6 @@ void GL_InitExtensions( void )
|
||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
Cbuf_AddText( "exec opengl.rc\n" );
|
|
||||||
Cbuf_Execute();
|
|
||||||
|
|
||||||
// initialize gl extensions
|
// initialize gl extensions
|
||||||
GL_CheckExtension( "OpenGL 1.1.0", opengl_110funcs, NULL, R_OPENGL_110 );
|
GL_CheckExtension( "OpenGL 1.1.0", opengl_110funcs, NULL, R_OPENGL_110 );
|
||||||
|
|
||||||
|
|
|
@ -1339,7 +1339,6 @@ void R_StudioSetUpTransform( ref_entity_t *e, bool trivial_accept )
|
||||||
f = f - 1.0f;
|
f = f - 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( m_pEntity && !m_pEntity->free ) m_pGroundEntity = m_pEntity->v.groundentity;
|
if( m_pEntity && !m_pEntity->free ) m_pGroundEntity = m_pEntity->v.groundentity;
|
||||||
|
|
||||||
if( m_pGroundEntity && m_pGroundEntity->v.movetype == MOVETYPE_PUSH && !VectorIsNull( m_pGroundEntity->v.velocity ))
|
if( m_pGroundEntity && m_pGroundEntity->v.movetype == MOVETYPE_PUSH && !VectorIsNull( m_pGroundEntity->v.velocity ))
|
||||||
|
|
14
xash.dsw
14
xash.dsw
|
@ -3,18 +3,6 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "botlib"=".\botlib\botlib.dsp" - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "bshift"=".\bshift\bshift.dsp" - Package Owner=<4>
|
Project: "bshift"=".\bshift\bshift.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
|
@ -75,7 +63,7 @@ Package=<4>
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "platform"=".\platform\platform.dsp" - Package Owner=<4>
|
Project: "launch"=".\launch\launch.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
|
|
|
@ -101,28 +101,21 @@ void GetLibrary( void )
|
||||||
if( GetBin( ))
|
if( GetBin( ))
|
||||||
{
|
{
|
||||||
// assume run directory as XashDirectory
|
// assume run directory as XashDirectory
|
||||||
strcpy( szSearch[count], "bin\\platform.dll" );
|
strcpy( szSearch[count], "bin\\launch.dll" );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( GetBin( ))
|
|
||||||
{
|
|
||||||
// assume run directory as XashDirectory (S.T.A.L.K.E.R. style)
|
|
||||||
strcpy( szSearch[count], "platform.dll" );
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( GetEnv( ))
|
if( GetEnv( ))
|
||||||
{
|
{
|
||||||
// get environment variable (e.g. compilers)
|
// get environment variable (e.g. compilers)
|
||||||
sprintf( szSearch[count], "%s\\bin\\platform.dll", szFsPath );
|
sprintf( szSearch[count], "%s\\bin\\launch.dll", szFsPath );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( GetReg( ))
|
if( GetReg( ))
|
||||||
{
|
{
|
||||||
// get environment variable direct from registry (paranoid)
|
// get environment variable direct from registry (paranoid)
|
||||||
sprintf( szSearch[count], "%s\\bin\\platform.dll", szFsPath );
|
sprintf( szSearch[count], "%s\\bin\\launch.dll", szFsPath );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,11 +135,11 @@ winmain_t CreateMain32( void )
|
||||||
if( hmain )
|
if( hmain )
|
||||||
{
|
{
|
||||||
main = (winmain_t)GetProcAddress( hmain, "CreateAPI" );
|
main = (winmain_t)GetProcAddress( hmain, "CreateAPI" );
|
||||||
if( !main ) GetError( "Unable to find entry point in platform.dll" );
|
if( !main ) GetError( "Unable to find entry point in launch.dll" );
|
||||||
return main;
|
return main;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetError( "Unable to load the platform.dll" );
|
GetError( "Unable to load the launch.dll" );
|
||||||
|
|
||||||
// make compiller happy
|
// make compiller happy
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -50,7 +50,7 @@ void AddMask( const char *mask )
|
||||||
==================
|
==================
|
||||||
CommonInit
|
CommonInit
|
||||||
|
|
||||||
platform.dll needs for some setup operations
|
launch.dll needs for some setup operations
|
||||||
so do it manually
|
so do it manually
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
|
|
Reference in New Issue