From 95bc52b2bc14758a547d8405a57d31917a42b5c0 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Wed, 2 Apr 2025 23:45:02 +0200 Subject: [PATCH] Check for valid humanity. --- Glamourer/Interop/Material/MaterialManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Glamourer/Interop/Material/MaterialManager.cs b/Glamourer/Interop/Material/MaterialManager.cs index e065e91..ff30483 100644 --- a/Glamourer/Interop/Material/MaterialManager.cs +++ b/Glamourer/Interop/Material/MaterialManager.cs @@ -157,7 +157,11 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable /// Find the type of the given draw object by checking the actors pointers. private static bool FindType(CharacterBase* characterBase, Actor actor, out MaterialValueIndex.DrawObjectType type) { - type = MaterialValueIndex.DrawObjectType.Human; + type = MaterialValueIndex.DrawObjectType.Invalid; + if (!((Model)characterBase).IsHuman) + return false; + + type = type = MaterialValueIndex.DrawObjectType.Human; if (!actor.Valid) return false;