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

Method getNPCFromSymbol

src/logic/ScriptEngine.cpp:318–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318Daedalus::GameState::NpcHandle ScriptEngine::getNPCFromSymbol(const std::string& symName)
319{
320 Daedalus::PARSymbol& sym = m_pVM->getDATFile().getSymbolByName(symName);
321
322 if (sym.instanceDataClass != Daedalus::IC_Npc)
323 return Daedalus::GameState::NpcHandle();
324
325 return ZMemory::handleCast<Daedalus::GameState::NpcHandle>(sym.instanceDataHandle);
326}
327
328Daedalus::GameState::ItemHandle ScriptEngine::getItemFromSymbol(const std::string& symName)
329{

Callers 3

dieMethod · 0.80
startAIStateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected