This commit is contained in:
aozhiwei 2023-04-01 15:42:41 +08:00
parent 6809a20f00
commit c421fa1359

View File

@ -3543,7 +3543,12 @@ Creature* Room::GetCreatureByUniId(int uniid)
bool Room::RandomSafeAreaPoint(glm::vec3& point)
{
return false;
glm::vec3 dir = GlmHelper::UP;
GlmHelper::RotateY(dir, a8::RandAngle());
float rnd_rad = rand() % std::max(GetGasData().new_area_meta->rad(), 100);
glm::vec2 center = GetGasData().pos_new + glm::vec2(dir.x, dir.z) * (100.f + rnd_rad);
point = glm::vec3(center.x, 0.0f, center.y);
return true;
}
bool Room::FindWalkablePointWithOutHouse(const glm::vec3& center, int try_count, int step, glm::vec3& point)