Comment 11 for bug 1395238

Revision history for this message
xxx-deleted (janosch-peters-deactivatedaccount) wrote :

I made another attempt to fix this bug. The solution is not elegant, but very simple: When soldiers figure out that they are stuck, they just walk to their destination ignoring blocked nodes. I made this change in behaviour only to soldiers returning home, because for attacking soldiers its not easy to tell if they are stuck or just waiting very long to get to an enemy because there might be a lot of fighting going on before them.

It is a pragmatic solution for a bug which will for most players never occur. Only a few LoC are changed and the solution will always work.

A solution using a random walk would be preferable because the game logic isnt spoiled (soldiers walking through other soldiers). The drawback, however, would be that a random solution might not always work. It is not straightforward to implement and the code changes would certainly be bigger. I tried this approach but had diffculties with performance.