From 9493bb7fbcdb9ec6838c1830ded0bbf197cc9181 Mon Sep 17 00:00:00 2001 From: wolfgangb Date: Wed, 16 Dec 2009 21:03:21 +0000 Subject: [PATCH] Play kill.wav when Tux is killed, hurt.wav when he can keep on playing. git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6219 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/object/player.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/object/player.cpp b/src/object/player.cpp index 11aeef549..a8b7cca7a 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -161,6 +161,7 @@ Player::Player(PlayerStatus* _player_status, const std::string& name) : sound_manager->preload("sounds/bigjump.wav"); sound_manager->preload("sounds/jump.wav"); sound_manager->preload("sounds/hurt.wav"); + sound_manager->preload("sounds/kill.wav"); sound_manager->preload("sounds/skid.wav"); sound_manager->preload("sounds/flip.wav"); sound_manager->preload("sounds/invincible_start.ogg"); @@ -1223,13 +1224,13 @@ Player::kill(bool completely) growing = false; - sound_manager->play("sounds/hurt.wav"); - if (climbing) stop_climbing(*climbing); physic.set_velocity_x(0); if(!completely && is_big()) { + sound_manager->play("sounds/hurt.wav"); + if(player_status->bonus == FIRE_BONUS || player_status->bonus == ICE_BONUS) { safe_timer.start(TUX_SAFE_TIME); @@ -1246,6 +1247,7 @@ Player::kill(bool completely) duck = false; } } else { + sound_manager->play("sounds/kill.wav"); // do not die when in edit mode if (edit_mode) { -- 2.11.0