Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2563


Ignore:
Timestamp:
Jan 1, 2009, 7:37:52 PM (15 years ago)
Author:
rgrieder
Message:

When the Scene does not support physics, the physical bodies in the WE still get created. Therefore the WE's will be added to the Scene to be added to Bullet.
So when a Scene suddenly becomes physical, it will empty the queue with WE's to Bullet.
This was a problem when synchronising over the network: The scene may not yet have had physics when certains WE's already got synchronised.

Also fixed a bug the synchronisation of the physics status of a WE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc

    r2562 r2563  
    652652            this->getScene()->addPhysicalObject(this);
    653653            this->bPhysicsActive_ = true;
     654            this->bPhysicsActiveSynchronised_ = true;
    654655        }
    655656    }
     
    662663            this->getScene()->removePhysicalObject(this);
    663664            this->bPhysicsActive_ = false;
     665            this->bPhysicsActiveSynchronised_ = false;
    664666        }
    665667    }
     
    692694        if (!this->isCollisionTypeLegal(type))
    693695            return;
    694         if (type != None && !this->getScene()->hasPhysics())
    695         {
    696             CCOUT(2) << "Warning: Cannot have physical bodies in a non physical scene." << std::endl;
    697             return;
    698         }
    699696
    700697        if (this->isPhysicsActive())
Note: See TracChangeset for help on using the changeset viewer.