Console Refactor

This commit is contained in:
Lukas Aldershaab 2023-04-23 10:39:54 +02:00
parent 626de074cc
commit 89b0c7f73b
89 changed files with 1883 additions and 1553 deletions

View file

@ -20,6 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "script.h"
#include "platform/platform.h"
#include "platform/threads/mutex.h"
#include "console/simBase.h"
@ -36,8 +37,6 @@
#include "platform/profiler.h"
#include "math/mMathFn.h"
extern ExprEvalState gEvalState;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
@ -341,9 +340,9 @@ SimObject* findObject(const char* name)
if (c == '%')
{
if (gEvalState.getStackDepth())
if (!Con::getFrameStack().empty())
{
Dictionary::Entry* ent = gEvalState.getCurrentFrame().lookup(StringTable->insert(name));
Dictionary::Entry* ent = Con::getCurrentStackFrame()->lookup(StringTable->insert(name));
if (ent)
return Sim::findObject(ent->getIntValue());