Check for valid humanity.

This commit is contained in:
Ottermandias 2025-04-02 23:45:02 +02:00
parent d79e4b5853
commit 95bc52b2bc

View file

@ -157,7 +157,11 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable
/// <summary> Find the type of the given draw object by checking the actors pointers. </summary> /// <summary> Find the type of the given draw object by checking the actors pointers. </summary>
private static bool FindType(CharacterBase* characterBase, Actor actor, out MaterialValueIndex.DrawObjectType type) 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) if (!actor.Valid)
return false; return false;