diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-03-28 21:40:44 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-03-29 20:14:09 +0100 |
commit | 7d9329ecfe84733cdefa34eab25ee3d124c94c59 (patch) | |
tree | c31fa17924b27fc57e30e5c3fe619d96b75f14d4 /src/itemdef.cpp | |
parent | 3640c8c051bc6b72f4af52752b2d48ced274f539 (diff) | |
download | minetest-7d9329ecfe84733cdefa34eab25ee3d124c94c59.tar.gz minetest-7d9329ecfe84733cdefa34eab25ee3d124c94c59.tar.bz2 minetest-7d9329ecfe84733cdefa34eab25ee3d124c94c59.zip |
New damage system, add damageGroups to ToolCapabilities, bump protocol version
Diffstat (limited to 'src/itemdef.cpp')
-rw-r--r-- | src/itemdef.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/itemdef.cpp b/src/itemdef.cpp index 4bd4181f9..98d7ce0a8 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -111,7 +111,7 @@ void ItemDefinition::reset() node_placement_prediction = ""; } -void ItemDefinition::serialize(std::ostream &os) const +void ItemDefinition::serialize(std::ostream &os, u16 protocol_version) const { writeU8(os, 1); // version writeU8(os, type); @@ -126,7 +126,7 @@ void ItemDefinition::serialize(std::ostream &os) const std::string tool_capabilities_s = ""; if(tool_capabilities){ std::ostringstream tmp_os(std::ios::binary); - tool_capabilities->serialize(tmp_os); + tool_capabilities->serialize(tmp_os, protocol_version); tool_capabilities_s = tmp_os.str(); } os<<serializeString(tool_capabilities_s); @@ -547,7 +547,7 @@ public: m_aliases[name] = convert_to; } } - void serialize(std::ostream &os) + void serialize(std::ostream &os, u16 protocol_version) { writeU8(os, 0); // version u16 count = m_item_definitions.size(); @@ -559,7 +559,7 @@ public: ItemDefinition *def = i->second; // Serialize ItemDefinition and write wrapped in a string std::ostringstream tmp_os(std::ios::binary); - def->serialize(tmp_os); + def->serialize(tmp_os, protocol_version); os<<serializeString(tmp_os.str()); } writeU16(os, m_aliases.size()); |