Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 24, 2008, 2:48:43 AM (16 years ago)
Author:
landauf
Message:

many changes, can't remember everything, but these are the most important:

  • attaching entities to other entities works
  • displaying models, lights and shadows works
  • controlling a spectator works
  • removed an update hack in PositionableEntity because I've found a much better solution

and with "works" I mean: it works on client, server and standalone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc

    r1993 r2006  
    3838
    3939#include "network/Host.h"
     40#include "network/ClientInformation.h"
    4041
    4142#include "GraphicsEngine.h"
     
    5758        this->bHumanPlayer_ = false;
    5859        this->bFinishedSetup_ = false;
     60        this->gametype_ = 0;
    5961
    6062        this->pawn_ = 0;
     
    7173        if (this->isInitialized())
    7274        {
    73             Gametype* gametype = Gametype::getCurrentGametype();
    74             if (gametype)
    75                 gametype->removePlayer(this);
     75            if (this->gametype_)
     76                this->gametype_->removePlayer(this);
    7677
    7778            if (this->controller_)
     
    101102    void PlayerInfo::changedName()
    102103    {
    103         Gametype* gametype = Gametype::getCurrentGametype();
    104         if (gametype)
    105             gametype->playerChangedName(this);
     104        if (this->gametype_)
     105            this->gametype_->playerChangedName(this);
    106106    }
    107107
     
    147147        else if (this->bFinishedSetup_)
    148148        {
    149             Gametype* gametype = Gametype::getCurrentGametype();
    150             if (gametype)
    151                 gametype->addPlayer(this);
     149            if (this->gametype_)
     150                this->gametype_->addPlayer(this);
    152151        }
    153152    }
     
    165164    void PlayerInfo::stopControl()
    166165    {
    167         this->pawn_->removePlayer();
     166        if (this->pawn_)
     167            this->pawn_->removePlayer();
    168168        this->pawn_ = 0;
    169169        this->pawnID_ = network::OBJECTID_UNKNOWN;
Note: See TracChangeset for help on using the changeset viewer.