- Timestamp:
- Aug 26, 2010, 12:09:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/network/Host.cc
r7204 r7219 38 38 namespace orxonox { 39 39 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); 41 44 42 45 // Host* Host::instance_=0; … … 52 55 // assert(instance_==0); 53 56 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); 56 58 this->bIsActive_ = false; 57 59 } … … 65 67 assert( std::find( instances_s.begin(), instances_s.end(), this )!=instances_s.end() ); 66 68 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); 69 70 } 70 71
Note: See TracChangeset
for help on using the changeset viewer.