diff options
author | SmallJoker <mk939@ymail.com> | 2019-09-10 21:18:42 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2019-09-14 19:43:08 +0200 |
commit | 9acd36bf9981cf9cb8e82785508d6eb7f010cc77 (patch) | |
tree | 6f0fae04efa009e8fd0a13dd0ab613c8010ae764 /src/server.cpp | |
parent | b0baa698a495cc990ce5d9c22763957f1138aed3 (diff) | |
download | minetest-9acd36bf9981cf9cb8e82785508d6eb7f010cc77.tar.gz minetest-9acd36bf9981cf9cb8e82785508d6eb7f010cc77.tar.bz2 minetest-9acd36bf9981cf9cb8e82785508d6eb7f010cc77.zip |
Formspecs: Introduce formspec_version to mods
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server.cpp b/src/server.cpp index f6bf491be..6a51139d9 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1568,7 +1568,7 @@ void Server::SendChatMessage(session_t peer_id, const ChatMessage &message) void Server::SendShowFormspecMessage(session_t peer_id, const std::string &formspec, const std::string &formname) { - NetworkPacket pkt(TOCLIENT_SHOW_FORMSPEC, 0 , peer_id); + NetworkPacket pkt(TOCLIENT_SHOW_FORMSPEC, 0, peer_id); if (formspec.empty()){ //the client should close the formspec //but make sure there wasn't another one open in meantime @@ -1579,7 +1579,7 @@ void Server::SendShowFormspecMessage(session_t peer_id, const std::string &forms pkt.putLongString(""); } else { m_formspec_state_data[peer_id] = formname; - pkt.putLongString(FORMSPEC_VERSION_STRING + formspec); + pkt.putLongString(formspec); } pkt << formname; @@ -1908,7 +1908,8 @@ void Server::SendPlayerInventoryFormspec(session_t peer_id) return; NetworkPacket pkt(TOCLIENT_INVENTORY_FORMSPEC, 0, peer_id); - pkt.putLongString(FORMSPEC_VERSION_STRING + player->inventory_formspec); + pkt.putLongString(player->inventory_formspec); + Send(&pkt); } @@ -1920,7 +1921,7 @@ void Server::SendPlayerFormspecPrepend(session_t peer_id) return; NetworkPacket pkt(TOCLIENT_FORMSPEC_PREPEND, 0, peer_id); - pkt << FORMSPEC_VERSION_STRING + player->formspec_prepend; + pkt << player->formspec_prepend; Send(&pkt); } |