Files
Project-Reboot-3.0/Project Reboot 3.0/reboot.cpp
Milxnor a94005805c glorious update
work on rift tour, fix some crash and some bugs, added destroying gadgets when no more uses
2023-05-14 09:11:55 -04:00

29 lines
782 B
C++

#include "reboot.h"
#include "SoftObjectPtr.h"
#include "KismetStringLibrary.h"
UObject* Assets::LoadAsset(FName Name, bool ShowDelayTimes)
{
static UObject* (*LoadAssetOriginal)(FName a1, bool a2) = decltype(LoadAssetOriginal)(Assets::LoadAsset);
return LoadAssetOriginal(Name, ShowDelayTimes);
}
UObject* Assets::LoadSoftObject(void* SoftObjectPtr)
{
if (Engine_Version == 416)
{
auto tAssetPtr = (TAssetPtr<UObject>*)SoftObjectPtr;
// return LoadAsset(tAssetPtr->AssetPtr.ObjectID.AssetLongPathname.);
return nullptr; // later
}
auto tSoftObjectPtr = (TSoftObjectPtr<UObject>*)SoftObjectPtr;
// if (auto WeakObject = tSoftObjectPtr->GetByWeakObject())
// return WeakObject;
return Assets::LoadAsset(tSoftObjectPtr->SoftObjectPtr.ObjectID.AssetPathName);
}