mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix bug where creatures wouldn't visually leave the battlefield immediately when killed
This commit is contained in:
@@ -83,6 +83,18 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
||||
processEventsQueued = false;
|
||||
|
||||
IMatchController controller = MatchUtil.getController();
|
||||
synchronized (cardsUpdate) {
|
||||
if (!cardsUpdate.isEmpty()) {
|
||||
MatchUtil.updateCards(cardsUpdate);
|
||||
cardsUpdate.clear();
|
||||
}
|
||||
}
|
||||
synchronized (cardsRefreshDetails) {
|
||||
if (!cardsRefreshDetails.isEmpty()) {
|
||||
controller.refreshCardDetails(cardsRefreshDetails);
|
||||
cardsRefreshDetails.clear();
|
||||
}
|
||||
}
|
||||
synchronized (livesUpdate) {
|
||||
if (!livesUpdate.isEmpty()) {
|
||||
controller.updateLives(livesUpdate);
|
||||
@@ -121,18 +133,6 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
||||
zonesUpdate.clear();
|
||||
}
|
||||
}
|
||||
synchronized (cardsUpdate) {
|
||||
if (!cardsUpdate.isEmpty()) {
|
||||
MatchUtil.updateCards(cardsUpdate);
|
||||
cardsUpdate.clear();
|
||||
}
|
||||
}
|
||||
synchronized (cardsRefreshDetails) {
|
||||
if (!cardsRefreshDetails.isEmpty()) {
|
||||
controller.refreshCardDetails(cardsRefreshDetails);
|
||||
cardsRefreshDetails.clear();
|
||||
}
|
||||
}
|
||||
if (gameOver) {
|
||||
gameOver = false;
|
||||
humanController.getInputQueue().onGameOver(true); // this will unlock any game threads waiting for inputs to complete
|
||||
|
||||
Reference in New Issue
Block a user