mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Fix incorrect trigger of change flag for static doors
This commit is contained in:
parent
395f98e476
commit
31a4e10c6f
@ -57,13 +57,15 @@ namespace MWClass
|
|||||||
physics.addObject(ptr);
|
physics.addObject(ptr);
|
||||||
|
|
||||||
// Resume the door's opening/closing animation if it wasn't finished
|
// Resume the door's opening/closing animation if it wasn't finished
|
||||||
ensureCustomData(ptr);
|
if (ptr.getRefData().getCustomData())
|
||||||
|
{
|
||||||
const DoorCustomData& customData = dynamic_cast<const DoorCustomData&>(*ptr.getRefData().getCustomData());
|
const DoorCustomData& customData = dynamic_cast<const DoorCustomData&>(*ptr.getRefData().getCustomData());
|
||||||
if (customData.mDoorState > 0)
|
if (customData.mDoorState > 0)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWorld()->activateDoor(ptr, customData.mDoorState == 1 ? true : false);
|
MWBase::Environment::get().getWorld()->activateDoor(ptr, customData.mDoorState == 1 ? true : false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string Door::getModel(const MWWorld::Ptr &ptr) const
|
std::string Door::getModel(const MWWorld::Ptr &ptr) const
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user