[quake3/f13/master] - Update release to svn revision (r1802) - Add a whole bunch of patches from Debian which allow usin

Hans de Goede jwrdegoede at fedoraproject.org
Mon Nov 15 08:50:44 UTC 2010


commit a71f980dddd704ef98f1047a4a49f3a4009e63cb
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Nov 12 16:54:02 2010 +0100

    - Update release to svn revision (r1802)
    - Add a whole bunch of patches from Debian which allow using ioquake3 as an
      engine for total conversions and compability with network play with
      official openarena servers (#565763)
    - Remove our own hacks for ioquake3 as an engine for total conversions

 .gitignore                                         |    3 +-
 ...0-don-t-require-BASEGAME-pak0.pk3-if-fs_b.patch |   35 ++++++
 ...seAccelOffset-at-0.001-to-avoid-division-.patch |   49 ++++++++
 ...eRead-allow-loading-any-demo-not-just-the.patch |   56 +++++++++
 ...col-cvar-to-be-changed-on-the-command-lin.patch |  119 ++++++++++++++++++++
 ...using-the-protocol-version-from-the-comma.patch |   71 ++++++++++++
 ...al-vmMagic-that-causes-equivalent-native-.patch |   68 +++++++++++
 ...new-function-to-go-through-the-search-pat.patch |   64 +++++++++++
 0010-Sys_LoadDll-use-FS_FindDll.patch              |   87 ++++++++++++++
 0011-Double-the-maximum-number-of-cvars.patch      |   28 +++++
 ...e-command-buffer-from-16K-to-128K-followi.patch |   24 ++++
 0013-Double-the-default-com_hunkMegs-to-128M.patch |   27 +++++
 sources                                            |    2 +-
 13 files changed, 631 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b3e6afb..215b7e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-quake3-1.36-svn1783.tar.bz2
+quake3-1.36.tar.bz2
+/quake3-1.36-svn1802.tar.bz2
diff --git a/0003-FS_CheckPak0-don-t-require-BASEGAME-pak0.pk3-if-fs_b.patch b/0003-FS_CheckPak0-don-t-require-BASEGAME-pak0.pk3-if-fs_b.patch
new file mode 100644
index 0000000..7bd3f59
--- /dev/null
+++ b/0003-FS_CheckPak0-don-t-require-BASEGAME-pak0.pk3-if-fs_b.patch
@@ -0,0 +1,35 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 7 Aug 2010 00:32:59 +0100
+Subject: [PATCH] FS_CheckPak0: don't require BASEGAME/pak0.pk3 if fs_basegame is not BASEGAME
+
+If fs_basegame is set to another game (like baseoa for OpenArena), *and*
+we're com_standalone, then we don't necessarily need pak0.pk3 at all.
+
+We still clear com_standalone if BASEGAME/pak0.pk3 is found, or if either
+fs_basegame or fs_game is BASEGAME.
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4699
+Forwarded: yes
+---
+ code/qcommon/files.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/code/qcommon/files.c b/code/qcommon/files.c
+index 1bc6b6f..3d2a2a4 100644
+--- a/code/qcommon/files.c
++++ b/code/qcommon/files.c
+@@ -2963,9 +2963,10 @@ static void FS_CheckPak0( void )
+ 	}
+ 
+ 	if( (!Cvar_VariableIntegerValue("com_standalone")	||
+-	     !fs_gamedirvar->string[0]				||
+ 	     !Q_stricmp(fs_gamedirvar->string, BASEGAME)	||
+-	     !Q_stricmp(fs_gamedirvar->string, "missionpack") )
++	     ((!fs_gamedirvar->string[0] ||
++	       !Q_stricmp(fs_gamedirvar->string, "missionpack")) &&
++	      !Q_stricmp(fs_basegame->string, BASEGAME)))
+ 	     &&
+ 	     (!founddemo && (foundPak & 0x1ff) != 0x1ff) )
+ 	{
+-- 
diff --git a/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch b/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch
new file mode 100644
index 0000000..66a9f53
--- /dev/null
+++ b/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch
@@ -0,0 +1,49 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sun, 1 Aug 2010 11:26:51 +0100
+Subject: [PATCH] Clip cl_mouseAccelOffset at 0.001 to avoid division by zero
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4691
+Forwarded: yes
+---
+ code/client/cl_input.c |   16 ++++++++++++----
+ 1 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/code/client/cl_input.c b/code/client/cl_input.c
+index a42030d..5549448 100644
+--- a/code/client/cl_input.c
++++ b/code/client/cl_input.c
+@@ -477,8 +477,16 @@ void CL_MouseMove(usercmd_t *cmd)
+ 		}
+ 		else
+ 		{
++#			define CL_MOUSEACCELOFFSET_MIN 1.0e-3f
+ 			float rate[2];
+ 			float power[2];
++			float offset = cl_mouseAccelOffset->value;
++
++			// clip at a small positive number to avoid division
++			// by zero (or indeed going backwards!)
++			if (offset < CL_MOUSEACCELOFFSET_MIN) {
++				offset = CL_MOUSEACCELOFFSET_MIN;
++			}
+ 
+ 			// sensitivity remains pretty much unchanged at low speeds
+ 			// cl_mouseAccel is a power value to how the acceleration is shaped
+@@ -487,11 +495,11 @@ void CL_MouseMove(usercmd_t *cmd)
+ 
+ 			rate[0] = fabs(mx) / (float) frame_msec;
+ 			rate[1] = fabs(my) / (float) frame_msec;
+-			power[0] = powf(rate[0] / cl_mouseAccelOffset->value, cl_mouseAccel->value);
+-			power[1] = powf(rate[1] / cl_mouseAccelOffset->value, cl_mouseAccel->value);
++			power[0] = powf(rate[0] / offset, cl_mouseAccel->value);
++			power[1] = powf(rate[1] / offset, cl_mouseAccel->value);
+ 
+-			mx = cl_sensitivity->value * (mx + ((mx < 0) ? -power[0] : power[0]) * cl_mouseAccelOffset->value);
+-			my = cl_sensitivity->value * (my + ((my < 0) ? -power[1] : power[1]) * cl_mouseAccelOffset->value);
++			mx = cl_sensitivity->value * (mx + ((mx < 0) ? -power[0] : power[0]) * offset);
++			my = cl_sensitivity->value * (my + ((my < 0) ? -power[1] : power[1]) * offset);
+ 
+ 			if(cl_showMouseRate->integer)
+ 				Com_Printf("ratex: %f, ratey: %f, powx: %f, powy: %f\n", rate[0], rate[1], power[0], power[1]);
+-- 
diff --git a/0005-FS_FOpenFileRead-allow-loading-any-demo-not-just-the.patch b/0005-FS_FOpenFileRead-allow-loading-any-demo-not-just-the.patch
new file mode 100644
index 0000000..f1e1f21
--- /dev/null
+++ b/0005-FS_FOpenFileRead-allow-loading-any-demo-not-just-the.patch
@@ -0,0 +1,56 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Fri, 6 Aug 2010 20:26:40 +0100
+Subject: [PATCH] FS_FOpenFileRead: allow loading any demo, not just the current protocol
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4698
+Forwarded: yes
+---
+ code/qcommon/files.c |   12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/code/qcommon/files.c b/code/qcommon/files.c
+index 3d2a2a4..9e76a0b 100644
+--- a/code/qcommon/files.c
++++ b/code/qcommon/files.c
+@@ -992,6 +992,14 @@ qboolean FS_FilenameCompare( const char *s1, const char *s2 ) {
+ 	return qfalse;		// strings are equal
+ }
+ 
++static ID_INLINE qboolean extension_is_demo( const char *filename, int len ) {
++	return (Q_stricmpn (filename + len - 6, ".dm_", 4) == 0 &&
++		filename[len - 2] >= '0' &&
++		filename[len - 2] <= '9' &&
++		filename[len - 1] >= '0' &&
++		filename[len - 1] <= '9' );
++}
++
+ /*
+ ===========
+ FS_FOpenFileRead
+@@ -1013,7 +1021,6 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
+ 	long			hash;
+ 	FILE			*temp;
+ 	int				l;
+-	char demoExt[16];
+ 
+ 	hash = 0;
+ 
+@@ -1060,7 +1067,6 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
+ 		Com_Error( ERR_FATAL, "FS_FOpenFileRead: NULL 'filename' parameter passed\n" );
+ 	}
+ 
+-	Com_sprintf (demoExt, sizeof(demoExt), ".dm_%d",PROTOCOL_VERSION );
+ 	// qpaths are not supposed to have a leading slash
+ 	if ( filename[0] == '/' || filename[0] == '\\' ) {
+ 		filename++;
+@@ -1177,7 +1183,7 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
+ 				if ( Q_stricmp( filename + l - 4, ".cfg" )		// for config files
+ 					&& Q_stricmp( filename + l - 5, ".menu" )	// menu files
+ 					&& Q_stricmp( filename + l - 5, ".game" )	// menu files
+-					&& Q_stricmp( filename + l - strlen(demoExt), demoExt )	// menu files
++					&& !extension_is_demo( filename, l )		// demos
+ 					&& Q_stricmp( filename + l - 4, ".dat" ) ) {	// for journal files
+ 					continue;
+ 				}
+-- 
diff --git a/0006-Allow-protocol-cvar-to-be-changed-on-the-command-lin.patch b/0006-Allow-protocol-cvar-to-be-changed-on-the-command-lin.patch
new file mode 100644
index 0000000..8350d2c
--- /dev/null
+++ b/0006-Allow-protocol-cvar-to-be-changed-on-the-command-lin.patch
@@ -0,0 +1,119 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Fri, 6 Aug 2010 20:34:51 +0100
+Subject: [PATCH] Allow protocol cvar to be changed on the command line
+
+This allows an unmodified ioquake3 binary to run standalone games that
+have the same underlying protocol, but change PROTOCOL_VERSION to reflect
+incompatible changes to game content, such as OpenArena. For instance,
+OpenArena >= 0.8.1 can use:
+
+    ioquake3 +set protocol 71 [...]
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4698
+Forwarded: yes
+---
+ code/client/cl_main.c   |    4 ++--
+ code/qcommon/common.c   |    2 ++
+ code/qcommon/qcommon.h  |    2 ++
+ code/server/sv_client.c |    4 ++--
+ code/server/sv_init.c   |    1 -
+ code/server/sv_main.c   |    2 +-
+ 6 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/code/client/cl_main.c b/code/client/cl_main.c
+index 2b4be3a..0ea6d7c 100644
+--- a/code/client/cl_main.c
++++ b/code/client/cl_main.c
+@@ -2121,7 +2121,7 @@ void CL_CheckForResend( void ) {
+ 		port = Cvar_VariableValue ("net_qport");
+ 
+ 		Q_strncpyz( info, Cvar_InfoString( CVAR_USERINFO ), sizeof( info ) );
+-		Info_SetValueForKey( info, "protocol", va("%i", PROTOCOL_VERSION ) );
++		Info_SetValueForKey( info, "protocol", va("%i", sv_protocol->integer ) );
+ 		Info_SetValueForKey( info, "qport", va("%i", port ) );
+ 		Info_SetValueForKey( info, "challenge", va("%i", clc.challenge ) );
+ 		
+@@ -3386,7 +3386,7 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) {
+ 
+ 	// if this isn't the correct protocol version, ignore it
+ 	prot = atoi( Info_ValueForKey( infoString, "protocol" ) );
+-	if ( prot != PROTOCOL_VERSION ) {
++	if ( prot != sv_protocol->integer ) {
+ 		Com_DPrintf( "Different protocol info packet: %s\n", infoString );
+ 		return;
+ 	}
+diff --git a/code/qcommon/common.c b/code/qcommon/common.c
+index 64ec51d..d6c0532 100644
+--- a/code/qcommon/common.c
++++ b/code/qcommon/common.c
+@@ -84,6 +84,7 @@ cvar_t	*com_minimized;
+ cvar_t	*com_maxfpsMinimized;
+ cvar_t	*com_abnormalExit;
+ cvar_t	*com_standalone;
++cvar_t	*sv_protocol;
+ 
+ // com_speeds times
+ int		time_game;
+@@ -2745,6 +2746,7 @@ void Com_Init( char *commandLine ) {
+ 
+ 	s = va("%s %s %s", Q3_VERSION, PLATFORM_STRING, __DATE__ );
+ 	com_version = Cvar_Get ("version", s, CVAR_ROM | CVAR_SERVERINFO );
++	sv_protocol = Cvar_Get ("protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO | CVAR_INIT);
+ 
+ 	Sys_Init();
+ 
+diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h
+index c6a61e2..6698454 100644
+--- a/code/qcommon/qcommon.h
++++ b/code/qcommon/qcommon.h
+@@ -839,6 +839,8 @@ extern	cvar_t	*sv_paused;
+ extern	cvar_t	*cl_packetdelay;
+ extern	cvar_t	*sv_packetdelay;
+ 
++extern	cvar_t	*sv_protocol;
++
+ // com_speeds times
+ extern	int		time_game;
+ extern	int		time_frontend;
+diff --git a/code/server/sv_client.c b/code/server/sv_client.c
+index 1195c88..657c936 100644
+--- a/code/server/sv_client.c
++++ b/code/server/sv_client.c
+@@ -302,8 +302,8 @@ void SV_DirectConnect( netadr_t from ) {
+ 	Q_strncpyz( userinfo, Cmd_Argv(1), sizeof(userinfo) );
+ 
+ 	version = atoi( Info_ValueForKey( userinfo, "protocol" ) );
+-	if ( version != PROTOCOL_VERSION ) {
+-		NET_OutOfBandPrint( NS_SERVER, from, "print\nServer uses protocol version %i.\n", PROTOCOL_VERSION );
++	if ( version != sv_protocol->integer ) {
++		NET_OutOfBandPrint( NS_SERVER, from, "print\nServer uses protocol version %i (yours is %i).\n", sv_protocol->integer, version );
+ 		Com_DPrintf ("    rejected connect from version %i\n", version);
+ 		return;
+ 	}
+diff --git a/code/server/sv_init.c b/code/server/sv_init.c
+index bac7fa4..07f11d1 100644
+--- a/code/server/sv_init.c
++++ b/code/server/sv_init.c
+@@ -633,7 +633,6 @@ void SV_Init (void) {
+ 	Cvar_Get ("timelimit", "0", CVAR_SERVERINFO);
+ 	sv_gametype = Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_LATCH );
+ 	Cvar_Get ("sv_keywords", "", CVAR_SERVERINFO);
+-	Cvar_Get ("protocol", va("%i", PROTOCOL_VERSION), CVAR_SERVERINFO | CVAR_ROM);
+ 	sv_mapname = Cvar_Get ("mapname", "nomap", CVAR_SERVERINFO | CVAR_ROM);
+ 	sv_privateClients = Cvar_Get ("sv_privateClients", "0", CVAR_SERVERINFO);
+ 	sv_hostname = Cvar_Get ("sv_hostname", "noname", CVAR_SERVERINFO | CVAR_ARCHIVE );
+diff --git a/code/server/sv_main.c b/code/server/sv_main.c
+index 67d7d51..9f20128 100644
+--- a/code/server/sv_main.c
++++ b/code/server/sv_main.c
+@@ -634,7 +634,7 @@ void SVC_Info( netadr_t from ) {
+ 	// to prevent timed spoofed reply packets that add ghost servers
+ 	Info_SetValueForKey( infostring, "challenge", Cmd_Argv(1) );
+ 
+-	Info_SetValueForKey( infostring, "protocol", va("%i", PROTOCOL_VERSION) );
++	Info_SetValueForKey( infostring, "protocol", va("%i", sv_protocol->integer) );
+ 	Info_SetValueForKey( infostring, "hostname", sv_hostname->string );
+ 	Info_SetValueForKey( infostring, "mapname", sv_mapname->string );
+ 	Info_SetValueForKey( infostring, "clients", va("%i", count) );
+-- 
diff --git a/0007-Load-demos-using-the-protocol-version-from-the-comma.patch b/0007-Load-demos-using-the-protocol-version-from-the-comma.patch
new file mode 100644
index 0000000..58208c0
--- /dev/null
+++ b/0007-Load-demos-using-the-protocol-version-from-the-comma.patch
@@ -0,0 +1,71 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Fri, 6 Aug 2010 20:37:48 +0100
+Subject: [PATCH] Load demos using the protocol version from the command line, if overridden
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4698
+Forwarded: yes
+---
+ code/client/cl_main.c |   21 +++++++++++++++++----
+ 1 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/code/client/cl_main.c b/code/client/cl_main.c
+index 0ea6d7c..15cf3db 100644
+--- a/code/client/cl_main.c
++++ b/code/client/cl_main.c
+@@ -624,14 +624,14 @@ void CL_Record_f( void ) {
+ 	if ( Cmd_Argc() == 2 ) {
+ 		s = Cmd_Argv(1);
+ 		Q_strncpyz( demoName, s, sizeof( demoName ) );
+-		Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, PROTOCOL_VERSION );
++		Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, sv_protocol->integer );
+ 	} else {
+ 		int		number;
+ 
+ 		// scan for a free demo name
+ 		for ( number = 0 ; number <= 9999 ; number++ ) {
+ 			CL_DemoFilename( number, demoName );
+-			Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, PROTOCOL_VERSION );
++			Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, sv_protocol->integer );
+ 
+ 			if (!FS_FileExists(name))
+ 				break;	// file doesn't exist
+@@ -881,6 +881,19 @@ static void CL_WalkDemoExt(char *arg, char *name, int *demofile)
+ {
+ 	int i = 0;
+ 	*demofile = 0;
++
++	Com_sprintf (name, MAX_OSPATH, "demos/%s.dm_%d", arg, sv_protocol->integer);
++
++	FS_FOpenFileRead( name, demofile, qtrue );
++
++	if (*demofile)
++	{
++		Com_Printf("Demo file: %s\n", name);
++		return;
++	}
++
++	Com_Printf("Not found: %s\n", name);
++
+ 	while(demo_protocols[i])
+ 	{
+ 		Com_sprintf (name, MAX_OSPATH, "demos/%s.dm_%d", arg, demo_protocols[i]);
+@@ -907,7 +920,7 @@ static void CL_CompleteDemoName( char *args, int argNum )
+ 	{
+ 		char demoExt[ 16 ];
+ 
+-		Com_sprintf( demoExt, sizeof( demoExt ), ".dm_%d", PROTOCOL_VERSION );
++		Com_sprintf( demoExt, sizeof( demoExt ), ".dm_%d", sv_protocol->integer );
+ 		Field_CompleteFilename( "demos", demoExt, qtrue );
+ 	}
+ }
+@@ -955,7 +968,7 @@ void CL_PlayDemo_f( void ) {
+ 				break;
+ 			i++;
+ 		}
+-		if (demo_protocols[i])
++		if (demo_protocols[i] || (protocol == sv_protocol->integer))
+ 		{
+ 			Com_sprintf (name, sizeof(name), "demos/%s", arg);
+ 			FS_FOpenFileRead( name, &clc.demofile, qtrue );
+-- 
diff --git a/0008-Add-a-special-vmMagic-that-causes-equivalent-native-.patch b/0008-Add-a-special-vmMagic-that-causes-equivalent-native-.patch
new file mode 100644
index 0000000..1b4af4f
--- /dev/null
+++ b/0008-Add-a-special-vmMagic-that-causes-equivalent-native-.patch
@@ -0,0 +1,68 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 21 Jul 2010 19:50:32 +0100
+Subject: [PATCH] Add a special vmMagic that causes equivalent native code to be loaded instead
+
+This means that mods can build everything from source without relying on
+the non-GPL q3lcc compiler. By padding the fake QVM with bytes chosen
+to match the CRC-32 of the upstream-released QVM, it's even possible to
+be network-compatible with the upstream one, and so play on pure servers.
+
+Origin: vendor, Debian
+Forwarded: no
+---
+ code/qcommon/qfiles.h |    4 ++++
+ code/qcommon/vm.c     |   18 ++++++++++++++++++
+ 2 files changed, 22 insertions(+), 0 deletions(-)
+
+diff --git a/code/qcommon/qfiles.h b/code/qcommon/qfiles.h
+index 7f1ef96..e3515b4 100644
+--- a/code/qcommon/qfiles.h
++++ b/code/qcommon/qfiles.h
+@@ -52,6 +52,10 @@ QVM files
+ 
+ #define	VM_MAGIC			0x12721444
+ #define	VM_MAGIC_VER2	0x12721445
++
++/* 'NTVE', but backwards because the QVM format is little-endian */
++#define	VM_MAGIC_USE_NATIVE	0x4556544E
++
+ typedef struct {
+ 	int		vmMagic;
+ 
+diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c
+index 2ccc24f..83832d1 100644
+--- a/code/qcommon/vm.c
++++ b/code/qcommon/vm.c
+@@ -384,6 +384,18 @@ vmHeader_t *VM_LoadQVM( vm_t *vm, qboolean alloc ) {
+ 		return NULL;
+ 	}
+ 
++	if (LittleLong( header.h->vmMagic ) == VM_MAGIC_USE_NATIVE) {
++		Com_Printf( "...which has vmMagic VM_MAGIC_USE_NATIVE.\n" );
++		Com_Printf( "Loading DLL file %s instead.\n", vm->name );
++		vm->dllHandle = Sys_LoadDll( vm->name, vm->fqpath , &vm->entryPoint, VM_DllSyscall );
++		if ( !vm->dllHandle ) {
++			Com_Printf( "Failed to load DLL.\n" );
++			VM_Free( vm );
++			return NULL;
++		}
++		return header.h;
++	}
++
+ 	if( LittleLong( header.h->vmMagic ) == VM_MAGIC_VER2 ) {
+ 		Com_Printf( "...which has vmMagic VM_MAGIC_VER2\n" );
+ 
+@@ -570,6 +582,12 @@ vm_t *VM_Create( const char *module, intptr_t (*systemCalls)(intptr_t *),
+ 		return NULL;
+ 	}
+ 
++	if ( vm->dllHandle ) {
++		// it was replaced by a DLL anyway
++		FS_FreeFile( header );
++		return vm;
++	}
++
+ 	// allocate space for the jump targets, which will be filled in by the compile/prep functions
+ 	vm->instructionCount = header->instructionCount;
+ 	vm->instructionPointers = Hunk_Alloc( vm->instructionCount*4, h_high );
+-- 
diff --git a/0009-FS_FindDll-new-function-to-go-through-the-search-pat.patch b/0009-FS_FindDll-new-function-to-go-through-the-search-pat.patch
new file mode 100644
index 0000000..0ce388c
--- /dev/null
+++ b/0009-FS_FindDll-new-function-to-go-through-the-search-pat.patch
@@ -0,0 +1,64 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 21 Jul 2010 23:01:46 +0100
+Subject: [PATCH] FS_FindDll: new function to go through the search path looking for a DLL
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4701
+Forwarded: yes
+---
+ code/qcommon/files.c   |   26 ++++++++++++++++++++++++++
+ code/qcommon/qcommon.h |    3 +++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+diff --git a/code/qcommon/files.c b/code/qcommon/files.c
+index 9e76a0b..c52e113 100644
+--- a/code/qcommon/files.c
++++ b/code/qcommon/files.c
+@@ -1218,6 +1218,32 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
+ }
+ 
+ 
++char *FS_FindDll( const char *filename ) {
++	searchpath_t	*search;
++	directory_t		*dir;
++
++	if ( !fs_searchpaths ) {
++		Com_Error( ERR_FATAL, "Filesystem call made without initialization\n" );
++	}
++
++	for ( search = fs_searchpaths ; search ; search = search->next ) {
++		if ( search->dir ) {
++			FILE *f;
++			char *netpath;
++
++			dir = search->dir;
++			netpath = FS_BuildOSPath( dir->path, dir->gamedir, filename );
++			f = fopen( netpath, "rb" );
++			if (f) {
++				fclose( f );
++				return netpath;
++			}
++		}
++	}
++
++	return NULL;
++}
++
+ /*
+ =================
+ FS_Read
+diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h
+index 6698454..30ab601 100644
+--- a/code/qcommon/qcommon.h
++++ b/code/qcommon/qcommon.h
+@@ -605,6 +605,9 @@ void	FS_FreeFileList( char **list );
+ qboolean FS_FileExists( const char *file );
+ 
+ qboolean FS_CreatePath (char *OSPath);
++
++char *FS_FindDll( const char *filename );
++
+ char   *FS_BuildOSPath( const char *base, const char *game, const char *qpath );
+ qboolean FS_CompareZipChecksum(const char *zipfile);
+ 
+-- 
diff --git a/0010-Sys_LoadDll-use-FS_FindDll.patch b/0010-Sys_LoadDll-use-FS_FindDll.patch
new file mode 100644
index 0000000..6481255
--- /dev/null
+++ b/0010-Sys_LoadDll-use-FS_FindDll.patch
@@ -0,0 +1,87 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 21 Jul 2010 19:46:38 +0100
+Subject: [PATCH] Sys_LoadDll: use FS_FindDll
+
+Origin: vendor, Debian
+Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4701
+Forwarded: yes
+---
+ code/sys/sys_main.c |   48 +++++++++---------------------------------------
+ 1 files changed, 9 insertions(+), 39 deletions(-)
+
+diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c
+index 91c54f1..923ecf3 100644
+--- a/code/sys/sys_main.c
++++ b/code/sys/sys_main.c
+@@ -402,34 +402,6 @@ void Sys_UnloadDll( void *dllHandle )
+ 
+ /*
+ =================
+-Sys_TryLibraryLoad
+-=================
+-*/
+-static void* Sys_TryLibraryLoad(const char* base, const char* gamedir, const char* fname, char* fqpath )
+-{
+-	void* libHandle;
+-	char* fn;
+-
+-	*fqpath = 0;
+-
+-	fn = FS_BuildOSPath( base, gamedir, fname );
+-	Com_Printf( "Sys_LoadDll(%s)... \n", fn );
+-
+-	libHandle = Sys_LoadLibrary(fn);
+-
+-	if(!libHandle) {
+-		Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, Sys_LibraryError() );
+-		return NULL;
+-	}
+-
+-	Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn );
+-	Q_strncpyz ( fqpath , fn , MAX_QPATH ) ;
+-
+-	return libHandle;
+-}
+-
+-/*
+-=================
+ Sys_LoadDll
+ 
+ Used to load a development dll instead of a virtual machine
+@@ -444,26 +416,24 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
+ 	void  *libHandle;
+ 	void  (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) );
+ 	char  fname[MAX_OSPATH];
+-	char  *basepath;
+-	char  *homepath;
+-	char  *gamedir;
++	char  *netpath;
+ 
+ 	assert( name );
+ 
+ 	Q_snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
+ 
+-	// TODO: use fs_searchpaths from files.c
+-	basepath = Cvar_VariableString( "fs_basepath" );
+-	homepath = Cvar_VariableString( "fs_homepath" );
+-	gamedir = Cvar_VariableString( "fs_game" );
++	netpath = FS_FindDll(fname);
+ 
+-	libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath);
++	if(!netpath) {
++		Com_Printf( "Sys_LoadDll(%s) could not find it\n", fname );
++		return NULL;
++	}
+ 
+-	if(!libHandle && basepath)
+-		libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath);
++	Com_Printf( "Loading DLL file: %s\n", netpath);
++	libHandle = Sys_LoadLibrary(netpath);
+ 
+ 	if(!libHandle) {
+-		Com_Printf ( "Sys_LoadDll(%s) failed to load library\n", name );
++		Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", netpath, Sys_LibraryError() );
+ 		return NULL;
+ 	}
+ 
+-- 
diff --git a/0011-Double-the-maximum-number-of-cvars.patch b/0011-Double-the-maximum-number-of-cvars.patch
new file mode 100644
index 0000000..eaa5699
--- /dev/null
+++ b/0011-Double-the-maximum-number-of-cvars.patch
@@ -0,0 +1,28 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 11 Aug 2010 21:37:03 +0100
+Subject: [PATCH] Double the maximum number of cvars
+
+OpenArena has had problems with hitting the cvar limit, and it only costs
+52K of memory (on i386/armel) to double the arbitrary limit. That should
+hopefully be plenty.
+
+Origin: vendor, Debian
+Forwarded: no
+---
+ code/qcommon/cvar.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/code/qcommon/cvar.c b/code/qcommon/cvar.c
+index 3558f0f..15715bc 100644
+--- a/code/qcommon/cvar.c
++++ b/code/qcommon/cvar.c
+@@ -28,7 +28,7 @@ cvar_t		*cvar_vars = NULL;
+ cvar_t		*cvar_cheats;
+ int			cvar_modifiedFlags;
+ 
+-#define	MAX_CVARS	1024
++#define	MAX_CVARS	2048
+ cvar_t		cvar_indexes[MAX_CVARS];
+ int			cvar_numIndexes;
+ 
+-- 
diff --git a/0012-Increase-the-command-buffer-from-16K-to-128K-followi.patch b/0012-Increase-the-command-buffer-from-16K-to-128K-followi.patch
new file mode 100644
index 0000000..5a2d620
--- /dev/null
+++ b/0012-Increase-the-command-buffer-from-16K-to-128K-followi.patch
@@ -0,0 +1,24 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 11 Aug 2010 21:40:03 +0100
+Subject: [PATCH] Increase the command buffer from 16K to 128K, following OpenArena
+
+Origin: OpenArena
+Forwarded: no
+---
+ code/qcommon/cmd.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/code/qcommon/cmd.c b/code/qcommon/cmd.c
+index f1243b3..349ff7d 100644
+--- a/code/qcommon/cmd.c
++++ b/code/qcommon/cmd.c
+@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ #include "q_shared.h"
+ #include "qcommon.h"
+ 
+-#define	MAX_CMD_BUFFER	16384
++#define	MAX_CMD_BUFFER	128*1024
+ #define	MAX_CMD_LINE	1024
+ 
+ typedef struct {
+-- 
diff --git a/0013-Double-the-default-com_hunkMegs-to-128M.patch b/0013-Double-the-default-com_hunkMegs-to-128M.patch
new file mode 100644
index 0000000..8974a89
--- /dev/null
+++ b/0013-Double-the-default-com_hunkMegs-to-128M.patch
@@ -0,0 +1,27 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 11 Aug 2010 21:40:59 +0100
+Subject: [PATCH] Double the default com_hunkMegs, to 128M
+
+OpenArena apparently aims for double the detail level, texture size etc.
+of vanilla Quake 3, so it needs more memory.
+
+Origin: OpenArena
+Forwarded: no
+---
+ code/qcommon/common.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/code/qcommon/common.c b/code/qcommon/common.c
+index d6c0532..ef022e3 100644
+--- a/code/qcommon/common.c
++++ b/code/qcommon/common.c
+@@ -38,7 +38,7 @@ int demo_protocols[] =
+ 
+ #define MIN_DEDICATED_COMHUNKMEGS 1
+ #define MIN_COMHUNKMEGS		56
+-#define DEF_COMHUNKMEGS		64
++#define DEF_COMHUNKMEGS		128
+ #define DEF_COMZONEMEGS		24
+ #define DEF_COMHUNKMEGS_S	XSTRING(DEF_COMHUNKMEGS)
+ #define DEF_COMZONEMEGS_S	XSTRING(DEF_COMZONEMEGS)
+-- 
diff --git a/sources b/sources
index 9443317..0e2d544 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c03d6a5707b51af6a4b26fe07ad65106  quake3-1.36-svn1783.tar.bz2
+83f1b46be26fc9c16c5b53f4f7a0a1b4  quake3-1.36-svn1802.tar.bz2
diff --git a/worldofpadman.sh b/worldofpadman.sh
old mode 100755
new mode 100644


More information about the scm-commits mailing list