14 Oct 2009

This commit is contained in:
g-cont 2009-10-14 00:00:00 +04:00 committed by Alibek Omarov
parent ace1035ec8
commit 6ac0c9514b
15 changed files with 400 additions and 159 deletions

View File

@ -26,7 +26,7 @@ void CL_WriteDemoMessage( sizebuf_t *msg, int head_size )
swlen = LittleLong( len );
if( !swlen ) return; // ignore null messages
FS_Write( cls.demofile, &swlen, 4);
FS_Write( cls.demofile, &swlen, 4 );
FS_Write( cls.demofile, msg->data + head_size, len );
}
@ -66,7 +66,11 @@ void CL_WriteDemoHeader( const char *name )
{
if( cl.configstrings[i][0] )
{
if( buf.cursize + com.strlen(cl.configstrings[i]) + 32 > buf.maxsize )
MSG_WriteByte( &buf, svc_configstring );
MSG_WriteShort( &buf, i);
MSG_WriteString( &buf, cl.configstrings[i] );
if( buf.cursize > ( buf.maxsize / 2 ))
{
// write it out
len = LittleLong( buf.cursize );
@ -74,9 +78,6 @@ void CL_WriteDemoHeader( const char *name )
FS_Write( cls.demofile, buf.data, buf.cursize );
buf.cursize = 0;
}
MSG_WriteByte( &buf, svc_configstring );
MSG_WriteShort( &buf, i);
MSG_WriteString( &buf, cl.configstrings[i] );
}
}
@ -84,12 +85,16 @@ void CL_WriteDemoHeader( const char *name )
// baselines
Mem_Set( &nullstate, 0, sizeof( nullstate ));
for( i = 0; i < clgame.globals->numEntities; i++ )
for( i = 0; i < clgame.globals->maxEntities; i++ )
{
state = &cl.entity_baselines[i];
if( !state->number ) continue;
if( !state->modelindex && !state->soundindex && !state->effects )
continue;
if( buf.cursize + 64 > buf.maxsize )
MSG_WriteByte( &buf, svc_spawnbaseline );
MSG_WriteDeltaEntity( &nullstate, state, &buf, true, true );
if( buf.cursize > ( buf.maxsize / 2 ))
{
// write it out
len = LittleLong( buf.cursize );
@ -97,8 +102,6 @@ void CL_WriteDemoHeader( const char *name )
FS_Write( cls.demofile, buf.data, buf.cursize );
buf.cursize = 0;
}
MSG_WriteByte( &buf, svc_spawnbaseline );
MSG_WriteDeltaEntity( &nullstate, state, &buf, true, true );
}
MSG_WriteByte( &buf, svc_stufftext );
@ -107,7 +110,7 @@ void CL_WriteDemoHeader( const char *name )
MSG_WriteString( &buf, "cmd fullupdate\n" );
MSG_WriteByte( &buf, svc_setview );
MSG_WriteWord( &buf, cl.playernum + 1 ); // reset view to client
MSG_WriteWord( &buf, cl.refdef.viewentity );
// write it to the demo file
len = LittleLong( buf.cursize );
@ -153,16 +156,28 @@ If the "nextdemo" cvar is set, that command will be issued
*/
void CL_NextDemo( void )
{
string v;
string str;
com.strncpy( v, Cvar_VariableString( "playdemo" ), sizeof(v));
if( cls.demonum == -1 )
return; // don't play demos
MsgDev(D_INFO, "CL_NextDemo: %s\n", v );
if(!v[0]) return;
S_StopAllSounds();
Cvar_Set( "nextdemo","" );
Cbuf_AddText(va("%s\n", v));
Cbuf_Execute();
if( !cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS )
{
cls.demonum = 0;
if( !cls.demos[cls.demonum][0] )
{
Msg( "no demos listed with startdemos\n" );
cls.demonum = -1;
return;
}
}
com.snprintf( str, MAX_STRING, "playdemo %s\n", cls.demos[cls.demonum] );
Cbuf_InsertText( str );
cls.demonum++;
}
/*
@ -261,7 +276,7 @@ void CL_StopRecord( void )
{
int len = -1;
if (!cls.demorecording) return;
if( !cls.demorecording ) return;
// finish up
FS_Write( cls.demofile, &len, 4 );
@ -317,7 +332,7 @@ void CL_PlayDemo_f( void )
{
string filename;
if(Cmd_Argc() != 2)
if( Cmd_Argc() != 2 )
{
Msg( "playdemo <demoname>\n" );
return;
@ -325,27 +340,74 @@ void CL_PlayDemo_f( void )
// shutdown any game or cinematic server
CL_Disconnect();
Cbuf_ExecuteText(EXEC_APPEND, "killserver\n");
Host_ShutdownServer();
com.snprintf( filename, MAX_STRING, "demos/%s.dem", Cmd_Argv(1));
com.snprintf( filename, MAX_STRING, "demos/%s.dem", Cmd_Argv( 1 ));
if(!FS_FileExists( filename ))
{
Msg("Can't loading %s\n", filename );
MsgDev( D_ERROR, "couldn't open %s\n", filename );
cls.demonum = -1; // stop demo loop
return;
}
cls.demofile = FS_Open( filename, "rb" );
com.strncpy( cls.demoname, Cmd_Argv(1), sizeof(cls.demoname));
com.strncpy( cls.demoname, Cmd_Argv( 1 ), sizeof( cls.demoname ));
Con_Close();
cls.state = ca_connected;
cls.demoplayback = true;
com.strncpy( cls.servername, Cmd_Argv(1), sizeof( cls.servername ));
com.strncpy( cls.servername, Cmd_Argv( 1 ), sizeof( cls.servername ));
// begin a playback demo
}
/*
==================
CL_StartDemos_f
==================
*/
void CL_StartDemos_f( void )
{
int i, c;
c = Cmd_Argc() - 1;
if( c > MAX_DEMOS )
{
MsgDev( D_WARN, "Host_StartDemos: max %i demos in demoloop\n", MAX_DEMOS );
c = MAX_DEMOS;
}
MsgDev( D_INFO, "%i demo%s in loop\n", c, (c > 1) ? "s" : "" );
for( i = 1; i < c + 1; i++ )
com.strncpy( cls.demos[i-1], Cmd_Argv( i ), sizeof( cls.demos[0] ));
if( !SV_Active() && cls.demonum != -1 && !cls.demoplayback )
{
cls.demonum = 0;
CL_NextDemo ();
}
else cls.demonum = -1;
}
/*
==================
CL_Demos_f
Return to looping demos
==================
*/
void CL_Demos_f( void )
{
if( cls.demonum == -1 )
cls.demonum = 1;
CL_Disconnect ();
CL_NextDemo ();
}
/*
====================
CL_Stop_f

View File

@ -128,7 +128,9 @@ Render callback for studio models
*/
edict_t *CL_GetLocalPlayer( void )
{
return EDICT_NUM( cl.playernum + 1 );
if( cls.state == ca_active )
return EDICT_NUM( cl.playernum + 1 );
return NULL;
}
/*
@ -385,27 +387,22 @@ edict_t *CL_AllocEdict( void )
void CL_InitEdicts( void )
{
edict_t *ent;
edict_t *e;
int i;
clgame.globals->maxEntities = com.atoi( cl.configstrings[CS_MAXEDICTS] );
clgame.globals->maxClients = com.atoi( cl.configstrings[CS_MAXCLIENTS] );
clgame.edicts = Mem_Realloc( cls.mempool, clgame.edicts, sizeof( edict_t ) * clgame.globals->maxEntities );
for( i = 2; i < clgame.globals->maxEntities; i++ )
{
ent = EDICT_NUM( i );
if( ent->free ) continue;
CL_FreeEdict( ent );
}
for( i = 0, e = EDICT_NUM( 0 ); i < clgame.globals->maxEntities; i++, e++ )
e->free = true; // mark all edicts as freed
clgame.globals->mapname = MAKE_STRING( cl.configstrings[CS_NAME] );
clgame.globals->deathmatch = Cvar_VariableInteger( "deathmatch" );
clgame.globals->coop = Cvar_VariableInteger( "coop" );
clgame.globals->teamplay = Cvar_VariableInteger( "teamplay" );
clgame.globals->serverflags = 0; // FIXME: make CS_SERVERFLAGS
clgame.globals->numEntities = 2; // world and client
clgame.globals->serverflags = 0; // FIXME: make CS_SERVERFLAGS
}
void CL_FreeEdicts( void )
@ -1425,8 +1422,6 @@ bool CL_LoadProgs( const char *name )
static CLIENTAPI GetClientAPI;
static cl_globalvars_t gpGlobals;
string libpath;
edict_t *e;
int i;
if( clgame.hInstance ) CL_UnloadProgs();
@ -1470,11 +1465,6 @@ bool CL_LoadProgs( const char *name )
clgame.movevars.airaccelerate = com.atof( DEFAULT_AIRACCEL );
clgame.movevars.friction = com.atof( DEFAULT_FRICTION );
clgame.globals->maxEntities = 2; // world and local client
clgame.edicts = Mem_Alloc( cls.mempool, sizeof( edict_t ) * clgame.globals->maxEntities );
for( i = 0, e = clgame.edicts; i < clgame.globals->maxEntities; i++, e++ )
CL_InitEdict( e );
// initialize game
clgame.dllFuncs.pfnInit();

View File

@ -111,7 +111,7 @@ void CL_ForwardToServer_f( void )
CL_Pause_f
==================
*/
void CL_Pause_f (void)
void CL_Pause_f( void )
{
if(!Host_ServerState() && !cls.demoplayback )
return; // but allow pause in demos
@ -349,8 +349,6 @@ void CL_Disconnect( void )
return;
cls.connect_time = 0;
SCR_StopCinematic();
CL_Stop_f();
// send a disconnect message to the server
@ -463,8 +461,11 @@ void CL_Reconnect_f( void )
S_StopAllSounds ();
Cmd_ExecuteString( "plaque\n" ); // disable plaque draw on change map
if( cls.demoplayback ) return;
if( cls.state == ca_connected )
{
cls.demonum = -1; // not in the demo loop now
cls.state = ca_connected;
MSG_WriteByte( &cls.netchan.message, clc_stringcmd );
MSG_Print( &cls.netchan.message, "new" );
@ -480,6 +481,7 @@ void CL_Reconnect_f( void )
}
else cls.connect_time = MAX_HEARTBEAT; // fire immediately
cls.demonum = -1; // not in the demo loop now
cls.state = ca_connecting;
Msg( "reconnecting...\n" );
}
@ -1043,7 +1045,7 @@ void CL_RequestNextDownload( void )
if( cls.demoplayback ) return; // not really connected
MSG_WriteByte( &cls.netchan.message, clc_stringcmd );
MSG_Print( &cls.netchan.message, va("begin %i\n", precache_spawncount ));
MSG_Print( &cls.netchan.message, va( "begin %i\n", precache_spawncount ));
}
/*
@ -1057,7 +1059,7 @@ before allowing the client into the server
void CL_Precache_f( void )
{
precache_check = CS_MODELS;
precache_spawncount = com.atoi(Cmd_Argv(1));
precache_spawncount = com.atoi( Cmd_Argv( 1 ));
CL_RequestNextDownload();
}
@ -1115,6 +1117,8 @@ void CL_InitLocal( void )
Cmd_AddCommand ("disconnect", CL_Disconnect_f, "disconnect from server" );
Cmd_AddCommand ("record", CL_Record_f, "record a demo" );
Cmd_AddCommand ("playdemo", CL_PlayDemo_f, "playing a demo" );
Cmd_AddCommand ("startdemos", CL_StartDemos_f, "start playing back the selected demos sequentially" );
Cmd_AddCommand ("demos", CL_Demos_f, "restart looping demos defined by the last startdemos command" );
Cmd_AddCommand ("movie", CL_PlayVideo_f, "playing a movie" );
Cmd_AddCommand ("stop", CL_Stop_f, "stop playing or recording a demo" );

View File

@ -23,6 +23,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "client.h"
#include "net_sound.h"
char *svc_strings[256] =
{
"svc_bad",
"svc_nop",
"svc_disconnect",
"svc_reconnect",
"svc_stufftext",
"svc_serverdata",
"svc_configstring",
"svc_spawnbaseline",
"svc_download",
"svc_playerinfo",
"svc_packetentities",
"svc_frame",
"svc_sound",
"svc_setangle",
"svc_setview",
"svc_print",
"svc_crosshairangle",
};
/*
===============
CL_CheckOrDownloadFile
@ -468,6 +490,8 @@ void CL_ParseServerMessage( sizebuf_t *msg )
cmd = MSG_ReadByte( msg );
if( cmd == -1 ) break;
// if( cmd > 200 ) MsgDev( D_INFO, "CL_Parse: %s received.\n", svc_strings[cmd - 200] );
// other commands
switch( cmd )
{

View File

@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "render_api.h"
#include "pm_movevars.h"
#define MAX_DEMOS 32
#define MAX_EDIT_LINE 256
#define COMMAND_HISTORY 32
#define MAX_SERVERS 64
@ -282,6 +283,10 @@ typedef struct
e_scrshot scrshot_action; // in-action
string shotname;
// demo loop control
int demonum; // -1 = don't play demos
string demos[MAX_DEMOS]; // when not playing
// demo recording info must be here, so it isn't clearing on level change
bool demorecording;
bool demoplayback;
@ -428,6 +433,8 @@ void CL_ReadDemoMessage( void );
void CL_StopPlayback( void );
void CL_StopRecord( void );
void CL_PlayDemo_f( void );
void CL_StartDemos_f( void );
void CL_Demos_f( void );
void CL_Record_f( void );
void CL_Stop_f( void );

View File

@ -121,6 +121,7 @@ int Host_CompareFileTime( long ft1, long ft2 );
void Host_AbortCurrentFrame( void );
void Host_WriteDefaultConfig( void );
void Host_WriteConfig( void );
void Host_ShutdownServer( void );
void Host_CheckChanges( void );
int Host_Milliseconds( void );
void Host_Print( const char *txt );

View File

@ -234,7 +234,7 @@ void _MSG_WriteBits( sizebuf_t *msg, long value, const char *name, int net_type,
// this isn't an exact overflow check, but close enough
if( msg->maxsize - msg->cursize < 4 )
{
MsgDev( D_ERROR, "MSG_WriteBits: sizebuf overflowed\n" );
MsgDev( D_ERROR, "MSG_WriteBits: sizebuf overflowed (called at %s:%i)\n", filename, fileline );
msg->overflowed = true;
return;
}

View File

@ -3,95 +3,95 @@
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: engine - Win32 Release--------------------
--------------------Configuration: engine - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2AD9.tmp" with contents
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2F93.tmp" with contents
[
/nologo /MD /W3 /GX /O2 /I "./" /I "common" /I "server" /I "client" /I "uimenu" /I "../public" /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"..\temp\engine\!release/" /Fd"..\temp\engine\!release/" /FD /c
"D:\Xash3D\src_main\engine\uimenu\ui_playersetup.c"
/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "./" /I "common" /I "server" /I "client" /I "uimenu" /I "../public" /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\engine\!debug/" /Fo"..\temp\engine\!debug/" /Fd"..\temp\engine\!debug/" /FD /c
"D:\Xash3D\src_main\engine\host.c"
]
Creating command line "cl.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2AD9.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2ADA.tmp" with contents
Creating command line "cl.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2F93.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2F94.tmp" with contents
[
user32.lib msvcrt.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\engine\!release/engine.dll" /implib:"..\temp\engine\!release/engine.lib" /opt:nowin98
"\Xash3D\src_main\temp\engine\!release\cinematic.obj"
"\Xash3D\src_main\temp\engine\!release\cl_cmds.obj"
"\Xash3D\src_main\temp\engine\!release\cl_demo.obj"
"\Xash3D\src_main\temp\engine\!release\cl_effects.obj"
"\Xash3D\src_main\temp\engine\!release\cl_frame.obj"
"\Xash3D\src_main\temp\engine\!release\cl_game.obj"
"\Xash3D\src_main\temp\engine\!release\cl_input.obj"
"\Xash3D\src_main\temp\engine\!release\cl_main.obj"
"\Xash3D\src_main\temp\engine\!release\cl_parse.obj"
"\Xash3D\src_main\temp\engine\!release\cl_phys.obj"
"\Xash3D\src_main\temp\engine\!release\cl_scrn.obj"
"\Xash3D\src_main\temp\engine\!release\cl_view.obj"
"\Xash3D\src_main\temp\engine\!release\com_library.obj"
"\Xash3D\src_main\temp\engine\!release\con_keys.obj"
"\Xash3D\src_main\temp\engine\!release\con_main.obj"
"\Xash3D\src_main\temp\engine\!release\con_utils.obj"
"\Xash3D\src_main\temp\engine\!release\engfuncs.obj"
"\Xash3D\src_main\temp\engine\!release\engine.obj"
"\Xash3D\src_main\temp\engine\!release\host.obj"
"\Xash3D\src_main\temp\engine\!release\infostring.obj"
"\Xash3D\src_main\temp\engine\!release\input.obj"
"\Xash3D\src_main\temp\engine\!release\net_chan.obj"
"\Xash3D\src_main\temp\engine\!release\net_huff.obj"
"\Xash3D\src_main\temp\engine\!release\net_msg.obj"
"\Xash3D\src_main\temp\engine\!release\sv_client.obj"
"\Xash3D\src_main\temp\engine\!release\sv_cmds.obj"
"\Xash3D\src_main\temp\engine\!release\sv_frame.obj"
"\Xash3D\src_main\temp\engine\!release\sv_game.obj"
"\Xash3D\src_main\temp\engine\!release\sv_init.obj"
"\Xash3D\src_main\temp\engine\!release\sv_main.obj"
"\Xash3D\src_main\temp\engine\!release\sv_move.obj"
"\Xash3D\src_main\temp\engine\!release\sv_phys.obj"
"\Xash3D\src_main\temp\engine\!release\sv_save.obj"
"\Xash3D\src_main\temp\engine\!release\sv_world.obj"
"\Xash3D\src_main\temp\engine\!release\ui_advanced.obj"
"\Xash3D\src_main\temp\engine\!release\ui_audio.obj"
"\Xash3D\src_main\temp\engine\!release\ui_controls.obj"
"\Xash3D\src_main\temp\engine\!release\ui_credits.obj"
"\Xash3D\src_main\temp\engine\!release\ui_defaults.obj"
"\Xash3D\src_main\temp\engine\!release\ui_demos.obj"
"\Xash3D\src_main\temp\engine\!release\ui_gameoptions.obj"
"\Xash3D\src_main\temp\engine\!release\ui_gotosite.obj"
"\Xash3D\src_main\temp\engine\!release\ui_ingame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_loadgame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_main.obj"
"\Xash3D\src_main\temp\engine\!release\ui_menu.obj"
"\Xash3D\src_main\temp\engine\!release\ui_mods.obj"
"\Xash3D\src_main\temp\engine\!release\ui_multiplayer.obj"
"\Xash3D\src_main\temp\engine\!release\ui_network.obj"
"\Xash3D\src_main\temp\engine\!release\ui_options.obj"
"\Xash3D\src_main\temp\engine\!release\ui_performance.obj"
"\Xash3D\src_main\temp\engine\!release\ui_playersetup.obj"
"\Xash3D\src_main\temp\engine\!release\ui_qmenu.obj"
"\Xash3D\src_main\temp\engine\!release\ui_quit.obj"
"\Xash3D\src_main\temp\engine\!release\ui_savegame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_video.obj"
"\Xash3D\src_main\temp\engine\!release\ui_newgame.obj"
user32.lib msvcrtd.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"..\temp\engine\!debug/engine.pdb" /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"..\temp\engine\!debug/engine.dll" /implib:"..\temp\engine\!debug/engine.lib" /pdbtype:sept
"\Xash3D\src_main\temp\engine\!debug\cinematic.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_cmds.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_demo.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_effects.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_frame.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_game.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_input.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_main.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_parse.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_phys.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_scrn.obj"
"\Xash3D\src_main\temp\engine\!debug\cl_view.obj"
"\Xash3D\src_main\temp\engine\!debug\com_library.obj"
"\Xash3D\src_main\temp\engine\!debug\con_keys.obj"
"\Xash3D\src_main\temp\engine\!debug\con_main.obj"
"\Xash3D\src_main\temp\engine\!debug\con_utils.obj"
"\Xash3D\src_main\temp\engine\!debug\engfuncs.obj"
"\Xash3D\src_main\temp\engine\!debug\engine.obj"
"\Xash3D\src_main\temp\engine\!debug\host.obj"
"\Xash3D\src_main\temp\engine\!debug\infostring.obj"
"\Xash3D\src_main\temp\engine\!debug\input.obj"
"\Xash3D\src_main\temp\engine\!debug\net_chan.obj"
"\Xash3D\src_main\temp\engine\!debug\net_huff.obj"
"\Xash3D\src_main\temp\engine\!debug\net_msg.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_client.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_cmds.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_frame.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_game.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_init.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_main.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_move.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_phys.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_save.obj"
"\Xash3D\src_main\temp\engine\!debug\sv_world.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_advanced.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_audio.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_controls.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_credits.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_defaults.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_demos.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_gameoptions.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_gotosite.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_ingame.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_loadgame.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_main.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_menu.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_mods.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_multiplayer.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_network.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_newgame.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_options.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_performance.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_playersetup.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_qmenu.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_quit.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_savegame.obj"
"\Xash3D\src_main\temp\engine\!debug\ui_video.obj"
]
Creating command line "link.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2ADA.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2ADB.bat" with contents
Creating command line "link.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2F94.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2F95.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\engine\!release\engine.dll "D:\Xash3D\bin\engine.dll"
copy \Xash3D\src_main\temp\engine\!debug\engine.dll "D:\Xash3D\bin\engine.dll"
]
Creating command line ""C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2ADB.bat""
Creating command line ""C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2F95.bat""
Compiling...
ui_playersetup.c
host.c
d:\xash3d\src_main\engine\host.c(90) : warning C4013: 'CL_NextDemo' undefined; assuming extern returning int
Linking...
Creating library ..\temp\engine\!release/engine.lib and object ..\temp\engine\!release/engine.exp
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!release\engine.dll
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!debug\engine.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.
<h3>Results</h3>
engine.dll - 0 error(s), 0 warning(s)
engine.dll - 0 error(s), 1 warning(s)
</pre>
</body>
</html>

View File

@ -54,6 +54,45 @@ int Host_CompareFileTime( long ft1, long ft2 )
return 0;
}
void Host_ShutdownServer( void )
{
if( !SV_Active()) return;
com.strncpy( host.finalmsg, "Server was killed\n", MAX_STRING );
SV_Shutdown( false );
}
/*
================
Host_EndGame
================
*/
void Host_EndGame( const char *message, ... )
{
va_list argptr;
static char string[MAX_MSGLEN];
va_start( argptr, message );
vsprintf( string, message, argptr );
va_end( argptr );
MsgDev( D_INFO, "Host_EndGame: %s\n", string );
if( SV_Active())
{
com.strncpy( host.finalmsg, "Host_EndGame\n", MAX_STRING );
SV_Shutdown( false );
}
if( host.type == HOST_DEDICATED )
Sys_Break( "Host_EndGame: %s\n", string ); // dedicated servers exit
if( cls.demonum != -1 )
CL_NextDemo ();
else CL_Disconnect ();
Host_AbortCurrentFrame ();
}
void Host_InitPhysic( void )
{
static physic_imp_t pi;

View File

@ -710,9 +710,9 @@ void SV_Baselines_f( sv_client_t *cl )
return;
}
start = com.atoi(Cmd_Argv(2));
start = com.atoi( Cmd_Argv( 2 ));
Mem_Set( &nullstate, 0, sizeof(nullstate));
Mem_Set( &nullstate, 0, sizeof( nullstate ));
// write a packet full of data
while( cl->netchan.message.cursize < MAX_MSGLEN / 2 && start < GI->max_edicts )
@ -727,7 +727,7 @@ void SV_Baselines_f( sv_client_t *cl )
}
if( start == GI->max_edicts ) com.snprintf( baseline, MAX_STRING, "precache %i\n", svs.spawncount );
else com.snprintf( baseline, MAX_STRING, "cmd baselines %i %i\n",svs.spawncount, start );
else com.snprintf( baseline, MAX_STRING, "cmd baselines %i %i\n", svs.spawncount, start );
// send next command
MSG_WriteByte( &cl->netchan.message, svc_stufftext );

