-
Notifications
You must be signed in to change notification settings - Fork 286
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
multiple fixes related to counter-battery fire #3011
Conversation
This supposed to point to MekHQ 2733? |
Yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, just a few comments first
* Utility function used to safely tell whether two Targetables are in the same hex. | ||
* Does not throw exceptions in case of nulls. | ||
*/ | ||
public static boolean atSamePosition(Targetable first, Targetable second) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nullable annotate both first and second
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further, for the name... isAtSamePosition would probably be a better name than atSamePosition.
megamek/src/megamek/common/weapons/ArtilleryWeaponIndirectFireHandler.java
Outdated
Show resolved
Hide resolved
…Handler.java Co-authored-by: Justin Bowen <39067288+Windchild292@users.noreply.github.com>
These prevent several game-blocking and non-game-blocking NPEs which occur when handling counter-battery fire against a unit that was previously destroyed.
Fixes mekhq #2733