[Orxonox-commit 5639] r10299 - in code/trunk/src: modules/weapons/projectiles orxonox/gamestates

landauf at orxonox.net landauf at orxonox.net
Mon Mar 2 23:19:32 CET 2015


Author: landauf
Date: 2015-03-02 23:19:32 +0100 (Mon, 02 Mar 2015)
New Revision: 10299

Modified:
   code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
   code/trunk/src/orxonox/gamestates/GSLevel.cc
Log:
fixed crash in SimpleRocket (during level-unloading).
improved debug output in GSLevel

Modified: code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc	2015-03-02 22:18:45 UTC (rev 10298)
+++ code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc	2015-03-02 22:19:32 UTC (rev 10299)
@@ -153,7 +153,8 @@
         {
             if( GameMode::isMaster() )
             {
-                this->getController()->destroy();
+                if (this->getController())
+                    this->getController()->destroy();
             }
         }
     }

Modified: code/trunk/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.cc	2015-03-02 22:18:45 UTC (rev 10298)
+++ code/trunk/src/orxonox/gamestates/GSLevel.cc	2015-03-02 22:19:32 UTC (rev 10299)
@@ -189,11 +189,10 @@
                 orxout(internal_info) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << endl;
             }
         }
-        orxout(internal_info) << i << " objects remaining.";
         if (i == 0)
-            orxout(internal_info) << " Well done!" << endl;
+            orxout(internal_info) << i << " objects remaining. Well done!" << endl;
         else
-            orxout(internal_info) << " Try harder!" << endl;
+            orxout(internal_warning) << i << " objects remaining. Try harder!" << endl;
     }
 
     void GSLevel::reloadLevel()




More information about the Orxonox-commit mailing list