[Orxonox-commit 5435] r10098 - in code/branches/weaponupdateHS14: data/levels data/levels/includes data/levels/templates src/modules/weapons

flsueess at orxonox.net flsueess at orxonox.net
Wed Oct 22 16:13:30 CEST 2014


Author: flsueess
Date: 2014-10-22 16:13:29 +0200 (Wed, 22 Oct 2014)
New Revision: 10098

Added:
   code/branches/weaponupdateHS14/data/levels/FPS_Level_HS14.oxw
   code/branches/weaponupdateHS14/data/levels/includes/weaponSettingsFPS_HS14.oxi
   code/branches/weaponupdateHS14/data/levels/templates/FPS_HS14.oxt
Modified:
   code/branches/weaponupdateHS14/data/levels/pirateAttack.oxw
   code/branches/weaponupdateHS14/src/modules/weapons/RocketController.cc
   code/branches/weaponupdateHS14/src/modules/weapons/RocketController.h
Log:
new files

Added: code/branches/weaponupdateHS14/data/levels/FPS_Level_HS14.oxw
===================================================================
--- code/branches/weaponupdateHS14/data/levels/FPS_Level_HS14.oxw	                        (rev 0)
+++ code/branches/weaponupdateHS14/data/levels/FPS_Level_HS14.oxw	2014-10-22 14:13:29 UTC (rev 10098)
@@ -0,0 +1,285 @@
+<!--  -->
+<LevelInfo
+ name = "FPS Level HS14"
+ description = "Entering a Space Station & finde a way through it."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/bigship.oxt")
+  include("templates/spaceshipTurret.oxt")
+  include("templates/spaceshipCollateralDamage.oxt")
+  include("templates/FPS.oxt")
+  include("templates/HeavyCruiser.oxt")
+?>
+
+<Level
+  gametype = Deathmatch
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <Scene
+    ambientlight = "0.5, 0.5, 0.5"
+    skybox       = "Orxonox/skyBoxMoreNebula"
+    negativeWorldRange = "-100000, -100000, -100000"
+    positiveWorldRange = " 100000,  100000,  100000"
+    gravity      = "0,0,0"
+    hasPhysics   = true
+  >
+
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
+    
+    <SpawnPoint team=1 position="3000,0,0" lookat="4000,-1000,-1000" spawnclass=SpaceShip pawndesign=spaceshipescort />
+	<!--6000,2000,500-->
+
+        
+        
+    <StaticEntity position  = "2800,0,0" mass=10000 collisionType=static >
+      <attached>
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
+        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
+        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
+        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
+        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
+        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
+        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
+        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
+        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
+        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
+        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
+        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
+        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
+      </collisionShapes>
+    </StaticEntity>
+
+<!-- Docking  -->
+    <Dock position="2830,20,50" roll=0 yaw=0 >
+        <animations>
+            <MoveToDockingTarget target="fistperson" />
+        </animations>
+        <effects>
+            <DockToShip target="fistperson" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockMe" />
+            </execute>
+
+	    <undocking>
+		<EventListener event="undockMe" />
+	    </undocking>
+	
+        </events>
+        <attached>
+	<!-- Trigger for docking with billboard -->
+            <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
+            <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
+                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+            />
+	<!-- Trigger for undocking with billboard -->
+	    <Billboard position="-2800,-20055,-700" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
+	    <DistanceTrigger position="-2800,-20055,-700" distance="150" target="Pawn"
+                beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
+            />
+        </attached>
+
+    </Dock>
+    
+<!-- FPS Player as destination of the dock -->
+    <FpsPlayer template = "fps" radarname = "First Person Player" position = "172,-20000,-676" >
+      <attached>
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="fistperson" />
+      </attached>
+    </FpsPlayer>
+
+
+
+
+<!-- Docking  II -->
+    <Dock position="-840,-20055,1.8" roll=0 yaw=0 >
+        <animations>
+            <MoveToDockingTarget target="spaceShip" />
+        </animations>
+        <effects>
+            <DockToShip target="spaceShip" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockMe" />
+            </execute>
+
+	    <undocking>
+		<EventListener event="undockMe" />
+	    </undocking>
+	
+        </events>
+        <attached>
+        
+	<!-- Trigger for docking with billboard -->
+            <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.3,0.4,0.5" scale=1 />
+            <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
+                beaconMode="exclude" targetname="bcnSpaceShip" name="dockMe"
+            />
+	<!-- Trigger for undocking with billboard -->
+	    <Billboard position="4140,20055,-295" material="Flares/ringflare2" colour="0.3,0.4,0.5" scale=1 />
+	    <DistanceTrigger position="4140,20055,-295" distance="300" target="Pawn"
+                beaconMode="identify" targetname="bcnSpaceShip" name="undockMe"
+            />
+        </attached>
+
+    </Dock>
+
+ <!-- Enemy ship -->
+	<SpaceShip			
+        template            = "HeavyCruiser"
+        team                = "0"
+        position            = "5800,-200,-1200"
+        orientation         = "1,200,0,0"
+        health              = "2000"
+        initialhealth       = "2000"
+        maxhealth           = "2000"
+        shieldhealth        = "200"
+        initialshieldhealth = "200"
+        maxshieldhealth     = "200"
+        shieldabsorption    = "0.8"
+        reloadrate          = "1"
+        reloadwaittime      = "1"
+        name                = "Tanis1"
+        radarname           = "Tanis Cruiser" >
+      <attached>
+        <DockingTarget name="spaceShip" />
+        <DistanceTriggerBeacon name="bcnSpaceShip" />
+      </attached>
+    </SpaceShip>
+    
+    <SpaceShip			
+        template            = "spaceshippirate"
+        team                = "0"
+        position            = "4800,-200,-1200"
+        orientation         = "1,200,0,0"
+        health              = "2000"
+        initialhealth       = "2000"
+        maxhealth           = "2000"
+        shieldhealth        = "200"
+        initialshieldhealth = "200"
+        maxshieldhealth     = "200"
+        shieldabsorption    = "0.8"
+        reloadrate          = "1"
+        reloadwaittime      = "1"
+        name                = "Tanis1"
+        radarname           = "Pirate" >
+        
+        <controller>
+            <AIController team=0/>           
+        </controller>
+   </SpaceShip>
+
+
+
+
+<!-- SpaceStation
+
+The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
+Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
+
+-->
+  <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 pitch=-90>
+      <attached>
+    <Model position="0,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
+	<Model position="500,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
+	<Model position="1200,0,0" mesh="ss_tube_x.mesh" scale3D="100,100,100" />
+	<Model position="1900,0,0" mesh="ss_curve.mesh" scale3D="100,100,100" />
+	<Model position="1200,0,703.5" mesh="ss_curve.mesh" scale3D="100,100,100" />
+	<Model position="1805.0,0,-800" mesh="ss_curve.mesh" scale3D="100,100,100" yaw=90 />
+	<Model position="1010.0,0,-700.0" mesh="ss_curve.mesh" scale3D="100,100,100" yaw=-180 />
+	
+	
+	<Model position="750,-16,703.5" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
+	<Model position="-250,-16,0" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
+	<Model position="1200,100,-100" roll=180 mesh="ss_machine.mesh" scale3D="0.15,0.15,0.15" />
+	<Model position="-100,100,0" roll=180 mesh="ss_table.mesh" scale3D="25,25,25" />
+	<Model position="-300,100,0" roll=180 mesh="ss_table_cracked.mesh" scale3D="25,25,25" />
+	<Model position="600,75,0" roll=180 mesh="ss_cylinder.mesh" scale3D="25,25,25" />
+	<Model position="300,50,0" roll=180  pitch=20 mesh="ss_chair.mesh" scale3D="20,20,20" />
+	<Model position="1000,50,0" roll=180 mesh="ss_wall.mesh" scale3D="20,20,20" />
+	<Model position="-830,20,0" roll=180 mesh="ss_flag_aean.mesh" scale3D="40,40,40" />
+	
+	<!--Model mesh="cube.mesh" mass=10 position="0,-100,0" scale3D="5000,0.5,1000" yaw=0 />
+    <Model mesh="cube.mesh" mass=10 position="0,100,0" scale3D="2000,0.5,1000" yaw=0 />
+    <!--Model mesh="cube.mesh" mass=10 position="0,0,100" scale3D="5000,100,0.5" yaw=0 />
+    <Model mesh="cube.mesh" mass=10 position="0,0,-100" scale3D="5000,100,0.5" yaw=0 /-->
+      </attached>
+      <collisionShapes>
+        <!--BoxCollisionShape position="0,-100,0" halfExtents="5000,0,100" /-->
+	    <BoxCollisionShape position="0,100,0" halfExtents="2000,0,1000" />
+	    <!--BoxCollisionShape position="0,0,100" halfExtents="5000,100,0" />
+	    <BoxCollisionShape position="0,0,-100" halfExtents="5000,100,0" /-->
+      </collisionShapes>
+  </StaticEntity>
+
+<!--       
+
+-->
+
+
+  <!--Model position="2820,-20,-160" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_tube.mesh" />
+  <Model position="2820,-20,-210" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_tube.mesh" />
+  <Model position="2820,-20,-280" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_curve.mesh" />
+  <Model position="2820,-100,-270.5" yaw="0" pitch="180" roll="90" scale="10" mesh="ss_curve.mesh" /-->
+  
+   
+<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
+<ForceField position="0,-20000,0" mode="homogen" diameter="3000" forcedirection = "0,-500,0" />
+
+
+
+
+
+<!-- Some more stuff -->
+
+    <!-- triple large belt around the planet  -->
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
+    ?>
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
+    ?>
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
+    ?>
+
+    <Model position="0,-19900,0" mesh="planets/ganymede.mesh" scale="5000" />
+    
+    
+
+  </Scene>
+
+</Level>
+

