mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 00:32:49 +00:00
Added check before attempting to remove actor's collision object from world
This commit is contained in:
parent
2eb6ef50ca
commit
e30dfb13d3
@ -72,7 +72,10 @@ void Actor::enableCollisionBody(bool collision)
|
||||
|
||||
void Actor::updateCollisionMask()
|
||||
{
|
||||
mCollisionWorld->removeCollisionObject(mCollisionObject.get());
|
||||
if (mCollisionObject.get()->getWorldArrayIndex() >= 0)
|
||||
{
|
||||
mCollisionWorld->removeCollisionObject(mCollisionObject.get());
|
||||
}
|
||||
int collisionMask = CollisionType_World | CollisionType_HeightMap;
|
||||
if (mExternalCollisionMode)
|
||||
collisionMask |= CollisionType_Actor | CollisionType_Projectile | CollisionType_Door;
|
||||
|
Loading…
x
Reference in New Issue
Block a user