I can confirm that forbidden_size is badly handled in Grid_CheckForbidden: if I replace switch(forbidden_size) with switch(1) (which is the expected value), it works.
I have tested a map, and there is still two big problems (that were already there on 2.1):
- the mouse can't access some cells (I saw this on levels bigger than 1, but this is not the case for all the cells of such levels). In fact, the blue or green box isn't displayed on those cells, but soldiers and aliens can go there.
- soldiers and aliens can see thru walls, so aliens spend their reacting time to shoot on walls in direction of the soldiers, and sometimes kill themselves this way.
I have launched UFOAI in debug mode and I think I have found something concerning the first bug. Consider this part of code in CL_ActorMouseTrace:
restingLevel = Grid_Fall(&clMap, testPos, fieldSize);
/* hack to prevent cursor from getting stuck on the top of an invisible
playerclip surface (in most cases anyway) */
PosToVec(testPos, pA);
VectorCopy(pA, pB);
pA[2] += UNIT_HEIGHT;
pB[2] -= UNIT_HEIGHT;
CM_TestLineDM(pA, pB, pC);
VecToPos(pC, testPos);
restingLevel = min(restingLevel, Grid_Fall(&clMap, testPos, fieldSize));
When the bug occurs, the ending restingLevel value is 0 (the first Grid_Fall call returns 3, which is correct). This explains why no cursor box is displayed. I don't have the time to look further, but I hope this can help.