summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-08 14:27:31 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-08 14:27:31 +0000
commit61ad137b444b36881d1e8409e194c77d33cb34a9 (patch)
tree28f0f90f828b47a0a31a59d4e34a81564dc951cf
parent74518e72ba5a699600ce52d3fa8505a645d109c9 (diff)
downloadcrawl-ref-61ad137b444b36881d1e8409e194c77d33cb34a9.tar.gz
crawl-ref-61ad137b444b36881d1e8409e194c77d33cb34a9.zip
Merged trunk revisions 1266 and 1267 into 0.2:
- A former ghost being assigned from another monster would retain the ghost struct, fixed (harmless). - Another case of monsters picking up enchantments from unrelated monsters squelched. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.2@1268 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/mon-util.cc4
-rw-r--r--crawl-ref/source/tags.cc1
2 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index f25858a518..b1dd2696b0 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2450,7 +2450,9 @@ void monsters::init_with(const monsters &mon)
god = mon.god;
if (mon.ghost.get())
- ghost.reset( new ghost_demon( *mon.ghost ) );
+ ghost.reset(new ghost_demon( *mon.ghost ));
+ else
+ ghost.reset(NULL);
}
coord_def monsters::pos() const
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 68fa56440e..6dae67aca2 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1600,6 +1600,7 @@ static void unmarshall_monster(tagHeader &th, monsters &m)
m.target_y = unmarshallByte(th);
m.flags = unmarshallLong(th);
+ m.enchantments.clear();
const int nenchs = unmarshallShort(th);
for (int i = 0; i < nenchs; ++i)
m.enchantments.insert( unmarshall_mon_enchant(th) );