Merge pull request #689 from rextimmy/forest_physx2_fix

Physx 2.8 actor release fix
This commit is contained in:
LuisAntonRebollo 2014-10-02 01:05:11 +02:00
commit 4a6384486c

View file

@ -448,9 +448,8 @@ void PxWorld::releaseActor( NxActor &actor )
// Clear the userdata.
actor.userData = NULL;
// If the scene is not simulating then we have the
// write lock and can safely delete it now.
if ( !mIsSimulating )
// actors are one of the few objects that are stable removing this way in physx 2.8
if (mScene->isWritable() )
{
mScene->releaseActor( actor );
}