This commit is contained in:
aozhiwei 2023-06-20 16:59:46 +08:00
parent 955f76da1a
commit d02976ac3e
3 changed files with 8 additions and 2 deletions

View File

@ -503,6 +503,12 @@ void Incubator::ShowHand()
glm::vec3 point = glm::vec3(room->GetGasData().new_area_meta->GetLastArea()->x1(),
6.0f,
room->GetGasData().new_area_meta->GetLastArea()->y1());
{
glm::vec3* safe_point = mt::SafeAreaSafePoint::RandPoint(room->GetGasData().new_area_meta->type());
if (safe_point) {
point = *safe_point;
}
}
Global::Instance()->verify_set_pos = 1;
hum->GetMutablePos().FromGlmVec3(point);
Global::Instance()->verify_set_pos = 0;

View File

@ -23,7 +23,7 @@ namespace mt
{
}
glm::vec3* SafeAreaSafePoint::RandPoint(int type) const
glm::vec3* SafeAreaSafePoint::RandPoint(int type)
{
auto itr = _type_safe_points_hash.find(type);
return itr != _type_safe_points_hash.end() && !itr->second.empty() ?

View File

@ -13,7 +13,7 @@ namespace mt
void Init1();
static void StaticPostInit();
glm::vec3* RandPoint(int type) const;
static glm::vec3* RandPoint(int type);
private:
static std::map<int, std::vector<glm::vec3>> _type_safe_points_hash;