[Game][Arrows] Deleting arrows has no acknowledgement command so we have to delete locally as well.

Took 22 minutes
This commit is contained in:
Lukas Brübach 2026-05-22 09:04:11 +02:00
parent 33e0f8699b
commit e182cec00a

View file

@ -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();
}
}
}