Changed: Added getGroundZ to develop branch too

--HG--
branch : develop
feature/pipeline-tools
kervala 8 years ago
parent eb878d97d1
commit 400c17826e

@ -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)
{

@ -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);

Loading…
Cancel
Save