Remove redundant use of PHYSFSX_exists
This commit is contained in:
parent
61fe046ba2
commit
1ecbeb6bf9
|
@ -796,8 +796,6 @@ static int load_mission(const mle *mission)
|
|||
#endif
|
||||
{
|
||||
strcpy(buf+strlen(buf)-4,".hog"); //change extension
|
||||
PHYSFSEXT_locateCorrectCase(buf);
|
||||
if (PHYSFSX_exists(buf,1))
|
||||
PHYSFSX_contfile_init(buf, 0);
|
||||
set_briefing_filename(Briefing_text_filename, Current_mission_filename);
|
||||
Ending_text_filename = Briefing_text_filename;
|
||||
|
|
|
@ -1360,9 +1360,6 @@ void read_netgame_profile(netgame_info *ng)
|
|||
char filename[PATH_MAX];
|
||||
|
||||
snprintf(filename, sizeof(filename), PLAYER_DIRECTORY_STRING("%.8s.ngp"), static_cast<const char *>(get_local_player().callsign));
|
||||
if (!PHYSFSX_exists(filename,0))
|
||||
return;
|
||||
|
||||
auto file = PHYSFSX_openReadBuffered(filename);
|
||||
if (!file)
|
||||
return;
|
||||
|
|
|
@ -103,9 +103,8 @@ static void songs_init()
|
|||
|
||||
for (i = SONG_FIRST_LEVEL_SONG; i < predef; i++) {
|
||||
snprintf(BIMSongs[i].filename, sizeof(BIMSongs[i].filename), "game%02d.hmp", i - SONG_FIRST_LEVEL_SONG + 1);
|
||||
if (!PHYSFSX_exists(BIMSongs[i].filename,1))
|
||||
snprintf(BIMSongs[i].filename, sizeof(BIMSongs[i].filename), "game%d.hmp", i - SONG_FIRST_LEVEL_SONG);
|
||||
if (!PHYSFSX_exists(BIMSongs[i].filename,1))
|
||||
if (!PHYSFSX_exists(BIMSongs[i].filename,1) &&
|
||||
!PHYSFSX_exists((snprintf(BIMSongs[i].filename, sizeof(BIMSongs[i].filename), "game%d.hmp", i - SONG_FIRST_LEVEL_SONG), BIMSongs[i].filename), 1))
|
||||
{
|
||||
memset(BIMSongs[i].filename, '\0', sizeof(BIMSongs[i].filename)); // music not available
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue