Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 1, 2009, 10:51:57 AM (15 years ago)
Author:
scheusso
Message:

fix for tab completion in dedicated server console

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp6/src/orxonox/gamestates/GSDedicated.cc

    r3240 r3263  
    8585
    8686        this->server_ = new Server(CommandLine::getValue("port"));
     87        if( this->commandLine_ )
     88          delete[] this->commandLine_;
    8789        COUT(0) << "Loading scene in server mode" << std::endl;
    8890
     
    111113    {
    112114        timeSinceLastUpdate_ += time.getDeltaTime();
    113         if (timeSinceLastUpdate_ >= NETWORK_PERIOD)
     115        //if (timeSinceLastUpdate_ >= NETWORK_PERIOD)
    114116        {
    115117            timeSinceLastUpdate_ -= static_cast<unsigned int>(timeSinceLastUpdate_ / NETWORK_PERIOD) * NETWORK_PERIOD;
    116118            server_->update(time);
    117119        }
    118         else
     120        /*else
    119121        {
    120122            msleep(static_cast<unsigned int>((NETWORK_PERIOD - timeSinceLastUpdate_)*1000));
    121123            msleep(static_cast<unsigned int>(NETWORK_PERIOD*1000)); // NOTE: this is to throttle the non-network framerate
    122124//            COUT(0) << "sleeping for " << (int)((NETWORK_PERIOD - timeSinceLastUpdate_) * 1000 * 1000) << " usec" << endl;
    123         }
     125        }*/
    124126        processQueue();
    125127        printLine();
     
    195197                            std::cout << endl << CommandExecutor::hint( std::string((const char*)this->commandLine_,inputIterator_) ) << endl;
    196198                            strncpy((char*)this->commandLine_, CommandExecutor::complete( std::string((const char*)this->commandLine_,inputIterator_) ).c_str(), MAX_COMMAND_LENGTH);
    197                             inputIterator_ = strlen((const char*)this->commandLine_);
     199                            this->inputIterator_ = strlen((const char*)this->commandLine_);
     200                            this->cursorX_ = this->inputIterator_;
    198201                            break;
    199202                        }
Note: See TracChangeset for help on using the changeset viewer.