This commit is contained in:
aozhiwei 2023-02-17 16:21:09 +08:00
parent b343ae4e5d
commit 5ed7a55817
2 changed files with 5 additions and 2 deletions

View File

@ -2606,7 +2606,10 @@ void Creature::OnLand()
glm::vec3 point; glm::vec3 point;
bool ok = false; bool ok = false;
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
ok = room->map_instance->FindNearestPoint(center, 10 + 10 * i, point); ok = room->map_instance->FindNearestPoint(center, 1.0f + 10 * i, point);
if (ok) {
break;
}
} }
if (!ok) { if (!ok) {
abort(); abort();

View File

@ -436,7 +436,7 @@ bool MapInstance::FindNearestPoint(const glm::vec3& center, float radius, glm::v
filter.setIncludeFlags(0xffff); filter.setIncludeFlags(0xffff);
filter.setExcludeFlags(0); filter.setExcludeFlags(0);
const float extents[3] = {radius, radius, radius}; const float extents[3] = {radius, 10.0f, radius};
float nearestPt[3]; float nearestPt[3];
float pos[3]; float pos[3];