- Timestamp:
- Jun 25, 2006, 11:14:09 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/util/multiplayer_team_deathmatch.cc
r8773 r8774 81 81 subscribeEvent( ES_GAME, SDLK_TAB ); 82 82 subscribeEvent( ES_GAME, SDLK_F1 ); 83 subscribeEvent( ES_MENU, SDLK_F1 ); 83 84 subscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 ); 84 85 … … 101 102 unsubscribeEvent( ES_GAME, SDLK_TAB ); 102 103 unsubscribeEvent( ES_GAME, SDLK_F1 ); 104 unsubscribeEvent( ES_MENU, SDLK_F1 ); 103 105 unsubscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 ); 104 106 … … 550 552 } else if ( event.type == SDLK_F1 ) 551 553 { 552 if ( event.bPressed ) 554 if ( !this->statsBox && event.bPressed ) 555 { 556 PRINTF(0)("show stats\n"); 553 557 this->showStats(); 558 } 559 if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed && this->table->rowCount() != 0 && this->table->columnCount() != 0 ) 560 { 561 PRINTF(0)("hide stats\n"); 562 this->hideStats(); 563 } 554 564 } 555 565 else if ( event.type == SDLK_TAB ) … … 565 575 } 566 576 } 567 else if ( statsBox && event.type == KeyMapper::PEV_FIRE1 )577 else if ( this->bLocalPlayerDead && statsBox && event.type == KeyMapper::PEV_FIRE1 ) 568 578 { 569 579 this->hideStats(); … … 625 635 statsBox->setAbsCoor2D( 300, 100 ); 626 636 627 this->table = new OrxGui::GLGuiTable( 4, 4);637 this->table = new OrxGui::GLGuiTable(0,0); 628 638 629 639 statsBox->pack( this->table ); 630 631 statsBox->setAbsCoor2D(50, 200); 632 640 633 641 statsBox->showAll(); 634 642 } … … 676 684 PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it); 677 685 678 assert( stats.getTeamId() == 0 || stats.getTeamId() == 1 ); 679 if ( stats.getTeamId() == 0 ) 680 fragsTeam0[stats.getScore()] = stats.getNickName(); 681 else 682 fragsTeam1[stats.getScore()] = stats.getNickName(); 686 if ( stats.getTeamId() == 0 || stats.getTeamId() == 1 ) 687 { 688 if ( stats.getTeamId() == 0 ) 689 fragsTeam0[stats.getScore()] = stats.getNickName(); 690 else 691 fragsTeam1[stats.getScore()] = stats.getNickName(); 692 } 683 693 } 684 694
Note: See TracChangeset
for help on using the changeset viewer.