Dude 💀

This commit is contained in:
Gray
2024-03-20 21:45:38 -04:00
parent 138d3cc668
commit b3d9ab9e8b
46 changed files with 2846 additions and 1608 deletions

View File

@@ -80,15 +80,17 @@ static inline UEngine* GetEngine()
return Engine;
}
static inline class UWorld* GetWorld()
{
static UObject* Engine = GetEngine();
static auto GameViewportOffset = Engine->GetOffset("GameViewport");
auto GameViewport = Engine->Get<UObject*>(GameViewportOffset);
namespace {
static inline class UWorld* GetWorld()
{
static UObject* Engine = GetEngine();
static auto GameViewportOffset = Engine->GetOffset("GameViewport");
auto GameViewport = Engine->Get<UObject*>(GameViewportOffset);
static auto WorldOffset = GameViewport->GetOffset("World");
static auto WorldOffset = GameViewport->GetOffset("World");
return GameViewport->Get<class UWorld*>(WorldOffset);
return GameViewport->Get<class UWorld*>(WorldOffset);
}
}
static TArray<UObject*>& GetLocalPlayers()
@@ -406,7 +408,8 @@ namespace MemberOffsets
}
}
static inline float GetMaxTickRateHook() { return 30.f; }
inline float ServerTickRate = 30.f;
static inline float GetMaxTickRateHook() { return ServerTickRate; }
#define VALIDATEOFFSET(offset) if (!offset) LOG_WARN(LogDev, "[{}] Invalid offset", __FUNCTIONNAME__);