Преглед изворни кода

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
    //Ensure our path is expando'd if it isn't already
    mFilePath = getOwned() ? expandAssetFilePath(mFileName) : mFilePath;
    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;
    mDiffuseImposterPath = getOwned() ? expandAssetFilePath(mDiffuseImposterFileName) : mDiffuseImposterFileName;
    if (mDiffuseImposterPath == StringTable->EmptyString())
    if (mDiffuseImposterPath == StringTable->EmptyString())
    {
    {