Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 15, 2015, 11:11:59 PM (10 years ago)
Author:
landauf
Message:

fixed #419 http://www.orxonox.net/ticket/419
physics is only activated if a WorldEntity is active. so we should toggle physics if activity changes.

File:
1 edited

Legend:

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

    r9667 r10274  
    221221        if(GameMode::isMaster())
    222222        {
     223            // physics is only enabled if the WorldEntity is active
     224            if (this->isActive())
     225                this->activatePhysics();
     226            else
     227                this->deactivatePhysics();
     228
     229            // iterate over all children and change their activity as well
    223230            for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
    224231            {
     
    246253        if(GameMode::isMaster())
    247254        {
     255            // iterate over all children and change their visibility as well
    248256            for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
    249257            {
Note: See TracChangeset for help on using the changeset viewer.