Ticket #2517: RegisterComponentsAsGlobal.2.diff

File RegisterComponentsAsGlobal.2.diff, 1.1 KB (added by Radagast, 10 years ago)
  • source/simulation2/system/ComponentManager.cpp

    diff --git a/source/simulation2/system/ComponentManager.cpp b/source/simulation2/system/ComponentManager.cpp
    index d035c6f..04adb47 100644
    a b void CComponentManager::Script_RegisterComponentType(ScriptInterface::CxPrivate*  
    170170    else
    171171    {
    172172        // Component type is already loaded, so do hotloading:
    173 
     173/*
    174174        if (!componentManager->m_CurrentlyHotloading)
    175175        {
    176176            componentManager->m_ScriptInterface.ReportError("Registering component type with already-registered name"); // TODO: report the actual name
    177177            return;
    178178        }
    179 
     179*/
    180180        const ComponentType& ctPrevious = componentManager->m_ComponentTypesById[cid];
    181181
    182182        // We can only replace scripted component types, not native ones
    void CComponentManager::Script_RegisterComponentType(ScriptInterface::CxPrivate*  
    301301            }
    302302        }
    303303    }
     304
     305    CComponentManager::Script_RegisterGlobal(pCxPrivate, cname, ctor);
    304306}
    305307
    306308void CComponentManager::Script_RegisterInterface(ScriptInterface::CxPrivate* pCxPrivate, std::string name)