Explorar o código

Merge pull request #899 from Azaezel/alpha401/fixFileRef

correct constructorfile reference
Brian Roberts %!s(int64=3) %!d(string=hai) anos
pai
achega
72230e2124
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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())
    {