mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #630 from JeffProgrammer/ts-nexttoken
This one slipped through - nextToken can't use local variable for its…
This commit is contained in:
commit
77ac78493a
|
|
@ -861,12 +861,6 @@ void setVariable(const char *name, const char *value)
|
|||
}
|
||||
}
|
||||
|
||||
void setLocalVariable(const char *name, const char *value)
|
||||
{
|
||||
name = prependPercent(name);
|
||||
gEvalState.getCurrentFrame().setVariable(StringTable->insert(name), value);
|
||||
}
|
||||
|
||||
void setBoolVariable(const char *varName, bool value)
|
||||
{
|
||||
SimObject *obj = NULL;
|
||||
|
|
|
|||
|
|
@ -720,15 +720,6 @@ namespace Con
|
|||
///
|
||||
void removeVariableNotify(const char *name, const NotifyDelegate &callback);
|
||||
|
||||
/// Assign a string value to a locally scoped console variable
|
||||
///
|
||||
/// @note The context of the variable is determined by gEvalState; that is,
|
||||
/// by the currently executing code.
|
||||
///
|
||||
/// @param name Local console variable name to set
|
||||
/// @param value String value to assign to name
|
||||
void setLocalVariable(const char *name, const char *value);
|
||||
|
||||
/// Retrieve the string value to a locally scoped console variable
|
||||
///
|
||||
/// @note The context of the variable is determined by gEvalState; that is,
|
||||
|
|
|
|||
|
|
@ -1703,12 +1703,7 @@ DefineEngineFunction( nextToken, const char*, ( const char* str1, const char* to
|
|||
if (*str)
|
||||
*str++ = 0;
|
||||
|
||||
// set local variable if inside a function
|
||||
if (gEvalState.getStackDepth() > 0 &&
|
||||
gEvalState.getCurrentFrame().scopeName)
|
||||
Con::setLocalVariable(token,tmp);
|
||||
else
|
||||
Con::setVariable(token,tmp);
|
||||
Con::setVariable(token,tmp);
|
||||
|
||||
// advance str past the 'delim space'
|
||||
while (isInSet(*str, delim))
|
||||
|
|
|
|||
Loading…
Reference in a new issue