Преглед на файлове

Merge pull request #899 from Azaezel/alpha401/fixFileRef

correct constructorfile reference
Brian Roberts преди 3 години
родител
ревизия
72230e2124
променени са 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 (%s) could not find %s!", getAssetName(), mConstructorFilePath);
    mDiffuseImposterPath = getOwned() ? expandAssetFilePath(mDiffuseImposterFileName) : mDiffuseImposterFileName;
    if (mDiffuseImposterPath == StringTable->EmptyString())
    {