From db047275f1b107942b7013ad53c7b2e24101d25b Mon Sep 17 00:00:00 2001 From: Jeff Hutchinson Date: Sat, 1 May 2021 02:55:24 -0400 Subject: [PATCH] add fast int to object lookup. --- Engine/source/console/compiledEval.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/console/compiledEval.cpp b/Engine/source/console/compiledEval.cpp index 018a82b21..b02f2f8fd 100644 --- a/Engine/source/console/compiledEval.cpp +++ b/Engine/source/console/compiledEval.cpp @@ -1824,7 +1824,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa // Optimization: If we're an integer, we can lookup the value by SimObjectId const ConsoleValue& simObjectLookupValue = callArgv[1]; if (simObjectLookupValue.getType() == ConsoleValueType::cvInteger) - gEvalState.thisObject = Sim::findObject(static_cast(simObjectLookupValue.getInt())); + gEvalState.thisObject = Sim::findObject(static_cast(simObjectLookupValue.getFastInt())); else { SimObject *foundObject = Sim::findObject(simObjectLookupValue.getString());