@Kiszonka this appears to be a mistake in PlaceOnWalkableArea. This function is run whenever a character ends up on a non-walkable area after walking (because of pathfinder imperfection), and idea is that it jumps a pixel to the nearest area.
I suspect that there may be a coordinate conversion mistake somewhere.
The easy way to reproduce the issue is this:
Code: ags
This puts a character on any place in room with Space key, and orders to move it to the nearest walkable area with W.
I suspect that there may be a coordinate conversion mistake somewhere.
The easy way to reproduce the issue is this:
function on_key_press(eKeyCode k)
{
if (k == eKeySpace)
{
Point* p = Screen.ScreenToRoomPoint(mouse.x, mouse.y);
player.x = p.x;
player.y = p.y;
}
else if (k == eKeyW)
{
player.PlaceOnWalkableArea();
}
}
This puts a character on any place in room with Space key, and orders to move it to the nearest walkable area with W.