Originally Posted by
Michael
Hmm mine doesn't do that, very strange show me your walk packet handler thingy
Its not my walking packet etc because I walk fine untill the region updates.
Are my fomulees for the regions and local coords correct?
Code:
mapRegionX = (absolute[0] >> 3) - 6;
mapRegionY = (absolute[1] >> 3) - 6;
localX = absX - 8 * mapRegionX;
localY = absY - 8 * mapRegionY;
Here is my walking packet -
Code:
int size = packet.getLength();
if(packet.getOpcode() == 11) {
size -= 14;
}
PathHandler path = player.getPathHandler();
path.clearWaypoints();
final int steps = (size - 5) / 2;
final int[][] waypoints = new int[steps][2];
for (int i = 0; i < steps; i++) {
waypoints[i][0] = packet.readByte();
waypoints[i][1] = packet.readByteS();
}
final int firstX = packet.readShortA();
final int firstY = packet.readLEShort();
@SuppressWarnings("unused")
final boolean runSteps = packet.readByteC() == 1;
path.add(Point.location(firstX, firstY));
for (int i = 0; i < steps; i++) {
waypoints[i][0] += firstX;
waypoints[i][1] += firstY;
path.add(Point.location(waypoints[i][0], waypoints[i][1]));
}
My walking class is the same as rs2d handled it. Works perfectly on my 377 but not with this?