Merge exp/component-audit-2: component audit rounds 2-4

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 16:49:08 -06:00
65 changed files with 2024 additions and 109 deletions

View File

@@ -80,8 +80,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) {

View File

@@ -162,7 +162,7 @@ void QuickBuildComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsIni
outBitStream.Write(m_ActivatorPosition);
outBitStream.Write(m_RepositionPlayer);
}
m_StateDirty = false;
if (!bIsInitialUpdate) m_StateDirty = false;
}
}

View File

@@ -3,6 +3,7 @@
*/
#include "RacingControlComponent.h"
#include "ControllablePhysicsComponent.h"
#include "CharacterComponent.h"
#include "DestroyableComponent.h"
@@ -276,6 +277,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player,
jetPackMode.target = player->GetObjectID();
jetPackMode.bUse = false;
jetPackMode.Send(UNASSIGNED_SYSTEM_ADDRESS);
if (auto* const physics = player->GetComponent<ControllablePhysicsComponent>()) physics->SetJetPackMode(jetPackMode.bUse, jetPackMode.effectID, jetPackMode.bBypassChecks);
// Set the vehicle's state.
GameMessages::NotifyVehicleOfRacingObject notifyVehicle;