Update IsMapValid for today's TF2 update.

This commit is contained in:
Nicholas Hastings
2015-06-11 17:48:58 -04:00
parent a4821f9389
commit c0d4dfa6ed
4 changed files with 10 additions and 8 deletions
+8 -1
View File
@@ -1238,7 +1238,13 @@ bool CHalfLife2::IsMapValid(const char *map)
if (!map || !map[0])
return false;
bool ret = engine->IsMapValid(map);
bool ret;
#if SOURCE_ENGINE == SE_TF2
char szTmp[PLATFORM_MAX_PATH];
strncopy(szTmp, map, sizeof(szTmp));
ret = engine->FindMap(szTmp, sizeof(szTmp)) != eFindMap_NotFound;
#else
ret = engine->IsMapValid(map);
#if SOURCE_ENGINE >= SE_LEFT4DEAD
if (!ret)
{
@@ -1249,5 +1255,6 @@ bool CHalfLife2::IsMapValid(const char *map)
}
}
#endif
#endif // SE_TF2
return ret;
}