Having read Caydr's request for new yardmap flags, I have been going through the code to determine what would need to be done in order to accommodate this.
Firstly, there is CUnitHandler::TestBuildSquare() which reads from CReadMap::groundBlockingObjectsMap through CReadMap::GroundBlocked().
CReadMap::groundBlockingObjectsMap is written to through CReadMap::AddGroundBockingObject(CSolidObject *object, unsigned char *yardMap).
The grid that hovers on the map for building structures is rendered by CUnitHandler::ShowUnitBuildSquare()
The actual checking of all this is done by CBuilder::StartBuild().
I seem to have forgotten where the yardmap is read, but if anyone would like to help me in this search, please do.
Caydr's yardmap request
Moderator: Moderators
Can you fix the existing yardmaps, remember ym screenshot of all those factories where the commander had blocked the factories building anythign by building llt's in the middle of them where the units get built?
I'll post a shot hen I remember where they where, it's a pain cus sometimes in nanoblobz closestbuildsite returns the centre of the autofac and NTAI builds a holder udner the autofac.
You might also wanna tie in an AI callback function to test if a square is blocked or not, which would be extremely useful (you have no idea how useful, submarine has asked for it too).
I'll post a shot hen I remember where they where, it's a pain cus sometimes in nanoblobz closestbuildsite returns the centre of the autofac and NTAI builds a holder udner the autofac.
You might also wanna tie in an AI callback function to test if a square is blocked or not, which would be extremely useful (you have no idea how useful, submarine has asked for it too).