/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/EnginePlugins/ParticlePlugin/WorldModule/ParticleSystems.cpp
35 строк
941 B
Jan Krassnigg
Various small improvements (particles, curves) (#1739)
11 дек 2025, 09:27
Не верифицирован
11 дек 2025, 09:27
1f50f82
Код
Авторство
О чём код?
#include <ParticlePlugin/ParticlePluginPCH.h> #include <ParticlePlugin/WorldModule/ParticleWorldModule.h> ezParticleSystemInstance* ezParticleWorldModule::CreateSystemInstance( ezUInt32 uiMaxParticles, ezWorld* pWorld, ezParticleEffectInstance* pOwnerEffect, float fSpawnMultiplier) { EZ_LOCK(m_Mutex); ezParticleSystemInstance* pResult = nullptr; if (!m_ParticleSystemFreeList.IsEmpty()) { pResult = m_ParticleSystemFreeList.PeekBack(); m_ParticleSystemFreeList.PopBack(); } if (pResult == nullptr) { pResult = &m_ParticleSystems.ExpandAndGetRef(); } pResult->Construct(uiMaxParticles, pWorld, pOwnerEffect, fSpawnMultiplier); return pResult; } void ezParticleWorldModule::DestroySystemInstance(ezParticleSystemInstance* pInstance) { EZ_LOCK(m_Mutex); EZ_ASSERT_DEBUG(pInstance != nullptr, "Invalid particle system"); pInstance->Destruct(); m_ParticleSystemFreeList.PushBack(pInstance); }