mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 18:39:46 +00:00
add pathfinding.set_width
This commit is contained in:
parent
1fe64a8b51
commit
b37da1a728
2 changed files with 8 additions and 1 deletions
|
|
@ -100,6 +100,13 @@ static int l_set_jump_height(lua::State* L) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int l_set_width(lua::State* L) {
|
||||||
|
if (auto agent = get_agent(L)) {
|
||||||
|
agent->width = lua::tonumber(L, 2);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int l_avoid_tag(lua::State* L) {
|
static int l_avoid_tag(lua::State* L) {
|
||||||
if (auto agent = get_agent(L)) {
|
if (auto agent = get_agent(L)) {
|
||||||
int index =
|
int index =
|
||||||
|
|
@ -125,6 +132,7 @@ const luaL_Reg pathfindinglib[] = {
|
||||||
{"pull_route", lua::wrap<l_pull_route>},
|
{"pull_route", lua::wrap<l_pull_route>},
|
||||||
{"set_max_visited", lua::wrap<l_set_max_visited_blocks>},
|
{"set_max_visited", lua::wrap<l_set_max_visited_blocks>},
|
||||||
{"set_jump_height", lua::wrap<l_set_jump_height>},
|
{"set_jump_height", lua::wrap<l_set_jump_height>},
|
||||||
|
{"set_width", lua::wrap<l_set_width>},
|
||||||
{"avoid_tag", lua::wrap<l_avoid_tag>},
|
{"avoid_tag", lua::wrap<l_avoid_tag>},
|
||||||
{nullptr, nullptr}
|
{nullptr, nullptr}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
#include "voxels/Chunk.hpp"
|
#include "voxels/Chunk.hpp"
|
||||||
#include "voxels/GlobalChunks.hpp"
|
#include "voxels/GlobalChunks.hpp"
|
||||||
#include "world/Level.hpp"
|
#include "world/Level.hpp"
|
||||||
#include "debug/debug.hpp"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue