Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

some nice fixes

File:
1 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/**
Note: See TracChangeset for help on using the changeset viewer.