From 7e72ede0ca48f1a3864d61af1788cacc7a92d738 Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Tue, 16 Apr 2013 02:43:29 +0200 Subject: [PATCH] Added support for resource files in Valve's file system. Thanks to Kyle. --- src/zr/downloads.inc | 2 +- src/zr/models.inc | 2 +- src/zr/playerclasses/filtertools.inc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zr/downloads.inc b/src/zr/downloads.inc index b54df19..ae720ba 100644 --- a/src/zr/downloads.inc +++ b/src/zr/downloads.inc @@ -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); diff --git a/src/zr/models.inc b/src/zr/models.inc index 6ef6556..31d1fdf 100644 --- a/src/zr/models.inc +++ b/src/zr/models.inc @@ -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++; diff --git a/src/zr/playerclasses/filtertools.inc b/src/zr/playerclasses/filtertools.inc index 513572b..95718f2 100644 --- a/src/zr/playerclasses/filtertools.inc +++ b/src/zr/playerclasses/filtertools.inc @@ -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; }