mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 08:35:52 -04:00
Fix incorrect trigger of change flag for static doors
This commit is contained in:
parent
395f98e476
commit
31a4e10c6f
@ -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…
x
Reference in New Issue
Block a user