diff options
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/common.c | 20 | ||||
-rw-r--r-- | src/qcommon/cvar.c | 9 | ||||
-rw-r--r-- | src/qcommon/files.c | 6 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 3 | ||||
-rw-r--r-- | src/qcommon/qcommon.h | 7 | ||||
-rw-r--r-- | src/qcommon/vm_ppc_new.c | 16 |
6 files changed, 41 insertions, 20 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index cc105ee8..dfbfcd0f 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -263,9 +263,6 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { code = ERR_FATAL; } - // make sure we can get at our local stuff - FS_PureServerSetLoadedPaks( "", "" ); - // if we are getting a solid stream of ERR_DROP, do an ERR_FATAL currentTime = Sys_Milliseconds(); if ( currentTime - lastErrorTime < 100 ) { @@ -286,20 +283,22 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { vsprintf (com_errorMessage,fmt,argptr); va_end (argptr); - if ( code != ERR_DISCONNECT && code != ERR_NEED_CD ) { + if (code != ERR_DISCONNECT && code != ERR_NEED_CD) Cvar_Set("com_errorMessage", com_errorMessage); - } - if ( code == ERR_SERVERDISCONNECT ) { + if (code == ERR_DISCONNECT || code == ERR_SERVERDISCONNECT) { CL_Disconnect( qtrue ); CL_FlushMemory( ); + // make sure we can get at our local stuff + FS_PureServerSetLoadedPaks("", ""); com_errorEntered = qfalse; longjmp (abortframe, -1); - } else if ( code == ERR_DROP || code == ERR_DISCONNECT ) { + } else if (code == ERR_DROP) { Com_Printf ("********************\nERROR: %s\n********************\n", com_errorMessage); SV_Shutdown (va("Server crashed: %s", com_errorMessage)); CL_Disconnect( qtrue ); CL_FlushMemory( ); + FS_PureServerSetLoadedPaks("", ""); com_errorEntered = qfalse; longjmp (abortframe, -1); } else if ( code == ERR_NEED_CD ) { @@ -312,6 +311,7 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { } else { Com_Printf("Server didn't have CD\n" ); } + FS_PureServerSetLoadedPaks("", ""); longjmp (abortframe, -1); } else { CL_Shutdown (); @@ -2279,7 +2279,7 @@ Com_Init void Com_Init( char *commandLine ) { char *s; - Com_Printf( "%s %s %s\n", Q3_VERSION, PLATFORM_STRING, __DATE__ ); + Com_Printf( "%s %s %s\n", SVN_VERSION, PLATFORM_STRING, __DATE__ ); if ( setjmp (abortframe) ) { Sys_Error ("Error during initialization"); @@ -2523,9 +2523,9 @@ int Com_ModifyMsec( int msec ) { // dedicated servers don't want to clamp for a much longer // period, because it would mess up all the client's views // of time. - if ( msec > 500 ) { + if (com_sv_running->integer && msec > 500) Com_Printf( "Hitch warning: %i msec frame time\n", msec ); - } + clampTime = 5000; } else if ( !com_sv_running->integer ) { diff --git a/src/qcommon/cvar.c b/src/qcommon/cvar.c index a4af1af0..4340dcc4 100644 --- a/src/qcommon/cvar.c +++ b/src/qcommon/cvar.c @@ -452,6 +452,15 @@ void Cvar_Reset( const char *var_name ) { Cvar_Set2( var_name, NULL, qfalse ); } +/* +============ +Cvar_ForceReset +============ +*/ +void Cvar_ForceReset(const char *var_name) +{ + Cvar_Set2(var_name, NULL, qtrue); +} /* ============ diff --git a/src/qcommon/files.c b/src/qcommon/files.c index 15e183a4..ac73a0a8 100644 --- a/src/qcommon/files.c +++ b/src/qcommon/files.c @@ -2706,7 +2706,7 @@ qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) { ================ FS_Shutdown -Frees all resources and closes all files +Frees all resources. ================ */ void FS_Shutdown( qboolean closemfp ) { @@ -2819,10 +2819,6 @@ static void FS_Startup( const char *gameName ) { if (fs_basepath->string[0]) { FS_AddGameDirectory( fs_basepath->string, gameName ); } -#ifdef MACOS_X - // allow .app bundles to be placed along side base dir - FS_AddGameDirectory( ".", gameName ); -#endif // fs_homepath is somewhat particular to *nix systems, only add if relevant // NOTE: same filtering below for mods and basegame if (fs_basepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 8d84b3f7..f7a8b43e 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -29,6 +29,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define VERSION_NUMBER "1.1.0" #define Q3_VERSION "tremulous " VERSION_NUMBER +#ifndef SVN_VERSION +#define SVN_VERSION Q3_VERSION +#endif #define CLIENT_WINDOW_TITLE "Tremulous " VERSION_NUMBER #define CLIENT_WINDOW_ICON "Tremulous" #define CONSOLE_WINDOW_TITLE "Tremulous " VERSION_NUMBER " console" diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index bf20536d..478cd5d5 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -481,6 +481,7 @@ void Cvar_CommandCompletion( void(*callback)(const char *s) ); // callback with each valid string void Cvar_Reset( const char *var_name ); +void Cvar_ForceReset(const char *var_name); void Cvar_SetCheatState( void ); // reset all testing vars to a safe value @@ -1096,4 +1097,10 @@ extern huffman_t clientHuffTables; #define CL_ENCODE_START 12 #define CL_DECODE_START 4 +// flags for sv_allowDownload and cl_allowDownload +#define DLF_ENABLE 1 +#define DLF_NO_REDIRECT 2 +#define DLF_NO_UDP 4 +#define DLF_NO_DISCONNECT 8 + #endif // _QCOMMON_H_ diff --git a/src/qcommon/vm_ppc_new.c b/src/qcommon/vm_ppc_new.c index a731d653..79fc506f 100644 --- a/src/qcommon/vm_ppc_new.c +++ b/src/qcommon/vm_ppc_new.c @@ -158,32 +158,38 @@ typedef enum { #define RG_EA r14 // The deepest value I saw in the Quake3 games was 9. -#define OP_STACK_MAX_DEPTH 12 +#define OP_STACK_MAX_DEPTH 16 -// These are all volatile and thus must be saved -// upon entry to the VM code. +// These are all volatile and thus must be saved upon entry to the VM code. +// NOTE: These are General Purpose Registers (GPR) numbers like the +// R_ definitions in the regNums_t enum above (31 is the max) static int opStackIntRegisters[OP_STACK_MAX_DEPTH] = { 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27 + 24, 25, 26, 27, + 28, 29, 30, 31 }; static unsigned int *opStackLoadInstructionAddr[OP_STACK_MAX_DEPTH]; // We use different registers for the floating point // operand stack (these are volatile in the PPC ABI) +// NOTE: these are Floating Point Register (FPR) numbers, not +// General Purpose Register (GPR) numbers static int opStackFloatRegisters[OP_STACK_MAX_DEPTH] = { 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11 + 8, 9, 10, 11, + 12, 13, 14, 15 }; static int opStackRegType[OP_STACK_MAX_DEPTH] = { 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 }; |