Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Fixed attachment of "absolute" CameraPosition-Nodes in the Network (this refers to the top-down camera in Pong)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc

    r2839 r2851  
    335335    }
    336336
     337    void ControllableEntity::parentChanged()
     338    {
     339        WorldEntity::parentChanged();
     340
     341        WorldEntity* parent = this->getParent();
     342        if (parent)
     343        {
     344            for (std::list<CameraPosition*>::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     345                if ((*it)->getIsAbsolute())
     346                    parent->attach((*it));
     347        }
     348    }
     349
    337350    void ControllableEntity::tick(float dt)
    338351    {
Note: See TracChangeset for help on using the changeset viewer.