mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix so player 2 receives zones properly in network game
This commit is contained in:
@@ -27,6 +27,7 @@ import forge.game.player.PlayerView;
|
||||
import forge.interfaces.IGameController;
|
||||
import forge.interfaces.IGuiGame;
|
||||
import forge.interfaces.IMayViewCards;
|
||||
import forge.trackable.TrackableTypes;
|
||||
|
||||
public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
||||
private PlayerView currentPlayer = null;
|
||||
@@ -67,6 +68,13 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
||||
@Override
|
||||
public void setGameView(final GameView gameView0) {
|
||||
if (gameView == null || gameView0 == null) {
|
||||
if (gameView0 != null) {
|
||||
//ensure lookup dictionaries are reset before each game
|
||||
TrackableTypes.CardViewType.clearLookupDictionary();
|
||||
TrackableTypes.PlayerViewType.clearLookupDictionary();
|
||||
TrackableTypes.StackItemViewType.clearLookupDictionary();
|
||||
gameView0.updateObjLookup();
|
||||
}
|
||||
gameView = gameView0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import forge.quest.QuestController;
|
||||
import forge.sound.MusicPlaylist;
|
||||
import forge.sound.SoundSystem;
|
||||
import forge.trackable.TrackableCollection;
|
||||
import forge.trackable.TrackableTypes;
|
||||
import forge.util.CollectionSuppliers;
|
||||
import forge.util.collect.FCollectionView;
|
||||
import forge.util.maps.HashMapOfLists;
|
||||
@@ -128,11 +127,6 @@ public class HostedMatch {
|
||||
}
|
||||
|
||||
public void startGame() {
|
||||
//ensure lookup dictionaries are cleared before each game
|
||||
TrackableTypes.CardViewType.clearLookupDictionary();
|
||||
TrackableTypes.PlayerViewType.clearLookupDictionary();
|
||||
TrackableTypes.StackItemViewType.clearLookupDictionary();
|
||||
|
||||
nextGameDecisions.clear();
|
||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MATCH);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user