MCPcopy Create free account
hub / github.com/SapphireServer/Sapphire / processLoadQueue

Method processLoadQueue

src/world/Script/NativeScriptMgr.cpp:89–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 void NativeScriptMgr::processLoadQueue()
90 {
91 std::vector< std::string > deferredLoads;
92
93 while( !m_scriptLoadQueue.empty() )
94 {
95 auto item = m_scriptLoadQueue.front();
96
97 // if it fails, we defer the loading to the next tick
98 if( !loadScript( item ) )
99 deferredLoads.push_back( item );
100
101 m_scriptLoadQueue.pop();
102 }
103
104 if( !deferredLoads.empty() )
105 {
106 for( auto& item : deferredLoads )
107 m_scriptLoadQueue.push( item );
108 }
109 }
110
111 void NativeScriptMgr::findScripts( std::set< Sapphire::Scripting::ScriptInfo* >& scripts, const std::string& search )
112 {

Callers 1

updateMethod · 0.80

Calls 3

emptyMethod · 0.45
popMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected