浏览代码

correct constructorfile reference

AzaezelX 3 年之前
父节点
当前提交
91d843b8bd
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Engine/source/T3D/assets/ShapeAsset.cpp

+ 3 - 2
Engine/source/T3D/assets/ShapeAsset.cpp

@@ -207,8 +207,9 @@ void ShapeAsset::initializeAsset()
    //Ensure our path is expando'd if it isn't already
    mFilePath = getOwned() ? expandAssetFilePath(mFileName) : mFilePath;
 
-   mConstructorFilePath = getOwned() ? expandAssetFilePath(mConstructorFilePath) : mConstructorFilePath;
-
+   mConstructorFilePath = getOwned() ? expandAssetFilePath(mConstructorFileName) : mConstructorFilePath;
+   if (!Torque::FS::IsFile(mConstructorFilePath))
+      Con::errorf("ShapeAsset::initializeAsset could not find %s!", mConstructorFilePath);
    mDiffuseImposterPath = getOwned() ? expandAssetFilePath(mDiffuseImposterFileName) : mDiffuseImposterFileName;
    if (mDiffuseImposterPath == StringTable->EmptyString())
    {