diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-05 05:02:53 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-10-05 05:02:53 +0000 |
commit | 5f934892184b3c09c3bbacf6fd81b7ce4d2de4be (patch) | |
tree | 98bea6cbef245b5f9badcf387d8ea2dc784f1faf | |
parent | 1f4245be349d0700ed7595bdf48eba5e97df165a (diff) | |
download | rockbox-5f934892184b3c09c3bbacf6fd81b7ce4d2de4be.tar.gz rockbox-5f934892184b3c09c3bbacf6fd81b7ce4d2de4be.zip |
Brickmania: Add an extra check in the hit logic to make sure that the brick isn't /hit/ after it has been removed from play.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22938 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/brickmania.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index a07485b033..74539518b7 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -1141,6 +1141,9 @@ static int brickmania_find_empty_fire(void) | |||
1141 | 1141 | ||
1142 | void brick_hit(int brick_number) | 1142 | void brick_hit(int brick_number) |
1143 | { | 1143 | { |
1144 | if(!brick[brick_number].used) | ||
1145 | return; | ||
1146 | |||
1144 | /* if this is a crackable brick hits starts as | 1147 | /* if this is a crackable brick hits starts as |
1145 | * greater than 0. | 1148 | * greater than 0. |
1146 | */ | 1149 | */ |
@@ -1150,7 +1153,7 @@ void brick_hit(int brick_number) | |||
1150 | score+=2; | 1153 | score+=2; |
1151 | } | 1154 | } |
1152 | else { | 1155 | else { |
1153 | brick[brick_number].used=0; | 1156 | brick[brick_number].used=false; |
1154 | /* Was there a powerup on the brick? */ | 1157 | /* Was there a powerup on the brick? */ |
1155 | if (brick[brick_number].power<10) { | 1158 | if (brick[brick_number].power<10) { |
1156 | /* Activate the powerup */ | 1159 | /* Activate the powerup */ |