Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5918


Ignore:
Timestamp:
Oct 9, 2009, 4:54:31 PM (14 years ago)
Author:
scheusso
Message:

2 new console commands (startIOConsole, printObjects)

Location:
code/branches/core5/src/orxonox/gamestates
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc

    r5910 r5918  
    5757        // create an empty Scene
    5858        this->scene_ = new Scene(NULL);
     59        this->scene_->setSyncMode( 0x0 );
    5960        // and a Camera
    6061        this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera");
     
    9091        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startDedicated, this), "startDedicated"));
    9192        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu, this), "startMainMenu"));
     93        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startIOConsole, this), "startIOConsole"));
    9294
    9395        KeyBinderManager::getInstance().setToDefault();
     
    153155        Game::getInstance().requestStates("mainmenu");
    154156    }
     157    void GSMainMenu::startIOConsole()
     158    {
     159        // HACK - HACK
     160        Game::getInstance().popState();
     161        Game::getInstance().popState();
     162        Game::getInstance().requestStates("ioConsole");
     163    }
    155164}
  • code/branches/core5/src/orxonox/gamestates/GSMainMenu.h

    r5896 r5918  
    4747        void update(const Clock& time);
    4848
    49         void startStandalone();
    50         void startServer();
    51         void startClient();
    52         void startDedicated();
    53         void startMainMenu();
     49        static void startStandalone();
     50        static void startServer();
     51        static void startClient();
     52        static void startDedicated();
     53        static void startMainMenu();
     54        static void startIOConsole();
    5455
    5556    private:
  • code/branches/core5/src/orxonox/gamestates/GSRoot.cc

    r5876 r5918  
    4141{
    4242    DeclareGameState(GSRoot, "root", false, false);
     43    SetConsoleCommandShortcut(GSRoot, printObjects);
    4344
    4445    GSRoot::GSRoot(const GameStateInfo& info)
     
    5354    {
    5455        NetworkFunctionBase::destroyAllNetworkFunctions();
     56    }
     57   
     58    void GSRoot::printObjects()
     59    {
     60        unsigned int nr=0;
     61        for(ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; ++it){
     62            if( dynamic_cast<Synchronisable*>(*it) )
     63                COUT(0) << "object: " << it->getIdentifier()->getName() << " id: " << dynamic_cast<Synchronisable*>(*it)->getObjectID() << std::endl;
     64            else
     65                COUT(0) << "object: " << it->getIdentifier()->getName() << std::endl;
     66            nr++;
     67        }
     68        COUT(0) << "currently got " << nr << " objects" << std::endl;
     69   
    5570    }
    5671
  • code/branches/core5/src/orxonox/gamestates/GSRoot.h

    r5876 r5918  
    4141        ~GSRoot();
    4242
     43        static void printObjects();
     44
    4345        void activate();
    4446        void deactivate();
Note: See TracChangeset for help on using the changeset viewer.