[Orxonox-commit 2167] r6883 - in code/branches/fps: data/levels data/levels/templates data/overlays src/orxonox/controllers
freicy at orxonox.net
freicy at orxonox.net
Mon May 10 16:17:20 CEST 2010
Author: freicy
Date: 2010-05-10 16:17:20 +0200 (Mon, 10 May 2010)
New Revision: 6883
Added:
code/branches/fps/data/levels/presentation_FS10.oxw
Modified:
code/branches/fps/data/levels/templates/fps.oxt
code/branches/fps/data/overlays/hudtamplates_fps.oxo
code/branches/fps/src/orxonox/controllers/NewHumanController.cc
Log:
by cyrill
Added: code/branches/fps/data/levels/presentation_FS10.oxw
===================================================================
--- code/branches/fps/data/levels/presentation_FS10.oxw (rev 0)
+++ code/branches/fps/data/levels/presentation_FS10.oxw 2010-05-10 14:17:20 UTC (rev 6883)
@@ -0,0 +1,95 @@
+<?lua
+ include("hudtemplates3.oxo")
+ include("stats.oxo")
+ include("templates/spaceship_assff.oxt")
+ include("templates/spaceship_H2.oxt")
+ include("templates/fps.oxt")
+?>
+
+<Level
+ name = "fps"
+ description = "tests"
+>
+ <Scene
+ ambientlight = "0.1, 0.1, 0.1"
+ skybox = "Orxonox/skypanoramagen1"
+ gravity = "0,-1000,0"
+ negativeWorldRange = "(-100000, -100000, -100000)"
+ positiveWorldRange = "( 100000, 100000, 100000)"
+ hasPhysics = true
+ >
+ <Light type=directional position="0,-100000,0" direction="0.02, -1, 0.05" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+ <StaticEntity position="0,-50,0" direction="0,-1,0" collisionType=static mass=100000 >
+ <attached>
+ <Model position="0,0,0" mesh="cube.mesh" scale3D="100,100,10" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+ </collisionShapes>
+ </StaticEntity>
+
+ <StaticEntity position="210,-30,0" direction="0,-1,0" collisionType=static mass=100000 >
+ <attached>
+ <Model position="0,0,0" mesh="cube_orange.mesh" scale3D="100,100,10" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+ </collisionShapes>
+ </StaticEntity>
+
+ <StaticEntity position="600,-20,0" direction="0,-1,0" collisionType=static mass=100000 >
+ <attached>
+ <Model position="0,0,0" mesh="cube_green.mesh" scale3D="100,100,10" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+ </collisionShapes>
+ </StaticEntity>
+
+<StaticEntity position="600,10,120" direction="0,-1,1" collisionType=static mass=100000 >
+ <attached>
+ <Model position="0,0,0" mesh="cube_red.mesh" scale3D="100,100,10" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+ </collisionShapes>
+ </StaticEntity>
+
+ <StaticEntity position="600,40,250" direction="0,-1,0" collisionType=static mass=100000 >
+ <attached>
+ <Model position="0,0,0" mesh="cube.mesh" scale3D="100,100,10" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+ </collisionShapes>
+ </StaticEntity>
+<?lua
+for i = 1, 10, 1
+do ?>
+ <SpawnPoint position="0,300,0" direction="0, 0, 0" lookat="0,0,100000000" spawnclass=FpsPlayer pawndesign=fps />
+<?lua
+end
+?>
+
+<!--
+<?lua
+for i = 1, 200, 1
+do
+j = math.random()
+?>
+
+ <MovableEntity position="<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000 - 2000) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 100) ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>" >
+ <attached>
+ <Model position="0,0,0" scale=<?lua print(j * 10) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
+ </attached>
+ <collisionShapes>
+ <SphereCollisionShape radius="<?lua print(j * 100) ?>" />
+ </collisionShapes>
+ </MovableEntity>
+<?lua
+end
+?>
+-->
+ </Scene>
+</Level>
\ No newline at end of file
Modified: code/branches/fps/data/levels/templates/fps.oxt
===================================================================
--- code/branches/fps/data/levels/templates/fps.oxt 2010-05-10 14:14:28 UTC (rev 6882)
+++ code/branches/fps/data/levels/templates/fps.oxt 2010-05-10 14:17:20 UTC (rev 6883)
@@ -1,6 +1,6 @@
<Template name=fps>
<FpsPlayer
- hudtemplate = spaceshiphud
+ hudtemplate = fpshud
camerapositiontemplate = fpscamera
spawnparticlesource = "Orxonox/fairytwirl"
@@ -28,7 +28,7 @@
</attached>
-->
<collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="100,10,100" />
+ <BoxCollisionShape position="0,0,0" halfExtents="7,7,7" />
<!--
<SphereCollisionShape radius="10" />
@@ -58,4 +58,4 @@
<CameraPosition position="50,5,-8" yaw=90 drag=true /-->
</camerapositions>
</FpsPlayer>
-</Template>
\ No newline at end of file
+</Template>
Modified: code/branches/fps/data/overlays/hudtamplates_fps.oxo
===================================================================
--- code/branches/fps/data/overlays/hudtamplates_fps.oxo 2010-05-10 14:14:28 UTC (rev 6882)
+++ code/branches/fps/data/overlays/hudtamplates_fps.oxo 2010-05-10 14:17:20 UTC (rev 6883)
@@ -3,8 +3,8 @@
</OverlayGroup>
</Template>
-<Template name="spaceshiphud">
- <OverlayGroup name = "spaceshiphud" scale = "1, 1">
+<Template name="fpshud">
+ <OverlayGroup name = "fpshud" scale = "1, 1">
<Map />
<HUDHealthBar
@@ -72,11 +72,11 @@
align = "center"
/>
- <GUIOverlay
+ <!-- <GUIOverlay
name = "QuestGUI"
guiname = "QuestGUI"
visible = "false"
/>
-
+-->
</OverlayGroup>
</Template>
Modified: code/branches/fps/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/fps/src/orxonox/controllers/NewHumanController.cc 2010-05-10 14:14:28 UTC (rev 6882)
+++ code/branches/fps/src/orxonox/controllers/NewHumanController.cc 2010-05-10 14:17:20 UTC (rev 6883)
@@ -209,8 +209,12 @@
if (!controlPaused_ )
{
- if (this->getControllableEntity() && (this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket")) || this->getControllableEntity()->isExactlyA(ClassByString("FpsPlayer"))))
- this->showOverlays();
+ if (this->getControllableEntity() && (this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
+ {this->showOverlays();}
+
+ if (this->getControllableEntity() && this->getControllableEntity()->isExactlyA(ClassByString("FpsPlayer")))\
+ {this->showOverlays();
+ this->hideArrows();}
this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5f-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5f-overlaySize_/2));
@@ -459,6 +463,7 @@
this->currentPitch_ = 0;
if (this->getControllableEntity() && (this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
{
+
this->showOverlays_ = true;
if (!this->controlPaused_)
{
More information about the Orxonox-commit
mailing list