mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528
(cherry-picked from 01d715eaef)
This commit is contained in:
@@ -161,7 +161,7 @@ GameObjectModel* GameObjectModel::Create(std::unique_ptr<GameObjectModelOwnerBas
|
||||
return mdl;
|
||||
}
|
||||
|
||||
bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift) const
|
||||
bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift, VMAP::ModelIgnoreFlags ignoreFlags) const
|
||||
{
|
||||
if (!isCollisionEnabled() || !owner->IsSpawned())
|
||||
return false;
|
||||
@@ -177,7 +177,7 @@ bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool sto
|
||||
Vector3 p = iInvRot * (ray.origin() - iPos) * iInvScale;
|
||||
Ray modRay(p, iInvRot * ray.direction());
|
||||
float distance = maxDist * iInvScale;
|
||||
bool hit = iModel->IntersectRay(modRay, distance, stopAtFirstHit);
|
||||
bool hit = iModel->IntersectRay(modRay, distance, stopAtFirstHit, ignoreFlags);
|
||||
if (hit)
|
||||
{
|
||||
distance *= iScale;
|
||||
|
||||
Reference in New Issue
Block a user