Player gets stuck when exiting possession from unit no longer owned
If you possess a unit, and that unit changes ownership through the script, or gets killed and you stay inside of possession until after the corpse is gone, and you exit possession, the game does not know what to do. It will zoom to a random spot, and the player loses control of the game and cannot play on OR save his game.
To reproduce, add this script to any level:
IF(PLAYER0,GAME_TURN >100)
NEXT_COMMAND_REUSABLE
CHANGE_CREATURE_OWNER(PLAYER0,IMP,ON_FRIENDLY_GROUND,PLAYER_GOOD)
ENDIF
Possess an imp within 5 seconds on level start, and wait until that time is up. Then exit possession and try to play on.
Could be related with issue https://github.com/dkfans/keeperfx/issues/2716 same 'stuck state' also happen with MOVE_CREATURE script command if you possess that creature, player is left with no other choice than restarting the game.
Fixed with https://github.com/dkfans/keeperfx/pull/3598