summaryrefslogtreecommitdiffstats
path: root/src/MobProximityCounter.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-19 14:53:41 +0200
committermadmaxoft <github@xoft.cz>2014-07-19 14:53:41 +0200
commit00c524519ef6c7ceaf4ac91307617cfd65d7cf21 (patch)
tree3587ecc98aada0ce36da33e50a1d460c17129b3e /src/MobProximityCounter.cpp
parentMerge pull request #1214 from mc-server/anti-glob (diff)
downloadcuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.tar
cuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.tar.gz
cuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.tar.bz2
cuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.tar.lz
cuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.tar.xz
cuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.tar.zst
cuberite-00c524519ef6c7ceaf4ac91307617cfd65d7cf21.zip
Diffstat (limited to 'src/MobProximityCounter.cpp')
-rw-r--r--src/MobProximityCounter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MobProximityCounter.cpp b/src/MobProximityCounter.cpp
index a89fa72df..f5d3e970c 100644
--- a/src/MobProximityCounter.cpp
+++ b/src/MobProximityCounter.cpp
@@ -8,12 +8,12 @@
void cMobProximityCounter::CollectMob(cEntity& a_Monster, cChunk& a_Chunk, double a_Distance)
{
- // LOGD("Collecting monster %s, with distance %f",a_Monster->GetClass(),a_Distance);
+ // LOGD("Collecting monster %s, with distance %f", a_Monster->GetClass(), a_Distance);
tMonsterToDistance::iterator it = m_MonsterToDistance.find(&a_Monster);
if (it == m_MonsterToDistance.end())
{
- sDistanceAndChunk newDistanceAndChunk(a_Distance,a_Chunk);
- std::pair<tMonsterToDistance::iterator,bool> result = m_MonsterToDistance.insert(tMonsterToDistance::value_type(&a_Monster,newDistanceAndChunk));
+ sDistanceAndChunk newDistanceAndChunk(a_Distance, a_Chunk);
+ std::pair<tMonsterToDistance::iterator, bool> result = m_MonsterToDistance.insert(tMonsterToDistance::value_type(&a_Monster, newDistanceAndChunk));
if (!result.second)
{
ASSERT(!"A collected Monster was not found inside distance map using find(), but insert() said there already is a key for it");
@@ -36,7 +36,7 @@ void cMobProximityCounter::convertMaps()
{
for(tMonsterToDistance::const_iterator itr = m_MonsterToDistance.begin(); itr != m_MonsterToDistance.end(); ++itr)
{
- m_DistanceToMonster.insert(tDistanceToMonster::value_type(itr->second.m_Distance,sMonsterAndChunk(*itr->first,*itr->second.m_Chunk)));
+ m_DistanceToMonster.insert(tDistanceToMonster::value_type(itr->second.m_Distance, sMonsterAndChunk(*itr->first, *itr->second.m_Chunk)));
}
}