mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Do not load global function scripts if global functions are disabled in model settings (fix #6029)
This commit is contained in:
parent
5ee3825a50
commit
b50826bc74
1 changed files with 3 additions and 0 deletions
|
@ -633,6 +633,9 @@ bool luaLoadMixScript(uint8_t index)
|
|||
|
||||
bool luaLoadFunctionScript(uint8_t index, uint8_t ref)
|
||||
{
|
||||
if ((ref >= SCRIPT_GFUNC_FIRST) && g_model.noGlobalFunctions)
|
||||
return false;
|
||||
|
||||
CustomFunctionData & fn = (ref < SCRIPT_GFUNC_FIRST ? g_model.customFn[index] : g_eeGeneral.customFn[index]);
|
||||
|
||||
if (fn.func == FUNC_PLAY_SCRIPT && ZEXIST(fn.play.name)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue