this.weapons = weaponType;
this.weapons = (int)weaponType;
    protected void addEquipment( Mounted mounted,                                 int loc,                                 boolean rearMounted )        throws LocationFullException     {        EquipmentType equip = mounted.getType();        // If the infantry can swarm, they're anti-mek infantry.        if ( Infantry.SWARM_MEK.equals( equip.getInternalName() ) ) {            this.antiMek = true;        }        // N.B. Clan Undine BattleArmor can leg attack, but aren't        //          classified as "anti-mek" in the BMRr, pg. 155).        else if ( Infantry.LEG_ATTACK.equals( equip.getInternalName() ) ||                  Infantry.STOP_SWARM.equals( equip.getInternalName() ) ) {            // Do nothing.        }        // Handle infantry weapons.        else if ( (mounted.getType() instanceof WeaponType) &&                  equip.hasFlag(WeaponType.F_INFANTRY) ) {            // Infantry can only mount one kind of infantry weapon.            WeaponType weapon = (WeaponType) mounted.getType();            long weaponType;            if ( this.weapons != INF_UNKNOWN ) {                throw new LocationFullException                    ( "Unit is already equiped with an infantry weapon" +                      " and does not need a " + weapon.getName() );            }            // If the weapon uses ammo, then *that* is our weapon type,            // otherwise it's a laser or flamer (get from equipment flags).            if ( weapon.getAmmoType() != AmmoType.T_NA ) {                weaponType = weapon.getAmmoType();            }            else {                weaponType = weapon.getFlags() &                     (WeaponType.F_LASER + WeaponType.F_FLAMER );            }            this.weapons = weaponType;            // Update our damage profile.            this.setDamage( weaponType );            // Inferno SRMs do half damage (rounded down).            if ( weapon.hasFlag(WeaponType.F_INFERNO) ) {                for ( int loop = 1; loop < damage.length; loop++ ) {                    damage[loop] = (int) Math.floor( damage[loop] / 2.0 );                }            }        }/*        // Infantry platoons can't carry big equipment.        else if ( this.isPlatoon() ) {            throw new LocationFullException                ( "Infantry platoons can not be equiped with a " +                  mounted.getName() );        }*/        // Update our superclass.        super.addEquipment( mounted, loc, rearMounted );    }