OpenXcom Forum
OpenXcom Forks => OXCE Bugs => OpenXcom Extended (OXCE) => OXCE Bugs FIXED => Topic started by: Xilmi on April 13, 2024, 01:45:51 pm
-
This issue was brought up to me by the streamer https://www.twitch.tv/dasrifftierchen
And since I could reproduce it in regular OXCE and not just my fork, I thought I better bring it up here.
The bug works as follows:
When a unit with reserved time-units tries to right-click-open a door while doing so would exceed the reserved time-units, the door will still get opened.
However, the time-units will not be spent, the vision will not be updated and the door-opening-sound will not be played.
This is because in TileEngine::unitOpensDoor the function tile->openDoor is called before _save->getBattleGame()->checkReservedTU.
I think TileEngine::unitOpensDoor needs a bit of restructuring to fix this issue.
I attached a screenshot and a save with the situation prepared for testing.
-
Fixed it now in my branch. The issue was caused by kneeling being also reserved. The TUs reserved for shooting were already considered before the door would open. But not the TUs reserved for kneeling.
-
Could you link commit that fix it?
-
I suppose it's this one: https://github.com/Xilmi/OpenXcom/commit/bc65e117185b68d2679814cae111e9250d083f83
-
Fixed.
https://github.com/MeridianOXC/OpenXcom/commit/9b7f01b66ffbe4082a4ef833d53785213d45fe09