mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 09:45:28 +00:00
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:
@@ -42,8 +42,9 @@ bool CollectibleComponent::CountsFor(const Entity& player) const {
|
||||
}
|
||||
}
|
||||
|
||||
// LWOCollectibleComponent::Deserialize (0x00c45ec0) reads the id on construction only
|
||||
void CollectibleComponent::Serialize(RakNet::BitStream& outBitStream, bool isConstruction) {
|
||||
outBitStream.Write(GetCollectibleId());
|
||||
if (isConstruction) outBitStream.Write(GetCollectibleId());
|
||||
}
|
||||
|
||||
bool CollectibleComponent::MsgGetObjectReportInfo(GameMessages::GetObjectReportInfo& reportMsg) {
|
||||
|
||||
Reference in New Issue
Block a user