From f89d4e9fabb326772fe5a78665743743348f9640 Mon Sep 17 00:00:00 2001 From: chirp <72366111+chirpxiv@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:40:14 +0100 Subject: [PATCH] remove redundant check --- PalettePlus/Extensions/GameObject.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PalettePlus/Extensions/GameObject.cs b/PalettePlus/Extensions/GameObject.cs index d0ef284..8e4dc39 100644 --- a/PalettePlus/Extensions/GameObject.cs +++ b/PalettePlus/Extensions/GameObject.cs @@ -25,11 +25,12 @@ internal unsafe static bool HasHumanModel(this Character actor) { var chara = actor.GetStruct(); if (chara == null) return false; - var modelId = chara->CharacterData.ModelCharaId_2 != -1 ? chara->CharacterData.ModelCharaId_2 : chara->CharacterData.ModelCharaId; - if (modelId != 0) return false; + //var modelId = chara->CharacterData.ModelCharaId_2 != -1 ? chara->CharacterData.ModelCharaId_2 : chara->CharacterData.ModelCharaId; + //if (modelId != 0) return false; var drawObject = chara->GameObject.DrawObject; - if (drawObject == null || drawObject->Object.GetObjectType() != ObjectType.CharacterBase) return false; + if (drawObject == null || drawObject->Object.GetObjectType() != ObjectType.CharacterBase) + return false; return ((CharacterBase*)drawObject)->GetModelType() == CharacterBase.ModelType.Human; }