Merge pull request #1171 from Azaezel/alpha41/scriptStability

script stabilization tweaks
This commit is contained in:
Brian Roberts 2024-01-06 10:33:04 -06:00 committed by GitHub
commit d22b7c7121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View file

@ -1202,7 +1202,7 @@ ConsoleValue Namespace::Entry::execute(S32 argc, ConsoleValue *argv, SimObject *
break;
}
return std::move(result);
return result;
}
//-----------------------------------------------------------------------------

View file

@ -666,7 +666,7 @@ Con::EvalResult CodeBlock::exec(U32 ip, const char* functionName, Namespace* thi
StringTableEntry fnNamespace, fnPackage;
static const U32 objectCreationStackSize = 32;
U32 objectCreationStackIndex = 0;
S32 objectCreationStackIndex = 0;
struct {
SimObject* newObject;
U32 failJump;

View file

@ -1,4 +1,4 @@
#include "runtime.h"
#include "runtime.h"
#include "codeBlock.h"
#include "console/script.h"
@ -386,13 +386,12 @@ namespace TorqueScript
// We're all compiled, so let's run it.
#ifdef TORQUE_DEBUG
Con::printf("Loading compiled script %s.", scriptFileName);
Con::printf("Loading compiled script %s.", nameBuffer);
#endif
CodeBlock* code = new CodeBlock;
CodeBlock* code = new CodeBlock();
code->read(scriptFileName, *compiledStream);
delete compiledStream;
code->exec(0, scriptFileName, NULL, 0, NULL, noCalls, NULL, 0);
delete code;
ret = true;
}
else if (scriptFile)