Minor WallData change.
This commit is contained in:
parent
af3f5ce7b7
commit
18f610bb3d
@ -112,11 +112,8 @@ public class WallData implements IXmlReader
|
||||
}
|
||||
|
||||
final Collection<WallHolder> allWalls = _walls.get(MapRegionManager.getInstance().getMapRegionLocId(x, y));
|
||||
if (allWalls == null)
|
||||
if (allWalls != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (WallHolder wall : allWalls)
|
||||
{
|
||||
// lower part of the multiplier fraction, if it is 0 we avoid an error and also know that the lines are parallel
|
||||
@ -132,13 +129,14 @@ public class WallData implements IXmlReader
|
||||
if ((multiplier1 >= 0) && (multiplier1 <= 1) && (multiplier2 >= 0) && (multiplier2 <= 1))
|
||||
{
|
||||
final int intersectZ = Math.round(z + (multiplier1 * (tz - z)));
|
||||
// now checking if the resulting point is between door's min and max z
|
||||
// now checking if the resulting point is between the wall min and max z
|
||||
if ((intersectZ > wall.getZMin()) && (intersectZ < wall.getZMax()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user