[Orxonox-commit 2323] r7038 - in code/branches/presentation3: data/levels data/levels/includes data/levels/templates src/modules/pickup src/orxonox/controllers

dafrick at orxonox.net dafrick at orxonox.net
Mon May 31 09:24:33 CEST 2010


Author: dafrick
Date: 2010-05-31 09:24:33 +0200 (Mon, 31 May 2010)
New Revision: 7038

Modified:
   code/branches/presentation3/data/levels/includes/pickups.oxi
   code/branches/presentation3/data/levels/pickups.oxw
   code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt
   code/branches/presentation3/src/modules/pickup/PickupSpawner.cc
   code/branches/presentation3/src/orxonox/controllers/DroneController.cc
Log:
Updated pickups level and template and include file to properly include the DronePickup.
Additionally adjusted the level of output generated by the PickupSpawner.


Modified: code/branches/presentation3/data/levels/includes/pickups.oxi
===================================================================
--- code/branches/presentation3/data/levels/includes/pickups.oxi	2010-05-31 07:21:07 UTC (rev 7037)
+++ code/branches/presentation3/data/levels/includes/pickups.oxi	2010-05-31 07:24:33 UTC (rev 7038)
@@ -1,3 +1,4 @@
+
 <!-- Shield pickups -->
 
 <PickupRepresentation
@@ -2,3 +3,3 @@
     pickupName = "Small Shield Pickup"
-    pickupDescription = "Gives you a small shield for 10 seconds."
+    pickupDescription = "Gives you a small-sized shield for 30 seconds."
     inventoryRepresentation = "SmallShield"
@@ -196,3 +197,15 @@
     </pickup>
 </PickupRepresentation>
 
+<!-- Drone Pickup -->
+
+<PickupRepresentation
+    pickupName = "Drone Pickup"
+    pickupDescription = "Adds a Drone to the Players Spaceship"
+    spawnerTemplate = "dronepickupRepresentation"
+>
+    <pickup>
+        <DronePickup template=dronepickup />
+    </pickup>
+</PickupRepresentation>
+

Modified: code/branches/presentation3/data/levels/pickups.oxw
===================================================================
--- code/branches/presentation3/data/levels/pickups.oxw	2010-05-31 07:21:07 UTC (rev 7037)
+++ code/branches/presentation3/data/levels/pickups.oxw	2010-05-31 07:24:33 UTC (rev 7038)
@@ -29,14 +29,6 @@
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
     <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
 
-    <!-- Drone pickup -->
-
-    <PickupSpawner position="-100,0,-100" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
-        <pickup>
-            <DronePickup droneTemplate=droneTemplate />
-        </pickup>
-    </PickupSpawner>
-
     <!-- Shield pickups -->
 
     <PickupSpawner position="-25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
@@ -150,6 +142,16 @@
         <PickupCollection template=triplehealthspeedinvisibilitypickup />
       </pickup>
     </PickupSpawner>
+    
+    <!-- Drone pickup -->
+    
+    <PickupSpawner position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
+      <pickup>
+        <DronePickup template=dronepickup />
+      </pickup>
+    </PickupSpawner>
+    
+    <!-- Other pickups -->
 
     <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
     <PickupRepresentation

Modified: code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt
===================================================================
--- code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt	2010-05-31 07:21:07 UTC (rev 7037)
+++ code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt	2010-05-31 07:24:33 UTC (rev 7038)
@@ -26,7 +26,6 @@
   />
 </Template>
 
-
 <Template name=mediumshieldpickupRepresentation>
     <PickupRepresentation>
         <spawner-representation>
@@ -426,6 +425,8 @@
     </PickupCollection>
 </Template>
 
+<!-- Drone Pickup -->
+
 <Template name=droneTemplate>
     <Drone name="meineDrohne"  mass= "50" linearDamping = "0.7" angularDamping = "0.99999" maxDistanceToOwner_=150 minDistanceToOwner_=50 primaryThrust_=250 auxilaryThrust_=250 rotationThrust_=50>
         <attached>
