1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Change ContentFeatures array to a vector

This commit is contained in:
Kahrl 2013-07-14 00:55:47 +02:00
parent 9733dd5b5e
commit 112dbba7c4
7 changed files with 162 additions and 115 deletions

View file

@ -175,7 +175,7 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef)
// Convert old materials
if(material <= 0xff)
material = content_translate_from_19_to_internal(material);
if(material > MAX_CONTENT)
if(material > 0xfff)
throw SerializationError("Too large material number");
// Convert old id to name
NameIdMapping legacy_nimap;
@ -194,7 +194,7 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef)
is>>material;
u16 materialcount;
is>>materialcount;
if(material > MAX_CONTENT)
if(material > 0xfff)
throw SerializationError("Too large material number");
// Convert old id to name
NameIdMapping legacy_nimap;