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

Fix #4795 Sensor Range Bands Not Showing Until Movement Begins. #4946

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion megamek/src/megamek/client/ui/swing/MovementDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,6 @@ public synchronized void selectEntity(int en) {
setStatusBarText(yourTurnMsg);
}
clientgui.getBoardView().clearFieldOfFire();
clientgui.getBoardView().clearSensorsRanges();
computeMovementEnvelope(ce);
}

Expand Down
9 changes: 2 additions & 7 deletions megamek/src/megamek/client/ui/swing/boardview/BoardView.java
Original file line number Diff line number Diff line change
Expand Up @@ -6424,13 +6424,8 @@ public RangeHelper(int min, int max) {

// prepares the sprites for visual and sensor ranges
public void setSensorRange(Entity entity, Coords c) {
if (entity == null || c == null || !GUIP.getShowSensorRange()) {
clearSensorsRanges();
return;
}

// Do not display anything for offboard units
if (entity.isOffBoard()) {
// Do not calculate anything for offboard units
if (entity == null || c == null || entity.isOffBoard()) {
clearSensorsRanges();
return;
}
Expand Down