Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bay Weapon arcs broken by PR #5406, now show arc of first weapon for entity, not of bay #5423

Closed
Sleet01 opened this issue Apr 27, 2024 · 1 comment · Fixed by #5425
Closed
Assignees

Comments

@Sleet01
Copy link
Collaborator

Sleet01 commented Apr 27, 2024

Environment

19:44:30,566 INFO [megamek.MegaMek] {main}
megamek.MegaMek.initializeLogging(MegaMek.java:118) - Starting MegaMek v0.49.20-SNAPSHOT
Build Date: N/A
Today: 2024-04-26
Origin Project: MegaMek
Java Vendor: Eclipse Adoptium
Java Version: 17.0.8.1
Platform: Linux 6.2.16-060216-generic (amd64)
System Locale: en_US
Total memory available to MegaMek: 4 GB

Description

Part of the MountedWeapons rework reverted or broke something in the way Bay Weapons are selected, and now all Bay Weapons display the firing arc of the first weapon for the entity rather than the first weapon in that bay.

Bug appears to be in either of:

  • megamek.client.ui.swing.unitDisplay.WeaponPanel#displaySelected
  • megamek.common.equipment.WeaponMounted#getBayWeapon

Files

Any nightly from the past two days will show this bug.

From 0.49.19:
image

Same unit in using latest code from 04/26/24:
image
(Note that the same weapon is now using the NOS arc instead of the LS arc)

@Sleet01
Copy link
Collaborator Author

Sleet01 commented Apr 27, 2024

Now that I think of it, the weaponId vs index mismatch may also explain why the ammo drop box is not populating either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants