Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 26, 2010, 12:09:12 AM (14 years ago)
Author:
landauf
Message:

adapted all console commands to the new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/network/Host.cc

    r7204 r7219  
    3838namespace orxonox {
    3939
    40   SetConsoleCommandShortcut(Host, Chat);
     40  static const std::string __CC_printRTT_name = "printRTT";
     41
     42  _SetConsoleCommand("chat", &Host::Chat);
     43  _SetConsoleCommand(__CC_printRTT_name, &Host::printRTT);
    4144
    4245  // Host*               Host::instance_=0;
     
    5255  //   assert(instance_==0);
    5356    instances_s.push_back(this);
    54     this->printRTTCC_ = createConsoleCommand( createFunctor(&Host::printRTT, this), "printRTT" );
    55     CommandExecutor::addConsoleCommandShortcut( this->printRTTCC_ );
     57    _ModifyConsoleCommand(__CC_printRTT_name).setObject(this);
    5658    this->bIsActive_ = false;
    5759  }
     
    6567    assert( std::find( instances_s.begin(), instances_s.end(), this )!=instances_s.end() );
    6668    instances_s.erase(std::find( instances_s.begin(), instances_s.end(), this ));
    67     if( this->printRTTCC_ )
    68       delete this->printRTTCC_;
     69    _ModifyConsoleCommand(__CC_printRTT_name).setObject(0);
    6970  }
    7071
Note: See TracChangeset for help on using the changeset viewer.