helping branch prediction

This commit is contained in:
d1str4ught
2026-01-30 03:29:58 +01:00
parent 1eb9743742
commit 30ff18e982
11 changed files with 28 additions and 118 deletions

View File

@@ -300,15 +300,13 @@ bool CParticleSystemInstance::OnUpdate(float fElapsedTime)
{
CParticleInstance * pInstance = *itor;
if (!pInstance->Update(fElapsedTime,fAngularVelocity))
{
if (!pInstance->Update(fElapsedTime,fAngularVelocity)) [[unlikely]] {
pInstance->DeleteThis();
itor = m_ParticleInstanceListVector[dwFrameIndex].erase(itor);
m_dwCurrentEmissionCount--;
}
else
{
else [[likely]] {
if (pInstance->m_byFrameIndex != dwFrameIndex)
{
m_ParticleInstanceListVector[dwFrameCount+pInstance->m_byFrameIndex].push_back(*itor);