Private
Public Access
1
0

fix: usr: the bomb using was not recorded correctly - the old data will be corrupted #6

This commit is contained in:
2026-04-19 09:05:53 +02:00
parent e5a22cdfe3
commit c2308ba408
2 changed files with 7 additions and 7 deletions

View File

@@ -610,8 +610,13 @@ readonly class TopicManager implements TopicManagerInterface
$playedGame->setRedPoints($redPoints);
$playedGame->setBluePoints($bluePoints);
$playedGame->setRedExplodedBomb((bool)$event['bomb'] && 'red' === $player ? true : null);
$playedGame->setBlueExplodedBomb((bool)$event['bomb'] && 'blue' === $player ? true : null);
if ((bool)$event['bomb']) {
if ('red' === $player) {
$playedGame->setRedExplodedBomb(true);
} elseif ('blue' === $player) {
$playedGame->setBlueExplodedBomb(true);
}
}
$playedGame->setUpdated(new DateTime());
/** Bonus data is already persisted in calculateBonuses, but we ensure it's up to date */