fix: write a collectible's id on construction only

LWOCollectibleComponent::Deserialize (0x00c45ec0) reads the 16-bit id
on construction and nothing on an update. DLU wrote the id on every
serialization, so the client read 16 stray bits as the flag bits of the
components after it. The replica decoder follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 13:20:36 -06:00
parent 599f33d436
commit 8dd279cb45
3 changed files with 23 additions and 2 deletions

View File

@@ -389,7 +389,8 @@ namespace {
}
if (r.Bit()) j["onThreatList"] = r.Bit();
} },
{ COLLECTIBLE, [](Reader& r, json& j, bool, const auto&) { j["collectibleID"] = r.Get<int16_t>(); } },
// LWOCollectibleComponent::Deserialize: the id on construction only
{ COLLECTIBLE, [](Reader& r, json& j, bool initial, const auto&) { if (initial) j["collectibleID"] = r.Get<int16_t>(); } },
// LWOPetComponent::Deserialize: everything under the dirty bit, the names on updates too
{ PET, [](Reader& r, json& j, bool, const auto&) {
if (!r.Bit()) return;