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/gametypes/TeamGametype.cc

    r2768 r2818  
    3434#include "objects/Teamcolourable.h"
    3535#include "objects/worldentities/TeamSpawnPoint.h"
    36 #include "objects/infos/PlayerInfo.h" // remove this
    3736
    3837namespace orxonox
     
    151150    }
    152151
    153     void TeamGametype::playerPostSpawn(PlayerInfo* player)
     152    void TeamGametype::playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn)
    154153    {
    155154        if (!player)
     
    160159        if (it_player != this->teamnumbers_.end() && it_player->second >= 0 && it_player->second < this->teamcolours_.size())
    161160        {
    162             if (player->getControllableEntity())
     161            if (pawn)
    163162            {
    164                 std::set<WorldEntity*> pawnAttachments = player->getControllableEntity()->getAttachedObjects();
     163                std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
    165164                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
    166165                {
Note: See TracChangeset for help on using the changeset viewer.