diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_main.c | 12 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 2 |
3 files changed, 3 insertions, 13 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 3a591a37..67acb55f 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -662,17 +662,7 @@ Test if a specific file exists or not */ qboolean CG_FileExists( char *filename ) { - fileHandle_t f; - - if( trap_FS_FOpenFile( filename, &f, FS_READ ) > 0 ) - { - //file exists so close it - trap_FS_FCloseFile( f ); - - return qtrue; - } - else - return qfalse; + return trap_FS_FOpenFile( filename, NULL, FS_READ ); } /* diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index cdfbc747..78cbe8d8 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -107,7 +107,7 @@ static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_t *ci ) // load the file len = trap_FS_FOpenFile( filename, &f, FS_READ ); - if( len <= 0 ) + if( len < 0 ) return qfalse; if( len >= sizeof( text ) - 1 ) diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index f6866bc2..e3776779 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -439,7 +439,7 @@ static qboolean CG_ParseWeaponFile( const char *filename, weaponInfo_t *wi ) // load the file len = trap_FS_FOpenFile( filename, &f, FS_READ ); - if( len <= 0 ) + if( len < 0 ) return qfalse; if( len >= sizeof( text ) - 1 ) |