Page 1 of 1

ClosestBuildSite function

Posted: 23 Jan 2007, 18:27
by tow_dragon
I think it should be a known bug, but for months (years?) nobody has fixed it. Function ClosestBuildSite from callback sometimes returns positions already occupied by hubs, factories, or movable units (that sometimes don't move after giving build order, btw.). Trunk version of TSI has a lot of problems with ie. 5 AutoFacs built in the same place or hubs trying to build sth on themselves or in the centre of a factory. These inconveniences cause, that ClosestBuildSite is sometimes almost absolutely useless.

Posted: 23 Jan 2007, 19:21
by AF
This is caused by the same bug I and zwzsg have been complaining about for the last year and a half.

Another symptom of this is building things inside other units. For example, NTai was told to place a mex inside an airfactory once, and indeed it went ahead and built it.

This is also the cause of the issue with OTA factories and the lack of support for O in yardmaps.

Image

Image

atm the check for static structure is something like

Code: Select all

if((ud->movedata==0)&&(!ud->canfly))
whereas it should be:

Code: Select all

if(ud->speed =< 0)
This would fix hubs and nanotowers. But its a cheap fix, one that corrects one bug while pretending it fixes the second bug thats much much bigger.

Posted: 23 Jan 2007, 20:04
by Kloot
e: obsolete

Posted: 23 Jan 2007, 20:42
by manored
What a weird bug! never seen something like that...