mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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) {
|
public synchronized void setGameOver(GameEndReason reason) {
|
||||||
age = GameStage.GameOver;
|
|
||||||
for (Player p : allPlayers) {
|
for (Player p : allPlayers) {
|
||||||
p.clearController();
|
p.clearController();
|
||||||
}
|
}
|
||||||
|
age = GameStage.GameOver;
|
||||||
|
|
||||||
for (Player p : getPlayers()) {
|
for (Player p : getPlayers()) {
|
||||||
p.onGameOver();
|
p.onGameOver();
|
||||||
|
|||||||
@@ -2574,6 +2574,8 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
final PlayerController oldController = getController();
|
final PlayerController oldController = getController();
|
||||||
|
|
||||||
controlledBy.remove(timestamp);
|
controlledBy.remove(timestamp);
|
||||||
|
getView().updateMindSlaveMaster(this);
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
game.fireEvent(new GameEventPlayerControl(this, oldLobbyPlayer, oldController, getLobbyPlayer(), getController()));
|
game.fireEvent(new GameEventPlayerControl(this, oldLobbyPlayer, oldController, getLobbyPlayer(), getController()));
|
||||||
}
|
}
|
||||||
@@ -2581,9 +2583,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
|
|
||||||
public void clearController() {
|
public void clearController() {
|
||||||
controlledBy.clear();
|
controlledBy.clear();
|
||||||
|
game.fireEvent(new GameEventPlayerControl(this, null, null, getLobbyPlayer(), getController()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Map.Entry<Long, Player> getControlledWhileSearching() {
|
public Map.Entry<Long, Player> getControlledWhileSearching() {
|
||||||
if (controlledWhileSearching.isEmpty()) {
|
if (controlledWhileSearching.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -793,9 +793,11 @@ public final class CMatchUI
|
|||||||
initHandViews();
|
initHandViews();
|
||||||
SLayoutIO.loadLayout(null);
|
SLayoutIO.loadLayout(null);
|
||||||
view.populate();
|
view.populate();
|
||||||
for (final VHand h : getHandViews()) {
|
final PlayerZoneUpdates zones = new PlayerZoneUpdates();
|
||||||
h.getLayoutControl().updateHand();
|
for (final PlayerView p : sortedPlayers) {
|
||||||
|
zones.add(new PlayerZoneUpdate(p, ZoneType.Hand));
|
||||||
}
|
}
|
||||||
|
updateZones(zones);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user