A content dev was trying to implement a dgun-like weapon in a unit, and was told to just use the canDGun=1 tag on the unit with commandfire=1 on the weapon.
This presented a problem, however, when he went to fire the unit's dgun... for you see, dgunning fired *all* of the weapons on the unit.
He came to me, and we tried several things.
We first looked at the *A commanders' unit scripts, and it seems they use a static var to block the laser from aiming while the dgun is aiming (so only one can fire at the same time). We tried this and it didn't work for some reason, so I looked to the forums and the engine source code for answers.
After following code around until I found where the engine decides whether to fire a weapon... I found some lovely code, which basically said:
This means all weapons will fire on dgun.if we are dgunning, or the unit can't dgun, or the weapon isn't commandfire, fire the weapon.
I think that kinda defeats the purpose of the dgun tag if you have to hack support into the unit script

I thought the logic should actually be:
I made a patch to change the firing logic, and it works with every dgun unit I could find except the gimp/corapmh (which could dgun before my patch, although the dgun just fired the normal laser. now dgun does nothing but the laser and torpedo still seem to function normally).if we are firing normally, and the unit and weapon can dgun, don't fire this weapon.
if we are dgunning, and the unit and weapon can dgun, fire this weapon.
I'm not perfect at testing, so I'm releasing a windows build of the current release spring (0.81.2.1) with my patch applied, to reduce raging in case I messed something up.
Enjoy: http://aegis.eat-peet.net/spring-dgun.7z