Optimize CPU particles impl parts

This commit is contained in:
Wojtek Figat
2021-08-30 20:30:52 +02:00
parent e284a88da4
commit e3b98c902b
4 changed files with 11 additions and 8 deletions

View File

@@ -419,7 +419,7 @@ void ParticleEmitterGraphCPUExecutor::ProcessGroupFunction(Box* box, Node* node,
Node* functionCallNode = nullptr;
ASSERT(context.GraphStack.Count() >= 2);
Graph* graph;
for (int32 i = context.CallStack.Count() - 1; i >= 0; i--)
for (int32 i = context.CallStackSize - 1; i >= 0; i--)
{
if (context.CallStack[i]->Type == GRAPH_NODE_MAKE_TYPE(14, 300) && context.Functions.TryGet(context.CallStack[i], graph) && context.GraphStack[context.GraphStack.Count() - 1] == graph)
{