added IsNull function

IsNull(app::Object_1*): detects whether objects are null, works more efficiently than a nullptr check.
This commit is contained in:
Jadis0x
2024-05-31 23:24:48 +03:00
parent 75b119170e
commit 58e36f2eb9
4 changed files with 45 additions and 22 deletions

View File

@@ -73,6 +73,14 @@ bool IsInGame()
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* ai = app::Survival_GetAzazel(survival, nullptr);