mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 17:55:27 +00:00
fix(entity): send updatesWithParentPosition from the spawn behavior, as live
The parent info always said the object doesn't move with its parent. Live sent true for objects a spawn behavior made with updatePositionWithParent (all 70 Engineer Personal Fortress constructions in the captures, LOT 9479, and the Summoner's Scratch, 9644); the client then moves them with the player. Every other construction in the captures sent false, and none sent an object world state, which stays unsent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,7 @@ void SpawnBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStrea
|
||||
}
|
||||
|
||||
entity->SetOwnerOverride(context->originator);
|
||||
entity->SetUpdatesWithParentPosition(m_UpdatePositionWithParent);
|
||||
|
||||
// Unset the flag to reposition the player, this makes it harder to glitch out of the map
|
||||
auto* quickBuildComponent = entity->GetComponent<QuickBuildComponent>();
|
||||
@@ -106,4 +107,5 @@ void SpawnBehavior::End(BehaviorContext* context, const BehaviorBranchContext br
|
||||
void SpawnBehavior::Load() {
|
||||
this->m_lot = GetInt("LOT_ID");
|
||||
this->m_Distance = GetFloat("distance");
|
||||
this->m_UpdatePositionWithParent = GetBoolean("updatePositionWithParent");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user