From e182cec00a0f6f217e82b7b43ad53b5635aeb905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 22 May 2026 09:04:11 +0200 Subject: [PATCH] [Game][Arrows] Deleting arrows has no acknowledgement command so we have to delete locally as well. Took 22 minutes --- cockatrice/src/game/game_scene.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cockatrice/src/game/game_scene.cpp b/cockatrice/src/game/game_scene.cpp index 71b9caa4b..253c5e1d9 100644 --- a/cockatrice/src/game/game_scene.cpp +++ b/cockatrice/src/game/game_scene.cpp @@ -408,6 +408,7 @@ void GameScene::onArrowDeleteRequested(int arrowId) { if (arrowRegistry.contains(arrowId)) { emit requestArrowDeletion(arrowId); + arrowRegistry.take(arrowId)->delArrow(); } } @@ -425,6 +426,7 @@ void GameScene::onCardZoneChanged(CardItem *card, bool sameZone) } for (auto *arrow : toDelete) { emit requestArrowDeletion(arrow->getId()); + arrowRegistry.take(arrow->getId())->delArrow(); } } @@ -433,6 +435,7 @@ void GameScene::clearArrowsForPlayer(int playerId) for (auto *arrow : arrowRegistry.values()) { if (arrow->getPlayer()->getPlayerInfo()->getId() == playerId) { emit requestArrowDeletion(arrow->getId()); + arrowRegistry.take(arrow->getId())->delArrow(); } } }