thebigsleepjoe / TTT-Bots-2

Player bots for Garry's Mod TTT
Creative Commons Attribution Share Alike 4.0 International
11 stars 4 forks source link

[Bug]: Bots unable to use doors #60

Closed ZeadenBeake closed 1 month ago

ZeadenBeake commented 1 month ago

Server hosting type

P2P

TTT Type

TTT2

Version of Bots

1.3

Describe the bug

Bots are unable to open doors. They can be either prop doors or the geometric non-prop ones (I forget the name of them), they will just walk back and forth at them. This even occurs on the purpose-made maps.

Stack trace/error

No response

Reproducing the bug

  1. Open any map, community + navmesh or the provided maps in TTT-Bots-2-Maps.
  2. Spawn bots and start the round.
  3. Observe bots moving back and forth or standing still while staring at doors.

Expected behavior

The bots should open the door and proceed through.

Screenshots

No response

Additional context

Some unsupported custom roles are used, but behavior is independent of role. Unsupported roles installed are Unknown, Drunk, Wrath, Sheriff, Clown

GitHub Username Credit (NOT REQUIRED)

ZeadenBeake

ZeadenBeake commented 1 month ago

[https://ibb.co/JzH3vC3](Image 1) [https://ibb.co/Z6zYNt2](Image 2)

Forgive the jank, first time posting issues on Github! I couldn't natively upload pictures, so here's another go at it. Not really much to show, to be fair.

thebigsleepjoe commented 1 month ago

Thanks for the report. Upon testing, vanilla TTT(1) doesn't experience this issue, but my TTT2 preset does. A recent code change in TTT2 probably modified how doors are handled.

I'll ask around and see if anyone knows what changed. Like a regular player, the bots currently emulate the +use button, so I don't know why this would have broken...

thebigsleepjoe commented 1 month ago

I pushed a commit to the main to fix this. Now we're just pending a push to the Steam branch. Give the Master branch a shot, and let me know how it goes.

ZeadenBeake commented 1 month ago

I've given it a quick test, and it does seem to work!

Although, I do notice that if two bots are trying to get through the same door at the same time, they'll fight over it. One will start to open the door, then the other will try to open the door, thus actually shutting it in the other's face. (Tested on ttt_simple_otat1, as it has many rooms that players usually spawn inside, thus many doors.)

I've only seen this occur once, although I didn't look too long so it could be pretty common for all I know.

thebigsleepjoe commented 1 month ago

Them fighting over doors is an unfortunately common thing they already did. Though to be fair, this fix definitely exaggerated that, as the bots don’t need to be looking at the door to open it anymore.

Doors are a pain in the ass…

I’ll open an issue later to property rate limit door use across bots.

On Thu, Oct 10, 2024 at 8:55 AM, ZeadenBeake @.***(mailto:On Thu, Oct 10, 2024 at 8:55 AM, ZeadenBeake < wrote:

I've given it a quick test, and it does seem to work!

Although, I do notice that if two bots are trying to get through the same door at the same time, they'll fight over it. One will start to open the door, then the other will try to open the door, thus actually shutting it in the other's face. (Tested on ttt_simple_otat1, as it has many rooms that players usually spawn inside, thus many doors.)

I've only seen this occur once, although I didn't look too long so it could be pretty common for all I know.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

thebigsleepjoe commented 1 month ago

Complete:

Thank you for submitting this issue. Closing now.