Flayra/NS2-Scripts — pull request #14 by fsfod (2011-10-16 16:27:27+00:00)
Title: fix idle worker button becoming nonfunctional because lastGotoIdleWorker is set to a non idle worker

The idle worker button would stop functioning if the last idle worker you selected was used to build something or it died and there was 2+ other idle workers. This was happening because there was no handling of lastGotoIdleWorker not being found in the workers table because it was no longer a valid idle worker in the function Commander:GotoIdleWorker.

I'm thinking maybe the workers table could be sorted by there ID and instead of having to reseting it to the first idle worker its set to the first one with an id larger than the id of lastGotoIdleWorker when lastGotoIdleWorker is no longer a valid idle worker