From Atlantai Firestar:
I've been bug hunting for ages now and I shoved aliks metal class in instead of cains, and aside from a few minor hanges and a truckload of compiler errors I Had to fix to remover JCAI dependencies, and a few amusing screenshots of wind gen mexes and mexes with radar towers on top, I saw little or no change save that now it seemed fairly more stable for a few minutes extra play.
So i recompiled and watched what the AI commander was doing seeing if I could spot what was going wrong when I saw it. NTAI com had chosen a position to build a metal maker and started doing so, there where some trees nearby and a construction kbot already had orders to build on the patch the metal maker was but hadn't started as it was reclaiming trees in the way. Suddenly the kbot finishes and starts to build an adv kbot lab on top of the half finished metal maker and the instance it happened the game crashed in exactly the same way JCAI and NTAI do. The reason NTAI has this error more often than JCAI is that NTAI uses a slightly different approach to building locations that makes it more prone to these errors.
I tried adding a vector<float3> array to the building function that added a builds chosen location tot eh array after checking to see if it already existed, hence avoid the error. I tried making ti check if ti was within 3-4 squares but that led to valid constructions being noted as invalid and thus weren't built. So I set ti to check if they where exactly equal to each other and it didn't work, they had construction collisions still.
So spring needs to handle these instances better, to prevent bugs in AI games and a handful of multiplayer games.
Post this in the AI forum immediatly, and stress it took me a while to find this bug too.
Bug located
Moderators: hoijui, Moderators
Bug located
Last edited by Triaxx2 on 14 Oct 2005, 23:25, edited 1 time in total.