Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2903


Ignore:
Timestamp:
Apr 6, 2009, 4:48:32 PM (16 years ago)
Author:
scheusso
Message:

merged changes made to trunk (r2902) into branch

Location:
code/branches/gametypes/src/orxonox/objects
Files:
3 added
3 edited

Legend:

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

    r2826 r2903  
    189189        return false;
    190190    }
     191
     192    int TeamDeathmatch::getTeam(PlayerInfo* player)
     193    {
     194        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
     195        if (it_player != this->teamnumbers_.end())
     196            return it_player->second;
     197        else
     198            return -1;
     199    }
    191200}
  • code/branches/gametypes/src/orxonox/objects/gametypes/TeamDeathmatch.h

    r2826 r2903  
    5858            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
    5959            bool pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2);
     60            int getTeam(PlayerInfo* player);
    6061
    6162            std::map<PlayerInfo*, int> teamnumbers_;
  • code/branches/gametypes/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2826 r2903  
    198198    void Pawn::death()
    199199    {
     200        this->setHealth(1);
    200201        if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
    201202        {
     
    214215                this->deatheffect();
    215216        }
    216         else
    217             this->setHealth(1);
    218217    }
    219218
Note: See TracChangeset for help on using the changeset viewer.