Expose the optional argument for ResolvePath to lua and add it to ResolveRelativePath.

This commit is contained in:
Kyzentun Keeslala
2015-07-16 17:54:48 -06:00
parent ffc0c0ecb2
commit a888506b32
3 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -623,13 +623,14 @@ namespace
{
RString sPath( SArg(1) );
int iLevel = IArg(2);
bool optional= lua_toboolean(L, 3);
luaL_where( L, iLevel );
RString sWhere = lua_tostring( L, -1 );
if( sWhere.size() > 2 && sWhere.substr(sWhere.size()-2, 2) == ": " )
sWhere = sWhere.substr( 0, sWhere.size()-2 ); // remove trailing ": "
LUA->YieldLua();
bool bRet = ActorUtil::ResolvePath( sPath, sWhere );
bool bRet = ActorUtil::ResolvePath(sPath, sWhere, optional);
LUA->UnyieldLua();
if( !bRet )