From 891fd0544214a1d854f837525c6c535ae6b68690 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Apr 2020 13:15:09 -0400 Subject: [PATCH] CPASAnimState: Add HasAnims() GetNumAnims() is only used in two places to do existence checking. We can just provide a dedicated function for this and also have size querying as well. --- Runtime/Character/CPASAnimState.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/Character/CPASAnimState.hpp b/Runtime/Character/CPASAnimState.hpp index 375ba5257..493152edd 100644 --- a/Runtime/Character/CPASAnimState.hpp +++ b/Runtime/Character/CPASAnimState.hpp @@ -26,7 +26,8 @@ public: explicit CPASAnimState(CInputStream& in); explicit CPASAnimState(int stateId); s32 GetStateId() const { return x0_id; } - s32 GetNumAnims() const { return x14_anims.size(); } + size_t GetNumAnims() const { return x14_anims.size(); } + bool HasAnims() const { return !x14_anims.empty(); } CPASAnimParm GetAnimParmData(s32 animId, size_t parmIdx) const; std::pair FindBestAnimation(const rstl::reserved_vector& parms, CRandom16& rand, s32 ignoreAnim) const;