Closed Gothfinger closed 4 years ago
My unsticking code needs rewriting as it isn't very good. Jumping seems to solve most problems, so it has been a bit neglected.
The only change that is really needed is the part where I changed the timings, strafeduration for example is used in await Task.Delay(strafeDuration); which is in milliseconds.
The other part is where I added wowProcess.SetKeyState(ConsoleKey.UpArrow, false, false, "StuckDetector"); since otherwise he would not back up. With this it becomes very robust, and he finds his way out of almost any stuck place.
Changed the timings to not confure seconds with milliseconds.
Made it go through more loops of unstick, which progressively should make it get out of most sticky situations. Added so that it correctly walks backward, didn't work for me in original code since for some reason it was pressing arrow forward nonstop