Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9059 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Jul 3, 2006, 6:30:42 PM (18 years ago)
Author:
patrick
Message:

merged the network branche with the trunk

Location:
trunk/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/multiplayer_team_deathmatch.cc

    r9008 r9059  
    8383  subscribeEvent( ES_GAME, SDLK_TAB );
    8484  subscribeEvent( ES_GAME, SDLK_F1 );
    85   subscribeEvent( ES_MENU, SDLK_F1 );
    8685  subscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 );
    8786
    88   this->notifier = new OrxGui::GLGuiNotifier();
    89   this->notifier->show();
    90   this->notifier->setAbsCoor2D(5, 30);
    91   this->notifier->setFadeAge( 6.0 );
    92   this->notifier->setHideAge( 8.0 );
    9387  this->input = new OrxGui::GLGuiInputLine();
    9488  this->input->setAbsCoor2D(180, 5);
     
    10498  unsubscribeEvent( ES_GAME, SDLK_TAB );
    10599  unsubscribeEvent( ES_GAME, SDLK_F1 );
    106   unsubscribeEvent( ES_MENU, SDLK_F1 );
    107100  unsubscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 );
    108 
    109   if ( this->notifier )
    110   {
    111     delete this->notifier;
    112     this->notifier = NULL;
    113   }
    114101
    115102  if ( this->input )
     
    308295
    309296  if ( team == 0 || team == 1 )
    310     return CL_SPACE_SHIP;
     297    return CL_FPS_PLAYER;
    311298
    312299  assert( false );
     
    316303{
    317304  if ( team == 0 )
    318     return "models/ships/reap_#.obj";
     305    return "models/creatures/doom_guy.md2";
    319306  else if ( team == 1 )
    320     return "models/ships/fighter.obj";
     307    return "models/creatures/doom_guy.md2";
    321308  else
    322309    return "";
     
    545532  } else if ( event.type == SDLK_F1 )
    546533  {
     534    if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed )
     535    {
     536      PRINTF(0)("hide stats\n");
     537      this->hideStats();
     538    }
    547539    if ( !this->statsBox && event.bPressed )
    548540    {
    549541      PRINTF(0)("show stats\n");
    550542      this->showStats();
    551     }
    552     if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed && this->table->rowCount() != 0 && this->table->columnCount() != 0 )
    553     {
    554       PRINTF(0)("hide stats\n");
    555       this->hideStats();
    556543    }
    557544  }
     
    597584
    598585  PRINTF(0)("CHATMESSAGE %s (%d): %s\n", name.c_str(), userId, message.c_str() );
    599   notifier->pushNotifyMessage(name + ": " + message);
     586  State::getPlayer()->hud().notifyUser(name + ": " + message);
    600587}
    601588
     
    624611void MultiplayerTeamDeathmatch::showStats( )
    625612{
    626   EventHandler::getInstance()->pushState( ES_MENU );
    627613  statsBox = new OrxGui::GLGuiBox();
    628614  statsBox->setAbsCoor2D( 300, 100 );
    629615
    630   this->table = new OrxGui::GLGuiTable(0,0);
     616  this->table = new OrxGui::GLGuiTable(5,5);
    631617
    632618  statsBox->pack( this->table );
     
    645631      statsBox = NULL;
    646632    }
    647 
    648     EventHandler::getInstance()->popState();
    649633}
    650634
  • trunk/src/util/multiplayer_team_deathmatch.h

    r9008 r9059  
    8383    OrxGui::GLGuiBox* box;
    8484   
    85     OrxGui::GLGuiNotifier* notifier;
    8685    OrxGui::GLGuiInputLine* input;
    8786   
Note: See TracChangeset for help on using the changeset viewer.