View File

@ -399,6 +399,9 @@ static void UI_PlayerSetup_Init( void )
uiPlayerSetup.refdef.fov_y = UI_PlayerSetup_CalcFov( uiPlayerSetup.refdef.fov_x, uiPlayerSetup.refdef.viewport[2], uiPlayerSetup.refdef.viewport[3] );
uiPlayerSetup.refdef.flags = RDF_NOWORLDMODEL;
// NOTE: CL_GetEdictByIndex returns NULL for WMODEL_ENTINDEX
// also it's special case, don't touch!
uiPlayerSetup.ent.serialnumber = WMODEL_ENTINDEX;
uiPlayerSetup.ent.v.sequence = 1;
uiPlayerSetup.ent.v.scale = 1.0f;
uiPlayerSetup.ent.v.frame = -1.0f;

63
launch/launch.plg Normal file
View File

@ -0,0 +1,63 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: launch - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2E9B.tmp" with contents
[
/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "./" /I "imagelib" /I "../public" /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\launch\!debug/" /Fo"..\temp\launch\!debug/" /Fd"..\temp\launch\!debug/" /FD /GZ /c
"D:\Xash3D\src_main\launch\filesystem.c"
]
Creating command line "cl.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2E9B.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2E9C.tmp" with contents
[
zlib.lib png.lib jpg.lib user32.lib gdi32.lib shell32.lib advapi32.lib winmm.lib /nologo /dll /incremental:yes /pdb:"..\temp\launch\!debug/launch.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\launch\!debug/launch.dll" /implib:"..\temp\launch\!debug/launch.lib" /pdbtype:sept /libpath:"./imagelib"
"\Xash3D\src_main\temp\launch\!debug\cmd.obj"
"\Xash3D\src_main\temp\launch\!debug\console.obj"
"\Xash3D\src_main\temp\launch\!debug\cpuinfo.obj"
"\Xash3D\src_main\temp\launch\!debug\crclib.obj"
"\Xash3D\src_main\temp\launch\!debug\cvar.obj"
"\Xash3D\src_main\temp\launch\!debug\export.obj"
"\Xash3D\src_main\temp\launch\!debug\filesystem.obj"
"\Xash3D\src_main\temp\launch\!debug\img_bmp.obj"
"\Xash3D\src_main\temp\launch\!debug\img_dds.obj"
"\Xash3D\src_main\temp\launch\!debug\img_jpg.obj"
"\Xash3D\src_main\temp\launch\!debug\img_main.obj"
"\Xash3D\src_main\temp\launch\!debug\img_pcx.obj"
"\Xash3D\src_main\temp\launch\!debug\img_png.obj"
"\Xash3D\src_main\temp\launch\!debug\img_tga.obj"
"\Xash3D\src_main\temp\launch\!debug\img_utils.obj"
"\Xash3D\src_main\temp\launch\!debug\img_vtf.obj"
"\Xash3D\src_main\temp\launch\!debug\img_wad.obj"
"\Xash3D\src_main\temp\launch\!debug\memlib.obj"
"\Xash3D\src_main\temp\launch\!debug\network.obj"
"\Xash3D\src_main\temp\launch\!debug\parselib.obj"
"\Xash3D\src_main\temp\launch\!debug\patch.obj"
"\Xash3D\src_main\temp\launch\!debug\stdlib.obj"
"\Xash3D\src_main\temp\launch\!debug\system.obj"
"\Xash3D\src_main\temp\launch\!debug\utils.obj"
]
Creating command line "link.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2E9C.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2E9D.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\launch\!debug\launch.dll "D:\Xash3D\bin\launch.dll"
]
Creating command line ""C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2E9D.bat""
Compiling...
filesystem.c
Linking...
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\launch\!debug\launch.dll
‘Ş®Ż¨ŕ®˘ ­® ä ©«®˘: 1.
<h3>Results</h3>
launch.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -163,3 +163,4 @@ Beta 13.12.09
136. re-vision uimenu
137. complete rewriting physic.dll
138. implement hashtable for loaded sounds
139. implement SCR_LoadingPlaque ?

