FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.73k stars 403 forks source link

Bot ignore follow order and swim to bottom right when outside of the submarine #10866

Closed hko2006 closed 1 year ago

hko2006 commented 1 year ago

Disclaimers

What happened?

Bot sec officer follows my mechanic when outside of the submarine.

Reproduction steps

Video

https://user-images.githubusercontent.com/5365456/210467315-e3d8004a-b214-4ab7-92e9-9dbf3ee045a5.mp4

They are at the cursor

image

Save

Save 1.zip

No order and return ship dont work too.

This is the third time this happen, all three times with this Day sec officer.

Bug prevalence

Happens every now and then

Version

0.20.16.1

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

itchyOwl commented 1 year ago

Here's some debug info about what's probably happening there. I'll look into it. Probably only affects caves.

image

image

itchyOwl commented 1 year ago

Fixed in https://github.com/Regalis11/Barotrauma-development/pull/3987

itchyOwl commented 1 year ago

Seems that this issue was only partially fixed:

image.png

image.png

itchyOwl commented 1 year ago

I'll push a fix for this tomorrow, but writing the repro steps here now.

Steps to repro the last issue:

  1. Make a bot to follow you outside of the sub so that there is a direct line of sight between you and the bot
  2. Teleport the sub so that there's no direct line of sight from the bot to the sub
  3. Order the bot to return back to the sub
  4. Order the bot to follow you again
  5. Observe the bot continuing to use pathing even though it should just steer towards you (when there's nothing blocking the way)

image.png

After the fix, the bot should steer towards the player when it can see the target. If the line of sight is blocked, the bot will try to use pathing to get around the obstacles.

image.png

Rokvach commented 1 year ago

Tested, working correctly. Closing.