summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Enders <smenders@gmail.com>2021-01-21 21:39:18 -0500
committerStephen Enders <smenders@gmail.com>2021-01-21 21:39:18 -0500
commit47b8018228f8d461a1487182ad176bfd41e55e9c (patch)
tree9357fb5b9bdadec222f0c499cedc700ec22650c3
parent588d9b55cb5a6b636a0411f763259c6319a137aa (diff)
Fix animation to be unsync'd
-rw-r--r--ur.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ur.cpp b/ur.cpp
index 5b4faa8..dc61eb3 100644
--- a/ur.cpp
+++ b/ur.cpp
@@ -108,8 +108,8 @@ render_dice(sf::RenderWindow* window,
if (animation_frame_timer->is_completed()) {
// iterate over each pair of dice sprites
// and show whichever matches the roll
- int result = dice_rand.next();
for (int i = 0; i < 8; i += 2) {
+ int result = dice_rand.next();
(*dice)[i].show = result == 0;
(*dice)[i + 1].show = result == 1;
}