From 77b699b8257957da2e84b70878e97af1adfccf08 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 19 Jun 2008 05:18:25 +0000 Subject: Since mons_clear_trapping_net() checks if the monster is caught in a net, a separate check before calling it is redundant, so remove instances of that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5974 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mstuff2.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/mstuff2.cc') diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index c3f9ae10a8..8e20b2dd09 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -996,8 +996,7 @@ void monster_teleport(struct monsters *monster, bool instan, bool silent) // Pick the monster up. mgrd(oldplace) = NON_MONSTER; - if (mons_is_caught(monster)) - mons_clear_trapping_net(monster); + mons_clear_trapping_net(monster); int newx, newy; while (true) @@ -2541,14 +2540,14 @@ bool moth_incite_monsters(const monsters *mon) return (false); } -void mons_clear_trapping_net(monsters *mons) +void mons_clear_trapping_net(monsters *mon) { - if (!mons_is_caught(mons)) + if (!mons_is_caught(mon)) return; - const int net = get_trapping_net(mons->x, mons->y); + const int net = get_trapping_net(mon->x, mon->y); if (net != NON_ITEM) remove_item_stationary(mitm[net]); - mons->del_ench(ENCH_HELD, true); + mon->del_ench(ENCH_HELD, true); } -- cgit v1.2.3-54-g00ecf