mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 09:15:28 +00:00
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:
@@ -1,4 +1,5 @@
|
||||
#include "JetPackBehavior.h"
|
||||
#include "ControllablePhysicsComponent.h"
|
||||
|
||||
#include "BehaviorBranchContext.h"
|
||||
#include "GameMessages.h"
|
||||
@@ -21,6 +22,7 @@ void JetPackBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bit_st
|
||||
jetPackMode.fVertVel = this->m_VerticalVelocity;
|
||||
jetPackMode.iWarningEffectID = this->m_WarningEffectID;
|
||||
jetPackMode.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
if (auto* const physics = entity->GetComponent<ControllablePhysicsComponent>()) physics->SetJetPackMode(jetPackMode.bUse, jetPackMode.effectID, jetPackMode.bBypassChecks);
|
||||
|
||||
if (entity->IsPlayer()) {
|
||||
auto* character = entity->GetCharacter();
|
||||
@@ -39,6 +41,7 @@ void JetPackBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext bra
|
||||
jetPackMode.target = entity->GetObjectID();
|
||||
jetPackMode.bUse = false;
|
||||
jetPackMode.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
if (auto* const physics = entity->GetComponent<ControllablePhysicsComponent>()) physics->SetJetPackMode(jetPackMode.bUse, jetPackMode.effectID, jetPackMode.bBypassChecks);
|
||||
|
||||
if (entity->IsPlayer()) {
|
||||
auto* character = entity->GetCharacter();
|
||||
|
||||
Reference in New Issue
Block a user