leverage isScriptFile

(also initialize  scattersky. mNightCubemapName = StringTable->EmptyString();)
This commit is contained in:
AzaezelX 2021-07-22 12:02:23 -05:00
parent c41b8e00ff
commit f185bef8a3
9 changed files with 18 additions and 17 deletions

View file

@ -166,7 +166,7 @@ void MaterialAsset::initializeAsset()
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
if (Platform::isFile(mScriptPath))
if (Platform::isScriptFile(mScriptPath))
Con::executeFile(mScriptPath, false, false);
loadMaterial();
@ -176,7 +176,7 @@ void MaterialAsset::onAssetRefresh()
{
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
if (Platform::isFile(mScriptPath))
if (Platform::isScriptFile(mScriptPath))
Con::executeFile(mScriptPath, false, false);
loadMaterial();