mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 15:36:42 +00:00
Fix incorrect trigger of change flag for static doors
This commit is contained in:
parent
395f98e476
commit
31a4e10c6f
1 changed files with 6 additions and 4 deletions
|
@ -57,11 +57,13 @@ 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());
|
|
||||||
if (customData.mDoorState > 0)
|
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWorld()->activateDoor(ptr, customData.mDoorState == 1 ? true : false);
|
const DoorCustomData& customData = dynamic_cast<const DoorCustomData&>(*ptr.getRefData().getCustomData());
|
||||||
|
if (customData.mDoorState > 0)
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getWorld()->activateDoor(ptr, customData.mDoorState == 1 ? true : false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue