mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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;
|
processEventsQueued = false;
|
||||||
|
|
||||||
IMatchController controller = MatchUtil.getController();
|
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) {
|
synchronized (livesUpdate) {
|
||||||
if (!livesUpdate.isEmpty()) {
|
if (!livesUpdate.isEmpty()) {
|
||||||
controller.updateLives(livesUpdate);
|
controller.updateLives(livesUpdate);
|
||||||
@@ -121,18 +133,6 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
|||||||
zonesUpdate.clear();
|
zonesUpdate.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
synchronized (cardsUpdate) {
|
|
||||||
if (!cardsUpdate.isEmpty()) {
|
|
||||||
MatchUtil.updateCards(cardsUpdate);
|
|
||||||
cardsUpdate.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
synchronized (cardsRefreshDetails) {
|
|
||||||
if (!cardsRefreshDetails.isEmpty()) {
|
|
||||||
controller.refreshCardDetails(cardsRefreshDetails);
|
|
||||||
cardsRefreshDetails.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (gameOver) {
|
if (gameOver) {
|
||||||
gameOver = false;
|
gameOver = false;
|
||||||
humanController.getInputQueue().onGameOver(true); // this will unlock any game threads waiting for inputs to complete
|
humanController.getInputQueue().onGameOver(true); // this will unlock any game threads waiting for inputs to complete
|
||||||
|
|||||||
Reference in New Issue
Block a user