MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Load

Method Load

ogsr_engine/xrGame/PhraseDialog.cpp:153–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151int CPhraseDialog::Priority() { return data()->m_iPriority; }
152
153void CPhraseDialog::Load(shared_str dialog_id)
154{
155 m_DialogId = dialog_id;
156
157 inherited_shared::load_shared(m_DialogId, NULL);
158
159 if (GetForceReload())
160 {
161 if (data()->m_sInitFunction.size())
162 {
163 data()->m_PhraseGraph.clear();
164
165 luabind::functor<void> lua_function;
166 bool functor_exists = ai().script_engine().functor(data()->m_sInitFunction.c_str(), lua_function);
167 ASSERT_FMT_DBG(functor_exists, "!![%s] Cannot find precondition [%s]", __FUNCTION__, data()->m_sInitFunction.c_str());
168 if (functor_exists)
169 lua_function(this);
170 }
171 }
172}
173
174#include "script_engine.h"
175#include "ai_space.h"

Callers 2

load_sharedMethod · 0.45
AddPhraseMethod · 0.45

Calls 5

lua_functionFunction · 0.85
functorMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected