MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / initForWorld

Method initForWorld

src/logic/ScriptEngine.cpp:149–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void 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
175void ScriptEngine::onNPCInserted(Daedalus::GameState::NpcHandle npc, const std::string& spawnpoint)
176{

Callers 1

Calls 2

getEngineArgsMethod · 0.80
getEngineMethod · 0.80

Tested by

no test coverage detected