bool ETHRawEntityController::RunCallback(ETHScriptEntity* entity) { if (HasConstructorCallback()) { ETHGlobal::RunEntityCallback(m_pContext, entity, m_constructorCallbackId); m_constructorCallbackId =-1; // never run it again. that's the trick } if (HasCallback()) { ETHGlobal::RunEntityCallback(m_pContext, entity, m_callbackId); } return true; }
bool ETHRawEntityController::RunCallback(ETHScriptEntity* entity) { if (HasConstructorCallback() && !m_hadRunConstructor) { ETHGlobal::RunEntityCallback(m_pContext, entity, m_constructorCallbackId); m_hadRunConstructor = true; } if (HasCallback()) { ETHGlobal::RunEntityCallback(m_pContext, entity, m_callbackId); } return true; }