8000 [pull] development from vmangos:development by pull[bot] · Pull Request #686 · World0fWarcraft/vmangos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] development from vmangos:development #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/game/Maps/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3406,8 +3406,13 @@ GameObjectModel const* Map::FindDynamicObjectCollisionModel(float x1, float y1,
ASSERT(MaNGOS::IsValidMapCoord(x2, y2, z2));
Vector3 const pos1 = Vector3(x1, y1, z1);
Vector3 const pos2 = Vector3(x2, y2, z2);
std::shared_lock<std::shared_timed_mutex> lock(m_dynamicTreeLock);
return m_dynamicTree.getObjectHit(pos1, pos2);
GameObjectModel const* result = nullptr;
if (pos1 != pos2)
{
std::shared_lock<std::shared_timed_mutex> lock(m_dynamicTreeLock);
result = m_dynamicTree.getObjectHit(pos1, pos2);
}
return result;
}

void Map::RemoveGameObjectModel(const GameObjectModel &model)
Expand Down
2 changes: 1 addition & 1 deletion src/game/vmap/DynamicTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ bool DynamicMapTree::getObjectHitPos(Vector3 const& pPos1, Vector3 const& pPos2,
// valid map coords should *never ever* produce float overflow, but this would produce NaNs too:
MANGOS_ASSERT(maxDist < std::numeric_limits<float>::max());
// prevent NaN values which can cause BIH intersection to enter infinite loop
if (maxDist < 1e-10f)
if (maxDist < 1e-10f || pPos1 == pPos2)
{
pResultHitPos = pPos2;
return false;
Expand Down
Loading
0