diff options
author | Mattes D <github@xoft.cz> | 2014-04-22 13:34:32 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-04-22 13:34:32 +0200 |
commit | 6492aa000b322877aecda32573cc55b57abfc5ed (patch) | |
tree | f9f0f9211b42aa72729f8d6d444e4f48556e5fb9 /src/World.cpp | |
parent | Added prefab hitboxes. (diff) | |
parent | reverted the revert of the minecart collision detection fix. (diff) | |
download | cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.tar cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.tar.gz cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.tar.bz2 cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.tar.lz cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.tar.xz cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.tar.zst cuberite-6492aa000b322877aecda32573cc55b57abfc5ed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp index 800bdde0e..25ac9b021 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -860,7 +860,7 @@ void cWorld::TickMobs(float a_Dt) { m_ChunkMap->SpawnMobs(Spawner); // do the spawn - for (cMobSpawner::tSpawnedContainer::const_iterator itr2 = Spawner.getSpawned().begin(); itr2 != Spawner.getSpawned().end(); itr2++) + for (cMobSpawner::tSpawnedContainer::const_iterator itr2 = Spawner.getSpawned().begin(); itr2 != Spawner.getSpawned().end(); ++itr2) { SpawnMobFinalize(*itr2); } @@ -870,14 +870,14 @@ void cWorld::TickMobs(float a_Dt) // move close mobs cMobProximityCounter::sIterablePair allCloseEnoughToMoveMobs = MobCensus.GetProximityCounter().getMobWithinThosesDistances(-1, 64 * 16);// MG TODO : deal with this magic number (the 16 is the size of a block) - for(cMobProximityCounter::tDistanceToMonster::const_iterator itr = allCloseEnoughToMoveMobs.m_Begin; itr != allCloseEnoughToMoveMobs.m_End; itr++) + for(cMobProximityCounter::tDistanceToMonster::const_iterator itr = allCloseEnoughToMoveMobs.m_Begin; itr != allCloseEnoughToMoveMobs.m_End; ++itr) { itr->second.m_Monster.Tick(a_Dt, itr->second.m_Chunk); } // remove too far mobs cMobProximityCounter::sIterablePair allTooFarMobs = MobCensus.GetProximityCounter().getMobWithinThosesDistances(128 * 16, -1);// MG TODO : deal with this magic number (the 16 is the size of a block) - for(cMobProximityCounter::tDistanceToMonster::const_iterator itr = allTooFarMobs.m_Begin; itr != allTooFarMobs.m_End; itr++) + for(cMobProximityCounter::tDistanceToMonster::const_iterator itr = allTooFarMobs.m_Begin; itr != allTooFarMobs.m_End; ++itr) { itr->second.m_Monster.Destroy(true); } @@ -2894,7 +2894,7 @@ void cWorld::TickQueuedBlocks(void) m_BlockTickQueueCopy.clear(); m_BlockTickQueue.swap(m_BlockTickQueueCopy); - for (std::vector<BlockTickQueueItem *>::iterator itr = m_BlockTickQueueCopy.begin(); itr != m_BlockTickQueueCopy.end(); itr++) + for (std::vector<BlockTickQueueItem *>::iterator itr = m_BlockTickQueueCopy.begin(); itr != m_BlockTickQueueCopy.end(); ++itr) { BlockTickQueueItem * Block = (*itr); Block->TicksToWait -= 1; @@ -2985,7 +2985,7 @@ int cWorld::SpawnMobFinalize(cMonster * a_Monster) -int cWorld::CreateProjectile(double a_PosX, double a_PosY, double a_PosZ, cProjectileEntity::eKind a_Kind, cEntity * a_Creator, const cItem a_Item, const Vector3d * a_Speed) +int cWorld::CreateProjectile(double a_PosX, double a_PosY, double a_PosZ, cProjectileEntity::eKind a_Kind, cEntity * a_Creator, const cItem & a_Item, const Vector3d * a_Speed) { cProjectileEntity * Projectile = cProjectileEntity::Create(a_Kind, a_Creator, a_PosX, a_PosY, a_PosZ, a_Item, a_Speed); if (Projectile == NULL) |