[Orxonox-commit 7159] r11776 - in code/branches/Presentation_HS17_merge: data/levels data/overlays src/modules/overlays/hud src/modules/questsystem src/orxonox/controllers src/orxonox/graphics src/orxonox/worldentities
landauf at orxonox.net
landauf at orxonox.net
Mon Feb 19 00:34:42 CET 2018
Author: landauf
Date: 2018-02-19 00:34:42 +0100 (Mon, 19 Feb 2018)
New Revision: 11776
Removed:
code/branches/Presentation_HS17_merge/data/overlays/HUDTemplate_test.oxo
code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.cc
code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.h
code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.cc
code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.h
code/branches/Presentation_HS17_merge/src/orxonox/controllers/WaypointArrow.cc
code/branches/Presentation_HS17_merge/src/orxonox/controllers/WaypointArrow.h
code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.cc
code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.h
Modified:
code/branches/Presentation_HS17_merge/data/levels/emptyLevel.oxw
code/branches/Presentation_HS17_merge/data/levels/tutorial.oxw
code/branches/Presentation_HS17_merge/src/modules/overlays/hud/CMakeLists.txt
code/branches/Presentation_HS17_merge/src/modules/questsystem/Quest.cc
code/branches/Presentation_HS17_merge/src/orxonox/controllers/CMakeLists.txt
code/branches/Presentation_HS17_merge/src/orxonox/graphics/Model.cc
code/branches/Presentation_HS17_merge/src/orxonox/worldentities/CMakeLists.txt
Log:
[Waypoints_HS17] removed/reverted a huge number of unwanted changes
Modified: code/branches/Presentation_HS17_merge/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/Presentation_HS17_merge/data/levels/emptyLevel.oxw 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/data/levels/emptyLevel.oxw 2018-02-18 23:34:42 UTC (rev 11776)
@@ -13,11 +13,6 @@
<?lua
include("templates/spaceshipEscort.oxt")
- include("templates/endurancetest_template.oxt")
- include("templates/spaceshipPirate.oxt")
- include("templates/spaceshipAssff.oxt")
-
-
?>
<Level>
@@ -26,31 +21,14 @@
</templates>
<?lua include("includes/notifications.oxi") ?>
- <NotificationQueueCEGUI
- name="narrative"
- targets="simpleNotification"
- size=3
- displayTime=3.9
- position="0.2, 0, 0.1, 0"
- fontSize="23"
- fontColor="0.3, 1, 0.2, 0.8"
- alignment="HorzCentred"
- displaySize="0.6, 0, 0, 0"
- />
-
- <Scene
- ambientlight = "0.5, 0.5, 0.5"
- skybox = "Orxonox/Starbox"
+ <Scene
+ ambientlight = "0.8, 0.8, 0.8"
+ skybox = "Orxonox/Starbox"
>
-
- <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" />
-
-
+ <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=spaceshipescort />
- <SpawnPoint position="50,0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
-
-
</Scene>
</Level>
Modified: code/branches/Presentation_HS17_merge/data/levels/tutorial.oxw
===================================================================
--- code/branches/Presentation_HS17_merge/data/levels/tutorial.oxw 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/data/levels/tutorial.oxw 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,8 +1,9 @@
<LevelInfo
name = "Coding Tutorial"
description = "Level for the coding tutorial."
- tags = "tutorial"
+ tags = "tutorial, shipselection"
screenshot = "codingtutorial.png"
+ startingships = "spaceshipassff, spaceshipghost, spaceshipspacecruiser"
/>
<?lua
@@ -9,6 +10,8 @@
include("HUDTemplates3.oxo")
include("stats.oxo")
include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipGhost.oxt")
+ include("templates/spaceshipSpacecruiser.oxt")
include("templates/lodInformation.oxt")
?>
@@ -20,34 +23,89 @@
<Scene
ambientlight = "0.5, 0.5, 0.5"
- skybox = "Orxonox/Starbox"
+ skybox = "Orxonox/skyBoxBasic"
>
+<Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
+ <attached>
+ <Model scale="1" mesh="drone.mesh"/>
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />
+ </collisionShapes>
+</Drone>
+ <Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
+ <attached>
+ <Model scale="1" mesh="rocket.mesh"/>
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />
+ </collisionShapes>
+ </Drone>
<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" />
+ <Model mesh="hs-w01.mesh" scale=10 position="0,0,-100" />
+ <Model mesh="hs-w01s.mesh" scale=10 position="0,0,-100" />
<?lua
for i = 1, 10, 1 do
?>
- <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+ <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=shipselection />
<?lua end ?>
-
- <AutonomousDroneController>
- </AutonomousDroneController>
-
- <AutonomousDrone mass=50 linearDamping=0.9 angularDamping=0.7>
- <attached>
- <Model scale="10" mesh="drone.mesh"/>
- </attached>
-
+ <GlobalShader compositor="Bloom" visible=false>
+ <events>
+ <visibility>
+ <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
+ </visibility>
+ </events>
+ </GlobalShader>
+ <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
+ <StaticEntity position="0,0,0" collisionType=static>
<collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />
+ <SphereCollisionShape radius="20" />
</collisionShapes>
- </AutonomousDrone>
+ </StaticEntity>
+<!--
+ <?lua
+ for i = 1, 70, 1 do
+ ?>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 1000 + 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * -1000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 1000 + 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * -1000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * 1000 + 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <MovableEntity position="<?lua print(math.random() * -1000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+ <attached>
+ <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
+ </attached>
+ </MovableEntity>
+ <?lua end ?>
+-->
+
</Scene>
</Level>
Deleted: code/branches/Presentation_HS17_merge/data/overlays/HUDTemplate_test.oxo
===================================================================
--- code/branches/Presentation_HS17_merge/data/overlays/HUDTemplate_test.oxo 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/data/overlays/HUDTemplate_test.oxo 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,226 +0,0 @@
-<!--
-<Template name="defaultHUD">
- <OverlayGroup name = "defaultHUD" scale = "1, 1">
- <ChatOverlay
- name = "chat"
- position = "0.03, 0.5"
- font = "VeraMono"
- caption = ""
- textsize = 0.025
- />
-
- <GametypeStatus
- name = "state"
- position = "0.5, 0.85"
- font = "VeraMono"
- textsize = 0.05
- colour = "1.0, 1.0, 0.0, 0.8"
- align = "center"
- />
- </OverlayGroup>
-</Template>
--->
-
-<Template name="spectatorhud">
- <OverlayGroup name = "spectatorhud" scale = "1, 1">
- </OverlayGroup>
-</Template>
-
-<Template name="rockethud">
- <OverlayGroup name = "rockethud" scale = "1, 1">
- <HUDRocketFuelBar
- name = "RocketFuelBar1"
- background = "Orxonox/BarBackground"
- size = "0.40, 0.04"
- position = "0.0 , 1.0 "
- pickpoint = "0, 1"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconFuel"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </HUDRocketFuelBar>
- </OverlayGroup>
-</Template>
-
-<Template name="spaceshiphud">
- <OverlayGroup name = "spaceshiphud" scale = "1, 1">
- <Map />
-
- <HUDHealthBar
- name = "HealthBar1"
- background = "Orxonox/HealthBarBackground"
- size = "0.40, 0.08"
- position = "0.0 , 0.85 "
- pickpoint = "0, 1"
- bartexture = "healthbar_bar.png"
- textfont = "VeraMono"
- textusebarcolour = true
- textscale = 0.4
- textoffset = "0.325, -0.825"
- textpickpoint = "0, 0"
- textalign = "right"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconHealth"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </HUDHealthBar>
-
- <HUDShieldBar
- name = "ShieldBar1"
- background = "Orxonox/BarBackground"
- size = "0.40, 0.04"
- position = "0.0 , 0.9 "
- pickpoint = "0, 1"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconShield"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </HUDShieldBar>
-
- <HUDSpeedBar
- name = "SpeedBar1"
- background = "Orxonox/BarBackground"
- size = "0.40, 0.04"
- position = "0.0 , 0.95 "
- pickpoint = "0, 1"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconSpeed"
- >
- <BarColour position = 0.0 colour = "0.7,0.5,0.2" />
- <BarColour position = 0.5 colour = "0.2,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.7,0.2,0.2" />
- </HUDSpeedBar>
-
- <HUDBoostBar
- name = "BoostBar1"
- background = "Orxonox/BarBackground"
- size = "0.40, 0.04"
- position = "0.0 , 1.0 "
- pickpoint = "0, 1"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconBoost"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </HUDBoostBar>
-
- <HUDEnemyHealthBar
- name = "EnemyHealthBar"
- background = "Orxonox/HealthBarBackground"
- size = "0.4, 0.08"
- position = "1 ,0"
- pickpoint = "1, 0"
- bartexture = "healthbar_bar.png"
- textfont = "VeraMono"
- textusebarcolour = true
- textscale = 0.4
- textoffset = "-0.675, 0.175"
- textpickpoint = "0, 0"
- textalign = "right"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconHealth"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </HUDEnemyHealthBar>
-
- <HUDEnemyShieldBar
- name = "EnemyShieldBar1"
- background = "Orxonox/BarBackground"
- size = "0.40, 0.04"
- position = "1.0 , 0.1 "
- pickpoint = "1, 0"
- correctaspect = true
- iconmaterial = "Orxonox/BarIconShield"
- >
- <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
- <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
- </HUDEnemyShieldBar>
-
- <HUDNavigation
- name = "Navigation"
- correctaspect = true
- font = "Monofur"
- textsize = 0.02
- navMarkerSize = 0.03
- aimMarkerSize = 0.02
- />
-
- <HUDRadar
- name = "Radar"
- background = "Orxonox/Radar3D"
- material2D = "Orxonox/Radar"
- material3DMiddle = "Orxonox/Radar3D"
- material3DFront = "Orxonox/Radar3DFront"
- material3DBack = "Orxonox/Radar3DBack"
- correctaspect = true
- size = "0.17, 0.17"
- position = "1.0, 1.0"
- pickpoint = "1.0, 1.0"
- rotation = 0
- sensitivity = 1.0
- halfDotSizeDistance = 3000
- detectionLimit = 10000.0
- maximumDotSize = 0.1
- maximumDotSize3D = 0.06
- mapAngle3D = 0.6435011
- />
-
- <HUDWeaponSystem
- name = "WeaponSystem"
- correctaspect = true
- position = "0.01, 0.01"
- pickpoint = "0, 0"
- visible = "true"
- weaponModeHUDSize = "0.09, 0.03"
- />
-
- <HUDPickupSystem
- name = "PickupSystem"
- correctaspect = true
- position = "0.32, 0.81"
- pickpoint = "0.0, 0.0"
- visible = "false"
- />
-
- <HUDWaypoints
- name = "Waypoints"
- correctaspect = true
- position = "0.32, 0.81"
- pickpoint = "0.0, 0.0"
- visible = "true"
- />
-
-
- <HUDTimer
- name = "Timer"
- position = "0.5, 0.25"
- font = "VeraMono"
- textsize = 0.1
- colour = "1.0, 1.0, 0.0, 0.8"
- align = "center"
- />
-
- <GUIOverlay
- name = "QuestGUI"
- guiname = "QuestGUI"
- visible = "false"
- />
-
- <GUIOverlay
- name = "PickupInventory"
- guiname = "PickupInventory"
- visible = "false"
- />
-
- </OverlayGroup>
-</Template>
Modified: code/branches/Presentation_HS17_merge/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/overlays/hud/CMakeLists.txt 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/modules/overlays/hud/CMakeLists.txt 2018-02-18 23:34:42 UTC (rev 11776)
@@ -10,7 +10,6 @@
HUDTimer.cc
HUDEnemyHealthBar.cc
HUDEnemyShieldBar.cc
- HUDWaypoints.cc
HUDWeaponMode.cc
HUDWeapon.cc
HUDWeaponSystem.cc
Deleted: code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.cc 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.cc 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,41 +0,0 @@
-
-
-
-
-#include <vector>
-#include <string>
-
-#include "HUDWaypoints.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "util/Convert.h"
-#include "core/class/Super.h"
-#include "pickup/Pickup.h"
-#include "pickup/PickupManager.h"
-
-namespace orxonox
-{
- RegisterClass(HUDWaypoints);
-
- HUDWaypoints::HUDWaypoints(Context* context) : OrxonoxOverlay(context)
- {
- RegisterObject(HUDWaypoints);
-
- overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWaypoints" + getUniqueNumberString()));
- overlayElement_->setMaterialName("PickupBar");
- overlayElement_->setPosition(0.0f,0.0f);
- overlayElement_->setDimensions(0.35f,0.075f);
- this->background_->addChild(overlayElement_);
- }
-
-
- HUDWaypoints::~HUDWaypoints()
- {
- /* if (this->isInitialized())
- {
- this->picks.clear();
- }*/
- }
-
-
-}
Deleted: code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.h 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/modules/overlays/hud/HUDWaypoints.h 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,68 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Patrick Wintermeyer
- * Co-authors:
- * ...
- *
- */
-
-
-#ifndef _HUDWaypoints_H__
-#define _HUDWaypoints_H__
-
-#include "overlays/OverlaysPrereqs.h"
-
-#include <map>
-#include <vector>
-#include <string>
-
-
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
-
-#include "overlays/OrxonoxOverlay.h"
-#include "worldentities/pawns/Pawn.h"
-#include "overlays/OverlayGroup.h"
-#include "pickup/Pickup.h"
-#include "pickup/PickupRepresentation.h"
-
-namespace orxonox
-{
- class _OverlaysExport HUDWaypoints : public OrxonoxOverlay
- {
- public:
- HUDWaypoints(Context* context);
- virtual ~HUDWaypoints();
-
- bool repaint=false; //if we shouldnt repaint, set this to false
-
- private:
-
- Ogre::PanelOverlayElement* overlayElement_;
- WeakPtr<Pawn> owner_;
-
- std::vector<PickupRepresentation> pickupRepresentations_;
- };
-}
-
-#endif
Modified: code/branches/Presentation_HS17_merge/src/modules/questsystem/Quest.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/questsystem/Quest.cc 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/modules/questsystem/Quest.cc 2018-02-18 23:34:42 UTC (rev 11776)
@@ -79,21 +79,10 @@
XMLPortObject(Quest, QuestHint, "hints", addHint, getHint, xmlelement, mode);
XMLPortObject(Quest, QuestEffect, "fail-effects", addFailEffect, getFailEffect, xmlelement, mode);
XMLPortObject(Quest, QuestEffect, "complete-effects", addCompleteEffect, getCompleteEffect, xmlelement, mode);
- //XMLPortObject(Quest, Worldentity, "arrowtarget", addArrowTarget, getArrowTarget, xmlelement, mode);
QuestManager::getInstance().registerQuest(this); // Registers the Quest with the QuestManager.
}
-
- /*bool Quest::addArrowTarget(Quest* quest){
-
- assert(quest);
-
-
- }*/
-
-
-
/**
@brief
Sets the parent-quest of the Quest.
Deleted: code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.cc 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.cc 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,111 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Oli Scheuss
- * Co-authors:
- * Damian 'Mozork' Frick
- *
- */
-
-#include "AutonomousDroneController.h"
-
-#include "worldentities/AutonomousDrone.h"
-#include "util/Math.h"
-
-namespace orxonox
-{
- //TODO: Put your code in here:
- // Create the factory for the drone controller.
- RegisterClass(AutonomousDroneController);
-
-
- /**
- @brief
- Constructor.
- @param context
- The context of this object.
- */
- AutonomousDroneController::AutonomousDroneController(Context* context) : Controller(context)
- {
- //TODO: Place your code here:
- RegisterObject(AutonomousDroneController);
-
-
- // Make sure to register the object and create the factory.
-
- // This checks that our context really is a drone
- // and saves the pointer to the drone for the controlling commands
- /* NOTE from Sandro: This is currently broken */
- //AutonomousDrone* drone = dynamic_cast<AutonomousDrone*>(context);
- //assert(drone != nullptr);
- //this->setControllableEntity(drone);
- }
-
- /**
- @brief
- Destructor.
- */
- AutonomousDroneController::~AutonomousDroneController()
- {
-
- }
-
- /**
- @brief
- The controlling happens here. This method defines what the controller has to do each tick.
- @param dt
- The duration of the tick.
- */
- void AutonomousDroneController::tick(float dt)
- {
- /* NOTE: Ugly hack by Sandro to make the tutorial work for the moment.
- * This will be reverted once the framework update is complete
- */
- //AutonomousDrone *myDrone = static_cast<AutonomousDrone*>(this->getControllableEntity());
- ObjectList<AutonomousDrone> objectList;
- ObjectList<AutonomousDrone>::iterator it = objectList.begin();
- AutonomousDrone* myDrone = *it;
-
- if (myDrone != nullptr)
- {
-
-
- //myDrone -> moveFrontBack(50*dt);
- myDrone -> rotateRoll(2*dt);
-
- myDrone -> rotateYaw(2*dt);
-
-
- //TODO: Place your code here:
- // Steering commands
- // You can use the commands provided by the AutonomousDrone to steer it:
- // - moveFrontBack, moveRightLeft, moveUpDown
- // - rotatePitch, rotateYaw, rotateRoll
- // You will see, that the AutonomousDrone has two variants for each of these commands, one with a vector as input and one with just a float. Use the one with just the float as input.
- // Apply them to myDrone (e.g. myDrone->rotateYaw(..) )
- // dt is the time passed since the last call of the tick function in seconds.
-
-
-
- }
- }
-}
Deleted: code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.h 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/controllers/AutonomousDroneController.h 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,59 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Oli Scheuss
- * Co-authors:
- * Damian 'Mozork' Frick
- *
- */
-
-#ifndef _AutonomousDroneController_H__
-#define _AutonomousDroneController_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "Controller.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
- /**
- @brief
- Controller for the AutonomousDrone of the PPS tutorial.
- @author
- Oli Scheuss
- */
- class _OrxonoxExport AutonomousDroneController : public Controller, public Tickable
- {
- public:
- AutonomousDroneController(Context* context);
- virtual ~AutonomousDroneController();
-
- virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick.
-
- protected:
-
- private:
- };
-}
-
-#endif /* _AutonomousDroneController_H__ */
Modified: code/branches/Presentation_HS17_merge/src/orxonox/controllers/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/controllers/CMakeLists.txt 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/controllers/CMakeLists.txt 2018-02-18 23:34:42 UTC (rev 11776)
@@ -18,6 +18,5 @@
FlyingController.cc
FightingController.cc
MasterController.cc
- AutonomousDroneController.cc
ArrowController.cc
)
Deleted: code/branches/Presentation_HS17_merge/src/orxonox/controllers/WaypointArrow.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/controllers/WaypointArrow.cc 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/controllers/WaypointArrow.cc 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,67 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "WaypointArrow.h"
-
-#include "core/CoreIncludes.h"
-#include "worldentities/ControllableEntity.h"
-
-namespace orxonox
-{
- RegisterClass(WaypointArrow);
-
- WaypointArrow::WaypointArrow(Context* context) : ArtificialController(context)
- {
- RegisterObject(WaypointController);
- this->setAccuracy(100);
- }
-
- WaypointController::~WaypointController()
- {
- for (WorldEntity* waypoint : this->waypoints_)
- {
- if(waypoint)
- waypoint->destroy();
- }
- }
-
- void WaypointController::tick(float dt)
- {
- if (!this->isActive())
- return;
-
- if (this->waypoints_.size() == 0 || !this->getControllableEntity())
- return;
-
- if (this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_)
- this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size();
-
- this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition());
- }
-
-}
Deleted: code/branches/Presentation_HS17_merge/src/orxonox/controllers/WaypointArrow.h
===================================================================
Modified: code/branches/Presentation_HS17_merge/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/graphics/Model.cc 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/graphics/Model.cc 2018-02-18 23:34:42 UTC (rev 11776)
@@ -70,6 +70,7 @@
SUPER(Model, XMLPort, xmlelement, mode);
XMLPortParam(Model, "lodLevel", setLodLevel, getLodLevel, xmlelement, mode);
+
XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
XMLPortParam(Model, "renderQueueGroup", setRenderQueueGroup, getRenderQueueGroup, xmlelement, mode);
XMLPortParam(Model, "material", setMaterial, getMaterial, xmlelement, mode);
Deleted: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.cc 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.cc 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,186 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Oli Scheuss
- * Co-authors:
- * Damian 'Mozork' Frick
- *
- */
-
-#include "AutonomousDrone.h"
-
-#include "core/CoreIncludes.h"
-#include "BulletDynamics/Dynamics/btRigidBody.h"
-
-namespace orxonox
-{
- //TODO: Put your code in here:
- // Create the factory for the drone.
- RegisterClass(AutonomousDrone);
- /**
- @brief
- Constructor. Registers the object and initializes some default values.
- @param creator
- The creator of this object.
- */
- AutonomousDrone::AutonomousDrone(Context* context) : ControllableEntity(context)
- {
- //TODO: Put your code in here:
- // Register the drone class to the core.
- RegisterObject(AutonomousDrone);
-
- this->myController_ = NULL;
-
- this->localLinearAcceleration_.setValue(0, 0, 0);
- this->localAngularAcceleration_.setValue(0, 0, 0);
- this->primaryThrust_ = 100;
- this->auxiliaryThrust_ = 100;
- this->rotationThrust_ = 10;
-
- this->setCollisionType(CollisionType::Dynamic);
-
- //this->myController_ = new AutonomousDroneController(this); // Creates a new controller and passes our this pointer to it as creator.
- }
-
- /**
- @brief
- Destructor. Destroys controller, if present.
- */
- AutonomousDrone::~AutonomousDrone()
- {
- // Deletes the controller if the object was initialized and the pointer to the controller is not NULL.
- if( this->isInitialized() && this->myController_ != NULL )
- delete this->myController_;
- }
-
- /**
- @brief
- Method for creating a AutonomousDrone through XML.
- */
- void AutonomousDrone::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- // This calls the XMLPort function of the parent class
- SUPER(AutonomousDrone, XMLPort, xmlelement, mode);
-
- XMLPortParam(AutonomousDrone, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
- //TODO: Put your code in here:
- XMLPortParam(AutonomousDrone, "auxiliaryThrust", setAuxiliaryThrust, getAuxiliaryThrust, xmlelement, mode);
- XMLPortParam(AutonomousDrone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
- // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort.
- // Variables can be added by the following command
- // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunctionName, getFunctionName, xmlelement, mode);
- // Also make sure that you also create the get- and set-functions in AutonomousDrone.h. As you can see, the get- and set-functions for the variable primaryThrust_ has already been specified there, so you can get your inspiration from there.
-
-
- }
-
- /**
- @brief
- Defines which actions the AutonomousDrone has to take in each tick.
- @param dt
- The length of the tick.
- */
- void AutonomousDrone::tick(float dt)
- {
- SUPER(AutonomousDrone, tick, dt);
-
- this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxiliaryThrust_);
- this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxiliaryThrust_);
- if (this->localLinearAcceleration_.z() > 0)
- this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxiliaryThrust_);
- else
- this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
- this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
- this->localLinearAcceleration_.setValue(0, 0, 0);
-
- this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
- this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
- this->localAngularAcceleration_.setValue(0, 0, 0);
- }
-
- /**
- @brief
- Moves the AutonomousDrone in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the movement.
- */
- void AutonomousDrone::moveFrontBack(const Vector2& value)
- {
- this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
- }
-
- /**
- @brief
- Moves the AutonomousDrone in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the movement.
- */
- void AutonomousDrone::moveRightLeft(const Vector2& value)
- {
- this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
- }
-
- /**
- @brief
- Moves the AutonomousDrone in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the movement.
- */
- void AutonomousDrone::moveUpDown(const Vector2& value)
- {
- this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
- }
-
- /**
- @brief
- Rotates the AutonomousDrone around the y-axis by the amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the angular movement.
- */
- void AutonomousDrone::rotateYaw(const Vector2& value)
- {
- this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x);
- }
-
- /**
- @brief
- Rotates the AutonomousDrone around the x-axis by the amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the angular movement.
- */
- void AutonomousDrone::rotatePitch(const Vector2& value)
- {
- this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
- }
-
- /**
- @brief
- Rotates the AutonomousDrone around the z-axis by the amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the angular movement.
- */
- void AutonomousDrone::rotateRoll(const Vector2& value)
- {
- this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
- }
-
-}
Deleted: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.h 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/worldentities/AutonomousDrone.h 2018-02-18 23:34:42 UTC (rev 11776)
@@ -1,146 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Oli Scheuss
- * Co-authors:
- * Damian 'Mozork' Frick
- *
- */
-
-#ifndef _AutonomousDrone_H__
-#define _AutonomousDrone_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "core/XMLPort.h"
-#include "controllers/AutonomousDroneController.h"
-
-#include "ControllableEntity.h"
-
-namespace orxonox {
-
- /**
- @brief
- Drone, that is made to move upon a specified pattern.
- This class was constructed for the PPS tutorial.
- @author
- Oli Scheuss
- */
- class _OrxonoxExport AutonomousDrone : public ControllableEntity
- {
- public:
- AutonomousDrone(Context* context);
- virtual ~AutonomousDrone();
-
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an AutonomousDrone through XML.
- virtual void tick(float dt); //!< Defines which actions the AutonomousDrone has to take in each tick.
-
- virtual void moveFrontBack(const Vector2& value);
- virtual void moveRightLeft(const Vector2& value);
- virtual void moveUpDown(const Vector2& value);
-
- virtual void rotateYaw(const Vector2& value);
- virtual void rotatePitch(const Vector2& value);
- virtual void rotateRoll(const Vector2& value);
-
- /**
- @brief Moves the Drone in the Front/Back-direction by the specifed amount.
- @param value The amount by which the drone is to be moved.
- */
- inline void moveFrontBack(float value)
- { this->moveFrontBack(Vector2(value, 0)); }
- /**
- @brief Moves the Drone in the Right/Left-direction by the specifed amount.
- @param value The amount by which the drone is to be moved.
- */
- inline void moveRightLeft(float value)
- { this->moveRightLeft(Vector2(value, 0)); }
- /**
- @brief Moves the Drone in the Up/Down-direction by the specifed amount.
- @param value The amount by which the drone is to be moved.
- */
- inline void moveUpDown(float value)
- { this->moveUpDown(Vector2(value, 0)); }
-
- /**
- @brief Rotates the Drone around the y-axis by the specifed amount.
- @param value The amount by which the drone is to be rotated.
- */
- inline void rotateYaw(float value)
- { this->rotateYaw(Vector2(value, 0)); }
- /**
- @brief Rotates the Drone around the x-axis by the specifed amount.
- @param value The amount by which the drone is to be rotated.
- */
- inline void rotatePitch(float value)
- { this->rotatePitch(Vector2(value, 0)); }
- /**
- @brief Rotates the Drone around the z-axis by the specifed amount.
- @param value The amount by which the drone is to be rotated.
- */
- inline void rotateRoll(float value)
- { this->rotateRoll(Vector2(value, 0)); }
-
- /**
- @brief Sets the primary thrust to the input amount.
- @param thrust The amount of thrust.
- */
- inline void setPrimaryThrust( float thrust )
- { this->primaryThrust_ = thrust; }
- //TODO: Place your set-functions here.
-
- inline void setAuxiliaryThrust ( float thrust )
- { this -> auxiliaryThrust_ = thrust; }
-
- inline void setRotationThrust (float thrust)
- { this -> rotationThrust_ = thrust;}
- // Hint: auxiliary thrust, rotation thrust.
-
- /**
- @brief Gets the primary thrust to the input amount.
- @return The amount of thrust.
- */
- inline float getPrimaryThrust()
- { return this->primaryThrust_; }
-
- inline float getAuxiliaryThrust()
- { return this->auxiliaryThrust_;}
-
- inline float getRotationThrust()
- { return this->rotationThrust_;}
-
- //TODO: Place your get-functions here.
-
- private:
- AutonomousDroneController *myController_; //!< The controller of the AutonomousDrone.
-
- btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the AutonomousDrone the next tick.
- btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the AutonomousDrone the next tick.
- float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward.
- float auxiliaryThrust_; //!< The amount of auxiliary thrust. Used for all other movements (except for rotations).
- float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.s
-
- };
-
-}
-
-#endif // _AutonomousDrone_H__
Modified: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/worldentities/CMakeLists.txt 2018-02-18 22:09:54 UTC (rev 11775)
+++ code/branches/Presentation_HS17_merge/src/orxonox/worldentities/CMakeLists.txt 2018-02-18 23:34:42 UTC (rev 11776)
@@ -13,7 +13,6 @@
ExplosionPart.cc
Actionpoint.cc
NameableStaticEntity.cc
- AutonomousDrone.cc
Arrow.cc
)
More information about the Orxonox-commit
mailing list