[Orxonox-commit 5111] r9776 - in code/branches/spacestationentry: data/levels src/orxonox/infos

agermann at orxonox.net agermann at orxonox.net
Mon Nov 11 15:55:34 CET 2013


Author: agermann
Date: 2013-11-11 15:55:34 +0100 (Mon, 11 Nov 2013)
New Revision: 9776

Modified:
   code/branches/spacestationentry/data/levels/docking.oxw
   code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw
   code/branches/spacestationentry/src/orxonox/infos/PlayerInfo.cc
Log:
Hack - Spacestation Docking mit abdocken funktioniert.

Modified: code/branches/spacestationentry/data/levels/docking.oxw
===================================================================
--- code/branches/spacestationentry/data/levels/docking.oxw	2013-11-11 14:47:10 UTC (rev 9775)
+++ code/branches/spacestationentry/data/levels/docking.oxw	2013-11-11 14:55:34 UTC (rev 9776)
@@ -1,3 +1,4 @@
+<!-- -->
 <LevelInfo
  name = "Transporter"
  description = "Level with a Transporter. Demonstrates the docking system."

Modified: code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw
===================================================================
--- code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw	2013-11-11 14:47:10 UTC (rev 9775)
+++ code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw	2013-11-11 14:55:34 UTC (rev 9776)
@@ -70,24 +70,7 @@
       </collisionShapes>
     </StaticEntity>
 
-<!-- Wuerfel -->
-
-  <StaticEntity position="0,-10000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
-      <attached>
-        <Model position="0,0,0" mesh="crate.mesh" scale3D="50,50,5" />
-        
-      </attached>
-      <collisionShapes>
-        <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
-      </collisionShapes>
-  </StaticEntity>
-<ForceField position="2500,-100000,2500" mode="sphere" diameter="182000" velocity="-5000" />
-<ForceField position="2500,-100000,-2500" mode="sphere" diameter="182000" velocity="-5000" />
-<ForceField position="-2500,-100000,2500" mode="sphere" diameter="182000" velocity="-5000" />
-<ForceField position="-2500,-100000,-2500" mode="sphere" diameter="182000" velocity="-5000" />
-
-
-   <!-- Docking -->
+   <!-- Docking (Andocken) -->
     <Dock position="2830,20,50" roll=0 yaw=0 >
         <animations>
             <MoveToDockingTarget target="destroyer" />
@@ -139,7 +122,7 @@
       </attached>
     </SpaceShip-->
     
-<FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-9900,0" >
+<FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-1900,0" >
       <attached>
         <DockingTarget name="spaceShip" />
         <DistanceTriggerBeacon name="bcnDestroyer" />
@@ -147,6 +130,47 @@
       </attached>
 </FpsPlayer>
 
+<!-- Wuerfel -->
+
+  <StaticEntity position="0,-2000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
+      <attached>
+        <Model position="0,0,0" mesh="crate.mesh" scale3D="22,22,5" />
+        
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+      </collisionShapes>
+  </StaticEntity>
+
+<!-- Schwerkraftfeld -->
+
+<ForceField position="2500,-92000,2500" mode="sphere" diameter="182000" velocity="-5000" />
+<ForceField position="2500,-92000,-2500" mode="sphere" diameter="182000" velocity="-5000" />
+<ForceField position="-2500,-92000,2500" mode="sphere" diameter="182000" velocity="-5000" />
+<ForceField position="-2500,-92000,-2500" mode="sphere" diameter="182000" velocity="-5000" />
+
+<!-- Ausgang -->
+
+  <StaticEntity position="120,-1950,120" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
+      <attached>
+        <Model position="0,0,0" mesh="cube.mesh" scale3D="4,4,4" />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="4,4,4" />
+      </collisionShapes>
+  </StaticEntity>
+
+<DistanceTrigger name="ausgang" position="120,-1950,120"  target="Pawn" distance=50 stayActive="false" delay=0 />
+    <Script code="undock" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event=ausgang />
+            </trigger>
+        </events>
+    </Script>
+
+
+
     <!-- triple large belt around the planet  -->
     <?lua
         dofile("includes/asteroidField.lua")

Modified: code/branches/spacestationentry/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/spacestationentry/src/orxonox/infos/PlayerInfo.cc	2013-11-11 14:47:10 UTC (rev 9775)
+++ code/branches/spacestationentry/src/orxonox/infos/PlayerInfo.cc	2013-11-11 14:55:34 UTC (rev 9776)
@@ -228,7 +228,13 @@
         if (!entity)
             return;
 
-        this->controllableEntity_->getController()->setActive(false);
+        Controller* tmp =this->controllableEntity_->getController();
+        if (tmp == NULL)
+        {
+        	orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is NULL " << endl;
+        	return;
+        }
+        tmp->setActive(false);
         //this->controllableEntity_->getController()->setControllableEntity(NULL);
         this->controllableEntity_->setController(0);
     }




More information about the Orxonox-commit mailing list