Fix calling multi-level inherited methods
parent
d0a8a32a57
commit
860cdb0aea
|
@ -333,7 +333,7 @@ CBotTypResult CBotClass::CompileMethode(const std::string& name,
|
|||
|
||||
r = m_pMethod->CompileCall(name, ppParams, nIdent);
|
||||
if ( r.Eq(CBotErrUndefCall) && m_parent != nullptr )
|
||||
return m_parent->m_pMethod->CompileCall(name, ppParams, nIdent);
|
||||
return m_parent->CompileMethode(name, pThis, ppParams, pStack, nIdent);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -354,9 +354,7 @@ bool CBotClass::ExecuteMethode(long& nIdent,
|
|||
|
||||
if (m_parent != nullptr)
|
||||
{
|
||||
ret = m_parent->m_pCalls->DoCall(name, pThis, ppParams, pResult, pStack, pToken);
|
||||
if (ret >= 0) return ret;
|
||||
ret = m_parent->m_pMethod->DoCall(nIdent, name, pThis, ppParams, pStack, pToken, m_parent);
|
||||
ret = m_parent->ExecuteMethode(nIdent, name, pThis, ppParams, pResult, pStack, pToken);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue