mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
fix s3, fix health + backpack bug on 1.11, change replciation, fix 7.20 & 12.61, fix backpack on >S9, probably some other stuff i forgot
25 lines
876 B
C++
25 lines
876 B
C++
#include "Level.h"
|
|
|
|
UWorld*& ULevel::GetOwningWorld()
|
|
{
|
|
static auto OwningWorldOffset = GetOffset("OwningWorld");
|
|
return Get<UWorld*>(OwningWorldOffset);
|
|
}
|
|
|
|
bool ULevel::HasVisibilityChangeRequestPending()
|
|
{
|
|
// I believe implementation on this changes depending on the version
|
|
|
|
auto OwningWorld = GetOwningWorld();
|
|
|
|
if (!OwningWorld)
|
|
return false;
|
|
|
|
static auto CurrentLevelPendingVisibilityOffset = OwningWorld->GetOffset("CurrentLevelPendingVisibility");
|
|
auto CurrentLevelPendingVisibility = OwningWorld->Get<ULevel*>(CurrentLevelPendingVisibilityOffset);
|
|
|
|
static auto CurrentLevelPendingInvisibilityOffset= OwningWorld->GetOffset("CurrentLevelPendingInvisibility");
|
|
auto CurrentLevelPendingInvisibility = OwningWorld->Get<ULevel*>(CurrentLevelPendingInvisibilityOffset);
|
|
|
|
return this == CurrentLevelPendingVisibility || this == CurrentLevelPendingInvisibility;
|
|
} |