Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
chirpxiv committed Oct 13, 2023
1 parent 0c259a2 commit f89d4e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions PalettePlus/Extensions/GameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f89d4e9

Please sign in to comment.