Core/Collision: Models with flag MOD_M2 (mostly trees, among some other objects) should not be taken into account for LoS checks, this check does not apply to gameobjects (yet)

closes #3495

Signed-off-by: Subv <[email protected]>
This commit is contained in:
Subv
2012-02-14 18:19:40 -05:00
parent 7d30b061f0
commit c53d722aa2
5 changed files with 9 additions and 4 deletions
@@ -420,6 +420,9 @@ namespace VMAP
bool WorldModel::IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const
{
// M2 models are not taken into account for LoS calculation
if (Flags & MOD_M2)
return false;
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.size() == 1)