Remove hack around FuzzyMatch never being returned in TF2 for FindMap.

It has been fixed now in the game.
This commit is contained in:
Nicholas Hastings 2015-07-04 13:42:50 -04:00
parent c32683225f
commit 8a978dc71f

View File

@ -1252,16 +1252,7 @@ SMFindMapResult CHalfLife2::FindMap(char *pMapName, int nMapNameMax)
return SMFindMapResult::FuzzyMatch;
}
#elif SOURCE_ENGINE == SE_TF2
// Save off name passed in so that we can compare to output.
// There is a bug where eFindMap_FuzzyMap is never returned, even for fuzzy matches.
char *pOriginal = sm_strdup(pMapName);
SMFindMapResult res = static_cast<SMFindMapResult>(engine->FindMap(pMapName, nMapNameMax));
bool bExactMatch = strcmp(pOriginal, pMapName) == 0;
delete [] pOriginal;
if (res == SMFindMapResult::Found && !bExactMatch)
return SMFindMapResult::FuzzyMatch;
else
return res;
return static_cast<SMFindMapResult>(engine->FindMap(pMapName, nMapNameMax));
#else
return engine->IsMapValid(pMapName) == 0 ? SMFindMapResult::NotFound : SMFindMapResult::Found;
#endif