Direct target following only for playables.

Thanks to Sahar.
This commit is contained in:
MobiusDevelopment
2021-03-12 14:36:30 +00:00
parent 18800e1b65
commit 99999d417f
23 changed files with 23 additions and 23 deletions
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -476,7 +476,7 @@ abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_accessor.moveTo(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_accessor.moveTo(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
// Mobius: Solves moving to wrong Z when not using geodata,
// but probably is not accurate and you should use geodata.
@@ -476,7 +476,7 @@ abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_accessor.moveTo(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_accessor.moveTo(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
// Mobius: Solves moving to wrong Z when not using geodata,
// but probably is not accurate and you should use geodata.
@@ -530,7 +530,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -530,7 +530,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{
@@ -467,7 +467,7 @@ public abstract class AbstractAI implements Ctrl
}
// Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
_actor.moveToLocation(pawn, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
_actor.moveToLocation(_actor.isPlayable() ? pawn : null, pawn.getX(), pawn.getY(), pawn.getZ(), offset);
if (!_actor.isMoving())
{