2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Implement new pfSecurePreloader

- Fetches a "SecurePreloader" manifest from the FileSrv, allowing gzipped
  python packages
- Save data to the disk for future game launches. We only update if we
  detect what we loaded into memory doesn't match what the server has.
- Falls back to downloading Python\*.pak and SDL\*.pak from the AuthSrv if
  the "SecurePreloader" manifest is not found.
This commit is contained in:
2012-01-07 23:56:39 -05:00
parent e28993aab5
commit d7fa8cb613
3 changed files with 363 additions and 608 deletions

View File

@ -317,10 +317,9 @@ hsBool plClient::Shutdown()
plAgeLoader::SetInstance(nil);
}
if (pfSecurePreloader::IsInstanced())
if (pfSecurePreloader::GetInstance())
{
pfSecurePreloader::GetInstance()->Shutdown();
// pfSecurePreloader handles its own fixed key unregistration
pfSecurePreloader::GetInstance()->Shutdown(); // will unregister itself
}
if (fInputManager)
@ -2517,6 +2516,8 @@ void plClient::ICompleteInit () {
void plClient::IHandlePreloaderMsg (plPreloaderMsg * msg) {
plgDispatch::Dispatch()->UnRegisterForExactType(plPreloaderMsg::Index(), GetKey());
if (pfSecurePreloader* sp = pfSecurePreloader::GetInstance())
sp->Shutdown();
if (!msg->fSuccess) {
char str[1024];
@ -2555,7 +2556,5 @@ void plClient::IHandleNetCommAuthMsg (plNetCommAuthMsg * msg) {
plgDispatch::Dispatch()->RegisterForExactType(plPreloaderMsg::Index(), GetKey());
// Precache our secure files
pfSecurePreloader::GetInstance()->RequestFileGroup(L"Python", L"pak");
pfSecurePreloader::GetInstance()->RequestFileGroup(L"SDL", L"sdl");
pfSecurePreloader::GetInstance()->Start();
}