NightFyre 9a743d2b16 toggle fullbright feature
- Adjusted SDK UGameViewportClient class members and padding
- Created helper function to get local player
- precompile headers for SDK
- SDK made into a static library ( single compile as its never changed )
2024-01-29 06:39:29 -05:00

62 lines
1.4 KiB
C++

#pragma once
// Dumped with Dumper-7!
#include "../pch.h"
namespace SDK
{
void InitGObjects()
{
UObject::GObjects = reinterpret_cast<TUObjectArray*>(uintptr_t(GetModuleHandle(0)) + Offsets::GObjects);
}
FString FSoftObjectPtr::GetSubPathString()
{
return ObjectID.SubPathString;
}
std::string FSoftObjectPtr::GetSubPathStringStr()
{
return ObjectID.SubPathString.ToString();
}
template<class SoftObjectPath>
SoftObjectPath& FSoftObjectPtr::GetObjectPath()
{
static_assert(std::is_same_v<SoftObjectPath, FSoftObjectPath>, "Only use this with FSoftObjectPath. This function is only templated as a workaround to C++ type-checks.");
return reinterpret_cast<FSoftObjectPath&>(ObjectID);
}
void Dummy() { FSoftObjectPtr().GetObjectPath(); }
class UObject* FWeakObjectPtr::Get() const
{
return UObject::GObjects->GetByIndex(ObjectIndex);
}
class UObject* FWeakObjectPtr::operator->() const
{
return UObject::GObjects->GetByIndex(ObjectIndex);
}
bool FWeakObjectPtr::operator==(const FWeakObjectPtr& Other) const
{
return ObjectIndex == Other.ObjectIndex;
}
bool FWeakObjectPtr::operator!=(const FWeakObjectPtr& Other) const
{
return ObjectIndex != Other.ObjectIndex;
}
bool FWeakObjectPtr::operator==(const class UObject* Other) const
{
return ObjectIndex == Other->Index;
}
bool FWeakObjectPtr::operator!=(const class UObject* Other) const
{
return ObjectIndex != Other->Index;
}
}