thebigsleepjoe / TTT-Bots-2

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

[BUG] Bots not Auto Switching Weapons Consistently #50

Closed thebigsleepjoe closed 1 month ago

thebigsleepjoe commented 2 months ago

Game version/server type

Describe the bug

Bots will not auto switch between weapons that are in their inventory. The behavior is very inconsistent--sometimes bots will use their weapons properly, while others will stick to the crowbar or a pistol for the whole match.

Stack trace/error

No apparent errors.

Reproducing the bug

Steps to reproduce the behavior:

  1. Load into a standard TTT2 match
  2. Add multiple bots
  3. Observe how some pick up weapons but do not switch to them.

Expected behavior

Bots will switch to their primary weapon if it has ammo, otherwise they will use their secondary.

Screenshots

image ^ Annoying bastard

Extra context

This seems to only happen AFTER the 1st round.

thebigsleepjoe commented 2 months ago

I think this was fixed as a part of v1.2.1-meta.

thebigsleepjoe commented 1 month ago

Issue was caused by bots not checking their ammo properly. Before, they had checked only how much they had in reserve without checking how much they had in their clip. Awaiting merge in #56