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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user