KoffeinFlummi/AGM — pull request #1621 by esteldunedain (2014-11-29 00:00:51+00:00)
Title: Experiment on disarming

**Do not merge**

This is not a real PR yet, but a way to see if there's any way to make this happen.

Here's the problem: the weapon classes never change, even if you remove the attachments. So if you disarm a guy who left the weapon attachments at home you still get a fresh weapon with all the attachments defined in the config. Commands to add/remove attachment from weapons stored on cargo (e.g. weaponholder) doesn't seem to exist. Neither for making a unit drop his weapon.

The only alternative I could think of is looking up the class hierarchy of the weapon and try to spawn the same weapon without attachments, but that may not be very reliable.

Any ideas??