Since Ubuntu 8.10 doesn't have updated versions in the repository (beta4 is buggy indeed), I decided to download the source from SVN. While waiting for everything to finish, I started browsing through the code.
Within 'actionVTOLLandingPos', the algorithm to find a landing place involves looking at the droid's present position, and using increasingly wide (+1 tile in each direction per iteration) square borders to look for a nice landing place. This leads to VTOLs using 'Manhattan Distance' (instead of straight-line distance). I would like to contribute some code to transform this square search into a spiral. How can I submit a patch, or should I just post it as a message to the forum?
The patch adds a function 'spiralSearch' with the following prototype:
Code: Select all
BOOL spiralSearch(SDWORD startX, SDWORD startY, SDWORD radius, searchFunction f, void *data);Code: Select all
BOOL f(SDWORD x, SDWORD y, void *data);
