[Orxonox-commit 7044] r11663 - in code/branches/CampaignMap_HS17: data/levels data/levels/templates src/modules/overlays/hud src/orxonox/gametypes src/orxonox/worldentities/pawns

fanconic at orxonox.net fanconic at orxonox.net
Mon Dec 11 17:39:48 CET 2017


Author: fanconic
Date: 2017-12-11 17:39:48 +0100 (Mon, 11 Dec 2017)
New Revision: 11663

Modified:
   code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw
   code/branches/CampaignMap_HS17/data/levels/templates/StoryModeEscort.oxt
   code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc
   code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.cc
   code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.h
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.cc
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.h
Log:
Changes in the Cameraorientation aswell as new objects inside the level

Modified: code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/data/levels/NC_StoryModeLevel.oxw	2017-12-11 16:39:48 UTC (rev 11663)
@@ -27,26 +27,38 @@
     skybox       = "Orxonox/Starbox"
   >
 
-  <SpawnPoint position="000.000, 000.000, 1000.000" spawnclass=StoryModePawn orientation="0, 0, 0, 1" pawndesign= StoryModeEscort />
-   
+  <SpawnPoint position="000.000, 000.000, 000.000" spawnclass=StoryModePawn orientation="0, 0, 0, 1" pawndesign=StoryModeEscort /> 
 
- <StoryModePlanet levelName="plizzanet1" position="0,0,0" direction="0,0,0">
+ <StoryModePlanet levelName="Level 1" position="0,0,-500" direction="1,0,0">
   <attached>
-    <Model position="0,0,0" mesh="planets/moon.mesh" scale=100 />
+    <Model position="0,0,0" mesh="ETH.mesh" scale=80 />
   </attached>
  </StoryModePlanet>
 
-<StoryModePlanet levelName="plizzanet2" position="600,0,0" direction="0,0,0">
+<StoryModePlanet levelName="Level 2" position="500,0,-1000" direction="0,0,0">
   <attached>
-    <Model position="0,0,0" mesh="planets/moon.mesh" scale=100 />
+    <Model position="0,0,0" mesh="planets/moon.mesh" scale=50 />
   </attached>
  </StoryModePlanet>
     
-<StoryModePlanet levelName="plizzanet3" position="1200,0,0" direction="0,0,0">
+<StoryModePlanet levelName="Level 3" position="-500,0,-1000" direction="0,1,0">
   <attached>
-    <Model position="0,0,0" mesh="planets/moon.mesh" scale=100 />
+    <Model position="0,0,0" mesh="can.mesh" scale=50 />
   </attached>
 </StoryModePlanet>
+
+<StoryModePlanet levelName="Level 4" position="1000,0,-1500" direction="0,0,0">
+  <attached>
+    <Model position="0,0,0" mesh="cube.mesh" scale=50 />
+  </attached>
+ </StoryModePlanet>
+
+ <StoryModePlanet levelName="Level 5" position="-1000,0,-1500" direction="0,0,0">
+  <attached>
+    <Model position="0,0,0" mesh="Pilz.mesh" scale=50 />
+  </attached>
+ </StoryModePlanet>
+
   
   </Scene>
 </Level>

Modified: code/branches/CampaignMap_HS17/data/levels/templates/StoryModeEscort.oxt
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/templates/StoryModeEscort.oxt	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/data/levels/templates/StoryModeEscort.oxt	2017-12-11 16:39:48 UTC (rev 11663)
@@ -1,7 +1,7 @@
 <Template name=StoryModeEscort>
   <StoryModePawn
    hudtemplate            = StoryModeHUD2
-   camerapositiontemplate = spaceshipghostcameras
+   camerapositiontemplate = spaceshipescortcameras
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
    explosionchunks        = 10
@@ -76,9 +76,9 @@
 <Template name=spaceshipescortcameras defaults=0>
   <StoryModePawn>
     <camerapositions>
