mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow nodes to have their post_effect_color affected by lighting (#13637)
Co-authored-by: DS <ds.desour@proton.me>
This commit is contained in:
parent
92b6ff4721
commit
aea9242a96
11 changed files with 73 additions and 9 deletions
|
@ -415,6 +415,7 @@ void ContentFeatures::reset()
|
|||
node_dig_prediction = "air";
|
||||
move_resistance = 0;
|
||||
liquid_move_physics = false;
|
||||
post_effect_color_shaded = false;
|
||||
}
|
||||
|
||||
void ContentFeatures::setAlphaFromLegacy(u8 legacy_alpha)
|
||||
|
@ -543,6 +544,7 @@ void ContentFeatures::serialize(std::ostream &os, u16 protocol_version) const
|
|||
writeU8(os, alpha);
|
||||
writeU8(os, move_resistance);
|
||||
writeU8(os, liquid_move_physics);
|
||||
writeU8(os, post_effect_color_shaded);
|
||||
}
|
||||
|
||||
void ContentFeatures::deSerialize(std::istream &is, u16 protocol_version)
|
||||
|
@ -656,6 +658,11 @@ void ContentFeatures::deSerialize(std::istream &is, u16 protocol_version)
|
|||
if (is.eof())
|
||||
throw SerializationError("");
|
||||
liquid_move_physics = tmp;
|
||||
|
||||
tmp = readU8(is);
|
||||
if (is.eof())
|
||||
throw SerializationError("");
|
||||
post_effect_color_shaded = tmp;
|
||||
} catch(SerializationError &e) {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue