mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 15:17:23 +08:00
feat(protection): model mismatch (#1014)
This commit is contained in:
parent
79e53211c6
commit
88addc5c7e
@ -55,11 +55,16 @@ namespace big
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_model_of_type(const rage::joaat_t hash, const eModelType type)
|
template<typename T, typename ...Args>
|
||||||
|
static bool is_model_of_type(const rage::joaat_t hash, const T arg, const Args... args)
|
||||||
{
|
{
|
||||||
if (const auto model = model_info::get_model(hash); model && model->m_model_type == type)
|
bool of_type = false;
|
||||||
return true;
|
if (const auto model = model_info::get_model(hash))
|
||||||
return false;
|
{
|
||||||
|
of_type = model->m_model_type == arg;
|
||||||
|
([&of_type, &model](eModelType type) { of_type |= model->m_model_type == type; }(args), ...);
|
||||||
|
}
|
||||||
|
return of_type;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user