Added support for resource files in Valve's file system. Thanks to Kyle.
This commit is contained in:
parent
5269107303
commit
7e72ede0ca
|
@ -75,7 +75,7 @@ DownloadsLoad()
|
|||
GetArrayString(arrayDownloads, x, downloadpath, sizeof(downloadpath));
|
||||
|
||||
// If file doesn't exist, then remove, log, and stop.
|
||||
if (!FileExists(downloadpath))
|
||||
if (!FileExists(downloadpath, true))
|
||||
{
|
||||
// Remove client from array.
|
||||
RemoveFromArray(arrayDownloads, x);
|
||||
|
|
|
@ -125,7 +125,7 @@ ModelsLoad()
|
|||
strcopy(buffer, sizeof(buffer), path);
|
||||
StrCat(buffer, sizeof(buffer), name);
|
||||
StrCat(buffer, sizeof(buffer), ".mdl");
|
||||
if (!FileExists(buffer))
|
||||
if (!FileExists(buffer, true))
|
||||
{
|
||||
LogEvent(false, LogType_Error, LOG_CORE_EVENTS, LogModule_Models, "Config Validation", "Warning: Invalid model name/path setting at index %d. File not found: \"%s\".", ModelCount + failedCount, buffer);
|
||||
failedCount++;
|
||||
|
|
|
@ -202,7 +202,7 @@ stock ClassValidateAttributes(classindex, bool:logErrors = false)
|
|||
!StrEqual(model_path, "no_change", false))
|
||||
{
|
||||
// Check if the file exists.
|
||||
if (!FileExists(model_path))
|
||||
if (!FileExists(model_path, true))
|
||||
{
|
||||
flags += ZR_CLASS_MODEL_PATH;
|
||||
if (logErrors)
|
||||
|
@ -253,7 +253,7 @@ stock ClassValidateAttributes(classindex, bool:logErrors = false)
|
|||
{
|
||||
// Check if the file exists.
|
||||
Format(overlay, sizeof(overlay), "materials/%s.vmt", overlay_path);
|
||||
if (!FileExists(overlay))
|
||||
if (!FileExists(overlay, true))
|
||||
{
|
||||
flags += ZR_CLASS_OVERLAY_PATH;
|
||||
if (logErrors)
|
||||
|
@ -485,7 +485,7 @@ stock ClassValidateEditableAttributes(attributes[ClassEditableAttributes])
|
|||
{
|
||||
// Check if the file exists.
|
||||
Format(overlay, sizeof(overlay), "materials/%s.vmt", overlay_path);
|
||||
if (!FileExists(overlay))
|
||||
if (!FileExists(overlay, true))
|
||||
{
|
||||
flags += ZR_CLASS_OVERLAY_PATH;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user