[Orxonox-commit 3809] r8487 - in code/branches/dockingsystem2: data/gui/scripts data/levels src/modules/docking

sven at orxonox.net sven at orxonox.net
Mon May 16 13:39:51 CEST 2011


Author: sven
Date: 2011-05-16 13:39:51 +0200 (Mon, 16 May 2011)
New Revision: 8487

Modified:
   code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua
   code/branches/dockingsystem2/data/levels/docking.oxw
   code/branches/dockingsystem2/src/modules/docking/DockingEffect.cc
   code/branches/dockingsystem2/src/modules/docking/DockingEffect.h
Log:


Modified: code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua
===================================================================
--- code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua	2011-05-16 11:27:03 UTC (rev 8486)
+++ code/branches/dockingsystem2/data/gui/scripts/DockingDialog.lua	2011-05-16 11:39:51 UTC (rev 8487)
@@ -9,8 +9,8 @@
 end
 
 function P.onShow()
+    orxonox.CommandExecutor:execute("pause")
     P.update()
-    orxonox.CommandExecutor:execute("pause")
 end
 
 function P.onHide()

Modified: code/branches/dockingsystem2/data/levels/docking.oxw
===================================================================
--- code/branches/dockingsystem2/data/levels/docking.oxw	2011-05-16 11:27:03 UTC (rev 8486)
+++ code/branches/dockingsystem2/data/levels/docking.oxw	2011-05-16 11:39:51 UTC (rev 8487)
@@ -36,6 +36,9 @@
 
 
     <Dock>
+        <animation>
+            <MoveToDockingTarget target="destroyer" position="10,150,40" />
+        </animation>
         <effects>
             <DockToShip target="destroyer" />
         </effects>
@@ -45,7 +48,7 @@
             </execute>
         </events>
         <attached>
-            <DistanceTrigger position="0,0,0" distance="50" target="Pawn" beaconMode="exclude" targetname="destroyerBeacon" name="dockMe" />
+            <DistanceTrigger position="0,0,0" distance="30" target="Pawn" beaconMode="exclude" targetname="destroyerBeacon" name="dockMe" />
             <Billboard material="Examples/Flare" colour="1.0, 0, 0" />
         </attached>
     </Dock>

Modified: code/branches/dockingsystem2/src/modules/docking/DockingEffect.cc
===================================================================
--- code/branches/dockingsystem2/src/modules/docking/DockingEffect.cc	2011-05-16 11:27:03 UTC (rev 8486)
+++ code/branches/dockingsystem2/src/modules/docking/DockingEffect.cc	2011-05-16 11:39:51 UTC (rev 8487)
@@ -51,14 +51,13 @@
 
         COUT(4) << "Invoking DockingEffects on player: " << player << " ."  << std::endl;
 
-        for (std::list<DockingEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++) {
-            switch(event) {
+        for (std::list<DockingEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
+        {
+            switch(event)
+            {
                 case docking::DOCKING:
                     check &= (*effect)->docking(player);
                     break;
-                case docking::ATTACH:
-                    check &= (*effect)->attach(player);
-                    break;
                 case docking::RELEASE:
                     check &= (*effect)->release(player);
                     break;

Modified: code/branches/dockingsystem2/src/modules/docking/DockingEffect.h
===================================================================
--- code/branches/dockingsystem2/src/modules/docking/DockingEffect.h	2011-05-16 11:27:03 UTC (rev 8486)
+++ code/branches/dockingsystem2/src/modules/docking/DockingEffect.h	2011-05-16 11:39:51 UTC (rev 8487)
@@ -51,7 +51,6 @@
     namespace docking {
         enum event {
             DOCKING,
-            ATTACH,
             RELEASE
         };
     }
@@ -71,8 +70,7 @@
             DockingEffect(BaseObject* creator);
             virtual ~DockingEffect();
 
-            virtual bool docking(PlayerInfo* player) = 0; //!< Called when docking starts
-            virtual bool attach(PlayerInfo* player) = 0; //!< Called after docking animation
+            virtual bool docking(PlayerInfo* player) = 0; //!< Called when player docked
             virtual bool release(PlayerInfo* player) = 0; //!< Called when player wants to undock
 
             static bool invokeEffect(docking::event event, PlayerInfo* player, std::list<DockingEffect*> & effects); //!< Invokes the event specific method of all DockingEffects in the list




More information about the Orxonox-commit mailing list