@@ -457,3 +458,24 @@
         </weapons>
     </Drone>
 </Template>
+
+<Template name=dronepickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.96,0.35,0.02" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Model scale="5" mesh="drone.mesh"/>
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=dronepickup>
+    <DronePickup droneTemplate=droneTemplate />
+</Template>
+

Modified: code/branches/presentation3/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/branches/presentation3/src/modules/pickup/PickupSpawner.cc	2010-05-31 07:21:07 UTC (rev 7037)
+++ code/branches/presentation3/src/modules/pickup/PickupSpawner.cc	2010-05-31 07:24:33 UTC (rev 7038)
@@ -222,7 +222,7 @@
         }
         else
         {
-            COUT(3) << "PickupSpawner empty, selfdestruct initialized." << std::endl;
+            COUT(4) << "PickupSpawner (&" << this << ") empty, selfdestruct initialized." << std::endl;
             this->setActive(false);
             this->destroy();
         }
@@ -247,12 +247,12 @@
     {
         if(this->pickup_ != NULL)
         {
-            COUT(1) << "In PickupSpawner: setPickupable called, with this->pickup_ already set." << std::endl;
+            COUT(1) << "In PickupSpawner (&" << this << "): setPickupable called, with this->pickup_ already set." << std::endl;
             return;
         }
         if(pickup == NULL)
         {
-            COUT(1) << "In PickupSpawner: Argument of setPickupable is NULL." << std::endl;
+            COUT(1) << "In PickupSpawner (&" << this << "): Argument of setPickupable is NULL." << std::endl;
             return;
         }
         
@@ -281,7 +281,7 @@
     {
         if (this->isActive()) //!< Checks whether PickupSpawner is active.
         {
-            COUT(3) << "PickupSpawner triggered and active." << std::endl;
+            COUT(4) << "PickupSpawner (&" << this << ") triggered and active." << std::endl;
             
             PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(pawn);
             if(carrier == NULL)
@@ -292,7 +292,7 @@
             
             if(!carrier->isTarget(this->pickup_))
             {
-                COUT(4) << "PickupSpawner triggered but Pawn wasn't a target of the Pickupable." << std::endl;
+                COUT(4) << "PickupSpawner (&" << this << ") triggered but Pawn wasn't a target of the Pickupable." << std::endl;
                 return;
             }
             
@@ -313,11 +313,11 @@
             else
             {
                 if(target == NULL)
-                    COUT(1) << "PickupSpawner: Pickupable has no target." << std::endl;
+                    COUT(1) << "PickupSpawner (&" << this << "): Pickupable has no target." << std::endl;
                 
                 if(pickup == NULL)
                 {
-                    COUT(1) << "PickupSpawner: getPickup produced an error, no Pickupable created." << std::endl;
+                    COUT(1) << "PickupSpawner (&" << this << "): getPickup produced an error, no Pickupable created." << std::endl;
                 }
                 else
                 {
@@ -351,7 +351,7 @@
     */
     void PickupSpawner::respawnTimerCallback()
     {
-        COUT(3) << "PickupSpawner reactivated." << std::endl;
+        COUT(4) << "PickupSpawner (&" << this << ") reactivated." << std::endl;
 
         this->setActive(true);
     }

Modified: code/branches/presentation3/src/orxonox/controllers/DroneController.cc
===================================================================
--- code/branches/presentation3/src/orxonox/controllers/DroneController.cc	2010-05-31 07:21:07 UTC (rev 7037)
+++ code/branches/presentation3/src/orxonox/controllers/DroneController.cc	2010-05-31 07:24:33 UTC (rev 7038)
@@ -96,7 +96,7 @@
 
     }
 
-    /*
+    /**
     @brief
         The controlling happens here. This method defines what the controller has to do each tick.
     @param dt




More information about the Orxonox-commit mailing list