Core/Vmaps: Stop M2s from occluding for spellcast LoS

Closes #18528

(cherry-picked from 01d715eaef)
This commit is contained in:
HelloKitty
2017-01-21 14:44:31 +01:00
committed by Shauren
parent da3783876b
commit 46c69df3a7
20 changed files with 104 additions and 44 deletions

View File

@@ -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;