Added damaged images to the crate object.
Added damaged images to the crate object.

--- a/CrateObject.cpp
+++ b/CrateObject.cpp
@@ -21,5 +21,12 @@
 void CrateObject::setLife(double life)
 {
   DestroyableObject::setLife(life);
+
+  ISceneNode *node=sceneNode();
+  ISceneManager *smgr=node->getSceneManager();
+  if(this->life()<50)
+    node->setMaterialTexture(0,smgr->getVideoDriver()->getTexture("media/crate-damaged.jpg"));
+  else
+    node->setMaterialTexture(0,smgr->getVideoDriver()->getTexture("media/crate.jpg"));
 }
 

Binary files /dev/null and b/media/crate-damaged.jpg differ