test mobs
This commit is contained in:
@@ -49,7 +49,7 @@ static int l_make_route(lua::State* L) {
|
||||
auto start = lua::tovec3(L, 2);
|
||||
auto target = lua::tovec3(L, 3);
|
||||
agent->state = {};
|
||||
agent->start = start;
|
||||
agent->start = glm::floor(start);
|
||||
agent->target = target;
|
||||
auto route = level->pathfinding->perform(*agent);
|
||||
if (!route.found) {
|
||||
@@ -65,7 +65,7 @@ static int l_make_route_async(lua::State* L) {
|
||||
auto start = lua::tovec3(L, 2);
|
||||
auto target = lua::tovec3(L, 3);
|
||||
agent->state = {};
|
||||
agent->start = start;
|
||||
agent->start = glm::floor(start);
|
||||
agent->target = target;
|
||||
level->pathfinding->perform(*agent, 0);
|
||||
}
|
||||
@@ -78,7 +78,7 @@ static int l_pull_route(lua::State* L) {
|
||||
if (!agent->state.finished) {
|
||||
return 0;
|
||||
}
|
||||
if (!route.found) {
|
||||
if (!route.found && !agent->mayBeIncomplete) {
|
||||
return lua::createtable(L, 0, 0);
|
||||
}
|
||||
return push_route(L, route);
|
||||
|
||||
Reference in New Issue
Block a user