2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

Implement body state classes

This commit is contained in:
Jack Andersen
2017-07-09 18:55:51 -10:00
parent 778b37e0f8
commit 56bfc276d6
43 changed files with 4087 additions and 248 deletions

View File

@@ -41,7 +41,7 @@ std::pair<float, s32> CPASDatabase::FindBestAnimation(const CPASAnimParmData& da
auto it = std::lower_bound(x0_states.cbegin(), x0_states.cend(), key,
[](const CPASAnimState& item, const CPASAnimState& test) -> bool {return item.GetStateId() < test.GetStateId();});
if (it->GetStateId() < key.GetStateId() || it == x0_states.cend())
if (it == x0_states.cend() || it->GetStateId() > key.GetStateId())
return {0.f, -1};
return (*it).FindBestAnimation(data.GetAnimParmData(), rand, ignoreAnim);