return;
if(mode != KILL &&
- safe_timer.get_timeleft() > 0 || invincible_timer.get_timeleft() > 0)
+ (safe_timer.get_timeleft() > 0 || invincible_timer.get_timeleft() > 0))
return;
sound_manager->play("sounds/hurt.wav");
dying = true;
dying_timer.start(3.0);
set_group(COLGROUP_DISABLED);
+
+ DisplayEffect* effect = new DisplayEffect();
+ effect->fade_out(3.0);
+ Sector::current()->add_object(effect);
+ sound_manager->stop_music(3.0);
}
}
#include "control/controller.hpp"
#include "scripting/player.hpp"
#include "player_status.hpp"
+#include "display_effect.hpp"
class BadGuy;
class Portable;
return;
std::string dir = FileSystem::dirname(filename);
- if(PHYSFS_exists(dir.c_str()) == 0 && PHYSFS_mkdir(dir.c_str()) == 0) {
+ if(PHYSFS_exists(dir.c_str()) == 0 && PHYSFS_mkdir(dir.c_str()) != 0) {
std::ostringstream msg;
msg << "Couldn't create directory '" << dir << "' for savegame:"
<< PHYSFS_getLastError();