Skip to content
Permalink
Browse files

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.
  • Loading branch information...
Hoikas committed Jan 8, 2012
1 parent 3e055e0 commit d8c1f6ef34df5a7160d69da5f686ecd0027ff60c
@@ -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();
}

0 comments on commit d8c1f6e

Please sign in to comment.
You can’t perform that action at this time.