[Orxonox-commit 4335] r9006 - in code/branches/presentation2011: data/levels src/orxonox/controllers

jo at orxonox.net jo at orxonox.net
Tue Dec 20 00:03:22 CET 2011


Author: jo
Date: 2011-12-20 00:03:21 +0100 (Tue, 20 Dec 2011)
New Revision: 9006

Added:
   code/branches/presentation2011/data/levels/presentationHS11.oxw
Modified:
   code/branches/presentation2011/data/levels/asteroidField.oxw
   code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc
   code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h
   code/branches/presentation2011/src/orxonox/controllers/FormationController.cc
Log:
Repairing setbotlevel command. Start of a presentation level.

Modified: code/branches/presentation2011/data/levels/asteroidField.oxw
===================================================================
--- code/branches/presentation2011/data/levels/asteroidField.oxw	2011-12-19 13:43:04 UTC (rev 9005)
+++ code/branches/presentation2011/data/levels/asteroidField.oxw	2011-12-19 23:03:21 UTC (rev 9006)
@@ -2,7 +2,7 @@
  name = "asteroidFieldTest"
  description = "Test of the asteroidField generator."
   screenshot = "asteroidFieldTest.png"
- tags = ""
+ tags = "test, showcase"
 />
 
 <?lua

Added: code/branches/presentation2011/data/levels/presentationHS11.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationHS11.oxw	                        (rev 0)
+++ code/branches/presentation2011/data/levels/presentationHS11.oxw	2011-12-19 23:03:21 UTC (rev 9006)
@@ -0,0 +1,47 @@
+<LevelInfo
+ name = "Presentation HS 2011"
+ description = "Oxonox Proudly Presents New Features From HS 2011"
+ tags = "presentation"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/skyBoxMoreNebula"
+  >
+
+    <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 team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+
+<!-- Generate asteroid field and asteroid belt -->
+<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) --> 
+    <?lua
+    	dofile("includes/asteroidField.lua")
+    	asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
+
+    ?>
+
+
+
+
+<!--    	asteroidBelt(0, 0, 0, 0, 0, 70, 100, 200, 22000, 20000, 500, 1) -->
+  </Scene>
+</Level>
+

Modified: code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc	2011-12-19 13:43:04 UTC (rev 9005)
+++ code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc	2011-12-19 23:03:21 UTC (rev 9006)
@@ -28,6 +28,7 @@
 
 #include "ArtificialController.h"
 #include "core/CoreIncludes.h"
+#include "core/command/ConsoleCommand.h"
 #include "worldentities/pawns/Pawn.h"
 #include "worldentities/pawns/SpaceShip.h"
 
@@ -40,6 +41,7 @@
 
 namespace orxonox
 {
+    SetConsoleCommand("ArtificialController", "setbotlevel",      &ArtificialController::setAllBotLevel);
 
     ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator)
     {
@@ -112,7 +114,6 @@
             this->targetDied();
     }
 
-//****************************************************************************************** NEW
     /**
         @brief DoFire is called when a bot should shoot and decides which weapon is used and whether the bot shoots at all.
     */

Modified: code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h	2011-12-19 13:43:04 UTC (rev 9005)
+++ code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h	2011-12-19 23:03:21 UTC (rev 9006)
@@ -32,6 +32,7 @@
 #include "OrxonoxPrereqs.h"
 #include "controllers/FormationController.h"
 
+
 namespace orxonox
 {
     class _OrxonoxExport ArtificialController : public FormationController
@@ -43,7 +44,7 @@
             void abandonTarget(Pawn* target);
 
             virtual void changedControllableEntity();
-//************************************************************************* NEW 
+
             virtual void doFire();
             void setBotLevel(float level=1.0f);
             inline float getBotLevel() const
@@ -68,7 +69,7 @@
 
             bool isCloseAtTarget(float distance) const;
             bool isLookingAtTarget(float angle) const;
-//************************************************************************* NEW 
+
             float botlevel_; //<! Makes the level of a bot configurable.
             enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes
             Mode mode_; //TODO: replace single value with stack-like implementation: std::vector<Mode> mode_;

Modified: code/branches/presentation2011/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/FormationController.cc	2011-12-19 13:43:04 UTC (rev 9005)
+++ code/branches/presentation2011/src/orxonox/controllers/FormationController.cc	2011-12-19 23:03:21 UTC (rev 9006)
@@ -85,7 +85,7 @@
         this->specificMasterActionHoldCount_  = 0;
         this->bShooting_ = false;
         this->bHasTargetPosition_ = false;
-	this->bHasTargetOrientation_=false;
+        this->bHasTargetOrientation_=false;
         this->speedCounter_ = 0.2f;
         this->targetPosition_ = Vector3::ZERO;
         this->team_=-1;




More information about the Orxonox-commit mailing list