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

Method GetAt

CryScriptSystem/ScriptObject.cpp:660–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660bool CScriptObject::GetAt(int nIdx, int &nVal)
661{
662 _GUARD_STACK(m_pLS);
663 bool res = false;
664 if (!_GET_THIS())
665 return false;
666
667 if (lua_getn(m_pLS, - 1) < nIdx)
668 {
669 return false;
670 }
671
672 lua_rawgeti(m_pLS, - 1, nIdx);
673 if (lua_isnumber(m_pLS, - 1))
674 {
675 res = true;
676 nVal =(int)lua_tonumber(m_pLS, - 1);
677 }
678 return res;
679}
680
681bool CScriptObject::GetAt(int nIdx, float &fVal)
682{

Callers 6

OnElementFoundMethod · 0.45
EnumDisplayFormatsMethod · 0.45
SetEntityPhysicParamsMethod · 0.45
GetStackAndLocalsMethod · 0.45
AddVariableToTreeMethod · 0.45
OnPaintMethod · 0.45

Calls 8

lua_getnFunction · 0.85
lua_rawgetiFunction · 0.85
lua_isnumberFunction · 0.85
lua_tonumberFunction · 0.85
lua_isstringFunction · 0.85
lua_tostringFunction · 0.85
lua_pushvalueFunction · 0.85
AttachMethod · 0.45

Tested by

no test coverage detected