From b9242886fbb98464f0e0b6079bd9febf747239e6 Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 18 Jun 2008 20:38:35 +0000 Subject: Make _equip_undead() use coord_defs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5959 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spells3.cc') diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 8f4f3199f1..bf096de326 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -666,7 +666,8 @@ static bool _is_animatable_corpse(const item_def& item) // undead can be equipped with the second monster's items if the second // monster is either of the same type as the first, or if the second // monster wasn't killed by the player or a player's pet. -static void _equip_undead(int x, int y, int corps, int monster, int monnum) +static void _equip_undead(const coord_def &a, int corps, int monster, + int monnum) { // Delay this until after 0.4 #if 0 @@ -685,7 +686,7 @@ static void _equip_undead(int x, int y, int corps, int monster, int monnum) // A monster's corpse is last in the linked list after its items, // so (for example) the first item after the second-to-last corpse // is the first item belonging to the last corpse. - int objl = igrd[x][y]; + int objl = igrd(a); int first_obj = NON_ITEM; while (objl != NON_ITEM && objl != corps) @@ -859,7 +860,7 @@ static bool _raise_corpse(const coord_def &a, int corps, beh_type beha, menv[monster].mname = "Blork"; } - _equip_undead(a.x, a.y, corps, monster, monnum); + _equip_undead(a, corps, monster, monnum); destroy_item(corps); -- cgit v1.2.3-54-g00ecf