Tunnelers get stuck on edge of water
Load the attached saved game in KeeperFX v0.4.6 r1819 patch, git 4a6d8d4, dated 2015-12-31 16:10:10 and notice the tunneler is stuck on the waters edge. He should be able to dig through the dirt.
(Same map as #718)
To reproduce load the map, frameskip, and wait.
When I possessed the tunneler and tried to dig something surreal happened. The tunneler disappeared but I remained in first person mode, unable to do anything like quitting the game or getting out of possession.
This is what was listed in the log:
Error: update_player_camera: Cannot go first person without controlling creature

Unfortunately, this packet file goes out of sync for me.. does it work on your machine?
Yeah, it works no problem. Just to be sure this is the level: 
I can also reproduce it quite easily. Starting this level and using frameskip will reproduce it about 50% of the times, the other times I run into #718.
The log says this:
Error: get_next_position_and_angle_required_to_tunnel_creature_to: The target subtile (124,148) has no approachable position
Error: get_next_position_and_angle_required_to_tunnel_creature_to: The target subtile (124,148) has no approachable position
Error: get_next_position_and_angle_required_to_tunnel_creature_to: The target subtile (124,148) has no approachable position
Error: creature_tunnel_to: Move creature TUNNELLER index 20 to (157,139) reset - wallhug distance 8243 too large
Error: creature_tunnel_to: Move creature TUNNELLER index 20 to (157,139) reset - wallhug distance 8224 too large
Error: get_next_position_and_angle_required_to_tunnel_creature_to: The target subtile (124,154) has no approachable position
Have you noticed the behaviour of the tunneller is generally different on your map than in original level 1? I mean instead of tunnelling around the players dungeon, he does random movement.
I am actually not sure why the tunneller seem to always dig in direction of the player at first - setting target to PLAYER0 dungeon fails:
Warning: script_support_send_tunneller_to_dungeon: Tried to send creature TUNNELLER to player 0 but can't find position
The reason is that the ADD_*_PARTY command is unconditional, so it is executed while creating the level. At this point, there is no list of "wander points" within dungeon of each player - this list is created much later.
So this is interesting - we were able to observe all the bugs in tunnelling only because the tunnelling was random instead of always chasing PLAYER0.
I did notice but I have not played any non-testing games in a while so I assumed this was the new tunneler behavior. I'm happy I accidentally made a good test map.
And all the more interesting because indeed the tunneler always digs towards the player dungeon first, why is that,...
I added a condition
IF(PLAYER0,GAME_TURN > 1)
to make sure the behaviour is really specific to unconditional PARTY, and - it works the same, still random movement. Looks like I still don't understand how the code works...
Looking closely at the behavior, my guess is that it behaves as if he has successfully tunneled around the dungeon as far as it could. Normally this is when the behavior chances. Perhaps now it can no longer manage to go around and instead gets stuck and gives up and proceeds with the behavior we now observe.
The tunneller stops because he can hear dungeon heart. Hearing the heart beat triggers combat mode; then the white trail on minimap disappears for some time, because the tunneller no longer tunnels - he tries to fight the heart instead. Since he cannot reach the heart, he backs off. After the retreat is done, he no longer hears the heart. He selects a random destination and gets back to tunnelling.
I had already tested on the same map with a southern wall no longer reinforced, that doesn't change the behavior. Wouldn't the tunneler dwarf work best if when determining a path he would disregard dirt and simply dig whenever he touches it?
Tunnelling actually doesn't contain any analysis of path. Tunneller just starts moving towards destination one slab at a time, if he finds a dirt - he digs it and continues with moving. If he finds a wall - he triggers wallhug until the wall finishes.
But even though the code does not include many conditions, it is still too complex to just react on bumping into wall. It doesn't react, it predicts - even if its only one turn forward.
The problem is - it has very, very basic moving capabilities. In original game it wasn't blocking that much, but if you'll look at his position, you will notice he doesn't really walk as he should. After a next slab is selected for digging, he just "teleports" to the place of digging - in one game turn. KeeperFX doesn't allow breaking the laws of (already simplified) in-game physics, so instead he will run at his max speed and a warning will be logged about creature having "excessive forward speed". And that is the moment when he gets blocked.
Uhh.. much text. Anyway my plans are to replace the moving part of tunnelling with Ariadne moving. Since paths in tunnelling are always very short, this is kind of using a cannon for a fly. But this will also solve all the issues. I tried to use only part of Ariadne, but that won't work - Ariadne is a complex system, if you're using it, it has to be used as a whole.
The problem in title should no longer happen, as Ariadne is used for moving while tunnelling.
I'll test this one and #718 after #721 is fixed.