GDScript: Check if scripting has been disabled in VM
If scripting has been disabled, GDScript should stop processing operations. The easiest way to do that is to check the scripting status at the beginning of each loop in the VM.
This commit is contained in:
parent
c992fca284
commit
f4ea4e5e90
|
@ -686,6 +686,12 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||
#else
|
||||
OPCODE_WHILE(true) {
|
||||
#endif
|
||||
if (!ScriptServer::is_scripting_enabled()) {
|
||||
#ifdef DEBUG_ENABLED
|
||||
exit_ok = true;
|
||||
#endif
|
||||
OPCODE_BREAK;
|
||||
}
|
||||
|
||||
OPCODE_SWITCH(_code_ptr[ip]) {
|
||||
OPCODE(OPCODE_OPERATOR) {
|
||||
|
|
Loading…
Reference in New Issue