From c1deed66c7150411c5035d1042615b7df3866901 Mon Sep 17 00:00:00 2001 From: Branan Purvine-Riley Date: Tue, 1 Nov 2011 00:39:17 -0700 Subject: [PATCH] Force page stream to stay open during a room load --- Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index effccaef..0350f6ed 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp @@ -1193,6 +1193,9 @@ void plResManager::PageInRoom(const plLocation& page, UInt16 objClassToRef, plRe return; } + // Step 0.9: Open the stream on this page, so it remains open for the entire loading process + pageNode->OpenStream(); + // Step 1: We force a load on all the keys in the given page kResMgrLog(2, ILog(2, "...Loading page keys...")); LoadPageKeys(pageNode); @@ -1211,6 +1214,7 @@ void plResManager::PageInRoom(const plLocation& page, UInt16 objClassToRef, plRe kResMgrLog(1, ILog(1, "...SceneNode not found to base page-in op on. Aborting...")); // This is coming up a lot lately; too intrusive to be an assert. // hsAssert( false, "No object found on which to base our PageInRoom()" ); + pageNode->CloseStream(); return; } @@ -1229,6 +1233,9 @@ void plResManager::PageInRoom(const plLocation& page, UInt16 objClassToRef, plRe kResMgrLog(2, ILog(2, "...Dispatching refMessage...")); AddViaNotify(objKey, refMsg, plRefFlags::kActiveRef); + // Step 5.9: Close the page stream + pageNode->CloseStream(); + // All done! kResMgrLog(1, ILog(1, "...Page in complete!"));