Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 22, 2009, 9:40:35 PM (15 years ago)
Author:
landauf
Message:

added two new functions to Gametype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/miniprojects/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2768 r2818  
    133133    }
    134134
     135    void Pawn::setPlayer(PlayerInfo* player)
     136    {
     137        ControllableEntity::setPlayer(player);
     138
     139        if (this->getGametype())
     140            this->getGametype()->playerStartsControllingPawn(player, this);
     141    }
     142
     143    void Pawn::removePlayer()
     144    {
     145        if (this->getGametype())
     146            this->getGametype()->playerStopsControllingPawn(this->getPlayer(), this);
     147
     148        ControllableEntity::removePlayer();
     149    }
     150
    135151    void Pawn::setHealth(float health)
    136152    {
Note: See TracChangeset for help on using the changeset viewer.