1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Karl Kurbjun 2009-10-05 05:02:53 +00:00
parent 1f4245be34
commit 5f93489218

View file

@ -1141,6 +1141,9 @@ static int brickmania_find_empty_fire(void)
void brick_hit(int brick_number) void brick_hit(int brick_number)
{ {
if(!brick[brick_number].used)
return;
/* if this is a crackable brick hits starts as /* if this is a crackable brick hits starts as
* greater than 0. * greater than 0.
*/ */
@ -1150,7 +1153,7 @@ void brick_hit(int brick_number)
score+=2; score+=2;
} }
else { else {
brick[brick_number].used=0; brick[brick_number].used=false;
/* Was there a powerup on the brick? */ /* Was there a powerup on the brick? */
if (brick[brick_number].power<10) { if (brick[brick_number].power<10) {
/* Activate the powerup */ /* Activate the powerup */