[Orxonox-commit 2136] r6852 - code/branches/lod/src/orxonox/graphics

kolibri7 at orxonox.net kolibri7 at orxonox.net
Mon May 3 22:33:02 CEST 2010


Author: kolibri7
Date: 2010-05-03 22:33:02 +0200 (Mon, 03 May 2010)
New Revision: 6852

Modified:
   code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc
   code/branches/lod/src/orxonox/graphics/Model.cc
Log:
modified it, but the game crashes, something is wrong with while(...)

Modified: code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc
===================================================================
--- code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc	2010-05-03 19:52:45 UTC (rev 6851)
+++ code/branches/lod/src/orxonox/graphics/MeshLodInformation.cc	2010-05-03 20:33:02 UTC (rev 6852)
@@ -78,4 +78,4 @@
 		return meshSource_;
 	}
  
-}
\ No newline at end of file
+}

Modified: code/branches/lod/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/lod/src/orxonox/graphics/Model.cc	2010-05-03 19:52:45 UTC (rev 6851)
+++ code/branches/lod/src/orxonox/graphics/Model.cc	2010-05-03 20:33:02 UTC (rev 6852)
@@ -104,10 +104,10 @@
                 {
                     float scaleFactor = getBiggestScale(this->getScale3D());
                     BaseObject* creatorPtr = this->getCreator();
-                    while(creatorPtr!=0)
+					//TODO Doesn't work...
+                    while(creatorPtr!=0&&typeid(creatorPtr)!=typeid(new WorldEntity*))
                     {
-                        // TODO Cannot cast to WorldEntity
-                        scaleFactor *= getBiggestScale(((WorldEntity) creatorPtr)->getScale3D());
+                        scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
                         creatorPtr = this->getCreator();
                     }
                     




More information about the Orxonox-commit mailing list