Shared: add `bool FileExists(string filePath)` function

This commit is contained in:
Marco Cawthorne 2023-12-15 17:00:13 -08:00
parent 2530608b1f
commit 6c1db1f4f6
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 10 additions and 0 deletions

View File

@ -503,4 +503,14 @@ Route_GetJumpVelocity(vector vecFrom, vector vecTo, float flGravMod)
vecJump[2] = 280;
#endif
return vecJump;
}
bool
FileExists(string filePath)
{
if (filePath != "") /* not empty */
if not(whichpack(filePath)) /* not present on disk */
return false;
return true;
}