From 5f934892184b3c09c3bbacf6fd81b7ce4d2de4be Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 5 Oct 2009 05:02:53 +0000 Subject: 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 --- apps/plugins/brickmania.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps') 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) void brick_hit(int brick_number) { + if(!brick[brick_number].used) + return; + /* if this is a crackable brick hits starts as * greater than 0. */ @@ -1150,7 +1153,7 @@ void brick_hit(int brick_number) score+=2; } else { - brick[brick_number].used=0; + brick[brick_number].used=false; /* Was there a powerup on the brick? */ if (brick[brick_number].power<10) { /* Activate the powerup */ -- cgit v1.2.3