mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-05 18:19:41 +00:00
[Client] Ensure physics actor is valid in World::setOnGround()
Do the same in World::setInertialForce()
This commit is contained in:
parent
e010c61167
commit
20e37204d0
1 changed files with 11 additions and 3 deletions
|
@ -1715,8 +1715,12 @@ namespace MWWorld
|
|||
void World::setInertialForce(const Ptr& ptr, const osg::Vec3f &force)
|
||||
{
|
||||
MWPhysics::Actor *actor = mPhysics->getActor(ptr);
|
||||
actor->setOnGround(false);
|
||||
actor->setInertialForce(force);
|
||||
|
||||
if (actor != nullptr)
|
||||
{
|
||||
actor->setOnGround(false);
|
||||
actor->setInertialForce(force);
|
||||
}
|
||||
}
|
||||
/*
|
||||
End of tes3mp addition
|
||||
|
@ -1731,7 +1735,11 @@ namespace MWWorld
|
|||
void World::setOnGround(const Ptr& ptr, bool onGround)
|
||||
{
|
||||
MWPhysics::Actor* actor = mPhysics->getActor(ptr);
|
||||
actor->setOnGround(onGround);
|
||||
|
||||
if (actor != nullptr)
|
||||
{
|
||||
actor->setOnGround(onGround);
|
||||
}
|
||||
}
|
||||
/*
|
||||
End of tes3mp addition
|
||||
|
|
Loading…
Reference in a new issue