Skip to content

Commit

Permalink
Fix /setnext with random map order (#979)
Browse files Browse the repository at this point in the history
Signed-off-by: alexsosnovsky <[email protected]>
  • Loading branch information
alexsosnovsky authored Mar 25, 2022
1 parent 963f02a commit a10e032
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/main/java/tc/oc/pgm/rotation/RandomMapOrder.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ public MapInfo getNextMap() {
return getNextMap();
}

// Setting a map requires no special actions from the RandomMapOrder
@Override
public void setNextMap(MapInfo map) {}
public void setNextMap(MapInfo map) {
// Set next maps are sent to the front of the deque
deque.addFirst(new WeakReference<>(map));
}

@Override
public void resetNextMap() {
Expand Down

0 comments on commit a10e032

Please sign in to comment.