forked from teamnwah/openmw-tes3coop
Added check before attempting to remove actor's collision object from world
This commit is contained in:
parent
2eb6ef50ca
commit
e30dfb13d3
1 changed files with 4 additions and 1 deletions
|
@ -72,7 +72,10 @@ void Actor::enableCollisionBody(bool collision)
|
||||||
|
|
||||||
void Actor::updateCollisionMask()
|
void Actor::updateCollisionMask()
|
||||||
{
|
{
|
||||||
|
if (mCollisionObject.get()->getWorldArrayIndex() >= 0)
|
||||||
|
{
|
||||||
mCollisionWorld->removeCollisionObject(mCollisionObject.get());
|
mCollisionWorld->removeCollisionObject(mCollisionObject.get());
|
||||||
|
}
|
||||||
int collisionMask = CollisionType_World | CollisionType_HeightMap;
|
int collisionMask = CollisionType_World | CollisionType_HeightMap;
|
||||||
if (mExternalCollisionMode)
|
if (mExternalCollisionMode)
|
||||||
collisionMask |= CollisionType_Actor | CollisionType_Projectile | CollisionType_Door;
|
collisionMask |= CollisionType_Actor | CollisionType_Projectile | CollisionType_Door;
|
||||||
|
|
Loading…
Reference in a new issue