1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Separate ephemeral from client caching in core.dynamic_add_media()

This commit is contained in:
sfan5 2025-08-26 16:34:50 +02:00
parent 0b66465f33
commit 5672b93007
5 changed files with 9 additions and 4 deletions

View file

@ -3782,10 +3782,10 @@ bool Server::dynamicAddMedia(const DynamicMediaArgs &a)
if (m_env) {
NetworkPacket pkt(TOCLIENT_MEDIA_PUSH, 0);
pkt << raw_hash << filename;
// NOTE: the meaning of a.ephemeral was accidentally inverted between proto 39 and 40,
// NOTE: the meaning of this bit 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);
pkt << static_cast<bool>(a.client_cache);
NetworkPacket legacy_pkt = pkt;