summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorchangyong guo <guo1487@163.com>2018-07-23 11:24:00 +0200
committerpeterbell10 <peterbell10@live.co.uk>2018-07-23 11:24:00 +0200
commit01e72ddb6567531b16f92af2564b853878b6ef65 (patch)
treeb91403cec84e0b405448d8fadbc2c39f2270ab47 /src/World.cpp
parentKeep players in gmNotSet (#4248) (diff)
downloadcuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.gz
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.bz2
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.lz
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.xz
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.tar.zst
cuberite-01e72ddb6567531b16f92af2564b853878b6ef65.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/World.cpp b/src/World.cpp
index adbac33bf..97155c872 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1430,7 +1430,6 @@ void cWorld::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_Blo
}
// TODO: Implement block hardiness
- Vector3d explosion_pos = Vector3d(a_BlockX, a_BlockY, a_BlockZ);
cVector3iArray BlocksAffected;
m_ChunkMap->DoExplosionAt(a_ExplosionSize, a_BlockX, a_BlockY, a_BlockZ, BlocksAffected);
BroadcastSoundEffect("entity.generic.explode", Vector3d(a_BlockX, a_BlockY, a_BlockZ), 1.0f, 0.6f);
@@ -1445,19 +1444,7 @@ void cWorld::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_Blo
continue;
}
- Vector3d distance_explosion = (*itr)->GetPosition() - explosion_pos;
- if (distance_explosion.SqrLength() < 4096.0)
- {
- double real_distance = std::max(0.004, distance_explosion.Length());
- double power = a_ExplosionSize / real_distance;
- if (power <= 1)
- {
- power = 0;
- }
- distance_explosion.Normalize();
- distance_explosion *= power;
- ch->SendExplosion(a_BlockX, a_BlockY, a_BlockZ, static_cast<float>(a_ExplosionSize), BlocksAffected, distance_explosion);
- }
+ ch->SendExplosion(a_BlockX, a_BlockY, a_BlockZ, static_cast<float>(a_ExplosionSize), BlocksAffected, (*itr)->GetSpeed());
}
}