diff options
author | Mattes D <github@xoft.cz> | 2014-01-25 22:36:32 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-01-25 22:36:32 +0100 |
commit | cdcad2237a91dfd18cde539c300034f84bc8c07b (patch) | |
tree | 5f3266637858980f29ff3ee4cc4c116e575797d3 /src/MobProximityCounter.cpp | |
parent | Merge pull request #583 from mc-server/ChangeToPolarSSL (diff) | |
parent | Did what xoft recommended (diff) | |
download | cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.gz cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.bz2 cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.lz cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.xz cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.zst cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.zip |
Diffstat (limited to 'src/MobProximityCounter.cpp')
-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(); |