Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2007, 10:31:38 PM (17 years ago)
Author:
dumenim
Message:

blub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/orxonox.cc

    r599 r601  
    8787  {
    8888    public:
    89       OrxListener(OIS::Keyboard *keyboard, OIS::Mouse *mouse, audio::AudioManager*  auMan, SpaceshipSteering* steering)
     89      OrxListener(OIS::Keyboard *keyboard, OIS::Mouse *mouse, audio::AudioManager*  auMan, SpaceshipSteering* steering, gameMode mode)
    9090      : mKeyboard(keyboard), mMouse(mouse)
    9191      {
    9292
    9393
    94 
     94        mode_=mode;
    9595        speed = 250;
    9696        loop = 100;
     
    162162        //if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
    163163          //cout << "maximal MouseX: " << maxMouseX << "\tminMouseX: " << minMouseX << endl;
     164        if(mode_==SERVER)
     165          server_g->tick(evt.timeSinceLastFrame);
    164166        usleep(10);
    165167        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
     
    181183
    182184    private:
     185      gameMode mode_;
    183186      float speed;
    184187      float rotate;
     
    276279    switch(mode_){
    277280    case PRESENTATION:
     281      //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener());
     282      //std::cout << "could not add framelistener" << std::endl;
    278283      server_g->open();
    279284      break;
     
    369374    if(!ogre_->load()) die(/* unable to load */);
    370375    // add network framelistener
    371     ogre_->getRoot()->addFrameListener(new network::ServerFrameListener());
    372376  }
    373377
     
    536540
    537541    //if(mode_!=CLIENT) // just a hack ------- remove this in future
    538       frameListener_ = new OrxListener(keyboard_, mouse_, auMan_, steering_);
     542      frameListener_ = new OrxListener(keyboard_, mouse_, auMan_, steering_, mode_);
    539543    ogre_->getRoot()->addFrameListener(frameListener_);
    540544  }
Note: See TracChangeset for help on using the changeset viewer.