mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
add fast int to object lookup.
This commit is contained in:
parent
ab4c0f0361
commit
db047275f1
1 changed files with 1 additions and 1 deletions
|
|
@ -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<SimObjectId>(simObjectLookupValue.getInt()));
|
||||
gEvalState.thisObject = Sim::findObject(static_cast<SimObjectId>(simObjectLookupValue.getFastInt()));
|
||||
else
|
||||
{
|
||||
SimObject *foundObject = Sim::findObject(simObjectLookupValue.getString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue