mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
leverage isScriptFile
(also initialize scattersky. mNightCubemapName = StringTable->EmptyString();)
This commit is contained in:
parent
c41b8e00ff
commit
f185bef8a3
9 changed files with 18 additions and 17 deletions
|
|
@ -124,7 +124,7 @@ void ScriptAsset::initializeAsset()
|
|||
{
|
||||
mScriptPath = expandAssetFilePath(mScriptFile);
|
||||
|
||||
if (Platform::isFile(mScriptPath))
|
||||
if (Platform::isScriptFile(mScriptPath))
|
||||
{
|
||||
//We're initialized properly, so we'll go ahead and kick along any dependencies we may have as well
|
||||
AssetManager::typeAssetDependsOnHash::Iterator assetDependenciesItr = mpOwningAssetManager->getDependedOnAssets()->find(mpAssetDefinition->mAssetId);
|
||||
|
|
@ -152,7 +152,7 @@ void ScriptAsset::onAssetRefresh()
|
|||
{
|
||||
mScriptPath = expandAssetFilePath(mScriptFile);
|
||||
|
||||
if (Platform::isFile(mScriptPath))
|
||||
if (Platform::isScriptFile(mScriptPath))
|
||||
{
|
||||
//Refresh any dependencies we may have
|
||||
for (U32 i = 0; i < mScriptAssets.size(); i++)
|
||||
|
|
@ -192,7 +192,7 @@ bool ScriptAsset::execScript()
|
|||
|
||||
return false;
|
||||
|
||||
if (Platform::isFile(mScriptPath))
|
||||
if (Platform::isScriptFile(mScriptPath))
|
||||
{
|
||||
return Con::executeFile(mScriptPath, false, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue