Changed: Added getGroundZ to develop branch too

--HG--
branch : develop
This commit is contained in:
kervala 2016-09-03 10:05:56 +02:00
parent eb878d97d1
commit 400c17826e
2 changed files with 13 additions and 0 deletions

View file

@ -519,6 +519,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions( NLGUI::CLuaState &ls )
LUABIND_FUNC(getCharacterSheetRegionForce),
LUABIND_FUNC(getCharacterSheetRegionLevel),
LUABIND_FUNC(getRegionByAlias),
LUABIND_FUNC(getGroundZ),
LUABIND_FUNC(tell),
LUABIND_FUNC(isRingAccessPointInReach),
LUABIND_FUNC(updateTooltipCoords),
@ -2614,6 +2615,17 @@ string CLuaIHMRyzom::getRegionByAlias(uint32 alias)
return ContinentMngr.getRegionNameByAlias(alias);
}
sint32 CLuaIHMRyzom::getGroundZ(uint32 x, sint32 y)
{
CVector vect = CVector(x, y, 0);
nlinfo("TEST");
UserEntity->getCollisionEntity()->snapToGround(vect);
nlinfo("Ground Z of (%d,%d) = %d", x, y, vect.z);
return vect.z;
}
// ***************************************************************************
void CLuaIHMRyzom::tell(const ucstring &player, const ucstring &msg)
{

View file

@ -201,6 +201,7 @@ private:
static sint getCharacterSheetRegionForce(const std::string &sheet);
static sint getCharacterSheetRegionLevel(const std::string &sheet);
static std::string getRegionByAlias(uint32 alias);
static sint getGroundZ(uint32 x, sint32 y);
// open the window to do a tell to 'player', if 'msg' is not empty, then the message will be sent immediatly
// else, current command of the chat window will be replaced with tell 'player'
static void tell(const ucstring &player, const ucstring &msg);