Added: code/branches/weaponupdateHS14/data/levels/includes/weaponSettingsFPS_HS14.oxi
===================================================================
--- code/branches/weaponupdateHS14/data/levels/includes/weaponSettingsFPS_HS14.oxi	                        (rev 0)
+++ code/branches/weaponupdateHS14/data/levels/includes/weaponSettingsFPS_HS14.oxi	2014-10-22 14:13:29 UTC (rev 10098)
@@ -0,0 +1,51 @@
+    <weaponslots>
+      <WeaponSlot position="0,0,0" yaw=0 pitch=0 roll=0 />
+<!--
+      <WeaponSlot position="-0.5,0.8,2.5" yaw=0 pitch=0 roll=0 />
+      <WeaponSlot position="15,-1.5,-25" yaw=0 pitch=0 roll=0 />
+      <WeaponSlot position="0,0,-45" yaw=0 pitch=0 roll=0 />
+-->
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+    </weaponsets>
+    <weapons>
+      <WeaponPack firemode=0>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+        </links>
+        <Weapon>
+          <HsW01 mode=0 munitionpershot=0 delay=0.0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.7, -0.3, -3" />
+          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20/>
+        </Weapon>
+        <LaserGun
+            position="0,0,0"
+            munitionType="LaserGunMunition"
+            bulletLoadingTime="0.2"
+            magazineLoadingTime="5.0"
+            speed="1000"
+            unlimitedMunition=true
+        />
+        <!--LaserGun
+            position="0,0,0"
+            munitionType="LaserGunMunition"
+            bulletLoadingTime="0.2"
+            magazineLoadingTime="5.0"
+            speed="1250"
+            unlimitedMunition=true
+        />
+      </WeaponPack>
+      <WeaponPack firemode=1>
+        <Fusion
+            position="0,0,0"
+            munitionType="FusionMunition"
+            bulletLoadingTime="0.3"
+            magazineLoadingTime="3"
+            speed="600"
+            unlimitedMunition=true
+        /-->
+      </WeaponPack>
+    </weapons>

