[Orxonox-commit 5414] r10077 - in code/branches/presentationFS14: data/levels/templates src/orxonox/controllers

smerkli at orxonox.net smerkli at orxonox.net
Tue May 27 09:54:25 CEST 2014


Author: smerkli
Date: 2014-05-27 09:54:25 +0200 (Tue, 27 May 2014)
New Revision: 10077

Added:
   code/branches/presentationFS14/data/levels/templates/spaceshipTurret.oxt
Modified:
   code/branches/presentationFS14/src/orxonox/controllers/ControllerDirector.cc
   code/branches/presentationFS14/src/orxonox/controllers/ScriptController.cc
Log:
Removed some verbose output from default output and 
re-added a file that was removed accidentally.


Added: code/branches/presentationFS14/data/levels/templates/spaceshipTurret.oxt
===================================================================
--- code/branches/presentationFS14/data/levels/templates/spaceshipTurret.oxt	                        (rev 0)
+++ code/branches/presentationFS14/data/levels/templates/spaceshipTurret.oxt	2014-05-27 07:54:25 UTC (rev 10077)
@@ -0,0 +1,40 @@
+<Template name=standardturret>
+  <Turret collisionType="dynamic">
+    <attached>
+      <Model position="0,0,0" mesh="turretSocketFront.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketIn.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketTop.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketLeft.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketRight.mesh" scale3D="10,10,10" pitch=-90/>
+
+      <Turret position="0,0,-10" collisionType="dynamic" angularDamping=0.999999 mass=100 maxPitch=90 maxYaw=90 maxAttackRadius=2000 minAttackRadius=30>
+        <attached>
+          <Model position="0,0,0" pitch="-90" roll="0" mesh="turretHead.mesh" scale3D="10,10,10"/>
+        </attached>
+        <collisionShapes>
+          <SphereCollisionShape radius="10"   position = "0,0,0"/>
+        </collisionShapes>
+        <controller>
+          <TurretController/>
+        </controller>
+        <?lua
+          include("../includes/weaponSettingsTurret.oxi")
+        ?>
+      </Turret>
+    </attached>
+    
+    <controller>
+      <TeamTargetProxy/>
+    </controller>
+  </Turret>
+</Template>
+
+<Template name=spaceshipturretcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,10, 40" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
\ No newline at end of file

Modified: code/branches/presentationFS14/src/orxonox/controllers/ControllerDirector.cc
===================================================================
--- code/branches/presentationFS14/src/orxonox/controllers/ControllerDirector.cc	2014-05-22 13:59:14 UTC (rev 10076)
+++ code/branches/presentationFS14/src/orxonox/controllers/ControllerDirector.cc	2014-05-27 07:54:25 UTC (rev 10077)
@@ -26,7 +26,7 @@
         RegisterObject(ControllerDirector);
 
         // output a message to ensure we know the constructor was run
-        orxout()<<"hello universe constructor blablub"<< endl;
+        orxout(verbose)<<"hello universe constructor blablub"<< endl;
 
 
 
@@ -41,7 +41,7 @@
     {
         SUPER(ControllerDirector, XMLPort, xmlelement, mode);
 
-        orxout()<< "ControllerDirector::XMLPort " 
+        orxout(verbose)<< "ControllerDirector::XMLPort " 
           << "An instance of ControllerDirector has been created." << endl;
     }
 
@@ -62,7 +62,7 @@
     void ControllerDirector::takeControl(Controller * controller, BaseObject * trigger) 
     {
        /* Output a message confirming that the function was called */
-       orxout()<<"test takecontrol."<< endl;
+       orxout(verbose)<<"test takecontrol."<< endl;
 
        /* First, we set up a new controller to attach to the unit that
         * triggered our event. 
@@ -111,7 +111,7 @@
         this->pTrigger_ = orxonox_cast<PlayerTrigger*>(trigger);
         this->player_ = NULL;
 
-        orxout() << "Preparation to take Control!" << endl; 
+        orxout(verbose) << "Preparation to take Control!" << endl; 
 
         // Check whether it is a player trigger and extract pawn from it
         if(this->pTrigger_ != NULL)
@@ -124,7 +124,7 @@
         }
         else
         {
-            orxout() << "ControllerDirector::preparationToTakeControl " 
+            orxout(verbose) << "ControllerDirector::preparationToTakeControl " 
               << "Not a player trigger, can't extract pawn from it.." << endl;
             return false;
         }

Modified: code/branches/presentationFS14/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/branches/presentationFS14/src/orxonox/controllers/ScriptController.cc	2014-05-22 13:59:14 UTC (rev 10076)
+++ code/branches/presentationFS14/src/orxonox/controllers/ScriptController.cc	2014-05-27 07:54:25 UTC (rev 10077)
@@ -70,8 +70,8 @@
     void ScriptController::takeControl(int ctrlid)
     {
         /* Output some debugging information */
-        orxout() << "ScriptController: Taking control" << endl;
-        orxout() << "This-pointer: " << this << endl;
+        orxout(verbose) << "ScriptController: Taking control" << endl;
+        orxout(verbose) << "This-pointer: " << this << endl;
 
         /* Set the controller ID (the argument here should be nonzero) */
         this->ctrlid_ = ctrlid;
@@ -99,13 +99,13 @@
     ScriptController* ScriptController::getScriptController()
     {
       /* Output a message that confirms this function was called */
-      orxout() << "Great success!" << std::endl;
+      orxout(verbose) << "Great success!" << std::endl;
 
       /* Debugging: print all the scriptcontroller object pointers */
       for(ObjectList<ScriptController>::iterator it = 
         ObjectList<ScriptController>::begin(); 
         it != ObjectList<ScriptController>::end(); ++it)
-      { orxout() << "Have object in list: " << *it << endl; }
+      { orxout(verbose) << "Have object in list: " << *it << endl; }
 
       /* Find the first one with a nonzero ID */
       for(ObjectList<ScriptController>::iterator it = 
@@ -114,7 +114,7 @@
       { 
         // TODO: do some selection here. Currently just returns the first one
         if( (*it)->getID() > 0 )
-        { orxout() << "Controller to return: " << *it << endl;
+        { orxout(verbose) << "Controller to return: " << *it << endl;
           return *it; 
         }
       
@@ -230,12 +230,12 @@
       tmp.duration = duration;
       tmp.eventTime = executionTime;
 
-      orxout() << tmp.fctName << endl;
+      orxout(verbose) << tmp.fctName << endl;
 
       /* Add the created event to the event list */
       if(eventList.size()==0)
       { /* The list is still empty, just add it */
-        orxout() << "eventList empty (01)" << endl;
+        orxout(verbose) << "eventList empty (01)" << endl;
         eventList.insert(eventList.begin(), tmp);
         this->eventno += 1;
         return; /* Nothing more to do, the event was added */




More information about the Orxonox-commit mailing list