From d2c2af326dce80440f9ffe9845caca38910ff8bf Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 19 May 2018 14:14:37 -0700 Subject: [PATCH] Minor fixes to CScriptDoor --- Runtime/World/CScriptDoor.cpp | 8 +++++++- amuse | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) 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