Barotrauma
Barotrauma copied to clipboard
AI does not properly open two nearby located doors
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [ ] My issue happened while using mods.
What happened?
Situation: there are two doors that are placed nearby. A bot opens first door, then almost immediately tries to open second door. The problem is - when the bot is opening the second door, he has not yet fully passed through the first door. This could cause incorrect behavior if the second door's logic results in closing the first door. Example: https://www.youtube.com/watch?v=WpQyH1VJI00 Test submarine: Test Sub.zip
What I expect: the bot should not try to press second door's buttons until he fully passes through the first door.
I decided to separate this issue from #9600 just to make it easier. I will create a pull request for this a bit later.
Reproduction steps
- In sub editor place 2 doors near each other.
- Place buttons and logic components so there will be a button that in the same time opens second door and closes first door.
- Place 2 bots so they will be separated by 2 doors.
- Command a bot to follow another bot.
Bug prevalence
Happens every time I play
Version
0.18.15.0
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
I have a similar problem. A custom submarine. The bot opens the door but not goes forward as the next door is closed. The next door should open when the first closes (The second door has no buttons and opens automatically when the first door is closed). But the bot opens the first door and just stands. The bot must approach the locked door but it does not! Apparently the bot expects the second door to open, at a great distance from it. It seems to me the problem is at what distance the bots open the door or at what distance they expect the path to open. The bot cannot handle such a task:
https://user-images.githubusercontent.com/93348499/180752871-3e84fbf7-1063-4307-bbfb-b9360d268821.mp4
Could you attach your custom sub here in a zip file?
Fixed in Regalis11/Barotrauma-development@7320dbdad51d0426b1b4857c68d523f556835d66
Tested, I was no longer able to repro the issue in the test sub provided in the ticket.
Also tested a slightly different setup: here opening the door on the left forces the door on the right to close, meaning the bot can only get through the doors if they wait until they're past the right one before trying to open the left one:
Seems to work with no issues there too, closing.
thank you for not forgetting the older tickets! looking forward to check it on stable version :-)