Skip to content

Commit

Permalink
Issue 6224: NPE when air fails maneuver and flies off map
Browse files Browse the repository at this point in the history
  • Loading branch information
psikomonkie committed Dec 10, 2024
1 parent b049c9a commit 087278c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,7 @@ private void processSteps() {
a.setStraightMoves(a.getStraightMoves() + 1);
// make sure it didn't fly off the map
if (!getGame().getBoard().contains(curPos)) {
curPos = curPos.translated(step.getFacing(), -1); //Return its position to on-map so it can be targeted this turn
a.setCurrentVelocity(md.getFinalVelocity());
gameManager.processLeaveMap(md, true, Compute.roundsUntilReturn(getGame(), entity));
return;
Expand Down

0 comments on commit 087278c

Please sign in to comment.