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:
Lioncash 2020-03-05 21:33:22 -05:00
parent 2f9dd38bbe
commit 40277bedac
2 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ void CParticleDatabase::SetParticleEffectState(std::string_view name, bool activ
void CParticleDatabase::SetCEXTValue(std::string_view name, int idx, float value) { void CParticleDatabase::SetCEXTValue(std::string_view name, int idx, float value) {
if (CParticleGenInfo* info = GetParticleEffect(name)) { 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); ->SetExternalVar(idx, value);
} }
} }

View File

@ -106,6 +106,6 @@ public:
TUniqueId GetLightId() const override; TUniqueId GetLightId() const override;
void DeleteLight(CStateManager& mgr) override; void DeleteLight(CStateManager& mgr) override;
void SetModulationColor(const zeus::CColor& color) 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 } // namespace urde