From cac29f72a2dd1854d1f889be9a7fc8be1f74baf4 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Wed, 6 Jan 2016 20:49:02 -0500 Subject: [PATCH] Fixed positioning of mine explosions. Accidentally put "x" instead of "y". Whoops! Fixed now. --- src/collectable.cpp | 2 +- src/game.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/collectable.cpp b/src/collectable.cpp index d349d49..eea383a 100644 --- a/src/collectable.cpp +++ b/src/collectable.cpp @@ -235,7 +235,7 @@ void collectable_explode(collectables *collectable) for (int i = 0 ; i < 10 ; i++) explosion_add(RANDRANGE(collectable->x - 25, collectable->x + 25), - RANDRANGE(collectable->y - 25, collectable->x + 25), SP_BIG_EXPLOSION); + RANDRANGE(collectable->y - 25, collectable->y + 25), SP_BIG_EXPLOSION); player_checkShockDamage(collectable->x, collectable->y); } diff --git a/src/game.cpp b/src/game.cpp index c525867..28d3480 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1425,7 +1425,7 @@ static void game_doPlayer() } engine.keyState[KEY_UP] = engine.keyState[KEY_DOWN] = engine.keyState[KEY_LEFT] = engine.keyState[KEY_RIGHT] = 0; - if ((rand() % 3) == 0) + if (CHANCE(1. / 3.)) explosion_add(player.x + RANDRANGE(-10, 10), player.y + RANDRANGE(-10, 10), SP_BIG_EXPLOSION); if (player.shield == -99)