| 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 | { |