My troops were transported OUTside the enemies boundary AFTER i razed the city?? autosave in zip, i believe i turn before raze? see pic 1
Wow... that's very interesting. There's a big question in my mind as to whether this should be solved in the code or not. On one hand, it probably should be. On another hand, it could create a nasty complexity and perhaps some clashes of rules elsewhere.
See... this is actually quite legally taking place.
I noticed, as I came up and went to attack the city, that there is a rogue in the city. The rogue is a 3rd party. Not sure which player's rogue it is but I'm sure we can assume it to be barbarian.
The rogue can't defend the city nor would he try.
When your units, as a stack, attack and make a breakthrough into the city, they legally move in as it temporarily becomes your city. The rogue is immune to attack still because the city is still a city and he's got the ability to blend into the city.
However, as soon as the city is razed, a plot validity check takes place on all units on the plot. This then finds a rogue that, being visible to your forces, cannot co-habitate the plot with your forces. Units are moved in a sequence from that scenario until the scenario is legal for all units that remain. This means until the rogue itself has been moved due to his own inability to now share the space, or until your units have lost visibility on the rogue.
When this sort of thing happens, the units are sent to the nearest not only 'legal' space for them to be but the space must be either yours or unowned.
Now... looking at this, it's the plot itself that runs the legality check and does so impartially for the player's units involved. The order of the units checked therefore cannot really be rigged.
There are numerous ways to address the problem but I'm really not sure what the 'best' way would be. I could add a tag to improvements so that units with bBlendWithCity can have that effect work when they are on a destroyed city tile. (This would mean that such destroyed city tiles would always be an illogical (outside of this issue) haven for criminals... illogical because there is no crowd to blend into.)
Plus, this adds a new tag and more data use.
I could disable the legality check and allow the units to overlap in this sort of case (I'm strongly considering this since unit movements alone didn't create the situation but rather the choice to raze introducing the new illegality of space sharing... this could improve some other eventual problems that this illegality check may create.)
This might be the way to go but it's hard to guess what other side effects this might have elsewhere.
I could get much more complicated in building new code - which could create complexity based delay and there's so many possible ways to address it along these lines that it's very difficult to say what should be done exactly.
Then there's the option to do nothing and issue the warning that if you see a criminal in the city and you plan to raze the city, march only one unit in to make the final attack against the city (this helps to keep from disrupting the stack as only either the criminal(s) or the invading unit will then be made to jump to the nearest valid plot.)
It's ... tricky. And maybe I should wait for some comments before making up my mind on this.