mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 19:59:09 +00:00
Fix custom startup ages
So, that net comm auth message was actually useful... Trololololo. Whatever.
This commit is contained in:
@ -807,6 +807,17 @@ bool plClient::MsgReceive(plMessage* msg)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// plNetCommAuthMsg
|
||||||
|
//============================================================================
|
||||||
|
if (plNetCommAuthMsg* authMsg = plNetCommAuthMsg::ConvertNoRef(msg)) {
|
||||||
|
plgDispatch::Dispatch()->UnRegisterForExactType(plNetCommAuthMsg::Index(), GetKey());
|
||||||
|
if (IS_NET_SUCCESS(authMsg->result)) {
|
||||||
|
SetFlag(kFlagInitialAuthComplete);
|
||||||
|
IPatchGlobalAgeFiles();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return hsKeyedObject::MsgReceive(msg);
|
return hsKeyedObject::MsgReceive(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1427,6 +1438,7 @@ bool plClient::StartInit()
|
|||||||
//
|
//
|
||||||
// Init Net before loading things
|
// Init Net before loading things
|
||||||
//
|
//
|
||||||
|
plgDispatch::Dispatch()->RegisterForExactType(plNetCommAuthMsg::Index(), GetKey());
|
||||||
plNetClientMgr::GetInstance()->RegisterAs(kNetClientMgr_KEY);
|
plNetClientMgr::GetInstance()->RegisterAs(kNetClientMgr_KEY);
|
||||||
plAgeLoader::GetInstance()->Init();
|
plAgeLoader::GetInstance()->Init();
|
||||||
|
|
||||||
@ -1465,6 +1477,7 @@ bool plClient::BeginGame()
|
|||||||
{
|
{
|
||||||
plNetClientMgr::GetInstance()->Init();
|
plNetClientMgr::GetInstance()->Init();
|
||||||
IPlayIntroMovie("avi/CyanWorlds.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
IPlayIntroMovie("avi/CyanWorlds.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||||
|
SetFlag(kFlagIntroComplete);
|
||||||
if (GetDone()) return false;
|
if (GetDone()) return false;
|
||||||
IPatchGlobalAgeFiles();
|
IPatchGlobalAgeFiles();
|
||||||
return true;
|
return true;
|
||||||
@ -1473,10 +1486,12 @@ bool plClient::BeginGame()
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void plClient::IPatchGlobalAgeFiles( void )
|
void plClient::IPatchGlobalAgeFiles( void )
|
||||||
{
|
{
|
||||||
plgDispatch::Dispatch()->RegisterForExactType(plResPatcherMsg::Index(), GetKey());
|
if (HasFlag(kFlagIntroComplete) && HasFlag(kFlagInitialAuthComplete)) {
|
||||||
|
plgDispatch::Dispatch()->RegisterForExactType(plResPatcherMsg::Index(), GetKey());
|
||||||
|
|
||||||
plResPatcher* patcher = plResPatcher::GetInstance();
|
plResPatcher* patcher = plResPatcher::GetInstance();
|
||||||
patcher->Update(plManifest::EssentialGameManifests());
|
patcher->Update(plManifest::EssentialGameManifests());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void plClient::InitDLLs()
|
void plClient::InitDLLs()
|
||||||
|
@ -248,6 +248,8 @@ public:
|
|||||||
kFlagDBGDisableRRequests,
|
kFlagDBGDisableRRequests,
|
||||||
kFlagAsyncInitComplete,
|
kFlagAsyncInitComplete,
|
||||||
kFlagGlobalDataLoaded,
|
kFlagGlobalDataLoaded,
|
||||||
|
kFlagInitialAuthComplete,
|
||||||
|
kFlagIntroComplete,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
|
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
|
||||||
|
Reference in New Issue
Block a user