浏览代码

Merge pull request #997 from Winterleaf/Fix-PostEffects

This just adds some console spam if the PostEffect Texture isn't found. ...
Daniel Buckmaster 10 年之前
父节点
当前提交
ca287f3308
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Engine/source/postFx/postEffect.cpp

+ 3 - 1
Engine/source/postFx/postEffect.cpp

@@ -403,7 +403,9 @@ bool PostEffect::onAdd()
          texFilename = scriptPath.getFullPath() + '/' + texFilename;
 
       // Try to load the texture.
-      mTextures[i].set( texFilename, &PostFxTextureProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
+      bool success = mTextures[i].set( texFilename, &PostFxTextureProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
+      if (!success)
+         Con::errorf("Invalid Texture for PostEffect (%s), The Texture '%s' does not exist!", this->getName(), texFilename.c_str());
    }
 
    // Is the target a named target?