diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-20 13:28:43 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-20 13:28:43 +0000 |
commit | e57ab785ed42435069db2f2397fe939a70119c27 (patch) | |
tree | 1462ef758ec81c636d670c6590a0a614606b2de6 /crawl-ref/source/files.cc | |
parent | 2eadd5f7cdf3ce07ea680f7651f482a26fd62624 (diff) | |
download | crawl-ref-e57ab785ed42435069db2f2397fe939a70119c27.tar.gz crawl-ref-e57ab785ed42435069db2f2397fe939a70119c27.zip |
Save existing ghosts back to bones file even if player is undead.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6620 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 2dbce76869..3a25835dde 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -1830,7 +1830,7 @@ static void _restore_ghost_version( FILE *ghostFile, void save_ghost( bool force ) { - if (!force && (you.your_level < 2 || you.is_undead)) + if (!force && you.your_level < 2) return; std::string cha_fil = make_filename( "bones", you.your_level, @@ -1849,6 +1849,9 @@ void save_ghost( bool force ) ghosts = ghost_demon::find_ghosts(); + if (ghosts.empty()) + return; + gfile = lk_open("wb", cha_fil); if (gfile == NULL) |