1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-27 09:41:16 +00:00

Use only off mesh connections starting or ending in a given tile

This commit is contained in:
elsid 2021-06-27 16:36:28 +02:00
parent a8ba9a0e2a
commit ff1af5e8ec
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -80,7 +80,12 @@ namespace DetourNavigator
[&] (const ObjectId v)
{
const auto byId = values->mById.equal_range(v);
std::for_each(byId.first, byId.second, [&] (const auto& v) { result.push_back(v.second); });
std::for_each(byId.first, byId.second, [&] (const auto& v)
{
if (getTilePosition(mSettings, v.second.mStart) == tilePosition
|| getTilePosition(mSettings, v.second.mEnd) == tilePosition)
result.push_back(v.second);
});
});
std::sort(result.begin(), result.end());