diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-01-26 00:09:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-01-26 00:09:51 +0300 |
commit | b6d97f404432d9cf6c84538c4d5f6f14e078ade3 (patch) | |
tree | 10339eb71797c794fa6ebd5e6371d1bb1494353a /src/net/messageout.cpp | |
parent | 4e2ceec09d767063ade469e6cb810a06d1e6249d (diff) | |
download | manaverse-b6d97f404432d9cf6c84538c4d5f6f14e078ade3.tar.gz manaverse-b6d97f404432d9cf6c84538c4d5f6f14e078ade3.tar.bz2 manaverse-b6d97f404432d9cf6c84538c4d5f6f14e078ade3.tar.xz manaverse-b6d97f404432d9cf6c84538c4d5f6f14e078ade3.zip |
Add packet CMSG_CAMERA_INFO 0x0a77
Diffstat (limited to 'src/net/messageout.cpp')
-rw-r--r-- | src/net/messageout.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index 0e7709b8b..cfbc90554 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -130,6 +130,17 @@ void MessageOut::writeBeingId(const BeingId value, const char *const str) writeInt32(toInt(value, int32_t), str); } +void MessageOut::writeFloat(const float value, const char *const str) +{ +#ifdef ENABLEDEBUGLOG + std::string text = strprintf("writeFloat: %f", value); + DEBUGLOG2(text.c_str(), mPos, str); +#endif + expand(4); + memcpy(mData + CAST_SIZE(mPos), &value, sizeof(float)); + mPos += 4; +} + #define LOBYTE(w) (CAST_U8(w)) #define HIBYTE(w) (CAST_U8((CAST_U16(w)) >> 8)) |