-      <CameraPosition position="0,0, 1000" drag=true mouselook=true />
-      <CameraPosition position="0,20, 90" drag=true mouselook=true />
-      <CameraPosition position="0,30,120" drag=true mouselook=true />
+      <CameraPosition position="0, 500, 400" drag=true mouselook=false />
+      <CameraPosition position="0,20, 90" drag=true mouselook=false />
+      <CameraPosition position="0,30,120" drag=true mouselook=false />
     </camerapositions>
   </StoryModePawn>
 </Template>

Modified: code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/src/modules/overlays/hud/StoryModeHUD.cc	2017-12-11 16:39:48 UTC (rev 11663)
@@ -53,6 +53,7 @@
 #include "worldentities/WorldEntity.h"
 #include "core/config/ConfigValueIncludes.h"
 #include "tools/TextureGenerator.h"
+#include "controllers/NewHumanController.h"
 
 #include "worldentities/StoryModePlanet.h"
 
@@ -90,7 +91,9 @@
         float xScale = this->getActualSize().x;
         float yScale = this->getActualSize().y;
 
-        
+        //Sets the Camera angle at 30 degrees above it, so levels can be seen better    
+        CameraManager::getInstance().getActiveCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
+
         int i = 0;
         for(StoryModePlanet* planet : ObjectList<StoryModePlanet>()){
 
@@ -101,11 +104,6 @@
             texts.push_back(text);
             texts[i]->setDimensions(xScale, yScale);
 
-            //PROBLEM: function doesn't get called automatically by the xml macro,
-            //which is why we need to call it manually here. works with storymodeplanet.h...
-            //this->setFont("Monofur");
-            //this->setTextSize(0.05f);
-
             //font name of the text needs to be set here, not in the xml setter function
             texts[i]->setFontName(this->fontName_);
             texts[i]->setCharHeight(this->textSize_ * yScale);

Modified: code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.cc	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.cc	2017-12-11 16:39:48 UTC (rev 11663)
@@ -30,6 +30,7 @@
 
 #include "items/Engine.h"
 #include "controllers/ArtificialController.h"
+#include "controllers/NewHumanController.h"
 
 #include "core/CoreIncludes.h"
 #include "core/command/ConsoleCommandIncludes.h"
@@ -47,6 +48,7 @@
     StoryMode::StoryMode(Context* context) : Gametype(context)
     {
         RegisterObject(StoryMode);
+        orxout() << "kill yourself1";
 
         this->gtinfo_ = new GametypeInfo(context);
         this->bAutoStart_ = true;
@@ -64,7 +66,6 @@
 */
     void StoryMode::exit()
     {
-        orxout() << "s funktioniert"<< endl;
         for (StoryMode* mission : ObjectList<StoryMode>())
         { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
             mission->end();
@@ -71,6 +72,7 @@
         }
         //Gametype::end();
     }
+
 /*
     void Mission::setTeams()
     { //Set pawn-colours

Modified: code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.h
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.h	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/src/orxonox/gametypes/StoryMode.h	2017-12-11 16:39:48 UTC (rev 11663)
@@ -40,6 +40,7 @@
             StoryMode(Context* context);
             virtual ~StoryMode() {}
             static void exit();
+//            virtual void playerEntered(PlayerInfo* player);
 
             
     };

Modified: code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.cc	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.cc	2017-12-11 16:39:48 UTC (rev 11663)
@@ -52,8 +52,9 @@
 
     void StoryModePawn::moveFrontBack(const Vector2& value)
         {
+            //this->getCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
             Vector3 newPos = this->getCamera()->getPosition();
-            newPos.y += value.x;
+            newPos.z -= 5*value.x;
             this->getCamera()->setPosition(newPos);
         }
 
@@ -60,7 +61,7 @@
     void StoryModePawn::moveRightLeft(const Vector2& value)
         {   
             Vector3 newPos = this->getCamera()->getPosition();
-            newPos.x += value.x;
+            newPos.x += 5*value.x;
             this->getCamera()->setPosition(newPos);
         }
 

Modified: code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.h
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.h	2017-12-11 15:35:38 UTC (rev 11662)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/pawns/StoryModePawn.h	2017-12-11 16:39:48 UTC (rev 11663)
@@ -20,7 +20,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Cyrill Burgener
+ *      Claudio Fanconi & Nikola Bolt
  *
  */
 



More information about the Orxonox-commit mailing list