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

@@ -31,7 +31,7 @@ namespace VMAP
iInvScale = 1.f/iScale;
}
bool ModelInstance::intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit) const
bool ModelInstance::intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit, ModelIgnoreFlags ignoreFlags) const
{
if (!iModel)
{
@@ -55,7 +55,7 @@ namespace VMAP
Vector3 p = iInvRot * (pRay.origin() - iPos) * iInvScale;
Ray modRay(p, iInvRot * pRay.direction());
float distance = pMaxDist * iInvScale;
bool hit = iModel->IntersectRay(modRay, distance, pStopAtFirstHit);
bool hit = iModel->IntersectRay(modRay, distance, pStopAtFirstHit, ignoreFlags);
if (hit)
{
distance *= iScale;