Fix custom functions decode of func
This commit is contained in:
committed by
Raphael Coeffic
parent
9057a6b7f1
commit
47a3d343b5
@@ -228,7 +228,7 @@ bool convert<CustomFunctionData>::decode(const Node& node,
|
|||||||
node["swtch"] >> rhs.swtch;
|
node["swtch"] >> rhs.swtch;
|
||||||
|
|
||||||
int func = 0;
|
int func = 0;
|
||||||
node["func"] >> func;
|
node["func"] >> customFnLut >> func;
|
||||||
rhs.func = (AssignFunc)func;
|
rhs.func = (AssignFunc)func;
|
||||||
|
|
||||||
std::string def_str;
|
std::string def_str;
|
||||||
@@ -254,7 +254,7 @@ bool convert<CustomFunctionData>::decode(const Node& node,
|
|||||||
case FuncPlayPrompt:
|
case FuncPlayPrompt:
|
||||||
case FuncPlayScript:
|
case FuncPlayScript:
|
||||||
case FuncBackgroundMusic:
|
case FuncBackgroundMusic:
|
||||||
strncpy(rhs.paramarm, def.str().c_str(), sizeof(rhs.paramarm)-1);
|
strncpy(rhs.paramarm, def.str().c_str(), sizeof(rhs.paramarm)-1); // TODO fix eg def: engarm,1x
|
||||||
break;
|
break;
|
||||||
case FuncReset: {
|
case FuncReset: {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user