Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2011, 4:16:27 PM (13 years ago)
Author:
sven
Message:

Added dock/undock console commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/dockingsystem2/src/modules/docking/Dock.h

    r8196 r8382  
    3636#define _Dock_H__
    3737
     38#include <map>
     39
    3840#include "core/CoreIncludes.h"
    3941#include "core/XMLPort.h"
     
    4143
    4244#include "worldentities/StaticEntity.h"
     45#include "notifications/NotificationManager.h"
     46
    4347#include "DockingEffect.h"
    4448#include "DockingPrereqs.h"
    4549
    46 namespace orxonox {
    47 
     50namespace orxonox {
    4851
    4952    class _DockingExport Dock : public StaticEntity {
     
    6063        const DockingEffect* getEffect(unsigned int index) const; //!< Get the DockingEffect at a given index.
    6164
     65        bool dock(PlayerInfo* player); //!< Returns true if given player docked successfully (player must be a candidate)
     66        bool undock(PlayerInfo* player); //!< Undocks a player (player must be docked)
     67
     68        static void cmdDock();
     69        static void cmdUndock();
     70
    6271    private:
    63         std::list<DockingEffect*> effects_; //!< The list of DockingEffects to be executed when a player docks.
     72        std::set<PlayerInfo*> candidates; //!< A set of all players which are allowed to dock using the console command.
     73        std::set<PlayerInfo*> docked; //!< A set of all docked players
     74        std::list<DockingEffect*> effects; //!< The list of DockingEffects to be executed when a player docks.
    6475    };
    6576
Note: See TracChangeset for help on using the changeset viewer.