mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 08:17:13 +00:00
fix: an activity's construction always carries its players
LWOActivityComponent::Deserialize (0x00d002b0) reads a flag, the player count and each player with its 10 values; a construction is the only way a client coming into range learns who is in the activity. The block was written only while it was waiting for the next update. Live finish line constructions (LOT 4967) had the flag and the count in 40 of 40, one of them with a player in it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -79,8 +79,11 @@ void ActivityComponent::LoadActivityData(const int32_t activityId) {
|
||||
}
|
||||
|
||||
void ActivityComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) {
|
||||
outBitStream.Write(m_DirtyActivityInfo);
|
||||
if (m_DirtyActivityInfo) {
|
||||
// A construction always carries the players: it is the only way a client coming into range learns who is in the
|
||||
// activity (LWOActivityComponent::Deserialize 0x00d002b0), and live wrote the block, empty or not, on every one
|
||||
const bool writeActivityInfo = m_DirtyActivityInfo || bIsInitialUpdate;
|
||||
outBitStream.Write(writeActivityInfo);
|
||||
if (writeActivityInfo) {
|
||||
outBitStream.Write<uint32_t>(m_ActivityPlayers.size());
|
||||
if (!m_ActivityPlayers.empty()) {
|
||||
for (const auto& [playerID, values] : m_ActivityPlayers) {
|
||||
|
||||
Reference in New Issue
Block a user