[Orxonox-commit 1196] r5917 - in code/branches/core5/src/orxonox: . collisionshapes gametypes items weaponsystem

scheusso at orxonox.net scheusso at orxonox.net
Fri Oct 9 16:44:50 CEST 2009


Author: scheusso
Date: 2009-10-09 16:44:50 +0200 (Fri, 09 Oct 2009)
New Revision: 5917

Modified:
   code/branches/core5/src/orxonox/Test.cc
   code/branches/core5/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
   code/branches/core5/src/orxonox/gametypes/Gametype.cc
   code/branches/core5/src/orxonox/gametypes/Gametype.h
   code/branches/core5/src/orxonox/items/MultiStateEngine.cc
   code/branches/core5/src/orxonox/weaponsystem/WeaponSlot.cc
Log:
missing parts of last commit


Modified: code/branches/core5/src/orxonox/Test.cc
===================================================================
--- code/branches/core5/src/orxonox/Test.cc	2009-10-09 14:41:30 UTC (rev 5916)
+++ code/branches/core5/src/orxonox/Test.cc	2009-10-09 14:44:50 UTC (rev 5917)
@@ -62,7 +62,7 @@
 		RegisterObject ( Test );
     setConfigValues();
     registerVariables();
-		setObjectMode(0x3);
+		setSyncMode(0x3);
 	}
 
 	Test::~Test()

Modified: code/branches/core5/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
===================================================================
--- code/branches/core5/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc	2009-10-09 14:41:30 UTC (rev 5916)
+++ code/branches/core5/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc	2009-10-09 14:44:50 UTC (rev 5917)
@@ -42,7 +42,7 @@
 
         this->worldEntityOwner_ = creator;
         // suppress synchronisation
-        this->setObjectMode(0x0);
+        this->setSyncMode(0x0);
     }
 
     WorldEntityCollisionShape::~WorldEntityCollisionShape()

Modified: code/branches/core5/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/core5/src/orxonox/gametypes/Gametype.cc	2009-10-09 14:41:30 UTC (rev 5916)
+++ code/branches/core5/src/orxonox/gametypes/Gametype.cc	2009-10-09 14:44:50 UTC (rev 5917)
@@ -32,6 +32,7 @@
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
 #include "core/GameMode.h"
+#include "core/ConsoleCommand.h"
 
 #include "infos/PlayerInfo.h"
 #include "infos/Bot.h"
@@ -77,12 +78,25 @@
         }
         else
             this->scoreboard_ = 0;
+        
+        /* HACK HACK HACK */
+        this->hackAddBots_ = createConsoleCommand( createFunctor(&Gametype::addBots, this), "hackAddBots");
+        this->hackKillBots_ = createConsoleCommand( createFunctor(&Gametype::killBots, this), "hackKillBots");
+        CommandExecutor::addConsoleCommandShortcut( this->hackAddBots_ );
+        CommandExecutor::addConsoleCommandShortcut( this->hackKillBots_ );
+        /* HACK HACK HACK */
     }
     
     Gametype::~Gametype()
     {
         if (this->isInitialized())
+        {
             this->gtinfo_->destroy();
+            if( this->hackAddBots_ )
+                delete this->hackAddBots_;
+            if( this->hackKillBots_ )
+                delete this->hackKillBots_;
+        }
     }
 
     void Gametype::setConfigValues()

Modified: code/branches/core5/src/orxonox/gametypes/Gametype.h
===================================================================
--- code/branches/core5/src/orxonox/gametypes/Gametype.h	2009-10-09 14:41:30 UTC (rev 5916)
+++ code/branches/core5/src/orxonox/gametypes/Gametype.h	2009-10-09 14:44:50 UTC (rev 5917)
@@ -183,6 +183,11 @@
 
             // Config Values
             std::string scoreboardTemplate_;
+            
+            /* HACK HACK HACK */
+            ConsoleCommand* hackAddBots_;
+            ConsoleCommand* hackKillBots_;
+            /* HACK HACK HACK */
     };
 }
 

Modified: code/branches/core5/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/branches/core5/src/orxonox/items/MultiStateEngine.cc	2009-10-09 14:41:30 UTC (rev 5916)
+++ code/branches/core5/src/orxonox/items/MultiStateEngine.cc	2009-10-09 14:44:50 UTC (rev 5917)
@@ -90,7 +90,7 @@
         {
             if (this->getShip()->hasLocalController())
             {
-                this->setObjectMode(ObjectDirection::Bidirectional);
+                this->setSyncMode(ObjectDirection::Bidirectional);
 
                 const Vector3& direction = this->getDirection();
                 const Vector3& velocity = this->getShip()->getLocalVelocity();

Modified: code/branches/core5/src/orxonox/weaponsystem/WeaponSlot.cc
===================================================================
--- code/branches/core5/src/orxonox/weaponsystem/WeaponSlot.cc	2009-10-09 14:41:30 UTC (rev 5916)
+++ code/branches/core5/src/orxonox/weaponsystem/WeaponSlot.cc	2009-10-09 14:44:50 UTC (rev 5917)
@@ -45,7 +45,7 @@
         this->weaponSystem_ = 0;
         this->weapon_ = 0;
 
-        this->setObjectMode(0x0);
+        this->setSyncMode(0x0);
     }
 
     WeaponSlot::~WeaponSlot()




More information about the Orxonox-commit mailing list