2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:47:43 +00:00

Lots of bug fixes; working CPhazonSuitFilter

This commit is contained in:
Jack Andersen
2017-12-19 20:06:54 -10:00
parent 1c44f8d1bc
commit c00cc6cea9
41 changed files with 322 additions and 161 deletions

View File

@@ -1,5 +1,6 @@
#include "CMetaAnimRandom.hpp"
#include "CMetaAnimFactory.hpp"
#include "CAnimSysContext.hpp"
namespace urde
{
@@ -32,7 +33,16 @@ std::shared_ptr<CAnimTreeNode>
CMetaAnimRandom::VGetAnimationTree(const CAnimSysContext& animSys,
const CMetaAnimTreeBuildOrders& orders) const
{
return {};
s32 r = animSys.x8_random->Range(1, 100);
const std::pair<std::shared_ptr<IMetaAnim>, u32>* useRd = nullptr;
for (auto& rd : x4_randomData)
{
useRd = &rd;
if (r <= rd.second)
break;
}
return useRd->first->GetAnimationTree(animSys, orders);
}
}