summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2015-09-27 23:47:55 -0500
committerwushin <pasekei@gmail.com>2015-09-27 23:47:55 -0500
commitbc2950c3216e9b2fbb40e0c0dde0a6471d332ae4 (patch)
treedd4cb41c63cc628294903fc5f426dc97791a9815 /src/map
parent27a6ccd14809eb1c497adc398ecbecd0c0bd3c98 (diff)
downloadtmwa-bc2950c3216e9b2fbb40e0c0dde0a6471d332ae4.tar.gz
tmwa-bc2950c3216e9b2fbb40e0c0dde0a6471d332ae4.tar.bz2
tmwa-bc2950c3216e9b2fbb40e0c0dde0a6471d332ae4.tar.xz
tmwa-bc2950c3216e9b2fbb40e0c0dde0a6471d332ae4.zip
Stop looking for the next victim on the map for mob deaths.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/map/mob.cpp b/src/map/mob.cpp
index 9fe6b2d..855e531 100644
--- a/src/map/mob.cpp
+++ b/src/map/mob.cpp
@@ -2683,24 +2683,8 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage,
if (sd == nullptr)
{
if (mvp_sd != nullptr)
- sd = mvp_sd;
- else
{
- for (io::FD i : iter_fds())
- {
- Session *s = get_session(i);
- if (!s)
- continue;
- dumb_ptr<map_session_data> tmp_sd = dumb_ptr<map_session_data>(static_cast<map_session_data *>(s->session_data.get()));
- if (tmp_sd && tmp_sd->state.auth)
- {
- if (md->bl_m == tmp_sd->bl_m)
- {
- sd = tmp_sd;
- break;
- }
- }
- }
+ sd = mvp_sd;
}
}
if (sd)