Permalink
Browse files

Make it compile

  • Loading branch information...
timangus committed Apr 7, 2016
1 parent 5658bc6 commit 87abdd914988724e164ffb16380ad26be8420b84
Showing with 2 additions and 88 deletions.
  1. +1 −22 src/qcommon/files.c
  2. +1 −1 src/renderergl2/tr_image.c
  3. +0 −65 src/server/sv_ccmds.c
View
@@ -2448,20 +2448,14 @@ int FS_GetModList( char *listbuf, int bufsize ) {
int dummy;
char **pFiles0 = NULL;
char **pFiles1 = NULL;
char **pFiles2 = NULL;
char **pFiles3 = NULL;
qboolean bDrop = qfalse;
*listbuf = 0;
nMods = nTotal = 0;
pFiles0 = Sys_ListFiles( fs_homepath->string, NULL, NULL, &dummy, qtrue );
pFiles1 = Sys_ListFiles( fs_basepath->string, NULL, NULL, &dummy, qtrue );
pFiles2 = Sys_ListFiles( fs_steampath->string, NULL, NULL, &dummy, qtrue );
// we searched for mods in the three paths
// it is likely that we have duplicate names now, which we will cleanup below
pFiles3 = Sys_ConcatenateFileLists( pFiles0, pFiles1 );
pFiles = Sys_ConcatenateFileLists( pFiles2, pFiles3 );
pFiles = Sys_ConcatenateFileLists( pFiles0, pFiles1 );
nPotential = Sys_CountFileList(pFiles);
@@ -2504,15 +2498,6 @@ int FS_GetModList( char *listbuf, int bufsize ) {
Sys_FreeFileList( pPaks );
}
/* try on steam path */
if ( nPaks <= 0 )
{
path = FS_BuildOSPath( fs_steampath->string, name, "" );
nPaks = 0;
pPaks = Sys_ListFiles( path, ".pk3", NULL, &nPaks, qfalse );
Sys_FreeFileList( pPaks );
}
if (nPaks > 0) {
nLen = strlen(name) + 1;
// nLen is the length of the mod path
@@ -3241,9 +3226,6 @@ static void FS_Startup( const char *gameName )
// check for additional base game so mods can be based upon other mods
if ( fs_basegame->string[0] && Q_stricmp( fs_basegame->string, gameName ) ) {
if (fs_steampath->string[0]) {
FS_AddGameDirectory(fs_steampath->string, fs_basegame->string);
}
if (fs_basepath->string[0]) {
FS_AddGameDirectory(fs_basepath->string, fs_basegame->string);
}
@@ -3254,9 +3236,6 @@ static void FS_Startup( const char *gameName )
// check for additional game folder for mods
if ( fs_gamedirvar->string[0] && Q_stricmp( fs_gamedirvar->string, gameName ) ) {
if (fs_steampath->string[0]) {
FS_AddGameDirectory(fs_steampath->string, fs_gamedirvar->string);
}
if (fs_basepath->string[0]) {
FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string);
}
@@ -2114,7 +2114,7 @@ static void Upload32(byte *data, int x, int y, int width, int height, GLenum pic
{
if (glConfig.textureFilterAnisotropic && !cubemap)
qglTextureParameteri(image->texnum, textureTarget, GL_TEXTURE_MAX_ANISOTROPY_EXT,
(GLint)Com_Clamp(1, maxAnisotropy, r_ext_max_anisotropy->integer));
(GLint)Com_Clamp(1, glConfig.maxAnisotropy, r_ext_max_anisotropy->integer));
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, gl_filter_min);
qglTextureParameterf(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, gl_filter_max);
View
@@ -223,71 +223,6 @@ static void SV_MapRestart_f( void ) {
}
/*
==================
SV_ConSayto_f
==================
*/
static void SV_ConSayto_f(void) {
char *p;
char text[1024];
client_t *cl;
char *rawname;
char name[MAX_NAME_LENGTH];
char cleanName[MAX_NAME_LENGTH];
client_t *saytocl;
int i;
// make sure server is running
if ( !com_sv_running->integer ) {
Com_Printf( "Server is not running.\n" );
return;
}
if ( Cmd_Argc() < 3 ) {
Com_Printf ("Usage: sayto <player name> <text>\n");
return;
}
rawname = Cmd_Argv(1);
//allowing special characters in the console
//with hex strings for player names
Com_FieldStringToPlayerName( name, MAX_NAME_LENGTH, rawname );
saytocl = NULL;
for ( i=0, cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++ ) {
if ( !cl->state ) {
continue;
}
Q_strncpyz( cleanName, cl->name, sizeof(cleanName) );
Q_CleanStr( cleanName );
if ( !Q_stricmp( cleanName, name ) ) {
saytocl = cl;
break;
}
}
if( !saytocl )
{
Com_Printf ("No such player name: %s.\n", name);
return;
}
strcpy (text, "console_sayto: ");
p = Cmd_ArgsFrom(2);
if ( *p == '"' ) {
p++;
p[strlen(p)-1] = 0;
}
strcat(text, p);
SV_SendServerCommand(saytocl, "chat \"%s\"", text);
}
/*
==================
SV_Heartbeat_f

0 comments on commit 87abdd9

Please sign in to comment.