diff options
author | madmaxoft <github@xoft.cz> | 2013-09-19 22:03:02 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-09-19 22:03:02 +0200 |
commit | f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d (patch) | |
tree | 9da67db19266a64fa2449672f52796db27ded14e | |
parent | ProtoProxy: Added handling for the Explosion packet. (diff) | |
download | cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.tar cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.tar.gz cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.tar.bz2 cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.tar.lz cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.tar.xz cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.tar.zst cuberite-f08d78c887e2ff05c2ecc2b7d16ba5b5f2ff506d.zip |
-rw-r--r-- | source/Protocol/Protocol125.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 54bd28c9f..050132917 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -436,15 +436,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(); } |