diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-24 20:54:13 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-24 20:54:13 +0100 |
commit | 161a1c72745fcb9274483d75af5238a6b7740ba3 (patch) | |
tree | ef0547efe7a0a28b637a8267bb5b43edf5a1e4ad | |
parent | Implemented creeper abilities (diff) | |
download | cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.tar cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.tar.gz cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.tar.bz2 cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.tar.lz cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.tar.xz cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.tar.zst cuberite-161a1c72745fcb9274483d75af5238a6b7740ba3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/MobProximityCounter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/MobProximityCounter.cpp b/src/MobProximityCounter.cpp index 583a71579..6c44ea458 100644 --- a/src/MobProximityCounter.cpp +++ b/src/MobProximityCounter.cpp @@ -59,7 +59,7 @@ cMobProximityCounter::sIterablePair cMobProximityCounter::getMobWithinThosesDist { if (toReturn.m_Begin == m_DistanceToMonster.end()) { - if (a_DistanceMin == -1 || itr->first > a_DistanceMin) + if ((a_DistanceMin == 1) || (itr->first > a_DistanceMin)) { toReturn.m_Begin = itr; // this is the first one with distance > a_DistanceMin; } @@ -67,7 +67,7 @@ cMobProximityCounter::sIterablePair cMobProximityCounter::getMobWithinThosesDist if (toReturn.m_Begin != m_DistanceToMonster.end()) { - if (a_DistanceMax != -1 && itr->first > a_DistanceMax) + if ((a_DistanceMax != 1) && (itr->first > a_DistanceMax)) { toReturn.m_End = itr; // this is just after the last one with distance < a_DistanceMax // Note : if we are not going through this, it's ok, toReturn.m_End will be end(); |