- tux sometimes makes short jumps in the endsequence, mostly when
going through the goal with a small jump, might be old_up related
- fadein/out for intro/extro would be nice
-- when jupming against the 2nd multiple coin block in a level only 1 coin will
- come out.
-- when jumping into the exit with a star, the endgame music will change back to
- levelmusic after a short time
- the can_jump flag should be based on a time instead of the 2 tiles check.
Since the 2 tiles flag won't help when you're jumping over a hole. Better use
a timer that is started when up is pressed, when you then land and the timer
Fixed
-----
+- when jumping into the exit with a star, the endgame music will change back to
+ levelmusic after a short time
+- when jupming against the 2nd multiple coin block in a level only 1 coin will
+ come out.
- when you interrupted the intro (by going to credits for example) and go back
to it, tux doesn't jump anymore
- supertux crashs from time to time - fixed
update_time = last_update_time = st_get_ticks();
- /* Clear screen: */
-// clearscreen(0, 0, 0);
-// updatescreen();
-
// Eat unneeded events
SDL_Event event;
while (SDL_PollEvent(&event)) {}
world->get_tux()->kill(Player::KILL);
/* Handle music: */
- if(world->get_tux()->invincible_timer.check())
+ if(world->get_tux()->invincible_timer.check() && !end_sequence)
{
- if(world->get_music_type() != HERRING_MUSIC)
- world->play_music(HERRING_MUSIC);
+ world->play_music(HERRING_MUSIC);
}
/* are we low on time ? */
- else if (time_left.get_left() < TIME_WARNING)
+ else if (time_left.get_left() < TIME_WARNING && !end_sequence)
{
world->play_music(HURRYUP_MUSIC);
}
/* or just normal music? */
- else if(world->get_music_type() != LEVEL_MUSIC)
+ else if(world->get_music_type() != LEVEL_MUSIC && !end_sequence)
{
world->play_music(LEVEL_MUSIC);
}
for (unsigned int i = 0; i < broken_bricks.size(); i++)
broken_bricks[i]->action(frame_ratio);
- /* Handle distro counting: */
- if (counting_distros)
- {
- distro_counter--;
-
- if (distro_counter <= 0)
- counting_distros = -1;
- }
-
// Handle all kinds of game objects
for (unsigned int i = 0; i < bouncy_bricks.size(); i++)
bouncy_bricks[i]->action(frame_ratio);
add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
+ // TODO: don't handle this in a global way but per-tile...
if (!counting_distros)
{
counting_distros = true;
- distro_counter = 50;
+ distro_counter = 5;
+ }
+ else
+ {
+ distro_counter--;
}
if (distro_counter <= 0)
- plevel->change(x, y, TM_IA, tile->next_tile);
+ {
+ counting_distros = false;
+ plevel->change(x, y, TM_IA, tile->next_tile);
+ }
play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
player_status.score = player_status.score + SCORE_DISTRO;