it kinda work

This commit is contained in:
Milxnor
2023-04-05 07:55:28 -04:00
parent bd4a8da94f
commit 0aa6c49580
25 changed files with 1247 additions and 219 deletions

View File

@@ -11,6 +11,8 @@
#include "FortPlayerPawn.h"
#include "globals.h"
#include "FortInventoryInterface.h"
#include <fstream>
#include "GenericPlatformTime.h"
#include "Map.h"
#include "events.h"
@@ -150,6 +152,9 @@ DWORD WINAPI Main(LPVOID)
Hooking::MinHook::Hook((PVOID)Addresses::GetNetMode, (PVOID)GetNetModeHook, nullptr);
}
GSRandSeed = FGenericPlatformTime::Cycles();
ReplicationRandStream = FRandomStream(FGenericPlatformTime::Cycles());
Hooking::MinHook::Hook((PVOID)Addresses::KickPlayer, (PVOID)AGameSession::KickPlayerHook, (PVOID*)&AGameSession::KickPlayerOriginal);
LOG_INFO(LogDev, "Size: 0x{:x}", sizeof(TMap<FName, void*>));
@@ -723,6 +728,16 @@ DWORD WINAPI Main(LPVOID)
LOG_ERROR(LogGame, "Restarting is not supported on chapter 2 and above!");
}
}
else if (GetAsyncKeyState(VK_F11) & 1)
{
std::ofstream stream("Test.log");
for (auto& Current : ReplicatedActors)
{
stream << Current << '\n';
}
}
Sleep(1000 / 30);
}