[Orxonox-commit 5155] r9820 - in code/branches/spacestationentry: data/levels src/modules/docking
agermann at orxonox.net
agermann at orxonox.net
Mon Nov 25 16:02:45 CET 2013
Author: agermann
Date: 2013-11-25 16:02:44 +0100 (Mon, 25 Nov 2013)
New Revision: 9820
Modified:
code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw
code/branches/spacestationentry/src/modules/docking/Dock.cc
code/branches/spacestationentry/src/modules/docking/Dock.h
Log:
Keine Grossen Fortschritte, die Loesung mit dem undock Konsolenbefehl wird verwendet. Spaeter noch versuchen, das homogene Schwerkraftfeld in die Forcefieldklasse zu integrieren.
Modified: code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw
===================================================================
--- code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw 2013-11-25 15:01:39 UTC (rev 9819)
+++ code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw 2013-11-25 15:02:44 UTC (rev 9820)
@@ -31,7 +31,7 @@
</templates>
<Scene
- ambientlight = "0.8, 0.8, 0.8"
+ ambientlight = "0.5, 0.5, 0.5"
skybox = "Orxonox/Starbox"
negativeWorldRange = "-100000, -100000, -100000"
positiveWorldRange = " 100000, 100000, 100000"
@@ -43,7 +43,7 @@
include("includes/pickups.oxi")
?>
- <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,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
<SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
<StaticEntity position = "2800,0,0" mass=10000 collisionType=static >
@@ -96,32 +96,7 @@
</Dock>
- <!-- Docking (Ausdocken)-->
- <Dock position="100,-1950,100" roll=0 yaw=0 >
- <animations>
- <MoveToDockingTarget target="spaceShip" />
- </animations>
- <effects>
- <DockToShip target="destroyer" />
- </effects>
- <events>
- <execute>
- <EventListener event="undockMe" />
- </execute>
-
- <activity>
- <EventListener event=notGameEnd />
- </activity>
- </events>
- <attached>
- <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
- <DistanceTrigger position="0,0,0" distance="5" target="Pawn"
- beaconMode="exclude" targetname="bcnDestroyer" name="undockMe"
- />
- </attached>
- </Dock>
-
@@ -153,11 +128,11 @@
<StaticEntity position="0,-2000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="crate.mesh" scale3D="22,22,5" />
+ <Model position="0,0,0" mesh="crate.mesh" scale3D="66,15,5" />
</attached>
<collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
+ <BoxCollisionShape position="0,0,0" halfExtents="330,330,10" />
</collisionShapes>
</StaticEntity>
@@ -168,16 +143,9 @@
<ForceField position="-2500,-92000,2500" mode="sphere" diameter="184000" velocity="-5000" />
<ForceField position="-2500,-92000,-2500" mode="sphere" diameter="184000" velocity="-5000" />
-<!-- Ausgang Trigger Falsch
+<!-- Ausgang - Trigger -->
- <StaticEntity position="100,-1950,100" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
- <attached>
- <Model position="0,0,0" mesh="cube.mesh" scale3D="4,4,4" />
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="4,4,4" />
- </collisionShapes>
- </StaticEntity>
+<Billboard position="150,-1950,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
<DistanceTrigger name="ausgang" position="100,-1950,100" target="Pawn" distance=50 stayActive="false" delay=0 />
<Script code="undock" onLoad="false">
@@ -187,9 +155,9 @@
</trigger>
</events>
</Script>
--->
+<!-- Rest -->
<!-- triple large belt around the planet -->
<?lua
Modified: code/branches/spacestationentry/src/modules/docking/Dock.cc
===================================================================
--- code/branches/spacestationentry/src/modules/docking/Dock.cc 2013-11-25 15:01:39 UTC (rev 9819)
+++ code/branches/spacestationentry/src/modules/docking/Dock.cc 2013-11-25 15:02:44 UTC (rev 9820)
@@ -68,6 +68,7 @@
XMLPortObject(Dock, DockingEffect, "effects", addEffect, getEffect, xmlelement, mode);
XMLPortObject(Dock, DockingAnimation, "animations", addAnimation, getAnimation, xmlelement, mode);
XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode);
+ //XMLPortEventSink(Dock, BaseObject, "undocking", undocking, xmlelement, mode);
}
@@ -77,9 +78,19 @@
XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode);
- // XMLPortEventSink(Dock, BaseObject, "execute2", execute2, xmlelement, mode);
+ //XMLPortEventSink(Dock, BaseObject, "undocking", undocking, xmlelement, mode);
}
+ /*
+ bool Dock::undocking(bool bTriggered, BaseObject* trigger)
+ {
+ orxout(user_warning)<<"undocking"<<endl;
+
+ return true;
+ }
+
+ */
+
bool Dock::execute(bool bTriggered, BaseObject* trigger)
{
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
@@ -122,50 +133,7 @@
return true;
}
- /*bool Dock::execute2(bool bTriggered, BaseObject* trigger)
- {
- orxout(user_warning)<<"execute2"<<endl;
- PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
- PlayerInfo* player = NULL;
- // Check whether it is a player trigger and extract pawn from it
- if(pTrigger != NULL)
- {
- if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
- orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
- return false;
- }
- player = pTrigger->getTriggeringPlayer();
- }
- else
- {
- orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
- return false;
- }
- if(player == NULL)
- {
- orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
- return false;
- }
-
- if(bTriggered)
- {
- // Add player to this Docks candidates
- docked_.insert(player);
-
- // Show docking dialog
- this->showDockingDialogHelper(player);
- }
- else
- {
- // Remove player from candidates list
- docked_.erase(player);
- }
-
- return true;
- }
-
-*/
void Dock::showDockingDialogHelper(PlayerInfo* player)
{
assert(player);
Modified: code/branches/spacestationentry/src/modules/docking/Dock.h
===================================================================
--- code/branches/spacestationentry/src/modules/docking/Dock.h 2013-11-25 15:01:39 UTC (rev 9819)
+++ code/branches/spacestationentry/src/modules/docking/Dock.h 2013-11-25 15:02:44 UTC (rev 9820)
@@ -61,7 +61,7 @@
// Trigger interface
bool execute(bool bTriggered, BaseObject* trigger);
- // bool execute2(bool bTriggered, BaseObject* trigger);
+ //bool undocking(bool bTriggered, BaseObject* trigger);
// XML interface
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
More information about the Orxonox-commit
mailing list