1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Integrate SecurePreloader into pfPatcher

This commit is contained in:
2013-11-25 11:55:29 -05:00
parent 9d162a7a32
commit 3299267976
26 changed files with 241 additions and 742 deletions

View File

@ -86,7 +86,6 @@ target_link_libraries(plClient pfJournalBook)
target_link_libraries(plClient pfLocalizationMgr)
target_link_libraries(plClient pfMessage)
target_link_libraries(plClient pfPython)
target_link_libraries(plClient pfSecurePreloader)
target_link_libraries(plClient pfSurface)
target_link_libraries(plClient plAgeDescription)
target_link_libraries(plClient plAgeLoader)

View File

@ -73,7 +73,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnMessage/plCameraMsg.h"
#include "plMessage/plTransitionMsg.h"
#include "plMessage/plLinkToAgeMsg.h"
#include "plMessage/plPreloaderMsg.h"
#include "plMessage/plNetCommMsgs.h"
#include "plMessage/plAgeLoadedMsg.h"
#include "plMessage/plResPatcherMsg.h"
@ -151,7 +150,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetCommon/plNetCommonConstants.h"
#include "plNetGameLib/plNetGameLib.h"
#include "pfSecurePreloader/pfSecurePreloader.h"
#include "pfLocalizationMgr/pfLocalizationMgr.h"
#include "pfPatcher/plManifests.h"
@ -312,11 +310,6 @@ bool plClient::Shutdown()
plAgeLoader::GetInstance()->UnRegisterAs(kAgeLoader_KEY); // deletes instance
plAgeLoader::SetInstance(nil);
}
if (pfSecurePreloader::GetInstance())
{
pfSecurePreloader::GetInstance()->Shutdown(); // will unregister itself
}
if (fInputManager)
{
@ -853,14 +846,6 @@ bool plClient::MsgReceive(plMessage* msg)
return true;
}
//============================================================================
// plPreloaderMsg
//============================================================================
if (plPreloaderMsg * preloaderMsg = plPreloaderMsg::ConvertNoRef(msg)) {
IHandlePreloaderMsg(preloaderMsg);
return true;
}
//============================================================================
// plResPatcherMsg
//============================================================================
@ -1565,8 +1550,7 @@ bool plClient::StartInit()
plgDispatch::Dispatch()->RegisterForExactType(plNetCommAuthMsg::Index(), GetKey());
plNetClientMgr::GetInstance()->Init();
plAgeLoader::GetInstance()->Init();
pfSecurePreloader::GetInstance()->Init();
plCmdIfaceModMsg* pModMsg2 = new plCmdIfaceModMsg;
pModMsg2->SetBCastFlag(plMessage::kBCastByExactType);
pModMsg2->SetSender(fConsole->GetKey());
@ -2516,27 +2500,6 @@ void plClient::ICompleteInit () {
clientMsg->Send();
}
//============================================================================
void plClient::IHandlePreloaderMsg (plPreloaderMsg * msg) {
plgDispatch::Dispatch()->UnRegisterForExactType(plPreloaderMsg::Index(), GetKey());
if (pfSecurePreloader* sp = pfSecurePreloader::GetInstance())
sp->Shutdown();
if (!msg->fSuccess) {
char str[1024];
StrPrintf(
str,
arrsize(str),
"Secure file preloader failed"
);
plNetClientApp::GetInstance()->QueueDisableNet(true, str);
return;
}
IPatchGlobalAgeFiles();
}
//============================================================================
void plClient::IHandlePatcherMsg (plResPatcherMsg * msg) {
plgDispatch::Dispatch()->UnRegisterForExactType(plResPatcherMsg::Index(), GetKey());
@ -2569,8 +2532,6 @@ void plClient::IHandleNetCommAuthMsg (plNetCommAuthMsg * msg) {
return;
}
plgDispatch::Dispatch()->RegisterForExactType(plPreloaderMsg::Index(), GetKey());
// Precache our secure files
pfSecurePreloader::GetInstance()->Start();
// Patch them global files!
IPatchGlobalAgeFiles();
}

View File

@ -181,7 +181,6 @@ protected:
void ICompleteInit ();
void IOnAsyncInitComplete ();
void IHandlePatcherMsg (plResPatcherMsg * msg);
void IHandlePreloaderMsg (plPreloaderMsg * msg);
void IHandleNetCommAuthMsg (plNetCommAuthMsg * msg);
bool IHandleAgeLoaded2Msg (plAgeLoaded2Msg * msg);