forked from Mirrors/openclonk
Replace C4AulScript::GetFunc with C4PropList::GetFunc/Call
parent
497cd5cffc
commit
f3854e87f8
|
@ -1172,10 +1172,8 @@ bool C4PlayerControl::ExecuteControlScript(int32_t iControl, C4ID idControlExtra
|
|||
x = rKeyExtraData.game_x; y = rKeyExtraData.game_y;
|
||||
}
|
||||
// exec control function
|
||||
C4AulFunc *pFunc = ::ScriptEngine.GetFunc(PSF_PlayerControl, &ScriptEngine, NULL);
|
||||
if (!pFunc) return false;
|
||||
C4AulParSet Pars(C4VInt(iPlr), C4VInt(iControl), C4VPropList(C4Id2Def(idControlExtraData)), C4VInt(x), C4VInt(y), C4VInt(rKeyExtraData.iStrength), C4VBool(fRepeated), C4VBool(fUp));
|
||||
return !!pFunc->Exec(NULL, &Pars);
|
||||
return ::ScriptEngine.GetPropList()->Call(PSF_PlayerControl, &Pars).getBool();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2658,7 +2658,7 @@ void C4AulParseState::Parse_Local()
|
|||
if (TokenType != ATT_IDTF)
|
||||
UnexpectedToken("variable name");
|
||||
// check: symbol already in use?
|
||||
if (a->GetFunc(Idtf))
|
||||
if (a->GetPropList() && a->GetPropList()->GetFunc(Idtf))
|
||||
throw new C4AulParseError(this, "variable definition: name already in use");
|
||||
// insert variable
|
||||
a->LocalNamed.AddName(Idtf);
|
||||
|
|
Loading…
Reference in New Issue