summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mstuff2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 05:18:25 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 05:18:25 +0000
commit77b699b8257957da2e84b70878e97af1adfccf08 (patch)
tree50b850ff908668e9ac944526f7157713e48e6da2 /crawl-ref/source/mstuff2.cc
parent9c825029344d1ab8e5e85987a375cbae9109e2ce (diff)
downloadcrawl-ref-77b699b8257957da2e84b70878e97af1adfccf08.tar.gz
crawl-ref-77b699b8257957da2e84b70878e97af1adfccf08.zip
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
Diffstat (limited to 'crawl-ref/source/mstuff2.cc')
-rw-r--r--crawl-ref/source/mstuff2.cc11
1 files changed, 5 insertions, 6 deletions
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);
}