summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp8
-rw-r--r--src/Entities/Player.h2
-rw-r--r--src/Entities/ProjectileEntity.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 07460fe98..376f431eb 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2322,15 +2322,15 @@ void cPlayer::LoadRank(void)
-void cPlayer::SendBlocksAround(int a_BlockX, int a_BlockY, int a_BlockZ, int a_Range)
+void cPlayer::SendBlocksAround(Vector3i a_BlockPos, int a_Range)
{
// Collect the coords of all the blocks to send:
sSetBlockVector blks;
- for (int y = a_BlockY - a_Range + 1; y < a_BlockY + a_Range; y++)
+ for (int y = a_BlockPos.y - a_Range + 1; y < a_BlockPos.y + a_Range; y++)
{
- for (int z = a_BlockZ - a_Range + 1; z < a_BlockZ + a_Range; z++)
+ for (int z = a_BlockPos.z - a_Range + 1; z < a_BlockPos.z + a_Range; z++)
{
- for (int x = a_BlockX - a_Range + 1; x < a_BlockX + a_Range; x++)
+ for (int x = a_BlockPos.x - a_Range + 1; x < a_BlockPos.x + a_Range; x++)
{
blks.emplace_back(x, y, z, E_BLOCK_AIR, static_cast<NIBBLETYPE>(0)); // Use fake blocktype, it will get set later on.
}
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 2f2b9d62e..87b3accda 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -554,7 +554,7 @@ public:
/** Sends the block in the specified range around the specified coord to the client
as a block change packet.
The blocks in range (a_BlockX - a_Range, a_BlockX + a_Range) are sent (NY-metric). */
- void SendBlocksAround(int a_BlockX, int a_BlockY, int a_BlockZ, int a_Range = 1);
+ void SendBlocksAround(Vector3i a_BlockPos, int a_Range = 1);
bool HasSkinPart(eSkinPart a_Part) const { return (m_SkinParts & a_Part) != 0; }
int GetSkinParts(void) const { return m_SkinParts; }
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 745f7de13..ea59c9c46 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -75,7 +75,7 @@ protected:
{
Vector3d Intersection = LineStart + m_Projectile->GetSpeed() * LineCoeff; // Point where projectile goes into the hit block
- if (cPluginManager::Get()->CallHookProjectileHitBlock(*m_Projectile, a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, Face, Intersection))
+ if (cPluginManager::Get()->CallHookProjectileHitBlock(*m_Projectile, a_BlockPos, Face, Intersection))
{
return false;
}