Modified: code/branches/weaponupdateHS14/data/levels/pirateAttack.oxw
===================================================================
--- code/branches/weaponupdateHS14/data/levels/pirateAttack.oxw	2014-10-22 14:11:42 UTC (rev 10097)
+++ code/branches/weaponupdateHS14/data/levels/pirateAttack.oxw	2014-10-22 14:13:29 UTC (rev 10098)
@@ -423,7 +423,7 @@
         end
         ?>
     
-        <?lua
+<--     <?lua
         for i = 1,2, 1
         do
         ?>
@@ -442,6 +442,7 @@
         <?lua
         end
         ?>
+        -->
     
     <!-- Pirates at the end of wrong Navi line (get visible when you get near them)-->
      <SpaceShip position="1600,2300,-10000" active=true visible=true name=navipirate1>

Added: code/branches/weaponupdateHS14/data/levels/templates/FPS_HS14.oxt
===================================================================
--- code/branches/weaponupdateHS14/data/levels/templates/FPS_HS14.oxt	                        (rev 0)
+++ code/branches/weaponupdateHS14/data/levels/templates/FPS_HS14.oxt	2014-10-22 14:13:29 UTC (rev 10098)
@@ -0,0 +1,53 @@
+<Template name=fps>
+  <FpsPlayer
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 100
+   maxhealth         = 200
+   initialhealth     = 100
+
+   primaryThrust     = 0;
+   auxilaryThrust    = 0;
+   rotationThrust    = 0;
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+   friction          = 0.01
+
+   weapon            = "hs-w01.mesh"
+  >
+    <collisionShapes>
+      <BoxCollisionShape position="0,-20,0" halfExtents="15,25,15" />
+    </collisionShapes>
+
+    <camerapositions>
+      <CameraPosition position="-1,1,2.2" drag=false mouselook=true />
+    </camerapositions>
+
+    <?lua
+        include("../includes/weaponSettingsFPS_HS14.oxi")
+    ?>
+
+  </FpsPlayer>
+</Template>
+<!--
+<Template name=fpscamera defaults=0>
+  <FpsPlayer>
+    <camerapositions>
+      <CameraPosition position="0,0,20" drag=false mouselook=true />
+
+      <!--
+      CameraPosition position="0,150,-25" pitch=-90 drag=true />
+      <CameraPosition position="0,0,-40" yaw=180 drag=true />
+      <CameraPosition position="0,3,-14" yaw=0 />
+      <CameraPosition position="-50,5,-8" yaw=-90 drag=true />
+      <CameraPosition position="50,5,-8" yaw=90 drag=true /
+
+    </camerapositions>
+  </FpsPlayer>
+</Template>
+-->

