mirror of https://github.com/minetest/minetest.git
Merge branch 'master' of git://github.com/celeron55/minetest
This commit is contained in:
commit
fe136eea7a
|
@ -692,17 +692,8 @@ void GUIFormSpecMenu::drawMenu()
|
|||
m_tooltip_element->setVisible(false);
|
||||
|
||||
/*
|
||||
Draw items
|
||||
Phase 0: Item slot rectangles
|
||||
Phase 1: Item images; prepare tooltip
|
||||
Draw images
|
||||
*/
|
||||
|
||||
for(int phase=0; phase<=1; phase++)
|
||||
for(u32 i=0; i<m_inventorylists.size(); i++)
|
||||
{
|
||||
drawList(m_inventorylists[i], phase);
|
||||
}
|
||||
|
||||
for(u32 i=0; i<m_images.size(); i++)
|
||||
{
|
||||
const ImageDrawSpec &spec = m_images[i];
|
||||
|
@ -720,6 +711,17 @@ void GUIFormSpecMenu::drawMenu()
|
|||
NULL/*&AbsoluteClippingRect*/, colors, true);
|
||||
}
|
||||
|
||||
/*
|
||||
Draw items
|
||||
Phase 0: Item slot rectangles
|
||||
Phase 1: Item images; prepare tooltip
|
||||
*/
|
||||
for(int phase=0; phase<=1; phase++)
|
||||
for(u32 i=0; i<m_inventorylists.size(); i++)
|
||||
{
|
||||
drawList(m_inventorylists[i], phase);
|
||||
}
|
||||
|
||||
/*
|
||||
Draw dragged item stack
|
||||
*/
|
||||
|
|
|
@ -254,7 +254,6 @@ void ContentFeatures::serialize(std::ostream &os)
|
|||
os<<serializeString(liquid_alternative_flowing);
|
||||
os<<serializeString(liquid_alternative_source);
|
||||
writeU8(os, liquid_viscosity);
|
||||
writeU8(os, liquid_renewable);
|
||||
writeU8(os, light_source);
|
||||
writeU32(os, damage_per_second);
|
||||
node_box.serialize(os);
|
||||
|
@ -264,6 +263,9 @@ void ContentFeatures::serialize(std::ostream &os)
|
|||
serializeSimpleSoundSpec(sound_footstep, os);
|
||||
serializeSimpleSoundSpec(sound_dig, os);
|
||||
serializeSimpleSoundSpec(sound_dug, os);
|
||||
// Stuff below should be moved to correct place in a version that otherwise changes
|
||||
// the protocol version
|
||||
writeU8(os, liquid_renewable);
|
||||
}
|
||||
|
||||
void ContentFeatures::deSerialize(std::istream &is)
|
||||
|
@ -309,7 +311,6 @@ void ContentFeatures::deSerialize(std::istream &is)
|
|||
liquid_alternative_flowing = deSerializeString(is);
|
||||
liquid_alternative_source = deSerializeString(is);
|
||||
liquid_viscosity = readU8(is);
|
||||
liquid_renewable = readU8(is);
|
||||
light_source = readU8(is);
|
||||
damage_per_second = readU32(is);
|
||||
node_box.deSerialize(is);
|
||||
|
@ -322,6 +323,9 @@ void ContentFeatures::deSerialize(std::istream &is)
|
|||
// If you add anything here, insert it primarily inside the try-catch
|
||||
// block to not need to increase the version.
|
||||
try{
|
||||
// Stuff below should be moved to correct place in a version that
|
||||
// otherwise changes the protocol version
|
||||
liquid_renewable = readU8(is);
|
||||
}catch(SerializationError &e) {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue