| 147 | } |
| 148 | |
| 149 | void ScriptEngine::initForWorld(const std::string& world, bool firstStart) |
| 150 | { |
| 151 | if (!m_World.getEngine()->getEngineArgs().cmdline.hasArg('c')) |
| 152 | { |
| 153 | if (firstStart && m_pVM->getDATFile().hasSymbolName("startup_" + world)) |
| 154 | { |
| 155 | LogInfo() << "Running: Startup_" << world; |
| 156 | prepareRunFunction(); |
| 157 | runFunction("startup_" + world); |
| 158 | LogInfo() << "Done!"; |
| 159 | } |
| 160 | |
| 161 | if (m_pVM->getDATFile().hasSymbolName("init_" + world)) |
| 162 | { |
| 163 | LogInfo() << "Running init_" << world; |
| 164 | prepareRunFunction(); |
| 165 | runFunction("init_" + world); |
| 166 | LogInfo() << "Done!"; |
| 167 | } |
| 168 | } |
| 169 | else |
| 170 | { |
| 171 | VobTypes::Wld_InsertNpc(m_World, "PC_THIEF", "WP_INTRO_FALL3"); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | void ScriptEngine::onNPCInserted(Daedalus::GameState::NpcHandle npc, const std::string& spawnpoint) |
| 176 | { |
no test coverage detected