diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-19 05:18:25 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-19 05:18:25 +0000 |
commit | 77b699b8257957da2e84b70878e97af1adfccf08 (patch) | |
tree | 50b850ff908668e9ac944526f7157713e48e6da2 /crawl-ref/source/debug.cc | |
parent | 9c825029344d1ab8e5e85987a375cbae9109e2ce (diff) | |
download | crawl-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/debug.cc')
-rw-r--r-- | crawl-ref/source/debug.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 3315167307..4268ffbfaf 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -4104,19 +4104,16 @@ static void _move_monster(int x, int y, int mid1) if (!moves.isValid || !in_bounds(moves.tx, moves.ty)) return; - struct monsters* mon1 = &menv[mid1]; - if (mons_is_caught(mon1)) - mons_clear_trapping_net(mon1); + monsters* mon1 = &menv[mid1]; + mons_clear_trapping_net(mon1); - int mid2 = mgrd[moves.tx][moves.ty]; - struct monsters* mon2 = NULL; + int mid2 = mgrd[moves.tx][moves.ty]; + monsters* mon2 = NULL; if (mid2 != NON_MONSTER) { mon2 = &menv[mid2]; - - if (mons_is_caught(mon2)) - mons_clear_trapping_net(mon2); + mons_clear_trapping_net(mon2); } mon1->x = moves.tx; |