[Orxonox-commit 1926] r6643 - in code/branches/ppspickups1: data/levels/templates src/modules/pickup src/modules/pickup/items src/orxonox/interfaces src/orxonox/items

ebeier at orxonox.net ebeier at orxonox.net
Mon Mar 29 16:39:26 CEST 2010


Author: ebeier
Date: 2010-03-29 16:39:25 +0200 (Mon, 29 Mar 2010)
New Revision: 6643

Modified:
   code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt
   code/branches/ppspickups1/src/modules/pickup/Pickup.cc
   code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc
   code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h
   code/branches/ppspickups1/src/orxonox/items/Engine.h
   code/branches/ppspickups1/src/orxonox/items/MultiStateEngine.cc
Log:
engine stripes now working correctly

Modified: code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt
===================================================================
--- code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt	2010-03-29 14:35:06 UTC (rev 6642)
+++ code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt	2010-03-29 14:39:25 UTC (rev 6643)
@@ -3,9 +3,9 @@
         <spawner-representation>
             <StaticEntity>
                 <attached>
-                    <Billboard position="0,0,0" colour="1.0,0.0,0.0" material="Sphere2" scale=0.1>
+                    <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
                         <attached>
-                            <Billboard position="0,0,0" colour="1.0,1.0,0.0" material="Cross" scale=0.7 />
+                            <Billboard position="0,0,0" colour="0.90,0.90,0.10" material="3arrowsup" scale=0.7 />
                         </attached>
                     </Billboard>
                 </attached>
@@ -17,7 +17,7 @@
 <Template name=smallspeedpickup>
   <SpeedPickup
     duration = 10.0
-    speedAdd = 0
+    speedAdd = 100
     SpeedMultiply = 10
     activationType = "immediate"
     durationType = "once"

Modified: code/branches/ppspickups1/src/modules/pickup/Pickup.cc
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/Pickup.cc	2010-03-29 14:35:06 UTC (rev 6642)
+++ code/branches/ppspickups1/src/modules/pickup/Pickup.cc	2010-03-29 14:39:25 UTC (rev 6643)
@@ -244,7 +244,7 @@
             COUT(1) << "Invalid durationTime in pickup." << std::endl;
             return false;
         }
-        if (false) /* How to check if Timer already running? */
+        if (false) /* TODO: Check if Timer is already running */
         {
             COUT(1) << "Pickup durationTimer already in use." << std::endl;
             return false;

Modified: code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc	2010-03-29 14:35:06 UTC (rev 6642)
+++ code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc	2010-03-29 14:39:25 UTC (rev 6643)
@@ -250,6 +250,6 @@
     }
 
     void SpeedPickup::PickupTimerCallBack(void) {
-        COUT(2) << "Timer ended!" << std::endl;
+        /* Reset values */
     }
 }

Modified: code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h	2010-03-29 14:35:06 UTC (rev 6642)
+++ code/branches/ppspickups1/src/orxonox/interfaces/PickupCarrier.h	2010-03-29 14:39:25 UTC (rev 6643)
@@ -45,7 +45,12 @@
 #include "core/OrxonoxClass.h"
 
 namespace orxonox
-{
+{
+    class Pickupable;
+    class Pickup;
+    class HealthPickup;
+    class MetaPickup;
+    class SpeedPickup;
 
     /**
     @brief

Modified: code/branches/ppspickups1/src/orxonox/items/Engine.h
===================================================================
--- code/branches/ppspickups1/src/orxonox/items/Engine.h	2010-03-29 14:35:06 UTC (rev 6642)
+++ code/branches/ppspickups1/src/orxonox/items/Engine.h	2010-03-29 14:39:25 UTC (rev 6643)
@@ -114,7 +114,7 @@
 
             virtual const Vector3& getCarrierPosition(void);
 
-            /* not in protected ?? */
+            /* Should not be here */
             inline void setSpeedAdd(float speedAdd)
                 { this->speedAdd_=speedAdd; }
             inline void setSpeedMultiply(float speedMultiply)

Modified: code/branches/ppspickups1/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/branches/ppspickups1/src/orxonox/items/MultiStateEngine.cc	2010-03-29 14:35:06 UTC (rev 6642)
+++ code/branches/ppspickups1/src/orxonox/items/MultiStateEngine.cc	2010-03-29 14:39:25 UTC (rev 6643)
@@ -128,6 +128,9 @@
                     this->state_ = Brake;
                 else
                     this->state_ = Idle;
+
+                if (this->state_ = Idle && this->getSpeedAdd()>0)
+                    this->state_ = Normal;
             }
 
             if (GameMode::isMaster())




More information about the Orxonox-commit mailing list