You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In particular circumstances the pathfinder can create a path that either crosses non-walkable pixels, OR character's walking logic somehow makes a character pass over non-walkable pixels when following this path. Because in AGS characters no longer test for walkable areas while moving, this does not cause them to stop. However the fact itself is a bug. It may in theory lead to unforeseen behavior, if, for example, a script is repeatedly testing a walkable area at the character's position.
This problem was first reported in #1879, where a character would get stuck if such pixel would be the last in a walking path.
The stucking itself was fixed by #2658, but the pathfinder issue remains.
AGS Version
Any version that features a new A* pathfinder, starting since 3.5.0.
Curiously, this seems to not depend on whether character's MoveList is based on fixed-point (in 3.x) or floating-point values (in 4.x). (at least there's no difference in the available test case)
This game is based on Sierra template (the character settings, such as walking speed, may be also essential for the test) and contains a walkable area mask provided by the user who reported the #1879.
In game, press Ctrl+A to display walkable areas, then T key to start a test. Player will be teleported to particular location and ordered to WalkStraight towards other position. It will be writing player's position and underlying area to the standard log.
The example log output:
Script : player move from 164,98 to 114,123
Script : player at 164,98, area 1
Script : player at 164,98, area 1
Script : player at 164,98, area 1
Script : player at 164,98, area 1
Script : player at 164,98, area 1
Script : player at 164,98, area 1
Script : player at 164,98, area 1
Script : player at 161,99, area 1
Script : player at 161,99, area 1
Script : player at 161,99, area 1
Script : player at 161,99, area 1
Script : player at 161,99, area 1
Script : player at 157,101, area 0
Script : player at 157,101, area 0
Script : player at 157,101, area 0
Script : player at 157,101, area 0
Script : player at 157,101, area 0
Script : player at 154,103, area 1
Script : player at 154,103, area 1
Script : player at 154,103, area 1
Script : player at 154,103, area 1
Script : player at 154,103, area 1
Script : player at 150,105, area 1
Script : player at 150,105, area 1
Script : player at 150,105, area 1
Script : player at 150,105, area 1
Script : player at 150,105, area 1
Script : player at 147,106, area 0
Script : player at 147,106, area 0
Script : player at 147,106, area 0
Script : player at 147,106, area 0
Script : player at 147,106, area 0
Script : player at 143,108, area 1
Script : player at 143,108, area 1
Script : player at 143,108, area 1
Script : player at 143,108, area 1
Script : player at 143,108, area 1
Script : player at 139,110, area 1
Script : player at 139,110, area 1
Script : player at 139,110, area 1
Script : player at 139,110, area 1
Script : player at 139,110, area 1
Script : player at 136,112, area 1
Script : player at 136,112, area 1
Script : player at 136,112, area 1
Script : player at 136,112, area 1
Script : player at 136,112, area 1
Script : player at 132,114, area 1
Script : player at 132,114, area 1
Script : player at 132,114, area 1
Script : player at 132,114, area 1
Script : player at 132,114, area 1
Script : player at 129,115, area 1
Script : player at 129,115, area 1
Script : player at 129,115, area 1
Script : player at 129,115, area 1
Script : player at 129,115, area 1
Script : player at 125,117, area 1
Script : player at 125,117, area 1
Script : player at 125,117, area 1
Script : player at 125,117, area 1
Script : player at 125,117, area 1
Script : player at 122,119, area 1
Script : player at 122,119, area 1
Script : player at 122,119, area 1
Script : player at 122,119, area 1
Script : player at 122,119, area 1
Script : player at 118,121, area 1
Script : player at 118,121, area 1
Script : player at 118,121, area 1
Script : player at 118,121, area 1
Script : player at 118,121, area 1
Expected behavior
The pathfinder should produce a path that does not cross over non-walkable pixels, nor character following such path should walk over non-walkable pixels.
The text was updated successfully, but these errors were encountered:
Describe the bug
In particular circumstances the pathfinder can create a path that either crosses non-walkable pixels, OR character's walking logic somehow makes a character pass over non-walkable pixels when following this path. Because in AGS characters no longer test for walkable areas while moving, this does not cause them to stop. However the fact itself is a bug. It may in theory lead to unforeseen behavior, if, for example, a script is repeatedly testing a walkable area at the character's position.
This problem was first reported in #1879, where a character would get stuck if such pixel would be the last in a walking path.
The stucking itself was fixed by #2658, but the pathfinder issue remains.
AGS Version
Any version that features a new A* pathfinder, starting since 3.5.0.
Curiously, this seems to not depend on whether character's MoveList is based on fixed-point (in 3.x) or floating-point values (in 4.x). (at least there's no difference in the available test case)
Game
test--360walkstraighterror.zip
This game is based on Sierra template (the character settings, such as walking speed, may be also essential for the test) and contains a walkable area mask provided by the user who reported the #1879.
In game, press Ctrl+A to display walkable areas, then T key to start a test. Player will be teleported to particular location and ordered to WalkStraight towards other position. It will be writing player's position and underlying area to the standard log.
The example log output:
Expected behavior
The pathfinder should produce a path that does not cross over non-walkable pixels, nor character following such path should walk over non-walkable pixels.
The text was updated successfully, but these errors were encountered: