From 29792b92d193a7e6a332a89860b8061078caf602 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 1 Aug 2015 18:08:59 -0400 Subject: [PATCH] Fix black screen introduced by #507 --- Sources/Plasma/Apps/plClient/plClient.cpp | 22 ++++++++++++---------- Sources/Plasma/Apps/plClient/plClient.h | 2 -- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 9ff117ed..069a0ff9 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -812,10 +812,9 @@ bool plClient::MsgReceive(plMessage* msg) //============================================================================ if (plNetCommAuthMsg* authMsg = plNetCommAuthMsg::ConvertNoRef(msg)) { plgDispatch::Dispatch()->UnRegisterForExactType(plNetCommAuthMsg::Index(), GetKey()); - if (IS_NET_SUCCESS(authMsg->result)) { - SetFlag(kFlagInitialAuthComplete); + if (IS_NET_SUCCESS(authMsg->result)) IPatchGlobalAgeFiles(); - } + return true; } return hsKeyedObject::MsgReceive(msg); @@ -1477,21 +1476,24 @@ bool plClient::BeginGame() { plNetClientMgr::GetInstance()->Init(); IPlayIntroMovie("avi/CyanWorlds.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75); - SetFlag(kFlagIntroComplete); if (GetDone()) return false; - IPatchGlobalAgeFiles(); + if (NetCommGetStartupAge()->ageDatasetName.CompareI("StartUp") == 0) { + // This is needed because there is no auth step in this case + plNetCommAuthMsg* msg = new plNetCommAuthMsg(); + msg->result = kNetSuccess; + msg->param = nullptr; + msg->Send(); + } return true; } //============================================================================ void plClient::IPatchGlobalAgeFiles( void ) { - if (HasFlag(kFlagIntroComplete) && HasFlag(kFlagInitialAuthComplete)) { - plgDispatch::Dispatch()->RegisterForExactType(plResPatcherMsg::Index(), GetKey()); + plgDispatch::Dispatch()->RegisterForExactType(plResPatcherMsg::Index(), GetKey()); - plResPatcher* patcher = plResPatcher::GetInstance(); - patcher->Update(plManifest::EssentialGameManifests()); - } + plResPatcher* patcher = plResPatcher::GetInstance(); + patcher->Update(plManifest::EssentialGameManifests()); } void plClient::InitDLLs() diff --git a/Sources/Plasma/Apps/plClient/plClient.h b/Sources/Plasma/Apps/plClient/plClient.h index 197cbbdf..485d5045 100644 --- a/Sources/Plasma/Apps/plClient/plClient.h +++ b/Sources/Plasma/Apps/plClient/plClient.h @@ -248,8 +248,6 @@ public: kFlagDBGDisableRRequests, kFlagAsyncInitComplete, kFlagGlobalDataLoaded, - kFlagInitialAuthComplete, - kFlagIntroComplete, }; bool HasFlag(int f) const { return fFlags.IsBitSet(f); }