mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 18:09:46 +00:00
add pathfinding.set_height
This commit is contained in:
parent
98cd85f4f6
commit
3ec03738b4
2 changed files with 9 additions and 0 deletions
|
|
@ -107,6 +107,13 @@ static int l_set_width(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_set_height(lua::State* L) {
|
||||
if (auto agent = get_agent(L)) {
|
||||
agent->height = lua::touinteger(L, 2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_avoid_tag(lua::State* L) {
|
||||
if (auto agent = get_agent(L)) {
|
||||
int index =
|
||||
|
|
@ -133,6 +140,7 @@ const luaL_Reg pathfindinglib[] = {
|
|||
{"set_max_visited", lua::wrap<l_set_max_visited_blocks>},
|
||||
{"set_jump_height", lua::wrap<l_set_jump_height>},
|
||||
{"set_width", lua::wrap<l_set_width>},
|
||||
{"set_height", lua::wrap<l_set_height>},
|
||||
{"avoid_tag", lua::wrap<l_avoid_tag>},
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue