From 44a536cd0028c2bd4426afdc03da69a2c4aadd20 Mon Sep 17 00:00:00 2001 From: Layla Marchant Date: Sat, 7 Mar 2020 23:30:09 -0500 Subject: [PATCH] Exclude mines in non-Classic reduction in spread. --- src/collectable.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/collectable.c b/src/collectable.c index 789709f..a7975dd 100644 --- a/src/collectable.c +++ b/src/collectable.c @@ -217,12 +217,14 @@ void collectable_add(float x, float y, int type, int value, int life) collectable->active = 1; collectable->x = x; collectable->y = y; + collectable->dx = RANDRANGE(-100, 100) / 100.; + collectable->dy = RANDRANGE(-100, 100) / 100.; - collectable->dx = RANDRANGE(-100, 100); - collectable->dx /= (game.difficulty == DIFFICULTY_ORIGINAL ? 100. : 200.); - - collectable->dy = RANDRANGE(-100, 100); - collectable->dy /= (game.difficulty == DIFFICULTY_ORIGINAL ? 100. : 200.); + if (game.difficulty != DIFFICULTY_ORIGINAL && type != P_MINE) + { + collectable->dx /= 2; + collectable->dy /= 2; + } collectable->type = type; collectable->value = value;