Merge pull request #185 from lioncash/reference2

CParticleGenInfo: Fix missing ampersand in GetParticleSystem() member function
This commit is contained in:
Phillip Stephens 2020-03-06 16:13:22 -08:00 committed by GitHub
commit c9e7b2c2ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
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);
}
}

View File

@ -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