mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 17:25:27 +00:00
feat: a player's construction can leave out its position and world transition
For the one construction a client gets of its own player after a seamless instance move. The client applies a construction's frame to its player at once (LWOBasePhysComponent::Deserialize, 0x00bf5a10), and world transition state 0 makes it fade the screen in from white (LWOCharacterComponent::PostCharacterLoaded, 0x00c71660). State 3 is read but nothing acts on it. Nothing sets either flag yet. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -225,12 +225,20 @@ void CharacterComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInit
|
||||
outBitStream.Write(m_RacesFinished);
|
||||
outBitStream.Write(m_FirstPlaceRaceFinishes);
|
||||
|
||||
outBitStream.Write0();
|
||||
outBitStream.Write(m_IsLanding);
|
||||
if (m_IsLanding) {
|
||||
outBitStream.Write<uint16_t>(m_LastRocketConfig.size());
|
||||
for (uint16_t character : m_LastRocketConfig) {
|
||||
outBitStream.Write(character);
|
||||
// The world transition state, two bits: 0 none, 1 arriving by rocket, 2 leaving. The client's
|
||||
// LWOCharacterComponent::PostCharacterLoaded (0x00c71660) fades the screen in from white and pushes its
|
||||
// gameplay state again when it reads 0. A client that kept its scene gets 3, which nothing acts on.
|
||||
if (m_KeepClientScene) {
|
||||
outBitStream.Write1();
|
||||
outBitStream.Write1();
|
||||
} else {
|
||||
outBitStream.Write0();
|
||||
outBitStream.Write(m_IsLanding);
|
||||
if (m_IsLanding) {
|
||||
outBitStream.Write<uint16_t>(m_LastRocketConfig.size());
|
||||
for (uint16_t character : m_LastRocketConfig) {
|
||||
outBitStream.Write(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user