MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / DependencyDropped

Method DependencyDropped

core/logic/PluginSys.cpp:663–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663void CPlugin::DependencyDropped(CPlugin *pOwner)
664{
665 if (!m_pRuntime)
666 return;
667
668 for (auto lib_iter=pOwner->m_Libraries.begin(); lib_iter!=pOwner->m_Libraries.end(); lib_iter++) {
669 if (m_RequiredLibs.find(*lib_iter) != m_RequiredLibs.end()) {
670 m_LibraryMissing = true;
671 break;
672 }
673 }
674
675 unsigned int unbound = 0;
676 for (size_t i = 0; i < pOwner->m_fakes.size(); i++)
677 {
678 ke::RefPtr<Native> entry(pOwner->m_fakes[i]);
679
680 uint32_t idx;
681 if (m_pRuntime->FindNativeByName(entry->name(), &idx) != SP_ERROR_NONE)
682 continue;
683
684 m_pRuntime->UpdateNativeBinding(idx, nullptr, 0, nullptr);
685 unbound++;
686 }
687
688 if (unbound)
689 {
690 m_FakeNativesMissing = true;
691 }
692
693 /* :IDEA: in the future, add native trapping? */
694 if (m_FakeNativesMissing || m_LibraryMissing)
695 {
696 EvictWithError(Plugin_Error, "Depends on plugin: %s", pOwner->GetFilename());
697 }
698}
699
700size_t CPlugin::GetConfigCount()
701{

Callers 1

DropEverythingMethod · 0.80

Calls 6

nameMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
sizeMethod · 0.45
GetFilenameMethod · 0.45

Tested by

no test coverage detected