[AssetHandler] Don't display missing techset errors for dedis
This commit is contained in:
parent
8d020f160a
commit
f0db0f2114
@ -399,6 +399,12 @@ namespace Components
|
||||
}
|
||||
}
|
||||
|
||||
void AssetHandler::MissingAssetError(int severity, const char* format, const char* type, const char* name)
|
||||
{
|
||||
if(Dedicated::IsEnabled() && Game::DB_GetXAssetNameType(type) == Game::XAssetType::ASSET_TYPE_TECHNIQUE_SET) return;
|
||||
Utils::Hook::Call<void(int, const char*, const char*, const char*)>(0x4F8C70)(severity, format, type, name); // Print error
|
||||
}
|
||||
|
||||
AssetHandler::AssetHandler()
|
||||
{
|
||||
Dvar::Register<bool>("r_noVoid", false, Game::DVAR_FLAG_SAVED, "Disable void model (red fx)");
|
||||
@ -417,6 +423,9 @@ namespace Components
|
||||
// Store empty assets
|
||||
Utils::Hook(0x5BB6EC, AssetHandler::StoreEmptyAssetStub, HOOK_CALL).install()->quick();
|
||||
|
||||
// Intercept missing asset messages
|
||||
Utils::Hook(0x5BB3F2, AssetHandler::MissingAssetError, HOOK_CALL).install()->quick();
|
||||
|
||||
// Log missing empty assets
|
||||
Scheduler::OnFrame([] ()
|
||||
{
|
||||
|
@ -68,6 +68,8 @@ namespace Components
|
||||
|
||||
static int HasThreadBypass();
|
||||
static void SetBypassState(bool value);
|
||||
|
||||
static void MissingAssetError(int severity, const char* format, const char* type, const char* name);
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user