summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-14 05:58:31 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-14 05:58:31 +0000
commit0f27d16c2da428a8651ce96f154d15f716f81014 (patch)
tree1d2513485770ceb98066317135297d722c3081d3 /crawl-ref
parentdfc6c6766dad0831a1ba7026f754e3e85f5dab42 (diff)
downloadcrawl-ref-0f27d16c2da428a8651ce96f154d15f716f81014.tar.gz
crawl-ref-0f27d16c2da428a8651ce96f154d15f716f81014.zip
[1634656] Make sure statues cannot move around.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@846 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/items.cc8
-rw-r--r--crawl-ref/source/monstuff.cc7
-rw-r--r--crawl-ref/source/stuff.cc13
3 files changed, 12 insertions, 16 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 86defb8de3..1c7e4681c3 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2261,15 +2261,17 @@ void update_level( double elapsedTime )
if (turns >= 10)
update_enchantments( mon, turns / 10 );
- // Don't move water or lava monsters around
- if (monster_habitat( mon->type ) != DNGN_FLOOR)
+ // Don't move water, lava, or stationary monsters around
+ if (monster_habitat( mon->type ) != DNGN_FLOOR
+ || mons_is_stationary( mon ))
+ {
continue;
+ }
// Let sleeping monsters lie
if (mon->behaviour == BEH_SLEEP)
continue;
-
const int range = (turns * mon->speed) / 10;
const int moves = (range > 50) ? 50 : range;
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index d5c81b3399..afe2e6f91d 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -4308,9 +4308,12 @@ static bool mons_can_displace(const monsters *mpusher, const monsters *mpushee)
// past, either, but they may be woken up by a crowd trying to
// elbow past them, and the wake-up check happens downstream.
if (mons_is_confused(mpusher) || mons_is_confused(mpushee)
- || mons_is_paralysed(mpusher) || mons_is_paralysed(mpushee)
- || mons_is_sleeping(mpusher))
+ || mons_is_paralysed(mpusher) || mons_is_paralysed(mpushee)
+ || mons_is_sleeping(mpusher) || mons_is_stationary(mpusher)
+ || mons_is_stationary(mpushee))
+ {
return (false);
+ }
// Batty monsters are unpushable
if (mons_is_batty(mpusher) || mons_is_batty(mpushee))
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 53769e5f09..9f65c6e961 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -117,18 +117,9 @@ void tag_followers( void )
struct monsters *fmenv = &menv[mgrd[count_x][count_y]];
if ((fmenv->type == MONS_PANDEMONIUM_DEMON)
- || (fmenv->type == MONS_PLANT)
- || (fmenv->type == MONS_FUNGUS)
- || (fmenv->type == MONS_OKLOB_PLANT)
- || (fmenv->type == MONS_CURSE_SKULL)
|| (fmenv->type == MONS_PLAYER_GHOST) // cdl
- || (fmenv->type == MONS_CURSE_TOE)
- || (fmenv->type == MONS_POTION_MIMIC)
- || (fmenv->type == MONS_WEAPON_MIMIC)
- || (fmenv->type == MONS_ARMOUR_MIMIC)
- || (fmenv->type == MONS_SCROLL_MIMIC)
- || (fmenv->type == MONS_GOLD_MIMIC)
- || (fmenv->type == -1))
+ || (fmenv->type == -1)
+ || mons_is_stationary(fmenv))
{
continue;
}