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] Check `minhealthdmg` on props to determine if they are breakable #33

Closed Cynosphere closed 10 months ago

Cynosphere commented 10 months ago

Game version/server type

Describe the bug

Some maps have breakable props that aren't static but have minhealthdmg set extremely high to make them unbreakable. Bots will get stuck trying to break them.

The only map I know has these props is ttt_forest_final (navmesh for convenience, most of it has the fence props avoided, but there are still some spots where they get stuck trying to break a fence)

Stack trace/error

N/A

Reproducing the bug

  1. Play on ttt_forest_final
  2. Wait for a bot to get stuck trying to break a fence

Expected behavior

The prop's minhealthdmg key value is checked (entity:GetInternalVariable("minhealthdmg")) for either 0 or if its within the damage of the weapon.

Screenshots

https://github.com/thebigsleepjoe/TTT-Bots-2/assets/1606710/f7350487-09b7-4c36-b320-fb3d29695691

thebigsleepjoe commented 10 months ago

That is unfortunate. Should be an easy fix though, I'll check it out later today or tomorrow

thebigsleepjoe commented 10 months ago

Pushed updated code to v1.2 dev branch, pending testing -- will close issue when completing milestone

Cynosphere commented 10 months ago

Tested and didn't witness any bots getting stuck

thebigsleepjoe commented 10 months ago

Ah, ty for testing it out. I'll close this issue out for now, then.

Appreciate the report, as always.