Fix incorrect blocked LOS-calculation on certain locations (by Lynx3d)

--HG--
branch : trunk
This commit is contained in:
click
2010-07-10 05:14:05 +02:00
parent 89ea8ccdf9
commit 478946284d
3 changed files with 29 additions and 22 deletions

View File

@@ -57,8 +57,11 @@ namespace VMAP
Ray modRay(p, iInvRot * pRay.direction());
float distance = pMaxDist * iInvScale;
bool hit = iModel->IntersectRay(modRay, distance, pStopAtFirstHit);
distance *= iScale;
pMaxDist = distance;
if(hit)
{
distance *= iScale;
pMaxDist = distance;
}
return hit;
}