View File

@ -167,7 +167,7 @@ enum
#define RP_SHOWNORMALS 0x2000
#define RP_NONVIEWERREF ( RP_PORTALVIEW|RP_MIRRORVIEW|RP_ENVVIEW|RP_SKYPORTALVIEW|RP_SHADOWMAPVIEW )
#define RP_LOCALCLIENT(e) (((e)->index == ri.GetLocalPlayer()->serialnumber))
#define RP_LOCALCLIENT(e) (ri.GetLocalPlayer() && ((e)->index == ri.GetLocalPlayer()->serialnumber))
#define RP_FOLLOWENTITY(e) (((e)->movetype == MOVETYPE_FOLLOW && (e)->parent))
#define MOD_ALLOWBUMP() (r_lighting_models_followdeluxe->integer ? mapConfig.deluxeMappingEnabled : GL_Support( R_SHADER_GLSL100_EXT ))

View File

@ -3,55 +3,102 @@
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: vid_gl - Win32 Release--------------------
--------------------Configuration: vid_gl - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2A81.tmp" with contents
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2E80.tmp" with contents
[
/nologo /ML /W3 /GX /O2 /Ob2 /I "../public" /I "../common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"..\temp\vid_gl\!release/" /Fd"..\temp\vid_gl\!release/" /FD /c
/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "../public" /I "../common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\vid_gl\!debug/" /Fo"..\temp\vid_gl\!debug/" /Fd"..\temp\vid_gl\!debug/" /FD /c
"D:\Xash3D\src_main\vid_gl\cin.c"
"D:\Xash3D\src_main\vid_gl\r_aliasq.c"
"D:\Xash3D\src_main\vid_gl\r_backend.c"
"D:\Xash3D\src_main\vid_gl\r_bloom.c"
"D:\Xash3D\src_main\vid_gl\r_cin.c"
"D:\Xash3D\src_main\vid_gl\r_cull.c"
"D:\Xash3D\src_main\vid_gl\r_draw.c"
"D:\Xash3D\src_main\vid_gl\r_image.c"
"D:\Xash3D\src_main\vid_gl\r_light.c"
"D:\Xash3D\src_main\vid_gl\r_main.c"
"D:\Xash3D\src_main\vid_gl\r_math.c"
"D:\Xash3D\src_main\vid_gl\r_mesh.c"
"D:\Xash3D\src_main\vid_gl\r_model.c"
"D:\Xash3D\src_main\vid_gl\r_opengl.c"
"D:\Xash3D\src_main\vid_gl\r_poly.c"
"D:\Xash3D\src_main\vid_gl\r_program.c"
"D:\Xash3D\src_main\vid_gl\r_register.c"
"D:\Xash3D\src_main\vid_gl\r_shader.c"
"D:\Xash3D\src_main\vid_gl\r_shadow.c"
"D:\Xash3D\src_main\vid_gl\r_sky.c"
"D:\Xash3D\src_main\vid_gl\r_sprite.c"
"D:\Xash3D\src_main\vid_gl\r_studio.c"
"D:\Xash3D\src_main\vid_gl\r_surf.c"
]
Creating command line "cl.exe @"C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2A81.tmp""
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2A82.tmp" with contents
Creating command line "cl.exe @"C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2E80.tmp""
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2E81.tmp" with contents
[
msvcrt.lib user32.lib gdi32.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\vid_gl\!release/vid_gl.dll" /implib:"..\temp\vid_gl\!release/vid_gl.lib" /libpath:"../public/libs/"
"\Xash3D\src_main\temp\vid_gl\!release\cin.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_aliasq.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_backend.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_bloom.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_cin.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_cull.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_draw.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_image.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_light.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_main.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_math.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_mesh.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_model.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_opengl.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_poly.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_program.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_register.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_shader.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_shadow.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_sky.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_sprite.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_studio.obj"
"\Xash3D\src_main\temp\vid_gl\!release\r_surf.obj"
msvcrtd.lib user32.lib gdi32.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"..\temp\vid_gl\!debug/vid_gl.pdb" /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"..\temp\vid_gl\!debug/vid_gl.dll" /implib:"..\temp\vid_gl\!debug/vid_gl.lib" /pdbtype:sept
"\Xash3D\src_main\temp\vid_gl\!debug\cin.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_aliasq.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_backend.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_bloom.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_cin.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_cull.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_draw.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_image.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_light.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_main.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_math.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_mesh.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_model.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_opengl.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_poly.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_program.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_register.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_shader.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_shadow.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_sky.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_sprite.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_studio.obj"
"\Xash3D\src_main\temp\vid_gl\!debug\r_surf.obj"
]
Creating command line "link.exe @"C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2A82.tmp""
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2A83.bat" with contents
Creating command line "link.exe @"C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2E81.tmp""
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2E82.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\vid_gl\!release\vid_gl.dll "D:\Xash3D\bin\vid_gl.dll"
copy \Xash3D\src_main\temp\vid_gl\!debug\vid_gl.dll "D:\Xash3D\bin\vid_gl.dll"
]
Creating command line ""C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2A83.bat""
Creating command line ""C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP2E82.bat""
Compiling...
cin.c
r_aliasq.c
r_backend.c
r_bloom.c
r_cin.c
r_cull.c
r_draw.c
r_image.c
r_light.c
r_main.c
r_math.c
r_mesh.c
r_model.c
r_opengl.c
r_poly.c
r_program.c
r_register.c
r_shader.c
r_shadow.c
r_sky.c
Generating Code...
Compiling...
r_sprite.c
r_studio.c
r_surf.c
Generating Code...
Linking...
Creating library ..\temp\vid_gl\!release/vid_gl.lib and object ..\temp\vid_gl\!release/vid_gl.exp
Creating library ..\temp\vid_gl\!debug/vid_gl.lib and object ..\temp\vid_gl\!debug/vid_gl.exp
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\vid_gl\!release\vid_gl.dll
Performing Custom Build Step on \Xash3D\src_main\temp\vid_gl\!debug\vid_gl.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.