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

Method BeginCall

CryScriptSystem/ScriptSystem.cpp:1164–1190  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1162//////////////////////////////////////////////////////////////////////
1163//////////////////////////////////////////////////////////////////////
1164int CScriptSystem::BeginCall(HSCRIPTFUNCTION hFunc)
1165{
1166 // alberto_pushfunc(m_pLS,hFunc);
1167 m_nTempTop = lua_gettop(m_pLS);
1168 if(hFunc==0)
1169 {
1170 RaiseError("(BeginCall) failed NULL parameter");
1171 m_nTempArg = -1;
1172 return 0;
1173 }
1174
1175 if(!lua_getref(m_pLS, (int)hFunc))
1176 {
1177 m_nTempArg = -1;
1178 return 0;
1179 }
1180 if(!lua_isfunction(m_pLS,-1))
1181 {
1182 RaiseError("Function Ptr:%d not found",hFunc);
1183 m_nTempArg = -1;
1184 return 0;
1185 }
1186 m_nTempArg = 0;
1187
1188
1189 return 1;
1190}
1191
1192//////////////////////////////////////////////////////////////////////
1193//////////////////////////////////////////////////////////////////////

Callers 15

ASEQuery_wantrulesFunction · 0.80
ASEQuery_wantplayersFunction · 0.80
Client_LoginSuccessMethod · 0.80
Client_LoginFailMethod · 0.80
Client_GameServerMethod · 0.80
Client_MOTDMethod · 0.80

Calls 6

lua_gettopFunction · 0.85
lua_getrefFunction · 0.85
lua_getglobalFunction · 0.85
lua_pushstringFunction · 0.85
lua_rawgetFunction · 0.85
lua_removeFunction · 0.85

Tested by

no test coverage detected