Modified: code/branches/weaponupdateHS14/src/modules/weapons/RocketController.cc
===================================================================
--- code/branches/weaponupdateHS14/src/modules/weapons/RocketController.cc	2014-10-22 14:11:42 UTC (rev 10097)
+++ code/branches/weaponupdateHS14/src/modules/weapons/RocketController.cc	2014-10-22 14:13:29 UTC (rev 10098)
@@ -40,6 +40,7 @@
 
 namespace orxonox
 {
+	RegisterClass(RocketController);
     /**
     @brief
         Constructor.
@@ -47,7 +48,7 @@
     RocketController::RocketController(Context* context) : Controller(context)
     {
         RegisterObject(RocketController);
-//        orxout() << "RocketController constructed" << endl;
+        //orxout() << "RocketController constructed" << endl;
 
         // Create a rocket for the controller.
         this->rocket_ = new SimpleRocket(this->getContext());
@@ -72,7 +73,7 @@
 
     RocketController::~RocketController()
     {
-//        orxout() << "RocketController destroyed" << endl;
+        orxout() << "RocketController destroyed" << endl;
     }
 
     /**
@@ -96,7 +97,7 @@
 
         if (distance > 1000 && this->rocket_->getVelocity().squaredLength()<160000)
             this->rocket_->setAcceleration(this->rocket_->getOrientation()*Vector3(-20,-20,-20));
-        if (distance <1000) this->rocket_->setAcceleration(0,0,0);
+        if (distance < 1000) this->rocket_->setAcceleration(0,0,0);
 
         this->rocket_->rotateYaw(-sgn(coord.x)*coord.x*coord.x);
         this->rocket_->rotatePitch(sgn(coord.y)*coord.y*coord.y);

Modified: code/branches/weaponupdateHS14/src/modules/weapons/RocketController.h
===================================================================
--- code/branches/weaponupdateHS14/src/modules/weapons/RocketController.h	2014-10-22 14:11:42 UTC (rev 10097)
+++ code/branches/weaponupdateHS14/src/modules/weapons/RocketController.h	2014-10-22 14:13:29 UTC (rev 10098)
@@ -38,6 +38,7 @@
 
 #include "tools/interfaces/Tickable.h"
 #include "controllers/Controller.h"
+#include "worldentities/ControllableEntity.h"
 
 namespace orxonox
 {
@@ -77,6 +78,7 @@
             SimpleRocket* rocket_; //!< The Rocket it controls.
             Vector3 targetPosition_; //!< The position of the target.
             WeakPtr<PlayerInfo> player_; //!< The player the rocket belongs to.
+            //WeakPtr<Pawn> pawn_;
 
             WeakPtr<WorldEntity> target_; //!< The target.
     };




More information about the Orxonox-commit mailing list