summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Protocol/Protocol125.cpp')
-rw-r--r--source/Protocol/Protocol125.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp
index 62863cd48..fb7315468 100644
--- a/source/Protocol/Protocol125.cpp
+++ b/source/Protocol/Protocol125.cpp
@@ -465,15 +465,18 @@ void cProtocol125::SendExplosion(double a_BlockX, double a_BlockY, double a_Bloc
WriteDouble (a_BlockZ);
WriteFloat (a_Radius);
WriteInt (a_BlocksAffected.size());
+ int BlockX = (int)a_BlockX;
+ int BlockY = (int)a_BlockY;
+ int BlockZ = (int)a_BlockZ;
for (cVector3iArray::const_iterator itr = a_BlocksAffected.begin(); itr != a_BlocksAffected.end(); ++itr)
{
- WriteByte ((Byte)(itr->x - a_BlockX));
- WriteByte ((Byte)(itr->y - a_BlockY));
- WriteByte ((Byte)(itr->z - a_BlockZ));
+ WriteByte((Byte)(itr->x - BlockX));
+ WriteByte((Byte)(itr->y - BlockY));
+ WriteByte((Byte)(itr->z - BlockZ));
}
- WriteFloat ((float)a_PlayerMotion.x);
- WriteFloat ((float)a_PlayerMotion.y);
- WriteFloat ((float)a_PlayerMotion.z);
+ WriteFloat((float)a_PlayerMotion.x);
+ WriteFloat((float)a_PlayerMotion.y);
+ WriteFloat((float)a_PlayerMotion.z);
Flush();
}
@@ -1701,7 +1704,7 @@ void cProtocol125::WriteEntityMetadata(const cEntity & a_Entity)
WriteByte(((const cMinecartWithFurnace &)a_Entity).IsFueled() ? 1 : 0); // Fueled?
}
}
- else if ((a_Entity.IsProjectile() && ((cProjectileEntity &)a_Entity).GetProjectileKind() == cProjectileEntity::pkArrow));
+ else if ((a_Entity.IsProjectile() && ((cProjectileEntity &)a_Entity).GetProjectileKind() == cProjectileEntity::pkArrow))
{
WriteByte(0x10);
WriteByte(((const cArrowEntity &)a_Entity).IsCritical() ? 1 : 0); // Critical hitting arrow?