As title says, if you move outside the range of gun they are wielding currently (even when almost full), they will just throw it. And I think I found answer in this old thread:
Throwing guns just does more damage then shooting it at such distance.
So the question of the thread, will there be an NPC rework, or something that prevents this behavior. It’s confusing to see NPC disarming themselves to say the least.
I probably have to mention that I only saw this behavior with enemy NPC. Version is resent (ish) experimental (title screen says 6882600).
It would be nice if the NPC Combat Commands menu had a “do not throw” option like it has a “do not use grenades” option. That would solve the throwing-melee-weapon-and-wielding-helmet issue and might solve the gun issue.
Edit: It wouldn’t fix the problem for enemy NPCs, but could be make “squad-based CDDA” more viable.