From 51ded013829b4cd8f73fa7f6313e73d2f7550aa5 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 5 Nov 2009 12:57:13 -0600 Subject: Make many checks for monster (non)existence on squares use monster_at(). Not all are changed yet, as there are several index checks still needed for debugging purposes. Also, make many checks for player/monster (non)existence use actor_at(). --- crawl-ref/source/maps.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/maps.cc') diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 2c7060f31b..dbbabd1dab 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -21,8 +21,9 @@ #include "enum.h" #include "files.h" #include "message.h" -#include "monplace.h" #include "mapdef.h" +#include "mon-util.h" +#include "monplace.h" #include "random.h" #include "state.h" #include "terrain.h" @@ -228,8 +229,8 @@ static bool _safe_vault_place(const map_def &map, if (!_may_overwrite_feature(dfeat, water_ok)) return (false); - // Don't overwrite items or monsters, either! - if (igrd(cp) != NON_ITEM || mgrd(cp) != NON_MONSTER) + // Don't overwrite monsters or items, either! + if (monster_at(cp) || igrd(cp) != NON_ITEM) return (false); } -- cgit v1.2.3-54-g00ecf