GetPCInJail and GetPCTraveling do not work as in vanilla
I'm opening this bug on behalf of dabeowul1 from IRC, who didn't have an account for the bug tracker or github. According to dabeowul, some survival mods don't work because of an issue with getPCInJail.
Currently if you play a mod like Necessities of Morrowind for purists (or some eat/drink/sleep mod which says it can cope with jailtime) you will find yourself die from starvation/sleep deprivation/dehydration whatever as soon as jailtime ends because the time advancement happens while getPCInJail indicates you are not still in jail.
I think the only actually needed change is the one where "MWBase::Environment::get().getWorld()->advanceTime(mDays * 24);" is called. If anyone brings in to their attention I'd be happy. Maybe also the place where "MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Jail);" is executed. From that pastebin, everything else I attempted to fix it which is still in that diff there should be irrelevant.
Here is the pastebin dabeowul referenced: http://pastebin.com/raw/uKSrPdiB
#5 Updated by Mitchell Schwitzer 11 months ago
Paul McElroy wrote:
How long did you serve? Ensure you're spending adequate time in jail so that you would absolutely die.
I had spent around 25-30 days in prison. I'll attempt it with larger bounty amounts. I had an issue where I was being marked for death as opposed to being able to choose to go to prison.
#13 Updated by Lennart Bernhardt 7 months ago
After writing some research for vanilla morrowind it seems that scripts are executed between the player clicking the travel button and the game starting to load the new cell.
Also GetPCTraveling seems to be true until like a frame after arriving.
Openmw does no currently support scripts running while traveling - anyone got any ideas to work around that?