mirror of
https://github.com/minetest/minetest.git
synced 2025-09-18 03:15:20 +02:00
Fix logic inversion for dynamic media (server-side fix) (#15870)
This commit is contained in:
@@ -3750,7 +3750,11 @@ bool Server::dynamicAddMedia(const DynamicMediaArgs &a)
|
||||
// Push file to existing clients
|
||||
if (m_env) {
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user