mirror of https://github.com/AxioDL/metaforce.git
CAnimData: Actually create CParticleData in InitializeEffects
This commit is contained in:
parent
ab296ff97e
commit
a9ed8c4329
|
@ -101,8 +101,10 @@ void CAnimData::InitializeEffects(CStateManager& mgr, TAreaId aId, const zeus::C
|
|||
for (const auto& effects : xc_charInfo.GetEffectList()) {
|
||||
for (const auto& effect : effects.second) {
|
||||
x120_particleDB.CacheParticleDesc(effect.GetParticleTag());
|
||||
x120_particleDB.AddParticleEffect(effect.GetSegmentName(), effect.GetFlags(), CParticleData(), scale, mgr, aId,
|
||||
true, x21c_particleLightIdx);
|
||||
const CParticleData data{effect.GetParticleTag(), effect.GetSegmentName(), effect.GetScale(),
|
||||
effect.GetParentedMode()};
|
||||
x120_particleDB.AddParticleEffect(effect.GetComponentName(), effect.GetFlags(), data, scale, mgr, aId, true,
|
||||
x21c_particleLightIdx);
|
||||
x120_particleDB.SetParticleEffectState(effect.GetComponentName(), false, mgr);
|
||||
}
|
||||
}
|
||||
|
@ -258,9 +260,7 @@ std::shared_ptr<CAnimationManager> CAnimData::GetAnimationManager() { return x10
|
|||
|
||||
void CAnimData::SetPhase(float ph) { x1f8_animRoot->VSetPhase(ph); }
|
||||
|
||||
void CAnimData::Touch(const CSkinnedModel& model, int shadIdx) const {
|
||||
model.GetModelInst()->Touch(shadIdx);
|
||||
}
|
||||
void CAnimData::Touch(const CSkinnedModel& model, int shadIdx) const { model.GetModelInst()->Touch(shadIdx); }
|
||||
|
||||
SAdvancementDeltas CAnimData::GetAdvancementDeltas(const CCharAnimTime& a, const CCharAnimTime& b) const {
|
||||
return x1f8_animRoot->VGetAdvancementResults(a, b).x8_deltas;
|
||||
|
|
|
@ -22,6 +22,8 @@ private:
|
|||
|
||||
public:
|
||||
CParticleData() = default;
|
||||
CParticleData(const SObjectTag& tag, std::string_view boneName, float scale, EParentedMode mode)
|
||||
: x4_particle(tag), xc_boneName(boneName), x1c_scale(scale), x20_parentMode(mode) {}
|
||||
explicit CParticleData(CInputStream& in);
|
||||
u32 GetDuration() const { return x0_duration; }
|
||||
const SObjectTag& GetTag() const { return x4_particle; }
|
||||
|
|
Loading…
Reference in New Issue