summaryrefslogtreecommitdiff
path: root/games/cleanq3/files
diff options
context:
space:
mode:
Diffstat (limited to 'games/cleanq3/files')
-rw-r--r--games/cleanq3/files/patch-code-cgame-cg_weapons.c23
-rw-r--r--games/cleanq3/files/patch-code-game-q_shared.c113
-rw-r--r--games/cleanq3/files/patch-code-game-q_shared.h140
-rw-r--r--games/cleanq3/files/patch-code-q3_ui-ui_playermodel.c11
-rw-r--r--games/cleanq3/files/patch-code-q3_ui-ui_players.c18
-rw-r--r--games/cleanq3/files/patch-code-q3_ui-ui_saveconfig.c11
-rw-r--r--games/cleanq3/files/patch-code-qcommon-common.c28
-rw-r--r--games/cleanq3/files/patch-code-qcommon-vm.c29
-rw-r--r--games/cleanq3/files/patch-code-renderer-tr_bsp.c11
-rw-r--r--games/cleanq3/files/patch-code-renderer-tr_shader.c29
-rw-r--r--games/cleanq3/files/patch-code-server-sv_client.c73
-rw-r--r--games/cleanq3/files/patch-code-ui-ui_main.c11
-rw-r--r--games/cleanq3/files/patch-code-ui-ui_players.c18
-rw-r--r--games/cleanq3/files/patch-code-unix-Makefile364
-rw-r--r--games/cleanq3/files/patch-code-unix-unix_main.c44
-rw-r--r--games/cleanq3/files/patch-code-unix-unix_shared.c49
16 files changed, 0 insertions, 972 deletions
diff --git a/games/cleanq3/files/patch-code-cgame-cg_weapons.c b/games/cleanq3/files/patch-code-cgame-cg_weapons.c
deleted file mode 100644
index 500eadd79101..000000000000
--- a/games/cleanq3/files/patch-code-cgame-cg_weapons.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./code/cgame/cg_weapons.c.orig Wed May 31 20:52:06 2006
-+++ ./code/cgame/cg_weapons.c Wed May 31 20:52:54 2006
-@@ -636,17 +636,17 @@
- }
-
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_flash.md3" );
- weaponInfo->flashModel = trap_R_RegisterModel( path );
-
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_barrel.md3" );
- weaponInfo->barrelModel = trap_R_RegisterModel( path );
-
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_hand.md3" );
- weaponInfo->handsModel = trap_R_RegisterModel( path );
-
diff --git a/games/cleanq3/files/patch-code-game-q_shared.c b/games/cleanq3/files/patch-code-game-q_shared.c
deleted file mode 100644
index cf54cfb63698..000000000000
--- a/games/cleanq3/files/patch-code-game-q_shared.c
+++ /dev/null
@@ -1,113 +0,0 @@
---- ./code/game/q_shared.c.orig Wed May 31 20:52:06 2006
-+++ ./code/game/q_shared.c Wed May 31 20:54:26 2006
-@@ -38,14 +38,21 @@
- COM_StripExtension
- ============
- */
--void COM_StripExtension( const char *in, char *out ) {
-- while ( *in && *in != '.' ) {
-- *out++ = *in++;
-+void COM_StripExtension( const char *in, char *out, int destsize ) {
-+ int length;
-+
-+ Q_strncpyz(out, in, destsize);
-+
-+ length = strlen(out)-1;
-+ while (length > 0 && out[length] != '.') {
-+ length--;
-+ if (out[length] == '/')
-+ return; // no extension
- }
-- *out = 0;
-+ if (length)
-+ out[length] = 0;
- }
-
--
- /*
- ==================
- COM_DefaultExtension
-@@ -79,29 +86,28 @@
-
- ============================================================================
- */
--/*
-+
- // can't just use function pointers, or dll linkage can
- // mess up when qcommon is included in multiple places
--static short (*_BigShort) (short l);
--static short (*_LittleShort) (short l);
--static int (*_BigLong) (int l);
--static int (*_LittleLong) (int l);
-+static int16_t (*_BigShort) (int16_t l);
-+static int16_t (*_LittleShort) (int16_t l);
-+static int32_t (*_BigLong) (int32_t l);
-+static int32_t (*_LittleLong) (int32_t l);
- static qint64 (*_BigLong64) (qint64 l);
- static qint64 (*_LittleLong64) (qint64 l);
- static float (*_BigFloat) (const float *l);
- static float (*_LittleFloat) (const float *l);
-
--short BigShort(short l){return _BigShort(l);}
--short LittleShort(short l) {return _LittleShort(l);}
--int BigLong (int l) {return _BigLong(l);}
--int LittleLong (int l) {return _LittleLong(l);}
-+int16_t BigShort(int16_t l){return _BigShort(l);}
-+int16_t LittleShort(int16_t l) {return _LittleShort(l);}
-+int32_t BigLong (int32_t l) {return _BigLong(l);}
-+int32_t LittleLong (int32_t l) {return _LittleLong(l);}
- qint64 BigLong64 (qint64 l) {return _BigLong64(l);}
- qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);}
--float BigFloat (const float *l) {return _BigFloat(l);}
--float LittleFloat (const float *l) {return _LittleFloat(l);}
--*/
-+float BigFloat (float l) {return _BigFloat(&l);}
-+float LittleFloat (float l) {return _LittleFloat(&l);}
-
--short ShortSwap (short l)
-+int16_t ShortSwap (int16_t l)
- {
- byte b1,b2;
-
-@@ -111,12 +117,12 @@
- return (b1<<8) + b2;
- }
-
--short ShortNoSwap (short l)
-+int16_t ShortNoSwap (int16_t l)
- {
- return l;
- }
-
--int LongSwap (int l)
-+int32_t LongSwap (int32_t l)
- {
- byte b1,b2,b3,b4;
-
-@@ -128,7 +134,7 @@
- return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
- }
-
--int LongNoSwap (int l)
-+int32_t LongNoSwap (int32_t l)
- {
- return l;
- }
-@@ -179,7 +185,7 @@
- Swap_Init
- ================
- */
--/*
-+
- void Swap_Init (void)
- {
- byte swaptest[2] = {1,0};
-@@ -209,7 +215,7 @@
- }
-
- }
--*/
-+
-
- /*
- ============================================================================
diff --git a/games/cleanq3/files/patch-code-game-q_shared.h b/games/cleanq3/files/patch-code-game-q_shared.h
deleted file mode 100644
index cdb5561848d1..000000000000
--- a/games/cleanq3/files/patch-code-game-q_shared.h
+++ /dev/null
@@ -1,140 +0,0 @@
---- ./code/game/q_shared.h.orig Wed May 31 20:52:06 2006
-+++ ./code/game/q_shared.h Wed May 31 20:54:33 2006
-@@ -126,12 +126,14 @@
-
- #define ID_INLINE __inline
-
-+#if 0
- static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
- #define LittleShort
- static ID_INLINE int BigLong(int l) { LongSwap(l); }
- #define LittleLong
- static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); }
- #define LittleFloat
-+#endif
-
- #define PATH_SEP '\\'
-
-@@ -182,12 +184,14 @@
- return fi;
- }
-
-+#if 0
- #define BigShort
- static inline short LittleShort(short l) { return ShortSwap(l); }
- #define BigLong
- static inline int LittleLong (int l) { return LongSwap(l); }
- #define BigFloat
- static inline float LittleFloat (const float l) { return FloatSwap(&l); }
-+#endif
-
- #endif
-
-@@ -205,12 +209,14 @@
-
- void Sys_PumpEvents( void );
-
-+#if 0
- #define BigShort
- static inline short LittleShort(short l) { return ShortSwap(l); }
- #define BigLong
- static inline int LittleLong (int l) { return LongSwap(l); }
- #define BigFloat
- static inline float LittleFloat (const float l) { return FloatSwap(&l); }
-+#endif
-
- #endif
-
-@@ -244,6 +250,7 @@
- #define BOTLIB_HARD_LINKED
- #endif
-
-+#if 0
- #if !idppc
- inline static short BigShort( short l) { return ShortSwap(l); }
- #define LittleShort
-@@ -259,6 +266,7 @@
- #define BigFloat
- inline static float LittleFloat (const float *l) { return FloatSwap(l); }
- #endif
-+#endif
-
- #endif
-
-@@ -280,8 +288,16 @@
-
- #define PATH_SEP '/'
-
-+#include <machine/param.h>
-+#if __FreeBSD_version < 500000
-+#include <inttypes.h>
-+#else
-+#include <stdint.h>
-+#endif
-+
- // bk010116 - omitted Q3STATIC (see Linux above), broken target
-
-+#if 0
- #if !idppc
- static short BigShort( short l) { return ShortSwap(l); }
- #define LittleShort
-@@ -297,6 +313,7 @@
- #define BigFloat
- static float LittleFloat (const float *l) { return FloatSwap(l); }
- #endif
-+#endif
-
- #endif
-
-@@ -428,13 +445,9 @@
- void *Hunk_Alloc( int size, ha_pref preference );
- #endif
-
--#ifdef __linux__
- // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371
- // custom Snd_Memset implementation for glibc memset bug workaround
- void Snd_Memset (void* dest, const int val, const size_t count);
--#else
--#define Snd_Memset Com_Memset
--#endif
-
- #if !( defined __VECTORC )
- void Com_Memset (void* dest, const int val, const size_t count);
-@@ -763,7 +776,7 @@
- float Com_Clamp( float min, float max, float value );
-
- char *COM_SkipPath( char *pathname );
--void COM_StripExtension( const char *in, char *out );
-+void COM_StripExtension( const char *in, char *out, int destsize );
- void COM_DefaultExtension( char *path, int maxSize, const char *extension );
-
- void COM_BeginParseSession( const char *name );
-@@ -864,18 +877,18 @@
- } qint64;
-
- //=============================================
--/*
--short BigShort(short l);
--short LittleShort(short l);
--int BigLong (int l);
--int LittleLong (int l);
--qint64 BigLong64 (qint64 l);
--qint64 LittleLong64 (qint64 l);
--float BigFloat (const float *l);
--float LittleFloat (const float *l);
-+
-+int16_t BigShort(int16_t l);
-+int16_t LittleShort(int16_t l);
-+int32_t BigLong (int32_t l);
-+int32_t LittleLong (int32_t l);
-+qint64 BigLong64 (qint64 l);
-+qint64 LittleLong64 (qint64 l);
-+float BigFloat (float l);
-+float LittleFloat (float l);
-
- void Swap_Init (void);
--*/
-+
- char * QDECL va(char *format, ...);
-
- //=============================================
diff --git a/games/cleanq3/files/patch-code-q3_ui-ui_playermodel.c b/games/cleanq3/files/patch-code-q3_ui-ui_playermodel.c
deleted file mode 100644
index 129a50885f05..000000000000
--- a/games/cleanq3/files/patch-code-q3_ui-ui_playermodel.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./code/q3_ui/ui_playermodel.c.orig Wed May 31 20:52:07 2006
-+++ ./code/q3_ui/ui_playermodel.c Wed May 31 20:54:50 2006
-@@ -404,7 +404,7 @@
- {
- filelen = strlen(fileptr);
-
-- COM_StripExtension(fileptr,skinname);
-+ COM_StripExtension(fileptr, skinname, sizeof(skinname));
-
- // look for icon_????
- if (!Q_stricmpn(skinname,"icon_",5))
diff --git a/games/cleanq3/files/patch-code-q3_ui-ui_players.c b/games/cleanq3/files/patch-code-q3_ui-ui_players.c
deleted file mode 100644
index 29ea1677b16c..000000000000
--- a/games/cleanq3/files/patch-code-q3_ui-ui_players.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./code/q3_ui/ui_players.c.orig Wed May 31 20:52:07 2006
-+++ ./code/q3_ui/ui_players.c Wed May 31 20:55:05 2006
-@@ -69,13 +69,13 @@
-
- if ( weaponNum == WP_MACHINEGUN || weaponNum == WP_GAUNTLET || weaponNum == WP_BFG ) {
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_barrel.md3" );
- pi->barrelModel = trap_R_RegisterModel( path );
- }
-
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_flash.md3" );
- pi->flashModel = trap_R_RegisterModel( path );
-
diff --git a/games/cleanq3/files/patch-code-q3_ui-ui_saveconfig.c b/games/cleanq3/files/patch-code-q3_ui-ui_saveconfig.c
deleted file mode 100644
index e6dc2d19819b..000000000000
--- a/games/cleanq3/files/patch-code-q3_ui-ui_saveconfig.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./code/q3_ui/ui_saveconfig.c.orig Wed May 31 20:52:07 2006
-+++ ./code/q3_ui/ui_saveconfig.c Wed May 31 20:55:15 2006
-@@ -85,7 +85,7 @@
- return;
- }
-
-- COM_StripExtension(saveConfig.savename.field.buffer, configname );
-+ COM_StripExtension(saveConfig.savename.field.buffer, configname, sizeof(configname) );
- trap_Cmd_ExecuteText( EXEC_APPEND, va( "writeconfig %s.cfg\n", configname ) );
- UI_PopMenu();
- }
diff --git a/games/cleanq3/files/patch-code-qcommon-common.c b/games/cleanq3/files/patch-code-qcommon-common.c
deleted file mode 100644
index 9fe202355cd9..000000000000
--- a/games/cleanq3/files/patch-code-qcommon-common.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./code/qcommon/common.c.orig Wed May 31 20:52:07 2006
-+++ ./code/qcommon/common.c Wed May 31 20:52:09 2006
-@@ -24,15 +24,8 @@
- #include "../game/q_shared.h"
- #include "qcommon.h"
- #include <setjmp.h>
--#ifdef __linux__
--#include <netinet/in.h>
--#else
--#if defined(MACOS_X)
-+#include <sys/types.h>
- #include <netinet/in.h>
--#else
--#include <winsock.h>
--#endif
--#endif
-
- int demo_protocols[] =
- { 66, 67, 68, 0 };
-@@ -2367,7 +2360,7 @@
- // cvar and command buffer management
- Com_ParseCommandLine( commandLine );
-
--// Swap_Init ();
-+ Swap_Init ();
- Cbuf_Init ();
-
- Com_InitZoneMemory();
diff --git a/games/cleanq3/files/patch-code-qcommon-vm.c b/games/cleanq3/files/patch-code-qcommon-vm.c
deleted file mode 100644
index e356997ce52f..000000000000
--- a/games/cleanq3/files/patch-code-qcommon-vm.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- code/qcommon/vm.c.orig Wed May 31 23:18:41 2006
-+++ code/qcommon/vm.c Wed May 31 23:19:43 2006
-@@ -225,7 +225,7 @@
- return;
- }
-
-- COM_StripExtension( vm->name, name );
-+ COM_StripExtension( vm->name, name, sizeof(name) );
- Com_sprintf( symbols, sizeof( symbols ), "vm/%s.map", name );
- len = FS_ReadFile( symbols, (void **)&mapfile );
- if ( !mapfile ) {
-@@ -478,7 +478,7 @@
- }
- }
-
-- if ( interpret == VMI_NATIVE ) {
-+ if ( 1 ) {
- // try to load as a system dll
- Com_Printf( "Loading dll file %s.\n", vm->name );
- vm->dllHandle = Sys_LoadDll( module, vm->fqpath , &vm->entryPoint, VM_DllSyscall );
-@@ -826,7 +826,7 @@
-
-
-
--#ifdef oDLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
-+#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
- int VM_CallCompiled( vm_t *vm, int *args ) {
- return(0);
- }
diff --git a/games/cleanq3/files/patch-code-renderer-tr_bsp.c b/games/cleanq3/files/patch-code-renderer-tr_bsp.c
deleted file mode 100644
index 6d5ab5cbbf0c..000000000000
--- a/games/cleanq3/files/patch-code-renderer-tr_bsp.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./code/renderer/tr_bsp.c.orig Wed May 31 20:52:07 2006
-+++ ./code/renderer/tr_bsp.c Wed May 31 20:55:47 2006
-@@ -1820,7 +1820,7 @@
- Q_strncpyz( s_worldData.name, name, sizeof( s_worldData.name ) );
-
- Q_strncpyz( s_worldData.baseName, COM_SkipPath( s_worldData.name ), sizeof( s_worldData.name ) );
-- COM_StripExtension( s_worldData.baseName, s_worldData.baseName );
-+ COM_StripExtension( s_worldData.baseName, s_worldData.baseName, sizeof(s_worldData.baseName) );
-
- startMarker = ri.Hunk_Alloc(0, h_low);
- c_gridVerts = 0;
diff --git a/games/cleanq3/files/patch-code-renderer-tr_shader.c b/games/cleanq3/files/patch-code-renderer-tr_shader.c
deleted file mode 100644
index ca343bc0bcd6..000000000000
--- a/games/cleanq3/files/patch-code-renderer-tr_shader.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- ./code/renderer/tr_shader.c.orig Wed May 31 20:52:08 2006
-+++ ./code/renderer/tr_shader.c Wed May 31 20:56:20 2006
-@@ -99,7 +99,7 @@
-
- // remap all the shaders with the given name
- // even tho they might have different lightmaps
-- COM_StripExtension( shaderName, strippedName );
-+ COM_StripExtension( shaderName, strippedName, sizeof(strippedName) );
- hash = generateHashValue(strippedName, FILE_HASH_SIZE);
- for (sh = hashTable[hash]; sh; sh = sh->next) {
- if (Q_stricmp(sh->name, strippedName) == 0) {
-@@ -2368,7 +2368,7 @@
- return tr.defaultShader;
- }
-
-- COM_StripExtension( name, strippedName );
-+ COM_StripExtension( name, strippedName, sizeof(strippedName) );
-
- hash = generateHashValue(strippedName, FILE_HASH_SIZE);
-
-@@ -2436,7 +2436,7 @@
- lightmapIndex = LIGHTMAP_BY_VERTEX;
- }
-
-- COM_StripExtension( name, strippedName );
-+ COM_StripExtension( name, strippedName, sizeof(strippedName) );
-
- hash = generateHashValue(strippedName, FILE_HASH_SIZE);
-
diff --git a/games/cleanq3/files/patch-code-server-sv_client.c b/games/cleanq3/files/patch-code-server-sv_client.c
deleted file mode 100644
index 834065de04b6..000000000000
--- a/games/cleanq3/files/patch-code-server-sv_client.c
+++ /dev/null
@@ -1,73 +0,0 @@
---- code/server/sv_client.c.orig Thu Jun 1 14:50:21 2006
-+++ code/server/sv_client.c Thu Jun 1 15:19:29 2006
-@@ -756,24 +756,54 @@
- int curindex;
- int rate;
- int blockspersnap;
-- int idPack, missionPack;
-+ int idPack, missionPack, unreferenced = 1;
- char errorMessage[1024];
-+ char pakbuf[MAX_OSPATH], *pakptr;
-+ const char *referencedPaks;
-+ int numRefPaks;
-
- if (!*cl->downloadName)
- return; // Nothing being downloaded
-
- if (!cl->download) {
-- // We open the file here
-+ // Chop off filename extension.
-+ Com_sprintf(pakbuf, sizeof(pakbuf), "%s", cl->downloadName);
-+ pakptr = Q_strrchr(pakbuf, '.');
-
-- Com_Printf( "clientDownload: %d : begining \"%s\"\n", cl - svs.clients, cl->downloadName );
-+ if (pakptr) {
-+ *pakptr = '\0';
-
-- missionPack = FS_idPak(cl->downloadName, "missionpack");
-- idPack = missionPack || FS_idPak(cl->downloadName, "baseq3");
-+ // Check for pk3 filename extension
-+ if (!Q_stricmp(pakptr + 1, "pk3")) {
-+ referencedPaks = FS_ReferencedPakNames();
-
-- if ( !sv_allowDownload->integer || idPack ||
-+ // Check whether the file appears in the list of referenced
-+ // paks to prevent downloading of arbitrary files.
-+ Cmd_TokenizeString(referencedPaks);
-+ numRefPaks = Cmd_Argc();
-+
-+ for (curindex = 0; curindex < numRefPaks; curindex++) {
-+ if (!FS_FilenameCompare(Cmd_Argv(curindex), pakbuf)) {
-+ unreferenced = 0;
-+
-+ // now that we know the file is referenced,
-+ // check whether it's legal to download it.
-+ missionPack = FS_idPak(pakbuf, "missionpack");
-+ idPack = missionPack || FS_idPak(pakbuf, BASEGAME);
-+
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ // We open the file here
-+ if ( !sv_allowDownload->integer || idPack || unreferenced ||
- ( cl->downloadSize = FS_SV_FOpenFileRead( cl->downloadName, &cl->download ) ) <= 0 ) {
- // cannot auto-download file
-- if (idPack) {
-+ if (unreferenced) {
-+ Com_sprintf(errorMessage, sizeof(errorMessage), "File \"%s\" is not referenced and cannot be downloaded.", cl->downloadName);
-+ } else if (idPack) {
- Com_Printf("clientDownload: %d : \"%s\" cannot download id pk3 files\n", cl - svs.clients, cl->downloadName);
- if (missionPack) {
- Com_sprintf(errorMessage, sizeof(errorMessage), "Cannot autodownload Team Arena file \"%s\"\n"
-@@ -809,6 +839,8 @@
- return;
- }
-
-+ Com_Printf( "clientDownload: %d : beginning \"%s\"\n", cl - svs.clients, cl->downloadName );
-+
- // Init
- cl->downloadCurrentBlock = cl->downloadClientBlock = cl->downloadXmitBlock = 0;
- cl->downloadCount = 0;
diff --git a/games/cleanq3/files/patch-code-ui-ui_main.c b/games/cleanq3/files/patch-code-ui-ui_main.c
deleted file mode 100644
index ea3b48bf5109..000000000000
--- a/games/cleanq3/files/patch-code-ui-ui_main.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./code/ui/ui_main.c.orig Wed May 31 20:52:08 2006
-+++ ./code/ui/ui_main.c Wed May 31 20:56:29 2006
-@@ -4971,7 +4971,7 @@
- {
- filelen = strlen(fileptr);
-
-- COM_StripExtension(fileptr,skinname);
-+ COM_StripExtension(fileptr, skinname, sizeof(skinname));
-
- // look for icon_????
- if (Q_stricmpn(skinname, "icon_", 5) == 0 && !(Q_stricmp(skinname,"icon_blue") == 0 || Q_stricmp(skinname,"icon_red") == 0))
diff --git a/games/cleanq3/files/patch-code-ui-ui_players.c b/games/cleanq3/files/patch-code-ui-ui_players.c
deleted file mode 100644
index 2fd07e7d6ed9..000000000000
--- a/games/cleanq3/files/patch-code-ui-ui_players.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./code/ui/ui_players.c.orig Wed May 31 20:52:08 2006
-+++ ./code/ui/ui_players.c Wed May 31 20:56:47 2006
-@@ -70,13 +70,13 @@
-
- if ( weaponNum == WP_MACHINEGUN || weaponNum == WP_GAUNTLET || weaponNum == WP_BFG ) {
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_barrel.md3" );
- pi->barrelModel = trap_R_RegisterModel( path );
- }
-
- strcpy( path, item->world_model[0] );
-- COM_StripExtension( path, path );
-+ COM_StripExtension( path, path, sizeof(path) );
- strcat( path, "_flash.md3" );
- pi->flashModel = trap_R_RegisterModel( path );
-
diff --git a/games/cleanq3/files/patch-code-unix-Makefile b/games/cleanq3/files/patch-code-unix-Makefile
deleted file mode 100644
index e0065e05fec8..000000000000
--- a/games/cleanq3/files/patch-code-unix-Makefile
+++ /dev/null
@@ -1,364 +0,0 @@
---- code/unix/Makefile.orig Sun Jun 4 18:06:17 2006
-+++ code/unix/Makefile Sun Jun 4 18:07:46 2006
-@@ -19,6 +19,7 @@
-
- PLATFORM=$(shell uname|tr A-Z a-z)
- PLATFORM_RELEASE=$(shell uname -r)
-+ARCH=$(shell uname -m)
-
- ###
- ### These paths are where you probably want to change things
-@@ -34,7 +35,7 @@
-
- # Build name
- # BUILD_NAME=$(BUILD_NAME)
--BUILD_NAME=quake3.x86
-+BUILD_NAME=quake3
-
-
-
-@@ -46,8 +47,8 @@
-
- BASEQ3_DIR=$(BDIR)/baseq3
-
--BD=debug$(ARCH)$(GLIBC)
--BR=release$(ARCH)$(GLIBC)
-+BD=debug
-+BR=release
- CDIR=$(MOUNT_DIR)/client
- SDIR=$(MOUNT_DIR)/server
- RDIR=$(MOUNT_DIR)/renderer
-@@ -76,7 +77,7 @@
- #############################################################################
-
- ## Defaults
--DLL_ONLY=false
-+DLL_ONLY?=false
- # bk010215 - TODO - add all defaults / kill Ryan
-
-
-@@ -199,31 +200,23 @@
-
- GLIBC= #libc is irrelevant
-
--ifneq (,$(findstring alpha,$(shell uname -m)))
--ARCH=axp
--RPMARCH=alpha
--VENDOR=dec
--else #default to i386
--ARCH=i386
--RPMARCH=i386
--VENDOR=unknown
--endif #alpha test
-+BASE_CFLAGS = $(CFLAGS) -DDATADIR='\"$(Q3DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' -pipe
-
-+GL_CFLAGS = -I$(LOCALBASE)/include
-
--BASE_CFLAGS = -pipe
-+DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror
-+RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG
-
--GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include
-+ifdef OPTIMIZED_CFLAGS
-+ ifeq ($(ARCH),i386)
-+RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -fomit-frame-pointer -pipe -ffast-math -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
-+ else
-+RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
-+ endif
-+endif
-
--DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror
--ifeq ($(ARCH),axp)
--CC=pgcc
--RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
--else
--#NEWPGCC=/loki/global/x86/bin/gcc # raistlin012301
--#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc
--NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc
--CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi )
--RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing - fstrength-reduce
-+ifeq ($(DLL_ONLY),true)
-+BASE_CFLAGS += -DDLL_ONLY
- endif
-
- LIBEXT=a
-@@ -235,25 +228,37 @@
- ARFLAGS=ar rv
- RANLIB=ranlib
-
--THREAD_LDFLAGS=-lpthread
-+THREAD_LDFLAGS=-lpthread
- # don't need -ldl (FreeBSD)
--LDFLAGS=-lm
-+LDFLAGS+=-lm
- #GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
- #GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
--GLLDFLAGS=-L/usr/X11R6/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
-+GLLDFLAGS=-L$(LOCALBASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
-
--ifeq ($(ARCH),axp)
--TARGETS=\
-- $(B)/$(PLATFORM)q3ded
--else
--TARGETS=\
-- $(B)/$(PLATFORM)quake3 \
-- $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
-- $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
-- $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \
-- $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
-- $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
-- $(B)/missionpack/ui$(ARCH).$(SHLIBEXT)
-+ifdef CLIENT
-+TARGETS+=$(B)/cleanq3
-+endif
-+
-+ifdef DEDICATED
-+TARGETS+=$(B)/cleanq3ded
-+endif
-+
-+ifdef SMP
-+TARGETS+=$(B)/cleanq3-smp
-+endif
-+
-+ifeq ($(DLL_ONLY),true)
-+GAMELIBS=yes
-+endif
-+
-+ifdef GAMELIBS
-+TARGETS+=\
-+ $(B)/baseq3/cgame.$(SHLIBEXT) \
-+ $(B)/baseq3/qagame.$(SHLIBEXT) \
-+ $(B)/baseq3/ui.$(SHLIBEXT) \
-+ $(B)/missionpack/cgame.$(SHLIBEXT) \
-+ $(B)/missionpack/qagame.$(SHLIBEXT) \
-+ $(B)/missionpack/ui.$(SHLIBEXT)
- endif
-
- else # ifeq freebsd
-@@ -348,7 +353,7 @@
- $(MAKE) targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)"
-
- #Build both debug and release builds
--all:build_debug build_release
-+all:build_release
-
- targets:makedirs $(TARGETS)
-
-@@ -516,20 +521,6 @@
- $(B)/client/unix_net.o \
- $(B)/client/unix_shared.o \
- \
-- $(B)/client/ahoptim.o \
-- $(B)/client/autohint.o \
-- $(B)/client/ftbase.o \
-- $(B)/client/ftdebug.o \
-- $(B)/client/ftglyph.o \
-- $(B)/client/ftinit.o \
-- $(B)/client/ftmm.o \
-- $(B)/client/ftsystem.o \
-- $(B)/client/raster1.o \
-- $(B)/client/sfnt.o \
-- $(B)/client/sfobjs.o \
-- $(B)/client/smooth.o \
-- $(B)/client/truetype.o
--# \
- # $(B)/client/q_parse.o \
- # $(B)/client/math_quaternion.o \
- # $(B)/client/util_str.o \
-@@ -541,10 +532,12 @@
- # $(B)/client/q_shared.o \
-
- ifeq ($(ARCH),i386)
-- Q3OBJ += $(B)/client/vm_x86.o
-+ ifeq ($(DLL_ONLY),false)
-+ Q3OBJ += $(B)/client/vm_x86.o
-+ endif
- endif
-
-- ifeq ($(ARCH),ppc)
-+ ifeq ($(ARCH),powerpc)
- ifeq ($(DLL_ONLY),false)
- Q3OBJ += $(B)/client/vm_ppc.o
- endif
-@@ -559,10 +552,24 @@
- $(B)/client/linux_qgl.o \
- $(B)/client/linux_glimp.o \
- $(B)/client/linux_snd.o \
-+ $(B)/client/linux_signals.o \
-+ $(B)/client/snd_mixa.o \
-+ $(B)/client/matha.o
-+
-+ Q3POBJ_SMP=\
-+ $(B)/client/linux_common.o \
-+ $(B)/client/linux_qgl.o \
-+ $(B)/client/linux_glimp_smp.o \
-+ $(B)/client/linux_snd.o \
-+ $(B)/client/linux_signals.o \
- $(B)/client/snd_mixa.o \
- $(B)/client/matha.o \
-- $(B)/client/ftol.o \
-- $(B)/client/snapvector.o
-+
-+ ifeq ($(ARCH),i386)
-+ Q3POBJ += $(B)/client/ftol.o $(B)/client/snapvector.o
-+ Q3POBJ_SMP += $(B)/client/ftol.o $(B)/client/snapvector.o
-+ endif
-+
- else
- ifeq ($(PLATFORM),irix)
- Q3POBJ=\
-@@ -602,12 +609,12 @@
- endif #FreeBSD
- endif #IRIX
-
--$(B)/$(PLATFORM)quake3 : $(Q3OBJ) $(Q3POBJ)
-+$(B)/cleanq3 : $(Q3OBJ) $(Q3POBJ)
- $(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS)
- # TTimo: splines code requires C++ linking, but splines have not been officially included in the codebase
- # $(CXX) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS)
-
--$(B)/$(PLATFORM)quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP)
-+$(B)/cleanq3-smp : $(Q3OBJ) $(Q3POBJ_SMP)
- $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \
- $(THREAD_LDFLAGS) $(LDFLAGS)
-
-@@ -758,6 +765,7 @@
- $(B)/client/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) $(GL_CFLAGS)
- $(B)/client/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC)
- $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC)
-+$(B)/client/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_CC) $(GL_CFLAGS)
- $(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS)
- $(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS)
-
-@@ -767,7 +775,7 @@
- $(B)/client/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC)
- endif
-
--ifeq ($(ARCH),ppc)
-+ifeq ($(ARCH),powerpc)
- ifeq ($(DLL_ONLY),false)
- $(B)/client/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC)
- endif
-@@ -912,22 +920,26 @@
- $(B)/ded/unix_main.o \
- $(B)/ded/unix_net.o \
- $(B)/ded/unix_shared.o \
-+ $(B)/ded/linux_signals.o \
- \
- $(B)/ded/null_client.o \
- $(B)/ded/null_input.o \
- $(B)/ded/null_snddma.o
-
- ifeq ($(ARCH),i386)
-- Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o
-+ Q3DOBJ += $(B)/ded/ftol.o $(B)/ded/snapvector.o
-+ ifeq ($(DLL_ONLY),false)
-+ Q3DOBJ += $(B)/ded/vm_x86.o
-+ endif
- endif
-
--ifeq ($(ARCH),ppc)
-+ifeq ($(ARCH),powerpc)
- ifeq ($(DLL_ONLY),false)
- Q3DOBJ += $(B)/ded/vm_ppc.o
- endif
- endif
-
--$(B)/$(PLATFORM)q3ded : $(Q3DOBJ)
-+$(B)/cleanq3ded : $(Q3DOBJ)
- $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
-
- $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC)
-@@ -988,6 +1000,7 @@
- $(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC)
- $(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC)
- $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC)
-+$(B)/ded/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_DED_CC)
- $(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC)
- $(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC)
- $(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC)
-@@ -1001,7 +1014,7 @@
- $(B)/ded/snapvector.o : $(UDIR)/snapvector.nasm; $(DO_NASM)
- endif
-
--ifeq ($(ARCH),ppc)
-+ifeq ($(ARCH),powerpc)
- ifeq ($(DLL_ONLY),false)
- $(B)/ded/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_DED_CC)
- endif
-@@ -1068,7 +1081,7 @@
- $(B)/baseq3/cgame/q_math.o \
- $(B)/baseq3/cgame/q_shared.o
-
--$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
-+$(B)/baseq3/cgame.$(SHLIBEXT) : $(Q3CGOBJ)
- $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
-
- $(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC)
-@@ -1128,7 +1141,7 @@
- $(B)/missionpack/cgame/q_shared.o \
- $(B)/missionpack/cgame/ui_shared.o
-
--$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ)
-+$(B)/missionpack/cgame.$(SHLIBEXT) : $(MPCGOBJ)
- $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
-
- $(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -DMISSIONPACK
-@@ -1200,7 +1213,7 @@
- $(B)/baseq3/game/q_math.o \
- $(B)/baseq3/game/q_shared.o
-
--$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
-+$(B)/baseq3/qagame.$(SHLIBEXT) : $(Q3GOBJ)
- $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
-
- $(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC)
-@@ -1278,7 +1291,7 @@
- $(B)/missionpack/game/q_math.o \
- $(B)/missionpack/game/q_shared.o
-
--$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ)
-+$(B)/missionpack/qagame.$(SHLIBEXT) : $(MPGOBJ)
- $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
-
- $(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -DMISSIONPACK
-@@ -1367,7 +1380,7 @@
- $(B)/baseq3/ui/q_math.o \
- $(B)/baseq3/ui/q_shared.o
-
--$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ)
-+$(B)/baseq3/ui.$(SHLIBEXT) : $(Q3UIOBJ)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
-
- $(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC)
-@@ -1410,7 +1423,7 @@
- $(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC)
- $(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC)
- $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC)
--$(B)/baseq3/ui/ui_syscalls.o : $(Q3UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC)
-+$(B)/baseq3/ui/ui_syscalls.o : $(UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC)
- $(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC)
-
- # bk001205 - these wre the only SHLIB compiles in 1.17
-@@ -1450,7 +1463,7 @@
- # $(B)/missionpack/ui/q_math.o \
- # $(B)/missionpack/ui/q_shared.o
-
--$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ)
-+$(B)/missionpack/ui.$(SHLIBEXT) : $(MPUIOBJ)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
-
- $(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC) -DMISSIONPACK
-@@ -2059,9 +2072,9 @@
-
- copyfiles:
- -mkdirhier $(COPYDIR)
-- cp $(BR)/linuxquake3 $(COPYDIR)/quake3.x86
-- strip $(COPYDIR)/quake3.x86
-- chmod 755 $(COPYDIR)/quake3.x86
-+ cp $(BR)/linuxquake3 $(COPYDIR)/quake3
-+ strip $(COPYDIR)/quake3
-+ chmod 755 $(COPYDIR)/quake3
- cp $(BR)/linuxq3ded $(COPYDIR)/q3ded
- strip $(COPYDIR)/q3ded
- chmod 755 $(COPYDIR)/q3ded
diff --git a/games/cleanq3/files/patch-code-unix-unix_main.c b/games/cleanq3/files/patch-code-unix-unix_main.c
deleted file mode 100644
index 049808e77841..000000000000
--- a/games/cleanq3/files/patch-code-unix-unix_main.c
+++ /dev/null
@@ -1,44 +0,0 @@
---- ./code/unix/unix_main.c.orig Wed May 31 20:52:08 2006
-+++ ./code/unix/unix_main.c Wed May 31 20:52:09 2006
-@@ -722,17 +722,7 @@
- assert( name );
-
- getcwd(curpath, sizeof(curpath));
--#if defined __i386__
-- snprintf (fname, sizeof(fname), "%si386.so", name);
--#elif defined __powerpc__ //rcg010207 - PPC support.
-- snprintf (fname, sizeof(fname), "%sppc.so", name);
--#elif defined __axp__
-- snprintf (fname, sizeof(fname), "%saxp.so", name);
--#elif defined __mips__
-- snprintf (fname, sizeof(fname), "%smips.so", name);
--#else
--#error Unknown arch
--#endif
-+ snprintf (fname, sizeof(fname), "%s.so", name);
-
- // bk001129 - was RTLD_LAZY
- #define Q_RTLD RTLD_NOW
-@@ -765,12 +755,22 @@
-
- if ( !libHandle )
- {
-+ Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror() );
-+ // FreeBSD package installation path
-+ fn = FS_BuildOSPath( LIBDIR , gamedir, fname );
-+ Com_Printf( "Sys_LoadDll(%s)... \n", fn );
-+ libHandle = dlopen( fn, Q_RTLD );
-+
-+ if ( !libHandle )
-+ {
- #ifndef NDEBUG // bk001206 - in debug abort on failure
- Com_Error ( ERR_FATAL, "Sys_LoadDll(%s) failed dlopen() completely!\n", name );
- #else
- Com_Printf ( "Sys_LoadDll(%s) failed dlopen() completely!\n", name );
- #endif
- return NULL;
-+ } else
-+ Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn );
- } else
- Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn );
- } else
diff --git a/games/cleanq3/files/patch-code-unix-unix_shared.c b/games/cleanq3/files/patch-code-unix-unix_shared.c
deleted file mode 100644
index 57127892e8bd..000000000000
--- a/games/cleanq3/files/patch-code-unix-unix_shared.c
+++ /dev/null
@@ -1,49 +0,0 @@
---- ./code/unix/unix_shared.c.orig Wed May 31 20:52:08 2006
-+++ ./code/unix/unix_shared.c Wed May 31 20:52:09 2006
-@@ -38,7 +38,7 @@
- static char cdPath[MAX_OSPATH];
-
- // Used to determine local installation path
--static char installPath[MAX_OSPATH];
-+static char installPath[MAX_OSPATH] = DATADIR;
-
- // Used to determine where to store user-specific files
- static char homePath[MAX_OSPATH];
-@@ -76,7 +76,7 @@
- return curtime;
- }
-
--#if defined(__linux__) && !defined(DEDICATED)
-+// #if defined(__linux__) && !defined(DEDICATED)
- /*
- ================
- Sys_XTimeToSysTime
-@@ -98,11 +98,15 @@
- {
- int ret, time, test;
-
-+ /*
-+ Let's try to comment out this and see what will happen :-)
-+
- if (!in_subframe->value)
- {
- // if you don't want to do any event times corrections
- return Sys_Milliseconds();
- }
-+ */
-
- // test the wrap issue
- #if 0
-@@ -136,10 +140,10 @@
-
- return ret;
- }
--#endif
-+// #endif
-
- //#if 0 // bk001215 - see snapvector.nasm for replacement
--#if (defined __APPLE__) // rcg010206 - using this for PPC builds...
-+#ifndef __i386__ // rcg010206 - using this for PPC builds...
- long fastftol( float f ) { // bk001213 - from win32/win_shared.c
- //static int tmp;
- // __asm fld f