From 61a3e40c9b96c8ea1947ca0d7ad3a3272e844211 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sun, 8 Nov 2009 18:45:45 -0600 Subject: Fix a few more ghost_demon struct issues with dancing weapons. Remove unneeded reset() in the initialization function, and set resistances properly to avoid crashes when e.g. checking poison resistance when trying to place them in poison clouds. --- crawl-ref/source/ghost.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/ghost.cc') diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index 98c60faa02..93ca2be4b2 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -613,7 +613,10 @@ void ghost_demon::init_dancing_weapon(const item_def& weapon, int power) if (power > 150) power = 150; - reset(); + resists.poison = 1; + resists.fire = 1; + resists.cold = 1; + resists.elec = 1; colour = weapon.colour; fly = FL_LEVITATE; -- cgit v1.2.3-54-g00ecf