case O_ROCKET:
cave->rockets_collected++;
+ gd_sound_play(cave, GD_S_BOMB_COLLECTING, element, x, y);
return O_SPACE;
case O_OUTBOX:
// placing a rocket into empty space
if (is_like_space(cave, x, y, player_move))
{
+ boolean rocket_launched = TRUE;
+
switch (player_move)
{
case GD_MV_RIGHT:
default:
// cannot fire in other directions
+ rocket_launched = FALSE;
break;
}
- gd_sound_play(cave, GD_S_BOMB_PLACING, O_BOMB, x, y);
+ if (rocket_launched)
+ gd_sound_play(cave, GD_S_BOMB_PLACING, O_BOMB, x, y);
}
// a player with rocket launcher cannot snap elements, so stop here