Fix Actor.getWorldLocation to use pathX/pathY instead of getX/getY
This commit is contained in:
@@ -42,6 +42,11 @@ public interface Actor extends Renderable
|
|||||||
|
|
||||||
int getHealth();
|
int getHealth();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the server location of the actor. Note that this is typically
|
||||||
|
* a couple steps ahead of where the client renders the actor.
|
||||||
|
* @return Returns the server location of the actor.
|
||||||
|
*/
|
||||||
WorldPoint getWorldLocation();
|
WorldPoint getWorldLocation();
|
||||||
|
|
||||||
LocalPoint getLocalLocation();
|
LocalPoint getLocalLocation();
|
||||||
|
|||||||
@@ -127,7 +127,10 @@ public abstract class RSActorMixin implements RSActor
|
|||||||
@Inject
|
@Inject
|
||||||
public WorldPoint getWorldLocation()
|
public WorldPoint getWorldLocation()
|
||||||
{
|
{
|
||||||
return WorldPoint.fromLocal(client, getX(), getY(), client.getPlane());
|
return WorldPoint.fromLocal(client,
|
||||||
|
this.getPathX()[0] * Perspective.LOCAL_TILE_SIZE + Perspective.LOCAL_TILE_SIZE / 2,
|
||||||
|
this.getPathY()[0] * Perspective.LOCAL_TILE_SIZE + Perspective.LOCAL_TILE_SIZE / 2,
|
||||||
|
client.getPlane());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ public interface RSActor extends RSRenderable, Actor
|
|||||||
@Import("y")
|
@Import("y")
|
||||||
int getY();
|
int getY();
|
||||||
|
|
||||||
|
@Import("pathX")
|
||||||
|
int[] getPathX();
|
||||||
|
|
||||||
|
@Import("pathY")
|
||||||
|
int[] getPathY();
|
||||||
|
|
||||||
@Import("animation")
|
@Import("animation")
|
||||||
@Override
|
@Override
|
||||||
int getAnimation();
|
int getAnimation();
|
||||||
|
|||||||
Reference in New Issue
Block a user