Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2015, 12:19:49 PM (9 years ago)
Author:
landauf
Message:

added check to detect if a collision shape is destroyed during a simulation step of bullet. this usually happens if a collision (or a 'hit') triggers an event which deletes an object. this yields undefined behavior and often leads to crashes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/Scene.h

    r10196 r10415  
    110110
    111111        public:
    112             inline bool hasPhysics()
     112            inline bool hasPhysics() const
    113113                { return this->physicalWorld_ != 0; }
    114114            void setPhysicalWorld(bool wantsPhysics);
     
    128128            void addPhysicalObject(WorldEntity* object);
    129129            void removePhysicalObject(WorldEntity* object);
     130
     131            inline bool isUpdatingPhysics() const
     132                { return this->bIsUpdatingPhysics_; }
    130133
    131134            void setDebugDrawPhysics(bool bDraw, bool bFill, float fillAlpha);
     
    163166            BulletDebugDrawer*                   debugDrawer_;
    164167            bool                                 bDebugDrawPhysics_;
     168            bool                                 bIsUpdatingPhysics_;
    165169    };
    166170}
Note: See TracChangeset for help on using the changeset viewer.