Fixed char moving in wrong direction when trying to attack walls.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment 2020-06-14 21:18:45 +00:00
parent f17155b4f0
commit 38a1a7365d
15 changed files with 15 additions and 15 deletions

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)

View File

@ -124,7 +124,7 @@ public class DoorData implements IXmlReader
final int nodeX = set.getInt("nodeX_0");
final int nodeY = set.getInt("nodeY_0");
final int posX = set.getInt("nodeX_1");
final int posY = set.getInt("nodeX_1");
final int posY = set.getInt("nodeY_1");
int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20)