ClosestBuildSite function

ClosestBuildSite function

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
tow_dragon
Posts: 45
Joined: 05 May 2006, 13:53

ClosestBuildSite function

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

e: obsolete
Last edited by Kloot on 16 Aug 2008, 13:12, edited 3 times in total.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

What a weird bug! never seen something like that...
Post Reply

Return to “Help & Bugs”