LoS walls implementation.
This commit is contained in:
@@ -25,6 +25,7 @@ import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.geodriver.Cell;
|
||||
import com.l2jmobius.commons.geodriver.GeoDriver;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.WallData;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
@@ -280,6 +281,10 @@ public class GeoData
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (WallData.getInstance().checkIfWallsBetween(x, y, z, tx, ty, tz))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return canSeeTarget(x, y, z, tx, ty, tz);
|
||||
}
|
||||
|
||||
@@ -470,6 +475,10 @@ public class GeoData
|
||||
{
|
||||
return new Location(x, y, getHeight(x, y, z));
|
||||
}
|
||||
if (WallData.getInstance().checkIfWallsBetween(x, y, z, tx, ty, tz))
|
||||
{
|
||||
return new Location(x, y, getHeight(x, y, z));
|
||||
}
|
||||
|
||||
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
|
||||
// first point is guaranteed to be available
|
||||
@@ -532,6 +541,10 @@ public class GeoData
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (WallData.getInstance().checkIfWallsBetween(fromX, fromY, fromZ, toX, toY, toZ))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final LinePointIterator pointIter = new LinePointIterator(geoX, geoY, tGeoX, tGeoY);
|
||||
// first point is guaranteed to be available
|
||||
|
Reference in New Issue
Block a user