diff --git a/Runtime/World/CScriptDoor.cpp b/Runtime/World/CScriptDoor.cpp index b0e19084b..d772d1a5e 100644 --- a/Runtime/World/CScriptDoor.cpp +++ b/Runtime/World/CScriptDoor.cpp @@ -97,7 +97,7 @@ void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat { if (TCastToPtr door = mgr.ObjectById(x27c_partner1)) { - if (x2a8_26_isOpen) + if (!x2a8_26_isOpen) return; x2a8_30_doClose = true; mgr.SendScriptMsg(door, GetUniqueId(), EScriptObjectMessage::Close); @@ -147,7 +147,10 @@ void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat { TUniqueId dock = mgr.GetIdForScript(conn.x8_objId); if (TCastToConstPtr d = mgr.GetObjectById(dock)) + { x282_dockId = d->GetUniqueId(); + break; + } } } break; @@ -335,6 +338,9 @@ u32 CScriptDoor::GetDoorOpenCondition(CStateManager& mgr) if (destArea < 0 || destArea >= mgr.GetWorld()->GetNumAreas()) return 0; + if (!mgr.GetWorld()->GetAreaAlways(destArea)->IsPostConstructed()) + return 1; + if (!mgr.GetWorld()->AreSkyNeedsMet()) return 1; diff --git a/amuse b/amuse index 1fefba66e..594fb346e 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 1fefba66e7fc96cb6fc1b1b014c365da2e0b7a43 +Subproject commit 594fb346e1ffd25f7d387f42716cd77202460c30