mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Fix global variables not being able to be used inside of a foreach$ loop.
This commit is contained in:
parent
76c5e30869
commit
2bf3c8384c
1 changed files with 4 additions and 1 deletions
|
|
@ -2898,7 +2898,10 @@ OPCodeReturn CodeInterpreter::op_iter_begin(U32 &ip)
|
|||
|
||||
IterStackRecord& iter = iterStack[_ITER];
|
||||
|
||||
iter.mVariable = gEvalState.getCurrentFrame().add(varName);
|
||||
if (varName[0] == '$')
|
||||
iter.mVariable = gEvalState.globalVars.add(varName);
|
||||
else
|
||||
iter.mVariable = gEvalState.getCurrentFrame().add(varName);
|
||||
|
||||
if (iter.mIsStringIter)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue