Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2009, 11:26:46 AM (15 years ago)
Author:
landauf
Message:

Added "Pong" minigame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.cc

    r2820 r2824  
    200200                // Reward killer
    201201                if (killer)
    202                 {
    203                     std::map<PlayerInfo*, Player>::iterator itKiller = this->players_.find(killer->getPlayer());
    204                     if (itKiller != this->players_.end())
    205                     {
    206                         this->playerScored(itKiller->second);
    207                     }
    208                     else
    209                         COUT(2) << "Warning: Killing Pawn was not in the playerlist" << std::endl;
    210                 }
     202                    this->playerScored(killer->getPlayer());
    211203
    212204                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(victim->getCreator());
     
    228220    }
    229221
    230     void Gametype::playerScored(Player& player)
    231     {
    232         player.frags_++;
     222    void Gametype::playerScored(PlayerInfo* player)
     223    {
     224        std::map<PlayerInfo*, Player>::iterator it = this->players_.find(player);
     225        if (it != this->players_.end())
     226            it->second.frags_++;
    233227    }
    234228
Note: See TracChangeset for help on using the changeset viewer.