summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/AL/al.h3
-rw-r--r--src/AL/alc.h4
-rw-r--r--src/client/cl_main.c4
-rw-r--r--src/qcommon/common.c2
-rw-r--r--src/qcommon/files.c16
-rw-r--r--src/qcommon/qcommon.h7
-rw-r--r--src/sys/sys_main.c10
7 files changed, 40 insertions, 6 deletions
diff --git a/src/AL/al.h b/src/AL/al.h
index 9fd55989..fd9a5375 100644
--- a/src/AL/al.h
+++ b/src/AL/al.h
@@ -339,6 +339,7 @@ ALAPI void ALAPIENTRY alDistanceModel( ALenum distanceModel );
#else /* AL_NO_PROTOTYPES */
+/*
void (ALAPIENTRY *alEnable)( ALenum capability );
void (ALAPIENTRY *alDisable)( ALenum capability );
ALboolean (ALAPIENTRY *alIsEnabled)( ALenum capability );
@@ -412,7 +413,7 @@ void (ALAPIENTRY *alDopplerFactor)( ALfloat value );
void (ALAPIENTRY *alDopplerVelocity)( ALfloat value );
void (ALAPIENTRY *alSpeedOfSound)( ALfloat value );
void (ALAPIENTRY *alDistanceModel)( ALenum distanceModel );
-
+*/
/* Type Definitions */
typedef void (ALAPIENTRY *LPALENABLE)( ALenum capability );
diff --git a/src/AL/alc.h b/src/AL/alc.h
index 980d8f1a..f3a41bce 100644
--- a/src/AL/alc.h
+++ b/src/AL/alc.h
@@ -107,7 +107,7 @@ ALCAPI void ALCAPIENTRY alcCaptureStop( ALCdevice *device );
ALCAPI void ALCAPIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
#else /* ALC_NO_PROTOTYPES */
-
+/*
ALCAPI ALCcontext * (ALCAPIENTRY *alcCreateContext)( ALCdevice *device, const ALCint* attrlist );
ALCAPI ALCboolean (ALCAPIENTRY *alcMakeContextCurrent)( ALCcontext *context );
ALCAPI void (ALCAPIENTRY *alcProcessContext)( ALCcontext *context );
@@ -128,7 +128,7 @@ ALCAPI ALCboolean (ALCAPIENTRY *alcCaptureCloseDevice)( ALCdevice *device )
ALCAPI void (ALCAPIENTRY *alcCaptureStart)( ALCdevice *device );
ALCAPI void (ALCAPIENTRY *alcCaptureStop)( ALCdevice *device );
ALCAPI void (ALCAPIENTRY *alcCaptureSamples)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
-
+*/
/* Type definitions */
typedef ALCcontext * (ALCAPIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
typedef ALCboolean (ALCAPIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index a1701d77..14cb84b7 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -3215,13 +3215,13 @@ void CL_GlobalServers_f( void ) {
// reset the list, waiting for response
// -1 is used to distinguish a "no response"
+ NET_StringToAdr( cl_master->string, &to );
+
if( cls.masterNum == 1 ) {
- NET_StringToAdr( cl_master->string, &to );
cls.nummplayerservers = -1;
cls.pingUpdateSource = AS_MPLAYER;
}
else {
- NET_StringToAdr( cl_master->string, &to );
cls.numglobalservers = -1;
cls.pingUpdateSource = AS_GLOBAL;
}
diff --git a/src/qcommon/common.c b/src/qcommon/common.c
index e2aa156c..3d3cd38d 100644
--- a/src/qcommon/common.c
+++ b/src/qcommon/common.c
@@ -244,6 +244,8 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
static int errorCount;
int currentTime;
+ Cvar_Set( "com_errorCode", va( "%i", code ) );
+
// when we are running automated scripts, make sure we
// know if anything failed
if ( com_buildScript && com_buildScript->integer ) {
diff --git a/src/qcommon/files.c b/src/qcommon/files.c
index 94e2152e..f896929f 100644
--- a/src/qcommon/files.c
+++ b/src/qcommon/files.c
@@ -235,6 +235,12 @@ typedef struct searchpath_s {
static char fs_gamedir[MAX_OSPATH]; // this will be a single file name with no separators
static cvar_t *fs_debug;
static cvar_t *fs_homepath;
+
+#ifdef MACOS_X
+// Also search the .app bundle for .pk3 files
+static cvar_t *fs_apppath;
+#endif
+
static cvar_t *fs_basepath;
static cvar_t *fs_basegame;
static cvar_t *fs_gamedirvar;
@@ -2386,7 +2392,7 @@ Sets fs_gamedir, adds the directory to the head of the path,
then loads the zip headers
================
*/
-static void FS_AddGameDirectory( const char *path, const char *dir ) {
+void FS_AddGameDirectory( const char *path, const char *dir ) {
searchpath_t *sp;
int i;
searchpath_t *search;
@@ -2713,6 +2719,14 @@ static void FS_Startup( const char *gameName )
FS_AddGameDirectory( fs_basepath->string, gameName );
}
// fs_homepath is somewhat particular to *nix systems, only add if relevant
+
+ #ifdef MACOS_X
+ fs_apppath = Cvar_Get ("fs_apppath", Sys_DefaultAppPath(), CVAR_INIT );
+ // Make MacOSX also include the base path included with the .app bundle
+ if (fs_apppath->string[0])
+ FS_AddGameDirectory(fs_apppath->string, gameName);
+ #endif
+
// NOTE: same filtering below for mods and basegame
if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) {
FS_AddGameDirectory ( fs_homepath->string, gameName );
diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h
index d6273d8a..e6612453 100644
--- a/src/qcommon/qcommon.h
+++ b/src/qcommon/qcommon.h
@@ -539,6 +539,8 @@ qboolean FS_ConditionalRestart( int checksumFeed );
void FS_Restart( int checksumFeed );
// shutdown and restart the filesystem so changes to fs_gamedir can take effect
+void FS_AddGameDirectory( const char *path, const char *dir );
+
char **FS_ListFiles( const char *directory, const char *extension, int *numfiles );
// directory should not have either a leading or trailing /
// if extension is "/", only subdirectories will be returned
@@ -1016,6 +1018,11 @@ void Sys_Mkdir( const char *path );
char *Sys_Cwd( void );
void Sys_SetDefaultInstallPath(const char *path);
char *Sys_DefaultInstallPath(void);
+
+#ifdef MACOS_X
+char *Sys_DefaultAppPath(void);
+#endif
+
void Sys_SetDefaultHomePath(const char *path);
char *Sys_DefaultHomePath(void);
const char *Sys_Dirname( char *path );
diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c
index 284a1194..af0f66a9 100644
--- a/src/sys/sys_main.c
+++ b/src/sys/sys_main.c
@@ -95,6 +95,16 @@ char *Sys_DefaultInstallPath(void)
/*
=================
+Sys_DefaultAppPath
+=================
+*/
+char *Sys_DefaultAppPath(void)
+{
+ return Sys_BinaryPath();
+}
+
+/*
+=================
Sys_In_Restart_f
Restart the input subsystem