mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-19 18:25:27 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user