mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 01:05:28 +00:00
fix: a LUP exhibit's construction always carries the exhibit
LWOLUPExhibitComponent::Deserialize (0x00c63790) reads a flag and the exhibit's LOT, and that is the only way the client learns which exhibit is shown. DLU wrote the block on a construction only while it was dirty, so a player who came into range after the first update saw no exhibit until the next one was picked, up to 20 seconds later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,11 @@ void LUPExhibitComponent::NextLUPExhibit() {
|
||||
}
|
||||
|
||||
void LUPExhibitComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) {
|
||||
outBitStream.Write(m_DirtyLUPExhibit);
|
||||
if (m_DirtyLUPExhibit) {
|
||||
// LWOLUPExhibitComponent::Deserialize (0x00c63790) only learns the exhibit from this block, so a client the object
|
||||
// comes into range of gets it too
|
||||
const bool writeExhibit = bIsInitialUpdate || m_DirtyLUPExhibit;
|
||||
outBitStream.Write(writeExhibit);
|
||||
if (writeExhibit) {
|
||||
outBitStream.Write(m_LUPExhibits[m_LUPExhibitIndex % m_LUPExhibits.size()]);
|
||||
if (!bIsInitialUpdate) m_DirtyLUPExhibit = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user