Closed scrom closed 8 years ago
I'd still like to keep the no climbing without a purpose and no doubling back most of the time so I've added in some "final chance" attempts at taking another exits after the existing logic. First chance is 5 attempts to get another exit that includes the option to double-back but doesn't offer the option to use "exitAction" exits - e.g. climb. Nor "avoid" locations. if that fails (unlikely). The last chance is to use any available exit including double-back, avoids and even exitActions.
after a few attempts it's still not fixed. I think the problem is that paths are calculated in reverse but then once trapped, paths are cleared until there's a viable route - which form the trapped location - working in reverse is also not possible at it points them to the same one way door they came in through.
nope - it wasn't paths being calculated backwards. There was some code in getRandomLocation that caused odd behaviour (afaik).
This was such a knotty issue that I've had to overhaul creatures obtaining exits and wandering (long overdue refactorings at the same time
This problem is now fixed And most of the nasty bugs and regressions since reworking this have been found and fixed. Wandering animals and odd reporting of autoclose doors still need work.
it turns out the case where a creature has come up the stairs to the top means they won't double-back down and can't use the "climb" exit. This leaves them to wait until the next turn without anything changing.