mirror of https://github.com/AxioDL/metaforce.git
CParticleGenInfo: Fix missing ampersand in GetParticleSystem() member function
Previously the particle system shared pointer would always be returned by value, rather than by reference.
This commit is contained in:
parent
2f9dd38bbe
commit
40277bedac
|
@ -306,7 +306,7 @@ void CParticleDatabase::SetParticleEffectState(std::string_view name, bool activ
|
|||
|
||||
void CParticleDatabase::SetCEXTValue(std::string_view name, int idx, float value) {
|
||||
if (CParticleGenInfo* info = GetParticleEffect(name)) {
|
||||
static_cast<CElementGen*>(static_cast<CParticleGenInfoGeneric*>(info)->GetParticleSystem().get())
|
||||
std::static_pointer_cast<CElementGen>(static_cast<CParticleGenInfoGeneric*>(info)->GetParticleSystem())
|
||||
->SetExternalVar(idx, value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,6 +106,6 @@ public:
|
|||
TUniqueId GetLightId() const override;
|
||||
void DeleteLight(CStateManager& mgr) override;
|
||||
void SetModulationColor(const zeus::CColor& color) override;
|
||||
const std::shared_ptr<CParticleGen> GetParticleSystem() const { return x84_system; }
|
||||
const std::shared_ptr<CParticleGen>& GetParticleSystem() const { return x84_system; }
|
||||
};
|
||||
} // namespace urde
|
||||
|
|
Loading…
Reference in New Issue