Double check for doors before normal checkMove to avoid exploiting key movement.

This commit is contained in:
MobiusDev
2018-03-05 16:19:06 +00:00
parent de2f1ad4f8
commit b7d6ffe17c
6 changed files with 36 additions and 0 deletions

View File

@@ -1128,6 +1128,12 @@ public class GeoEngine
*/ */
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance) public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
{ {
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instance, false))
{
return new GeoLocation(ox, oy, oz);
}
// get origin and check existing geo coordinates // get origin and check existing geo coordinates
final int gox = getGeoX(ox); final int gox = getGeoX(ox);
final int goy = getGeoY(oy); final int goy = getGeoY(oy);

View File

@@ -1128,6 +1128,12 @@ public class GeoEngine
*/ */
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance) public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
{ {
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instance, false))
{
return new GeoLocation(ox, oy, oz);
}
// get origin and check existing geo coordinates // get origin and check existing geo coordinates
final int gox = getGeoX(ox); final int gox = getGeoX(ox);
final int goy = getGeoY(oy); final int goy = getGeoY(oy);

View File

@@ -1128,6 +1128,12 @@ public class GeoEngine
*/ */
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance) public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
{ {
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instance, false))
{
return new GeoLocation(ox, oy, oz);
}
// get origin and check existing geo coordinates // get origin and check existing geo coordinates
final int gox = getGeoX(ox); final int gox = getGeoX(ox);
final int goy = getGeoY(oy); final int goy = getGeoY(oy);

View File

@@ -1128,6 +1128,12 @@ public class GeoEngine
*/ */
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance) public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
{ {
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instance, false))
{
return new GeoLocation(ox, oy, oz);
}
// get origin and check existing geo coordinates // get origin and check existing geo coordinates
final int gox = getGeoX(ox); final int gox = getGeoX(ox);
final int goy = getGeoY(oy); final int goy = getGeoY(oy);

View File

@@ -1116,6 +1116,12 @@ public class GeoEngine
*/ */
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, int instanceId) public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, int instanceId)
{ {
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instanceId, false))
{
return new GeoLocation(ox, oy, oz);
}
// get origin and check existing geo coordinates // get origin and check existing geo coordinates
final int gox = getGeoX(ox); final int gox = getGeoX(ox);
final int goy = getGeoY(oy); final int goy = getGeoY(oy);

View File

@@ -1128,6 +1128,12 @@ public class GeoEngine
*/ */
public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance) public final Location canMoveToTargetLoc(int ox, int oy, int oz, int tx, int ty, int tz, Instance instance)
{ {
// Mobius: Double check for doors before normal checkMove to avoid exploiting key movement.
if (DoorData.getInstance().checkIfDoorsBetween(ox, oy, oz, tx, ty, tz, instance, false))
{
return new GeoLocation(ox, oy, oz);
}
// get origin and check existing geo coordinates // get origin and check existing geo coordinates
final int gox = getGeoX(ox); final int gox = getGeoX(ox);
final int goy = getGeoY(oy); final int goy = getGeoY(oy);