Reorganized UnityEngine namespace
Reorganized UnityEngine namespace by splitting headers into individual classes
This commit is contained in:
@@ -50,9 +50,14 @@
|
|||||||
<ClCompile Include="include\Minhook\src\HDE\hde64.cpp" />
|
<ClCompile Include="include\Minhook\src\HDE\hde64.cpp" />
|
||||||
<ClCompile Include="include\Minhook\src\hook.cpp" />
|
<ClCompile Include="include\Minhook\src\hook.cpp" />
|
||||||
<ClCompile Include="include\Minhook\src\trampoline.cpp" />
|
<ClCompile Include="include\Minhook\src\trampoline.cpp" />
|
||||||
<ClCompile Include="lib\ClientHelper.cpp" />
|
<ClCompile Include="lib\private\ClientHelper.cpp" />
|
||||||
<ClCompile Include="lib\UnityEngine.cpp" />
|
<ClCompile Include="lib\private\UnityEngine\Camera.cpp" />
|
||||||
<ClCompile Include="lib\Wrapper.cpp" />
|
<ClCompile Include="lib\private\UnityEngine\GameObject.cpp" />
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Input.cpp" />
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Math.cpp" />
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Object.cpp" />
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Transform.cpp" />
|
||||||
|
<ClCompile Include="lib\private\wrapper.cpp" />
|
||||||
<ClCompile Include="user\features\esp\esp.cpp" />
|
<ClCompile Include="user\features\esp\esp.cpp" />
|
||||||
<ClCompile Include="user\features\menu.cpp" />
|
<ClCompile Include="user\features\menu.cpp" />
|
||||||
<ClCompile Include="user\features\misc\misc.cpp" />
|
<ClCompile Include="user\features\misc\misc.cpp" />
|
||||||
@@ -93,9 +98,15 @@
|
|||||||
<ClInclude Include="include\Minhook\src\HDE\table32.h" />
|
<ClInclude Include="include\Minhook\src\HDE\table32.h" />
|
||||||
<ClInclude Include="include\Minhook\src\HDE\table64.h" />
|
<ClInclude Include="include\Minhook\src\HDE\table64.h" />
|
||||||
<ClInclude Include="include\Minhook\src\trampoline.h" />
|
<ClInclude Include="include\Minhook\src\trampoline.h" />
|
||||||
<ClInclude Include="lib\ClientHelper.h" />
|
<ClInclude Include="lib\public\ClientHelper.h" />
|
||||||
<ClInclude Include="lib\UnityEngine.h" />
|
<ClInclude Include="lib\public\UnityEngine\Camera.h" />
|
||||||
<ClInclude Include="lib\Wrapper.h" />
|
<ClInclude Include="lib\public\UnityEngine\Engine.hpp" />
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\GameObject.h" />
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Input.h" />
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Math.h" />
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Object.h" />
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Transform.h" />
|
||||||
|
<ClInclude Include="lib\public\wrapper.h" />
|
||||||
<ClInclude Include="user\features\esp\esp.hpp" />
|
<ClInclude Include="user\features\esp\esp.hpp" />
|
||||||
<ClInclude Include="user\features\menu.hpp" />
|
<ClInclude Include="user\features\menu.hpp" />
|
||||||
<ClInclude Include="user\features\misc\misc.h" />
|
<ClInclude Include="user\features\misc\misc.h" />
|
||||||
@@ -226,7 +237,7 @@
|
|||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>pch-il2cpp.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch-il2cpp.h</PrecompiledHeaderFile>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)appdata;$(ProjectDir)framework;$(ProjectDir)user;$(ProjectDir)lib</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(ProjectDir)appdata;$(ProjectDir)framework;$(ProjectDir)user;$(ProjectDir)lib\public;</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
<ClCompile Include="framework\pch-il2cpp.cpp">
|
<ClCompile Include="framework\pch-il2cpp.cpp">
|
||||||
<Filter>framework</Filter>
|
<Filter>framework</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lib\Wrapper.cpp">
|
|
||||||
<Filter>lib</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="include\imgui\imgui.cpp">
|
<ClCompile Include="include\imgui\imgui.cpp">
|
||||||
<Filter>include\imgui</Filter>
|
<Filter>include\imgui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -64,18 +61,12 @@
|
|||||||
<ClCompile Include="user\settings\settings.cpp">
|
<ClCompile Include="user\settings\settings.cpp">
|
||||||
<Filter>user\settings</Filter>
|
<Filter>user\settings</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lib\ClientHelper.cpp">
|
|
||||||
<Filter>lib</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="user\utils\utils.cpp">
|
<ClCompile Include="user\utils\utils.cpp">
|
||||||
<Filter>user\utils</Filter>
|
<Filter>user\utils</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="user\features\misc\misc.cpp">
|
<ClCompile Include="user\features\misc\misc.cpp">
|
||||||
<Filter>user\features\misc</Filter>
|
<Filter>user\features\misc</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lib\UnityEngine.cpp">
|
|
||||||
<Filter>lib</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="user\players\players.cpp">
|
<ClCompile Include="user\players\players.cpp">
|
||||||
<Filter>user\players</Filter>
|
<Filter>user\players</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -85,6 +76,30 @@
|
|||||||
<ClCompile Include="user\network\VersionControl.cpp">
|
<ClCompile Include="user\network\VersionControl.cpp">
|
||||||
<Filter>user\network</Filter>
|
<Filter>user\network</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\ClientHelper.cpp">
|
||||||
|
<Filter>lib\private</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\wrapper.cpp">
|
||||||
|
<Filter>lib\private</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Camera.cpp">
|
||||||
|
<Filter>lib\private\UnityEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\GameObject.cpp">
|
||||||
|
<Filter>lib\private\UnityEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Input.cpp">
|
||||||
|
<Filter>lib\private\UnityEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Math.cpp">
|
||||||
|
<Filter>lib\private\UnityEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Object.cpp">
|
||||||
|
<Filter>lib\private\UnityEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lib\private\UnityEngine\Transform.cpp">
|
||||||
|
<Filter>lib\private\UnityEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="user\main.h">
|
<ClInclude Include="user\main.h">
|
||||||
@@ -120,9 +135,6 @@
|
|||||||
<ClInclude Include="framework\pch-il2cpp.h">
|
<ClInclude Include="framework\pch-il2cpp.h">
|
||||||
<Filter>framework</Filter>
|
<Filter>framework</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lib\Wrapper.h">
|
|
||||||
<Filter>lib</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="include\imgui\imconfig.h">
|
<ClInclude Include="include\imgui\imconfig.h">
|
||||||
<Filter>include\imgui</Filter>
|
<Filter>include\imgui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -183,9 +195,6 @@
|
|||||||
<ClInclude Include="user\settings\settings.hpp">
|
<ClInclude Include="user\settings\settings.hpp">
|
||||||
<Filter>user\settings</Filter>
|
<Filter>user\settings</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lib\ClientHelper.h">
|
|
||||||
<Filter>lib</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="user\utils\utils.hpp">
|
<ClInclude Include="user\utils\utils.hpp">
|
||||||
<Filter>user\utils</Filter>
|
<Filter>user\utils</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -195,9 +204,6 @@
|
|||||||
<ClInclude Include="include\color.hpp">
|
<ClInclude Include="include\color.hpp">
|
||||||
<Filter>include</Filter>
|
<Filter>include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lib\UnityEngine.h">
|
|
||||||
<Filter>lib</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="user\players\players.h">
|
<ClInclude Include="user\players\players.h">
|
||||||
<Filter>user\players</Filter>
|
<Filter>user\players</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -210,6 +216,33 @@
|
|||||||
<ClInclude Include="include\json.hpp">
|
<ClInclude Include="include\json.hpp">
|
||||||
<Filter>include</Filter>
|
<Filter>include</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\ClientHelper.h">
|
||||||
|
<Filter>lib\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\wrapper.h">
|
||||||
|
<Filter>lib\public</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Camera.h">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Engine.hpp">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\GameObject.h">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Input.h">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Math.h">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Object.h">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lib\public\UnityEngine\Transform.h">
|
||||||
|
<Filter>lib\public\UnityEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="appdata">
|
<Filter Include="appdata">
|
||||||
@@ -257,5 +290,17 @@
|
|||||||
<Filter Include="user\network">
|
<Filter Include="user\network">
|
||||||
<UniqueIdentifier>{faef4024-c359-4051-90fc-8735a4acbe8f}</UniqueIdentifier>
|
<UniqueIdentifier>{faef4024-c359-4051-90fc-8735a4acbe8f}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="lib\public">
|
||||||
|
<UniqueIdentifier>{22144ae2-ce2d-48f4-ac56-0cefde863748}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lib\private">
|
||||||
|
<UniqueIdentifier>{b83e2b95-1a9b-4065-8f3b-750d80fa32da}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lib\private\UnityEngine">
|
||||||
|
<UniqueIdentifier>{a4d2670d-9928-419c-ab6d-12fd69137e9f}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lib\public\UnityEngine">
|
||||||
|
<UniqueIdentifier>{289d934d-1844-4207-b865-47a910a88c81}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#include "pch-il2cpp.h"
|
|
||||||
|
|
||||||
#include "UnityEngine.h"
|
|
||||||
#include <helpers.h>
|
|
||||||
|
|
||||||
app::Component* UnityEngine::GameObject::GetComponentByName(app::GameObject* go, const char* type)
|
|
||||||
{
|
|
||||||
app::Component* component = app::GameObject_GetComponentByName(go, ConvertToSystemString(type), nullptr);
|
|
||||||
|
|
||||||
return component ? component : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
app::Component__Array* UnityEngine::GameObject::LogComponents(app::GameObject* go)
|
|
||||||
{
|
|
||||||
Wrapper obj("UnityEngine.CoreModule.dll");
|
|
||||||
|
|
||||||
Il2CppObject* object = obj.find_class("UnityEngine", "Component").get_class();
|
|
||||||
|
|
||||||
if (!object) return nullptr;
|
|
||||||
|
|
||||||
app::Type* type = reinterpret_cast<app::Type*>(object);
|
|
||||||
if (!type) return nullptr;
|
|
||||||
|
|
||||||
app::Component__Array* __components = app::GameObject_GetComponents(go, type, nullptr);
|
|
||||||
|
|
||||||
return __components ? __components : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* UnityEngine::Math::Vector3::ToString(app::Vector3* v)
|
|
||||||
{
|
|
||||||
app::String* str = app::Vector3_ToString(v, nullptr);
|
|
||||||
|
|
||||||
return str ? il2cppi_to_string(str).c_str() : "Vector::ToString returned nullptr!\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* UnityEngine::Math::Vector3::ToString(app::Vector3 v)
|
|
||||||
{
|
|
||||||
return ("x: " + std::to_string(v.x) + " y: " + std::to_string(v.y) + " z: " + std::to_string(v.z)).c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
app::Transform* UnityEngine::Transform::Get(app::GameObject* go)
|
|
||||||
{
|
|
||||||
if (!go || !app::GameObject_get_transform) return nullptr;
|
|
||||||
|
|
||||||
app::Transform* __transform = app::GameObject_get_transform(go, nullptr);
|
|
||||||
|
|
||||||
return __transform ? __transform : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
app::Vector3 UnityEngine::Transform::Position(app::Transform* transform)
|
|
||||||
{
|
|
||||||
if (!transform || !app::Transform_get_position) return app::Vector3();
|
|
||||||
|
|
||||||
return app::Transform_get_position(transform, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
app::Camera* UnityEngine::Camera::GetMainCamera() {
|
|
||||||
return app::Camera_get_main(nullptr) ? app::Camera_get_main(nullptr) : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* UnityEngine::Object::GetObjectName(app::Object_1* obj)
|
|
||||||
{
|
|
||||||
static std::string name = il2cppi_to_string(app::Object_1_GetName(obj, nullptr));
|
|
||||||
return name.c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
app::GameObject__Array* UnityEngine::Object::FindGameObjectsWithTag(const char* tag)
|
|
||||||
{
|
|
||||||
app::GameObject__Array* go_array_result = app::GameObject_FindGameObjectsWithTag(ConvertToSystemString(tag), nullptr);
|
|
||||||
|
|
||||||
return go_array_result ? go_array_result : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UnityEngine::Object::FindObjectFromInstanceID(int32_t instanceID)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
float UnityEngine::Input::GetAxis(const char* axisName)
|
|
||||||
{
|
|
||||||
return app::Input_1_GetAxis(ConvertToSystemString(axisName), nullptr);
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Wrapper.h"
|
|
||||||
#include "helpers.h"
|
|
||||||
#include "ClientHelper.h"
|
|
||||||
|
|
||||||
namespace UnityEngine {
|
|
||||||
namespace GameObject {
|
|
||||||
app::Component* GetComponentByName(app::GameObject* go, const char* type);
|
|
||||||
app::Component__Array* LogComponents(app::GameObject* go);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Math {
|
|
||||||
namespace Vector3 {
|
|
||||||
const char* ToString(app::Vector3* v);
|
|
||||||
const char* ToString(app::Vector3 v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Transform {
|
|
||||||
app::Transform* Get(app::GameObject* go);
|
|
||||||
app::Vector3 Position(app::Transform* transform);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Input {
|
|
||||||
static float GetAxis(const char* axisName);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Behaviour {
|
|
||||||
template<typename T>
|
|
||||||
static inline bool Enabled(T* behaviour) {
|
|
||||||
return app::Behaviour_get_enabled((app::Behaviour*)behaviour, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
static inline void Enabled(T* behaviour, bool value) {
|
|
||||||
app::Behaviour_set_enabled((app::Behaviour*)behaviour, value, nullptr);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Camera {
|
|
||||||
static app::Camera* GetMainCamera();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Object {
|
|
||||||
|
|
||||||
static const char* GetObjectName(app::Object_1* obj);
|
|
||||||
|
|
||||||
static app::GameObject__Array* FindGameObjectsWithTag(const char* tag);
|
|
||||||
|
|
||||||
// Object_1_FindObjectFromInstanceID
|
|
||||||
static void FindObjectFromInstanceID(int32_t instanceID);
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
static inline T* FindObjectOfType(const char* className, const char* classNamespace = "", const char* assemblyName = "Assembly-CSharp.dll") {
|
|
||||||
|
|
||||||
Wrapper obj(assemblyName);
|
|
||||||
|
|
||||||
Il2CppObject* object = obj.find_class(classNamespace, className).get_class();
|
|
||||||
|
|
||||||
if (!object || !app::Object_1_FindObjectOfType) return nullptr;
|
|
||||||
|
|
||||||
app::Object_1* obj_1 = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
|
||||||
|
|
||||||
if (!obj_1 || IsNull(obj_1)) return nullptr;
|
|
||||||
|
|
||||||
return reinterpret_cast<T*>(obj_1);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "ClientHelper.h"
|
#include "ClientHelper.h"
|
||||||
#include "players/players.h"
|
#include "players/players.h"
|
||||||
#include "UnityEngine.h"
|
#include "UnityEngine/Engine.hpp"
|
||||||
|
|
||||||
bool IsSinglePlayer()
|
bool IsSinglePlayer()
|
||||||
{
|
{
|
||||||
@@ -43,27 +43,23 @@ bool IsPlayerCrawling()
|
|||||||
|
|
||||||
bool IsPlayerCrawling(app::GameObject* go)
|
bool IsPlayerCrawling(app::GameObject* go)
|
||||||
{
|
{
|
||||||
if (go == NULL)
|
if (go == nullptr) return false;
|
||||||
|
|
||||||
|
app::Component* nbComponent = GameObject::GetComponentByName(go, "NolanBehaviour");
|
||||||
|
|
||||||
|
if (nbComponent) return false;
|
||||||
|
|
||||||
|
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(nbComponent);
|
||||||
|
|
||||||
|
if (nb)
|
||||||
|
return app::NolanBehaviour_IsCrawling(nb, nullptr);
|
||||||
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (app::GameObject_GetComponentByName != NULL) {
|
|
||||||
app::Component* nbComponent = app::GameObject_GetComponentByName(go, ConvertToSystemString("NolanBehaviour"), nullptr);
|
|
||||||
|
|
||||||
if (nbComponent) {
|
|
||||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(nbComponent);
|
|
||||||
|
|
||||||
if (nb) {
|
|
||||||
return app::NolanBehaviour_IsCrawling(nb, nullptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return app::NolanBehaviour_IsCrawling(Player::GetNolan(), nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsInGame()
|
bool IsInGame()
|
||||||
{
|
{
|
||||||
app::OptionsHelpers* optionsHelpers = UnityEngine::Object::FindObjectOfType<app::OptionsHelpers>("OptionsHelpers");
|
app::OptionsHelpers* optionsHelpers = Object::FindObjectOfType<app::OptionsHelpers>("OptionsHelpers");
|
||||||
|
|
||||||
if (optionsHelpers)
|
if (optionsHelpers)
|
||||||
return optionsHelpers->fields._inGame_k__BackingField;
|
return optionsHelpers->fields._inGame_k__BackingField;
|
||||||
@@ -71,14 +67,6 @@ bool IsInGame()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsNull(app::Object_1* obj)
|
|
||||||
{
|
|
||||||
if (obj == nullptr)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return !app::Object_1_op_Implicit(obj, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
app::GameObject* GetAzazel(app::Survival* survival)
|
app::GameObject* GetAzazel(app::Survival* survival)
|
||||||
{
|
{
|
||||||
app::GameObject* ai = app::Survival_GetAzazel(survival, nullptr);
|
app::GameObject* ai = app::Survival_GetAzazel(survival, nullptr);
|
||||||
8
lib/private/UnityEngine/Camera.cpp
Normal file
8
lib/private/UnityEngine/Camera.cpp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "UnityEngine/Camera.h"
|
||||||
|
|
||||||
|
app::Camera* Camera::GetMainCamera()
|
||||||
|
{
|
||||||
|
return app::Camera_get_main(nullptr) ? app::Camera_get_main(nullptr) : nullptr;
|
||||||
|
}
|
||||||
29
lib/private/UnityEngine/GameObject.cpp
Normal file
29
lib/private/UnityEngine/GameObject.cpp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "UnityEngine/GameObject.h"
|
||||||
|
|
||||||
|
#include "wrapper.h"
|
||||||
|
#include <helpers.h>
|
||||||
|
|
||||||
|
app::Component* GameObject::GetComponentByName(app::GameObject* go, const char* type)
|
||||||
|
{
|
||||||
|
app::Component* component = app::GameObject_GetComponentByName(go, ConvertToSystemString(type), nullptr);
|
||||||
|
|
||||||
|
return component ? component : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
app::Component__Array* GameObject::LogComponents(app::GameObject* go)
|
||||||
|
{
|
||||||
|
Wrapper obj("UnityEngine.CoreModule.dll");
|
||||||
|
|
||||||
|
Il2CppObject* object = obj.find_class("UnityEngine", "Component").get_class();
|
||||||
|
|
||||||
|
if (!object) return nullptr;
|
||||||
|
|
||||||
|
app::Type* type = reinterpret_cast<app::Type*>(object);
|
||||||
|
if (!type) return nullptr;
|
||||||
|
|
||||||
|
app::Component__Array* __components = app::GameObject_GetComponents(go, type, nullptr);
|
||||||
|
|
||||||
|
return __components ? __components : nullptr;
|
||||||
|
}
|
||||||
9
lib/private/UnityEngine/Input.cpp
Normal file
9
lib/private/UnityEngine/Input.cpp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "UnityEngine/Input.h"
|
||||||
|
#include <helpers.h>
|
||||||
|
|
||||||
|
float Input::GetAxis(const char* axisName)
|
||||||
|
{
|
||||||
|
return app::Input_1_GetAxis(ConvertToSystemString(axisName), nullptr);
|
||||||
|
}
|
||||||
16
lib/private/UnityEngine/Math.cpp
Normal file
16
lib/private/UnityEngine/Math.cpp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "UnityEngine/Math.h"
|
||||||
|
#include <helpers.h>
|
||||||
|
|
||||||
|
const char* Math::Vector3::ToString(app::Vector3* v)
|
||||||
|
{
|
||||||
|
app::String* str = app::Vector3_ToString(v, nullptr);
|
||||||
|
|
||||||
|
return str ? il2cppi_to_string(str).c_str() : "Vector::ToString returned nullptr!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* Math::Vector3::ToString(app::Vector3 v)
|
||||||
|
{
|
||||||
|
return ("x: " + std::to_string(v.x) + " y: " + std::to_string(v.y) + " z: " + std::to_string(v.z)).c_str();
|
||||||
|
}
|
||||||
30
lib/private/UnityEngine/Object.cpp
Normal file
30
lib/private/UnityEngine/Object.cpp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "UnityEngine/Object.h"
|
||||||
|
#include <string>
|
||||||
|
#include <helpers.h>
|
||||||
|
|
||||||
|
const char* Object::GetObjectName(app::Object_1* obj)
|
||||||
|
{
|
||||||
|
static std::string name = il2cppi_to_string(app::Object_1_GetName(obj, nullptr));
|
||||||
|
return name.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
app::GameObject__Array* Object::FindGameObjectsWithTag(const char* tag)
|
||||||
|
{
|
||||||
|
app::GameObject__Array* go_array_result = app::GameObject_FindGameObjectsWithTag(ConvertToSystemString(tag), nullptr);
|
||||||
|
|
||||||
|
return go_array_result ? go_array_result : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Object::FindObjectFromInstanceID(int32_t instanceID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Object::IsNull(app::Object_1* obj)
|
||||||
|
{
|
||||||
|
if (obj == nullptr)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return !app::Object_1_op_Implicit(obj, nullptr);
|
||||||
|
}
|
||||||
19
lib/private/UnityEngine/Transform.cpp
Normal file
19
lib/private/UnityEngine/Transform.cpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
|
||||||
|
#include "UnityEngine/Transform.h"
|
||||||
|
|
||||||
|
app::Transform* Transform::Get(app::GameObject* go)
|
||||||
|
{
|
||||||
|
if (!go || !app::GameObject_get_transform) return nullptr;
|
||||||
|
|
||||||
|
app::Transform* __transform = app::GameObject_get_transform(go, nullptr);
|
||||||
|
|
||||||
|
return __transform ? __transform : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
app::Vector3 Transform::Position(app::Transform* transform)
|
||||||
|
{
|
||||||
|
if (!transform || !app::Transform_get_position) return app::Vector3();
|
||||||
|
|
||||||
|
return app::Transform_get_position(transform, nullptr);
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@ bool IsLocalPlayer(app::NolanBehaviour* player);
|
|||||||
bool IsPlayerCrawling();
|
bool IsPlayerCrawling();
|
||||||
bool IsPlayerCrawling(app::GameObject* go);
|
bool IsPlayerCrawling(app::GameObject* go);
|
||||||
bool IsInGame();
|
bool IsInGame();
|
||||||
bool IsNull(app::Object_1* obj);
|
|
||||||
|
|
||||||
app::GameObject* GetAzazel(app::Survival* survival);
|
app::GameObject* GetAzazel(app::Survival* survival);
|
||||||
|
|
||||||
5
lib/public/UnityEngine/Camera.h
Normal file
5
lib/public/UnityEngine/Camera.h
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
struct Camera {
|
||||||
|
static app::Camera* GetMainCamera();
|
||||||
|
};
|
||||||
7
lib/public/UnityEngine/Engine.hpp
Normal file
7
lib/public/UnityEngine/Engine.hpp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "UnityEngine/Camera.h"
|
||||||
|
#include "UnityEngine/GameObject.h"
|
||||||
|
#include "UnityEngine/Input.h"
|
||||||
|
#include "UnityEngine/Object.h"
|
||||||
|
#include "UnityEngine/Transform.h"
|
||||||
6
lib/public/UnityEngine/GameObject.h
Normal file
6
lib/public/UnityEngine/GameObject.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace GameObject {
|
||||||
|
app::Component* GetComponentByName(app::GameObject* go, const char* type);
|
||||||
|
app::Component__Array* LogComponents(app::GameObject* go);
|
||||||
|
};
|
||||||
5
lib/public/UnityEngine/Input.h
Normal file
5
lib/public/UnityEngine/Input.h
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
struct Input {
|
||||||
|
static float GetAxis(const char* axisName);
|
||||||
|
};
|
||||||
8
lib/public/UnityEngine/Math.h
Normal file
8
lib/public/UnityEngine/Math.h
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Math {
|
||||||
|
namespace Vector3 {
|
||||||
|
const char* ToString(app::Vector3* v);
|
||||||
|
const char* ToString(app::Vector3 v);
|
||||||
|
}
|
||||||
|
}
|
||||||
37
lib/public/UnityEngine/Object.h
Normal file
37
lib/public/UnityEngine/Object.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "wrapper.h"
|
||||||
|
|
||||||
|
struct Object {
|
||||||
|
static const char* GetObjectName(app::Object_1* obj);
|
||||||
|
static app::GameObject__Array* FindGameObjectsWithTag(const char* tag);
|
||||||
|
static void FindObjectFromInstanceID(int32_t instanceID);
|
||||||
|
|
||||||
|
static bool IsNull(app::Object_1* obj);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static inline T* FindObjectOfType(const char* className, const char* classNamespace = "", const char* assemblyName = "Assembly-CSharp.dll") {
|
||||||
|
|
||||||
|
Wrapper obj(assemblyName);
|
||||||
|
|
||||||
|
Il2CppObject* object = obj.find_class(classNamespace, className).get_class();
|
||||||
|
|
||||||
|
if (!object || !app::Object_1_FindObjectOfType) return nullptr;
|
||||||
|
|
||||||
|
app::Object_1* obj_1 = app::Object_1_FindObjectOfType(reinterpret_cast<app::Type*>(object), nullptr);
|
||||||
|
|
||||||
|
if (!obj_1 || IsNull(obj_1)) return nullptr;
|
||||||
|
|
||||||
|
return reinterpret_cast<T*>(obj_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static inline bool Enabled(T* behaviour) {
|
||||||
|
return app::Behaviour_get_enabled((app::Behaviour*)behaviour, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static inline void Enabled(T* behaviour, bool value) {
|
||||||
|
app::Behaviour_set_enabled((app::Behaviour*)behaviour, value, nullptr);
|
||||||
|
}
|
||||||
|
};
|
||||||
6
lib/public/UnityEngine/Transform.h
Normal file
6
lib/public/UnityEngine/Transform.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Transform {
|
||||||
|
app::Transform* Get(app::GameObject* go);
|
||||||
|
app::Vector3 Position(app::Transform* transform);
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "ClientHelper.h"
|
#include "ClientHelper.h"
|
||||||
#include "UnityEngine.h"
|
#include "UnityEngine/Engine.hpp"
|
||||||
#include "players/players.h"
|
#include "players/players.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "esp.hpp"
|
#include "esp.hpp"
|
||||||
@@ -31,11 +31,11 @@ static void DrawBoxESP(app::GameObject *it, float footOffset, float headOffset,
|
|||||||
if (!it || cam == nullptr)
|
if (!it || cam == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
app::Transform* _transform = UnityEngine::Transform::Get(it);
|
app::Transform* _transform = Transform::Get(it);
|
||||||
if (_transform == nullptr)
|
if (_transform == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
app::Vector3 pos = UnityEngine::Transform::Position(_transform);
|
app::Vector3 pos = Transform::Position(_transform);
|
||||||
|
|
||||||
app::Vector3 footpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + footOffset, pos.z}, NULL);
|
app::Vector3 footpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + footOffset, pos.z}, NULL);
|
||||||
app::Vector3 headpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + headOffset, pos.z}, NULL);
|
app::Vector3 headpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + headOffset, pos.z}, NULL);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "ClientHelper.h"
|
#include "ClientHelper.h"
|
||||||
#include "players/players.h"
|
#include "players/players.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "UnityEngine.h"
|
#include "UnityEngine/Engine.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "Windows.h"
|
#include "Windows.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -16,7 +16,7 @@ void Misc::ForceStart()
|
|||||||
std::string _scene = SceneName();
|
std::string _scene = SceneName();
|
||||||
|
|
||||||
if (IsHost() && _scene == std::string("Menu")) {
|
if (IsHost() && _scene == std::string("Menu")) {
|
||||||
app::Menu* _menu = UnityEngine::Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
app::Menu* _menu = Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
||||||
|
|
||||||
if (_menu) {
|
if (_menu) {
|
||||||
if (app::Menu_OnLobbyStartButtonClick) {
|
if (app::Menu_OnLobbyStartButtonClick) {
|
||||||
@@ -99,7 +99,7 @@ void Misc::InstantWin()
|
|||||||
int32_t progress = 10;
|
int32_t progress = 10;
|
||||||
|
|
||||||
if (_scene == std::string("Inn")) {
|
if (_scene == std::string("Inn")) {
|
||||||
app::MapController* _MapController = UnityEngine::Object::FindObjectOfType<app::MapController>("MapController");
|
app::MapController* _MapController = Object::FindObjectOfType<app::MapController>("MapController");
|
||||||
|
|
||||||
if (_MapController) {
|
if (_MapController) {
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ void Misc::InstantWin()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_scene == std::string("Slaughterhouse")) {
|
else if (_scene == std::string("Slaughterhouse")) {
|
||||||
app::SlaughterhouseAltarController* _SlaughterhouseAltarController = UnityEngine::Object::FindObjectOfType<app::SlaughterhouseAltarController>("SlaughterhouseAltarController");
|
app::SlaughterhouseAltarController* _SlaughterhouseAltarController = Object::FindObjectOfType<app::SlaughterhouseAltarController>("SlaughterhouseAltarController");
|
||||||
|
|
||||||
if (_SlaughterhouseAltarController) {
|
if (_SlaughterhouseAltarController) {
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ void Misc::InstantWin()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//app::SurvivalObjectBurnController* _SurvivalObjectBurnController = UnityEngine::Object::FindObjectOfType("SurvivalObjectBurnController");
|
//app::SurvivalObjectBurnController* _SurvivalObjectBurnController = UnityEngine::Object::FindObjectOfType("SurvivalObjectBurnController");
|
||||||
app::SurvivalObjectBurnController* _SurvivalObjectBurnController = UnityEngine::Object::FindObjectOfType<app::SurvivalObjectBurnController>("SurvivalObjectBurnController");
|
app::SurvivalObjectBurnController* _SurvivalObjectBurnController = Object::FindObjectOfType<app::SurvivalObjectBurnController>("SurvivalObjectBurnController");
|
||||||
|
|
||||||
if (_SurvivalObjectBurnController) {
|
if (_SurvivalObjectBurnController) {
|
||||||
// DO_APP_FUNC(0x00562590, void, SurvivalObjectBurnController_SkipToGoat, (SurvivalObjectBurnController * __this, int32_t number, MethodInfo * method));
|
// DO_APP_FUNC(0x00562590, void, SurvivalObjectBurnController_SkipToGoat, (SurvivalObjectBurnController * __this, int32_t number, MethodInfo * method));
|
||||||
@@ -174,10 +174,10 @@ void Misc::SpawnPrefab(const char* prefabName) {
|
|||||||
if (localPlayer) {
|
if (localPlayer) {
|
||||||
app::Quaternion rotation = app::Quaternion_get_identity(NULL);
|
app::Quaternion rotation = app::Quaternion_get_identity(NULL);
|
||||||
|
|
||||||
app::Transform* playerTransform = UnityEngine::Transform::Get(localPlayer);
|
app::Transform* playerTransform = Transform::Get(localPlayer);
|
||||||
if (playerTransform == nullptr) return;
|
if (playerTransform == nullptr) return;
|
||||||
|
|
||||||
app::Vector3 playerPos = UnityEngine::Transform::Position(playerTransform);
|
app::Vector3 playerPos = Transform::Position(playerTransform);
|
||||||
|
|
||||||
if (app::BoltNetwork_Instantiate_6) {
|
if (app::BoltNetwork_Instantiate_6) {
|
||||||
app::GameObject* go = (app::GameObject*)app::BoltNetwork_Instantiate_6(p, playerPos, rotation, nullptr);
|
app::GameObject* go = (app::GameObject*)app::BoltNetwork_Instantiate_6(p, playerPos, rotation, nullptr);
|
||||||
@@ -194,7 +194,7 @@ void Misc::RankSpoofer(int value) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
app::NolanRankController* rankController = UnityEngine::Object::FindObjectOfType<app::NolanRankController>("NolanRankController");
|
app::NolanRankController* rankController = Object::FindObjectOfType<app::NolanRankController>("NolanRankController");
|
||||||
|
|
||||||
if (rankController != nullptr) {
|
if (rankController != nullptr) {
|
||||||
if (app::NolanRankController_SetRank != nullptr) {
|
if (app::NolanRankController_SetRank != nullptr) {
|
||||||
@@ -227,7 +227,7 @@ void Misc::Revive(bool self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// app::SurvivalReviveInteractable
|
// app::SurvivalReviveInteractable
|
||||||
app::SurvivalReviveInteractable* revive = UnityEngine::Object::FindObjectOfType<app::SurvivalReviveInteractable>("SurvivalReviveInteractable");
|
app::SurvivalReviveInteractable* revive = Object::FindObjectOfType<app::SurvivalReviveInteractable>("SurvivalReviveInteractable");
|
||||||
|
|
||||||
if (revive == NULL) {
|
if (revive == NULL) {
|
||||||
if (self) {
|
if (self) {
|
||||||
@@ -288,10 +288,10 @@ void Misc::Jumpscare() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
app::Survival* survival = UnityEngine::Object::FindObjectOfType<app::Survival>("Survival");
|
app::Survival* survival = Object::FindObjectOfType<app::Survival>("Survival");
|
||||||
if (survival == NULL) { return; }
|
if (survival == NULL) { return; }
|
||||||
|
|
||||||
app::SurvivalAzazelBehaviour* azazel = UnityEngine::Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
app::SurvivalAzazelBehaviour* azazel = Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
||||||
|
|
||||||
app::GameObject* ai = GetAzazel(survival);
|
app::GameObject* ai = GetAzazel(survival);
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ void Misc::Jumpscare() {
|
|||||||
|
|
||||||
if (currentPlayer == NULL) continue;
|
if (currentPlayer == NULL) continue;
|
||||||
|
|
||||||
app::Component* component = UnityEngine::GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
app::Component* component = GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||||
|
|
||||||
if (component != NULL) {
|
if (component != NULL) {
|
||||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(component);
|
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(component);
|
||||||
@@ -333,10 +333,10 @@ void Misc::Kill(bool self) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
app::Survival* survival = UnityEngine::Object::FindObjectOfType<app::Survival>("Survival");
|
app::Survival* survival = Object::FindObjectOfType<app::Survival>("Survival");
|
||||||
if (survival == NULL) { return; }
|
if (survival == NULL) { return; }
|
||||||
|
|
||||||
app::SurvivalAzazelBehaviour* azazel = UnityEngine::Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
app::SurvivalAzazelBehaviour* azazel = Object::FindObjectOfType<app::SurvivalAzazelBehaviour>("SurvivalAzazelBehaviour");
|
||||||
|
|
||||||
app::GameObject* ai = GetAzazel(survival);
|
app::GameObject* ai = GetAzazel(survival);
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@ void Misc::Kill(bool self) {
|
|||||||
|
|
||||||
if (currentPlayer == NULL) continue;
|
if (currentPlayer == NULL) continue;
|
||||||
|
|
||||||
app::Component* component = UnityEngine::GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
app::Component* component = GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||||
|
|
||||||
if (component != NULL) {
|
if (component != NULL) {
|
||||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(component);
|
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(component);
|
||||||
@@ -396,7 +396,7 @@ void Misc::TpToAzazel()
|
|||||||
if (nb == nullptr) return;
|
if (nb == nullptr) return;
|
||||||
|
|
||||||
|
|
||||||
app::Survival* _survival = UnityEngine::Object::FindObjectOfType<app::Survival>("Survival");
|
app::Survival* _survival = Object::FindObjectOfType<app::Survival>("Survival");
|
||||||
if (_survival == nullptr) return;
|
if (_survival == nullptr) return;
|
||||||
|
|
||||||
// get azazel
|
// get azazel
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
|
||||||
#include "players/players.h"
|
#include "players/players.h"
|
||||||
#include "UnityEngine.h"
|
#include "UnityEngine/Engine.hpp"
|
||||||
#include "ClientHelper.h"
|
#include "ClientHelper.h"
|
||||||
#include "features/misc/misc.h"
|
#include "features/misc/misc.h"
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ void __stdcall hNolanBehaviour_Update(app::NolanBehaviour* __this, MethodInfo* m
|
|||||||
|
|
||||||
if (transform) {
|
if (transform) {
|
||||||
|
|
||||||
app::Vector3 pos = UnityEngine::Transform::Position(transform);
|
app::Vector3 pos = Transform::Position(transform);
|
||||||
|
|
||||||
if (GetAsyncKeyState('W') & 0x8000) {
|
if (GetAsyncKeyState('W') & 0x8000) {
|
||||||
pos = pos + (app::Transform_get_forward(transform, nullptr) * speed * Time_DeltaTime());
|
pos = pos + (app::Transform_get_forward(transform, nullptr) * speed * Time_DeltaTime());
|
||||||
@@ -116,10 +116,10 @@ void __stdcall hNolanBehaviour_Update(app::NolanBehaviour* __this, MethodInfo* m
|
|||||||
|
|
||||||
app::GameObject* thisGameObject = app::Component_get_gameObject((app::Component*)__this, nullptr);
|
app::GameObject* thisGameObject = app::Component_get_gameObject((app::Component*)__this, nullptr);
|
||||||
|
|
||||||
if (thisGameObject != nullptr || !IsNull((app::Object_1*)thisGameObject)) {
|
if (thisGameObject != nullptr || !Object::IsNull((app::Object_1*)thisGameObject)) {
|
||||||
app::Component* _UltimateCharacterLocomotion = UnityEngine::GameObject::GetComponentByName(thisGameObject, "UltimateCharacterLocomotion");
|
app::Component* _UltimateCharacterLocomotion = GameObject::GetComponentByName(thisGameObject, "UltimateCharacterLocomotion");
|
||||||
|
|
||||||
if (_UltimateCharacterLocomotion != nullptr && !IsNull((app::Object_1*)_UltimateCharacterLocomotion)) {
|
if (_UltimateCharacterLocomotion != nullptr && !Object::IsNull((app::Object_1*)_UltimateCharacterLocomotion)) {
|
||||||
if (app::UltimateCharacterLocomotion_SetPosition_1) {
|
if (app::UltimateCharacterLocomotion_SetPosition_1) {
|
||||||
app::UltimateCharacterLocomotion_SetPosition_1((app::UltimateCharacterLocomotion*)_UltimateCharacterLocomotion, pos, false, nullptr);
|
app::UltimateCharacterLocomotion_SetPosition_1((app::UltimateCharacterLocomotion*)_UltimateCharacterLocomotion, pos, false, nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "Wrapper.h"
|
#include "Wrapper.h"
|
||||||
#include "ClientHelper.h"
|
#include "ClientHelper.h"
|
||||||
#include "hooks/hooks.hpp"
|
#include "hooks/hooks.hpp"
|
||||||
#include "UnityEngine.h"
|
#include "UnityEngine/Engine.hpp"
|
||||||
#include "color.hpp"
|
#include "color.hpp"
|
||||||
#include "features/misc/misc.h"
|
#include "features/misc/misc.h"
|
||||||
#include "utils/utils.hpp"
|
#include "utils/utils.hpp"
|
||||||
@@ -127,7 +127,7 @@ void Run()
|
|||||||
std::string scene = SceneName();
|
std::string scene = SceneName();
|
||||||
|
|
||||||
if (scene == std::string("Menu")) {
|
if (scene == std::string("Menu")) {
|
||||||
app::Menu* horrorMenu = UnityEngine::Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
app::Menu* horrorMenu = Object::FindObjectOfType<app::Menu>("Menu", "Horror");
|
||||||
|
|
||||||
if (!horrorMenu)
|
if (!horrorMenu)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
#include "players.h"
|
#include "players.h"
|
||||||
#include <helpers.h>
|
#include <helpers.h>
|
||||||
#include "UnityEngine.h"
|
#include "UnityEngine/Engine.hpp"
|
||||||
#include "ClientHelper.h"
|
#include "ClientHelper.h"
|
||||||
|
|
||||||
app::GameObject__Array* Players::GetAllPlayers()
|
app::GameObject__Array* Players::GetAllPlayers()
|
||||||
{
|
{
|
||||||
app::GameObject__Array* players = UnityEngine::Object::FindGameObjectsWithTag("Player");
|
app::GameObject__Array* players = Object::FindGameObjectsWithTag("Player");
|
||||||
|
|
||||||
return players ? players : nullptr;
|
return players ? players : nullptr;
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ app::GameObject* Player::GetLocalPlayer()
|
|||||||
|
|
||||||
if (cachedLocalPlayer != nullptr) {
|
if (cachedLocalPlayer != nullptr) {
|
||||||
// Check if cached player is still valid
|
// Check if cached player is still valid
|
||||||
if (IsNull((app::Object_1*)cachedLocalPlayer)) {
|
if (Object::IsNull((app::Object_1*)cachedLocalPlayer)) {
|
||||||
cachedLocalPlayer = nullptr;
|
cachedLocalPlayer = nullptr;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -35,11 +35,11 @@ app::GameObject* Player::GetLocalPlayer()
|
|||||||
for (int i = 0; i < _size; i++) {
|
for (int i = 0; i < _size; i++) {
|
||||||
app::GameObject* currentPlayer = playerList->vector[i];
|
app::GameObject* currentPlayer = playerList->vector[i];
|
||||||
|
|
||||||
if (IsNull((app::Object_1*)currentPlayer)) {
|
if (Object::IsNull((app::Object_1*)currentPlayer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
app::Component* nbComponent = UnityEngine::GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
app::Component* nbComponent = GameObject::GetComponentByName(currentPlayer, "NolanBehaviour");
|
||||||
|
|
||||||
if (nbComponent) {
|
if (nbComponent) {
|
||||||
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(nbComponent);
|
app::NolanBehaviour* nb = reinterpret_cast<app::NolanBehaviour*>(nbComponent);
|
||||||
@@ -64,7 +64,7 @@ app::NolanBehaviour* Player::GetNolan()
|
|||||||
|
|
||||||
if (lastLocalPlayer != localPlayer) {
|
if (lastLocalPlayer != localPlayer) {
|
||||||
|
|
||||||
app::Component* nbComponent = UnityEngine::GameObject::GetComponentByName(localPlayer, "NolanBehaviour");
|
app::Component* nbComponent = GameObject::GetComponentByName(localPlayer, "NolanBehaviour");
|
||||||
|
|
||||||
if (nbComponent) {
|
if (nbComponent) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user