Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7339 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Apr 19, 2006, 2:11:14 AM (19 years ago)
Author:
bensch
Message:

some nice fixes

Location:
trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.cc

    r7338 r7339  
    7070
    7171SHELL_COMMAND(speed, GameWorld, setSpeed);
     72SHELL_COMMAND(playmode, GameWorld, setPlaymode);
    7273SHELL_COMMAND_STATIC(togglePNodeVisibility, GameWorld, GameWorld::togglePNodeVisibility);
    7374SHELL_COMMAND_STATIC(toggleBVVisibility, GameWorld, GameWorld::toggleBVVisibility);
     
    284285  if (this->dataTank->localPlayer &&
    285286      this->dataTank->localPlayer->getPlayable() &&
    286       this->dataTank->localPlayer->getPlayable()->setPlayMode(playmode))
    287   {
    288     PRINTF(3)("Set Playmode to %d\n", playmode);
    289   }
    290 }
    291 
     287      this->dataTank->localPlayer->getPlayable()->setPlaymode(playmode))
     288  {
     289    PRINTF(3)("Set Playmode to %d:%s\n", playmode, Playable::playmodeToString(playmode));
     290  }
     291  else
     292  {
     293    PRINTF(1)("Unable to set Playmode %d:%s\n", playmode, Playable::playmodeToString(playmode));
     294  }
     295}
     296
     297void GameWorld::setPlaymode(const std::string& playmode)
     298{
     299  this->setPlaymode(Playable::stringToPlaymode(playmode));
     300}
    292301
    293302/**
  • trunk/src/story_entities/game_world.h

    r7338 r7339  
    4747
    4848    void setPlaymode(Playable::Playmode playmode);
     49    void setPlaymode(const std::string& playmode);
    4950    /**  this returns the current game time @returns elapsed game time     */
    5051    inline double getGameTime() { return this->gameTime; }
Note: See TracChangeset for help on using the changeset viewer.