mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix logic inversion for dynamic media (server-side fix) (#15870)
This commit is contained in:
parent
4ba438a7ec
commit
b1363fce8e
1 changed files with 5 additions and 1 deletions
|
@ -3750,7 +3750,11 @@ bool Server::dynamicAddMedia(const DynamicMediaArgs &a)
|
||||||
// Push file to existing clients
|
// Push file to existing clients
|
||||||
if (m_env) {
|
if (m_env) {
|
||||||
NetworkPacket pkt(TOCLIENT_MEDIA_PUSH, 0);
|
NetworkPacket pkt(TOCLIENT_MEDIA_PUSH, 0);
|
||||||
pkt << raw_hash << filename << static_cast<bool>(a.ephemeral);
|
pkt << raw_hash << filename;
|
||||||
|
// NOTE: the meaning of a.ephemeral was accidentally inverted between proto 39 and 40,
|
||||||
|
// when dynamic_add_media v2 was added. As of 5.12.0 the server sends it correctly again.
|
||||||
|
// Compatibility code on the client-side was not added.
|
||||||
|
pkt << static_cast<bool>(!a.ephemeral);
|
||||||
|
|
||||||
NetworkPacket legacy_pkt = pkt;
|
NetworkPacket legacy_pkt = pkt;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue