Skip to content

Commit

Permalink
Workaround for wrong function being hooked
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Sep 30, 2022
1 parent d34dcc9 commit 5463605
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ bool FSaveMetadataPatch::Patch(FSaveHeader Header, APlayerController* PlayerCont

void FSaveMetadataPatch::RegisterPatch() {
UFGSaveSystem* Context = GetMutableDefault<UFGSaveSystem>();
SUBSCRIBE_METHOD_VIRTUAL(UFGSaveSystem::LoadSaveFile, Context, [](auto& scope, UFGSaveSystem* self, const FSaveHeader& SaveGame, APlayerController* Player)
void* ContextInterface = static_cast<IFGSaveManagerInterface*>(Context);
SUBSCRIBE_METHOD_VIRTUAL(UFGSaveSystem::LoadSaveFile, ContextInterface, [](auto& scope, UFGSaveSystem* self, const FSaveHeader& SaveGame, APlayerController* Player)
{
bool bAbort = Patch(SaveGame, Player);
if (bAbort)
Expand Down

0 comments on commit 5463605

Please sign in to comment.