fix: construct a player in jetpack mode with its jetpack

LWOControllablePhysComponent::Deserialize (0x00c45770) reads the jetpack
mode, effect, flying and bypass checks bits on construction, and
LWOControllablePhysComponent::SendMessage (0x00d2f020) keeps the same
from SetJetPackMode. DLU sent the message but never kept it, so a player
who came into range of someone flying was told they had no jetpack.

Live player constructions in jetpack mode carried effect 167, flying 0
and bypass checks 1, and a 0 after the pickup radius (the client reads
that bit into the flying flag). DLU wrote the jetpack mode there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 13:07:28 -06:00
parent 102abc32f5
commit f4d3d794fd
7 changed files with 64 additions and 4 deletions

View File

@@ -125,7 +125,9 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream& outBitStream, bo
outBitStream.Write(m_DirtyEquippedItemInfo || bIsInitialUpdate);
if (m_DirtyEquippedItemInfo || bIsInitialUpdate) {
outBitStream.Write(m_PickupRadius);
outBitStream.Write(m_InJetpackMode);
// LWOControllablePhysComponent::Deserialize (0x00c45770) reads this into the same flag as the jetpack block's
// flying bit; live wrote 0, also for players in jetpack mode (10,069 player constructions)
outBitStream.Write(m_JetpackFlying);
if (!bIsInitialUpdate) m_DirtyEquippedItemInfo = false;
}
@@ -181,6 +183,12 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream& outBitStream, bo
}
}
void ControllablePhysicsComponent::SetJetPackMode(const bool use, const int32_t effectID, const bool bypassChecks) {
m_InJetpackMode = use;
m_JetpackEffectID = effectID;
m_JetpackBypassChecks = bypassChecks;
}
// A character's save, then where it comes into this world
void ControllablePhysicsComponent::LoadFromSaveData(const tinyxml2::XMLDocument& doc) {
ReadSaveData(doc);

View File

@@ -150,6 +150,12 @@ public:
*/
const bool GetJetpackBypassChecks() const { return m_JetpackBypassChecks; }
/**
* Keeps what a SetJetPackMode sent to the clients said, for the construction of this object: use, effect and
* bypass checks, as LWOControllablePhysComponent::SendMessage (0x00d2f020) keeps them
*/
void SetJetPackMode(bool use, int32_t effectID, bool bypassChecks);
/**
* Set the jetpack effect ID
* @param effectID the effect to play while using the jetpack
@@ -337,12 +343,12 @@ private:
/**
* Whether or not this entity is currently flying a jetpack
*/
bool m_JetpackFlying;
bool m_JetpackFlying{ false };
/**
* Bypass jetpack checks, currently unused
* Bypass jetpack checks, from the last SetJetPackMode
*/
bool m_JetpackBypassChecks;
bool m_JetpackBypassChecks{ false };
/**
* The effect that plays while using the jetpack