Enemy's prone stance makes him end up partly obstructed
I attached two savegames that represent what you see in the screenshots. The enemy seems to be neither on the upper, nor on the lower level. I attached two savegames. In the first one, you can see the enemy and he can see you. He will shoot and hit you as well, if you stay there. If you look at your possible cover, you can see that the tile he seems to be on appears to be the safest bet. You can also just move there. The enemy attempted to knife me, but failed every time.

I can confirm this bug on both Stracciatella and Vanilla JA2.
The problem here is NOT that the enemy is "stuck between upper and lower plane" however. The problem is that the enemy is in prone stance in a place, where he should't be able to do so. You can test this by placing a merc on the same tile (after killing the enemy, ofc) and trying to go prone while facing in the same direction as the enemy does --- this doesn't work. So, the enemy is half trapped within the stack of boxes and thus partly obstructed. The enemy shouldn't be allowed to enter the prone stance with this specific facing on this secific tile.
SaveGame11.zip I ran into this bug 2-3 times in my current big playtest. Here's a savegame with an instance of this bug. An enemy decided to go prone in a place where it is not possible to go prone while facing a specific direction.
This is the same underlying problem as #98 and #1681: there is no structure at the enemy's gridno. Interesting though that this one and #1681 both mention enemies going prone, that looks like a decent starting point for an investigation.
Here's a save that allowed me to reproduce 6 out of 6 tries on released 0.20: 2023-02-28t17-56-26z-invulnerablerepro.zip
Maybe if the sector isn't even initialized yet, it will help with the debugging as any Bad Thing™ is only about to happen?
Repro:
- load the game
- speed up the time for the squad to reach the N6 sector
- start somewhere on the road, kill the first visible enemy, end turn
- afterwards go towards the sandbags, the elite enemy there ways always prone then
- bonus: after you end the turn then, the cheeky bastard will stand up, throw a grenade and then lie down back into the unallowable position!
- not even a direct LAW hit hurts him when prone
If you rush the sandbags immediately during your 1st turn, the elite enemy is standing and presumably goes prone only afterwards.
Further details - amongst my non-vanilla settings these are possibly related in case your (repro) mileage varies:
-
"go_prone_more_often": true -
"avoid_ambushes": true