mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix hand hiding after controlled turns
This commit is contained in:
committed by
Hans Mackowiak
parent
63b5eac6b9
commit
e0688d7458
@@ -439,10 +439,10 @@ public class Game {
|
||||
}
|
||||
|
||||
public synchronized void setGameOver(GameEndReason reason) {
|
||||
age = GameStage.GameOver;
|
||||
for (Player p : allPlayers) {
|
||||
p.clearController();
|
||||
}
|
||||
age = GameStage.GameOver;
|
||||
|
||||
for (Player p : getPlayers()) {
|
||||
p.onGameOver();
|
||||
|
||||
@@ -2574,6 +2574,8 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
final PlayerController oldController = getController();
|
||||
|
||||
controlledBy.remove(timestamp);
|
||||
getView().updateMindSlaveMaster(this);
|
||||
|
||||
if (event) {
|
||||
game.fireEvent(new GameEventPlayerControl(this, oldLobbyPlayer, oldController, getLobbyPlayer(), getController()));
|
||||
}
|
||||
@@ -2581,9 +2583,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
|
||||
public void clearController() {
|
||||
controlledBy.clear();
|
||||
game.fireEvent(new GameEventPlayerControl(this, null, null, getLobbyPlayer(), getController()));
|
||||
}
|
||||
|
||||
|
||||
public Map.Entry<Long, Player> getControlledWhileSearching() {
|
||||
if (controlledWhileSearching.isEmpty()) {
|
||||
return null;
|
||||
|
||||
@@ -793,9 +793,11 @@ public final class CMatchUI
|
||||
initHandViews();
|
||||
SLayoutIO.loadLayout(null);
|
||||
view.populate();
|
||||
for (final VHand h : getHandViews()) {
|
||||
h.getLayoutControl().updateHand();
|
||||
final PlayerZoneUpdates zones = new PlayerZoneUpdates();
|
||||
for (final PlayerView p : sortedPlayers) {
|
||||
zones.add(new PlayerZoneUpdate(p, ZoneType.Hand));
|
||||
}
|
||||
updateZones(zones);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user