MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / Init

Method Init

CrySystem/ScriptObjectSystem.cpp:130–152  ·  view source on GitHub ↗

//////////////////////////////////////////////////// ! Initializes the script-object and makes it available for the scripts. @param pScriptSystem Pointer to the ScriptSystem-interface @param pSystem Pointer to the System-interface @see IScriptSystem @see ISystem */

Source from the content-addressed store, hash-verified

128 @see ISystem
129*/
130void CScriptObjectSystem::Init(IScriptSystem *pScriptSystem, ISystem *pSystem)
131{
132 m_pSystem = pSystem;
133 m_pLog = m_pSystem->GetILog();
134 m_pSoundSytem = m_pSystem->GetISoundSystem();
135 m_pRenderer = m_pSystem->GetIRenderer();
136 m_pConsole = m_pSystem->GetIConsole();
137 m_pTimer = m_pSystem->GetITimer();
138 m_pEntitySystem = (IEntitySystem *) m_pSystem->GetIEntitySystem();
139 m_p3DEngine =m_pSystem->GetI3DEngine();
140 m_pPhysicalWorld =m_pSystem->GetIPhysicalWorld();
141
142 pScriptSystem->SetGlobalValue("ENTITYPROP_CASTSHADOWS", ENTITYPROP_CASTSHADOWS);
143 pScriptSystem->SetGlobalValue("ENTITYPROP_DONOTCHECKVIS", ENTITYPROP_DONOTCHECKVIS);
144
145 pScriptSystem->SetGlobalValue("SCANDIR_ALL",SCANDIR_ALL);
146 pScriptSystem->SetGlobalValue("SCANDIR_FILES",SCANDIR_FILES);
147 pScriptSystem->SetGlobalValue("SCANDIR_SUBDIRS",SCANDIR_SUBDIRS);
148
149 e_deformable_terrain = m_pSystem->GetIConsole()->GetCVar("e_deformable_terrain");
150
151 InitGlobal(pScriptSystem,"System",this);
152}
153
154
155void CScriptObjectSystem::InitializeTemplate(IScriptSystem *pSS)

Callers

nothing calls this directly

Calls 10

GetILogMethod · 0.80
GetISoundSystemMethod · 0.80
GetIConsoleMethod · 0.80
GetITimerMethod · 0.80
GetIEntitySystemMethod · 0.80
GetI3DEngineMethod · 0.80
GetIPhysicalWorldMethod · 0.80
SetGlobalValueMethod · 0.80
GetCVarMethod · 0.80
GetIRendererMethod · 0.45

Tested by

no test coverage detected