committed by
Damjan Adamic
parent
0b0059908c
commit
8626c0728c
@@ -2115,12 +2115,17 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
}
|
||||
}
|
||||
|
||||
static bool hasRepeatParam(const CustomFunctionData & fn)
|
||||
{
|
||||
return (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic);
|
||||
}
|
||||
|
||||
virtual void beforeExport()
|
||||
{
|
||||
if (fn.swtch.type != SWITCH_TYPE_NONE) {
|
||||
_func = fn.func;
|
||||
|
||||
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic || (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast))
|
||||
if (hasRepeatParam(fn))
|
||||
_active = (version >= 216 ? fn.repeatParam : (fn.repeatParam/5));
|
||||
else
|
||||
_active = (fn.enabled ? 1 : 0);
|
||||
@@ -2216,7 +2221,7 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
{
|
||||
fn.func = (AssignFunc)_func;
|
||||
|
||||
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic || (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast))
|
||||
if (hasRepeatParam(fn))
|
||||
fn.repeatParam = (version >= 216 ? _active : (_active*5));
|
||||
else
|
||||
fn.enabled = (_active & 0x01);
|
||||
|
||||
Reference in New Issue
Block a user