[Orxonox-commit 1106] r5827 - code/branches/core5/src/orxonox/gametypes

landauf at orxonox.net landauf at orxonox.net
Mon Sep 28 21:10:04 CEST 2009


Author: landauf
Date: 2009-09-28 21:10:04 +0200 (Mon, 28 Sep 2009)
New Revision: 5827

Modified:
   code/branches/core5/src/orxonox/gametypes/Gametype.cc
Log:
(hopefully) a small fix in Gametype (not sure if this works with the network though, because the creator of a new object is deleted in the next line. but I think we fixed this problem, didn't we?)

This bug caused a crash if the creator (usually a SpawnPoint) of a Pawn was already deleted (which is the case in our UnderAttack level where the SpawnPoints are attached to the Destroyer - with the destruction of the Destroyer, the SpawnPoints were also removed.)


Modified: code/branches/core5/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/core5/src/orxonox/gametypes/Gametype.cc	2009-09-28 19:05:56 UTC (rev 5826)
+++ code/branches/core5/src/orxonox/gametypes/Gametype.cc	2009-09-28 19:10:04 UTC (rev 5827)
@@ -137,7 +137,7 @@
             {
                 ControllableEntity* oldentity = it->first->getControllableEntity();
 
-                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity->getCreator());
+                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity);
                 if (oldentity->getCamera())
                 {
                     entity->setPosition(oldentity->getCamera()->getWorldPosition());




More information about the Orxonox-commit mailing list