Working on units from TRO VA, and alot of the support units mount Infantry weapons. Currently I can mount them on the unit but if I test them MM crashes in the firing phase.
The stacktrace key sections are here:
Exception in thread "Packet Pump" java.lang.ClassCastException: megamek.common.SupportTank cannot be cast to megamek.common.Infantry
at megamek.common.weapons.infantry.InfantryWeaponHandler.calcHits(InfantryWeaponHandler.java:93)
at megamek.common.weapons.WeaponHandler.handle(WeaponHandler.java:493)
at megamek.server.Server.handleAttacks(Server.java:31820)
at megamek.server.Server.endCurrentPhase(Server.java:2693)
at megamek.server.Server.changeToNextTurn(Server.java:3007)
at megamek.server.Server.endCurrentTurn(Server.java:2104)
at megamek.server.Server.receiveAttack(Server.java:11707)
at megamek.server.Server.handle(Server.java:27861)
at megamek.server.Server$PacketPump.run(Server.java:312)
I've also attached a sample unit, the exact unit from the above crash.
Not related to the bug, but doesn't your sample .blk file also require pintle turret equipment mounted in the body of the unit? Just checking to see if MM will correctly calculate/validate the weight of the pintle turret if you only use the (PT) tag, and not both the tag and the equipment.
yeah, I'd missed it when I made the file by hand.
Fixed in [r11580]
Related
Commit: [r11580]