ClosestBuildSite function
Moderator: Moderators
- tow_dragon
- Posts: 45
- Joined: 05 May 2006, 13:53
ClosestBuildSite function
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.
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.


atm the check for static structure is something like
whereas it should be:
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.
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.


atm the check for static structure is something like
Code: Select all
if((ud->movedata==0)&&(!ud->canfly))Code: Select all
if(ud->speed =< 0)