From 3067bad9b9fc6f5b7183edbbc8b82a4d86c01d36 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 21 Aug 2020 15:11:02 +1000 Subject: [PATCH] - Blood/Duke/Exhumed/SW: Fix `map` CCMD so the game doesn't return to the menu if incorrect map specified (or crash in the case of Exhumed). --- source/blood/src/osdcmd.cpp | 2 +- source/exhumed/src/osdcmds.cpp | 2 +- source/games/duke/src/ccmds.cpp | 2 +- source/sw/src/osdcmds.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blood/src/osdcmd.cpp b/source/blood/src/osdcmd.cpp index b2c425b1b..4f33ef771 100644 --- a/source/blood/src/osdcmd.cpp +++ b/source/blood/src/osdcmd.cpp @@ -51,7 +51,7 @@ static int osdcmd_map(CCmdFuncPtr parm) FString mapfilename = mapname; DefaultExtension(mapfilename, ".map"); - if (!fileSystem.FindFile(mapfilename)) + if (!fileSystem.FileExists(mapfilename)) { Printf(TEXTCOLOR_RED "map: file \"%s\" not found.\n", mapfilename.GetChars()); return CCMD_OK; diff --git a/source/exhumed/src/osdcmds.cpp b/source/exhumed/src/osdcmds.cpp index 70383cea3..2d7a21745 100644 --- a/source/exhumed/src/osdcmds.cpp +++ b/source/exhumed/src/osdcmds.cpp @@ -71,7 +71,7 @@ static int osdcmd_map(CCmdFuncPtr parm) FString mapfilename = mapname; DefaultExtension(mapfilename, ".map"); - if (!fileSystem.FindFile(mapfilename)) + if (!fileSystem.FileExists(mapfilename)) { Printf(TEXTCOLOR_RED "map: file \"%s\" not found.\n", mapfilename.GetChars()); return CCMD_OK; diff --git a/source/games/duke/src/ccmds.cpp b/source/games/duke/src/ccmds.cpp index bf35c7875..fd261e7f1 100644 --- a/source/games/duke/src/ccmds.cpp +++ b/source/games/duke/src/ccmds.cpp @@ -93,7 +93,7 @@ static int ccmd_map(CCmdFuncPtr parm) FString mapfilename = mapname; DefaultExtension(mapfilename, ".map"); - if (!fileSystem.FindFile(mapfilename)) + if (!fileSystem.FileExists(mapfilename)) { Printf(TEXTCOLOR_RED "map: file \"%s\" not found.\n", mapname.GetChars()); return CCMD_OK; diff --git a/source/sw/src/osdcmds.cpp b/source/sw/src/osdcmds.cpp index fcba37213..d137651dc 100644 --- a/source/sw/src/osdcmds.cpp +++ b/source/sw/src/osdcmds.cpp @@ -82,7 +82,7 @@ static int osdcmd_map(CCmdFuncPtr parm) FString mapfilename = mapname; DefaultExtension(mapfilename, ".map"); - if (!fileSystem.FindFile(mapfilename)) + if (!fileSystem.FileExists(mapfilename)) { Printf(TEXTCOLOR_RED "map: file \"%s\" not found.\n", mapfilename.GetChars()); return CCMD_OK;