mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Game Repair Mode
This adds a license-stopgap "feature" ... You can now update only the game data by using the -Repair argument on the launcher. You'll need to specify a stripped down MOULa server.ini with the GateKeeperSrv keys/host.
This commit is contained in:
@ -104,6 +104,7 @@ struct pfPatcherWorker : public hsThread
|
||||
|
||||
pfPatcher::CompletionFunc fOnComplete;
|
||||
pfPatcher::FileDownloadFunc fFileBeginDownload;
|
||||
pfPatcher::FileDesiredFunc fFileDownloadDesired;
|
||||
pfPatcher::FileDownloadFunc fFileDownloaded;
|
||||
pfPatcher::GameCodeDiscoverFunc fGameCodeDiscovered;
|
||||
pfPatcher::ProgressTickFunc fProgressTick;
|
||||
@ -482,7 +483,16 @@ void pfPatcherWorker::ProcessFile()
|
||||
}
|
||||
}
|
||||
|
||||
// If you got here, they're different.
|
||||
// It's different... but do we want it?
|
||||
if (fFileDownloadDesired) {
|
||||
if (!fFileDownloadDesired(clName)) {
|
||||
PatcherLogRed("\tDeclined '%S'", entry.clientName);
|
||||
fQueuedFiles.pop_front();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// If you got here, they're different and we want it.
|
||||
PatcherLogYellow("\tEnqueuing '%S'", entry.clientName);
|
||||
plFileSystem::CreateDir(plFileName(clName).StripFileName());
|
||||
|
||||
@ -564,6 +574,11 @@ void pfPatcher::OnFileDownloadBegin(FileDownloadFunc cb)
|
||||
fWorker->fFileBeginDownload = cb;
|
||||
}
|
||||
|
||||
void pfPatcher::OnFileDownloadDesired(FileDesiredFunc cb)
|
||||
{
|
||||
fWorker->fFileDownloadDesired = cb;
|
||||
}
|
||||
|
||||
void pfPatcher::OnFileDownloaded(FileDownloadFunc cb)
|
||||
{
|
||||
fWorker->fFileDownloaded = cb;
|
||||
|
@ -70,6 +70,9 @@ public:
|
||||
/** Represents a function that takes the status and an optional message on completion. */
|
||||
typedef std::function<void(ENetError, const plString&)> CompletionFunc;
|
||||
|
||||
/** Represents a function that takes (const plFileName&) and approves it. */
|
||||
typedef std::function<bool(const plFileName&)> FileDesiredFunc;
|
||||
|
||||
/** Represents a function that takes (const plFileName&) on an interesting file operation. */
|
||||
typedef std::function<void(const plFileName&)> FileDownloadFunc;
|
||||
|
||||
@ -95,6 +98,12 @@ public:
|
||||
*/
|
||||
void OnFileDownloadBegin(FileDownloadFunc cb);
|
||||
|
||||
/** Set a callback that will be fired when the patcher wants to download a file. You are
|
||||
* given the ability to approve or veto the download. With great power comes great responsibility...
|
||||
* \remarks This will be called from the patcher thread.
|
||||
*/
|
||||
void OnFileDownloadDesired(FileDesiredFunc cb);
|
||||
|
||||
/** Set a callback that will be fired when the patcher has finished downloading a file from the server.
|
||||
* \remarks This will be called from the network thread.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user