mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 15:57:13 +00:00
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>
28 lines
769 B
C++
28 lines
769 B
C++
#pragma once
|
|
#include "Behavior.h"
|
|
|
|
class SpawnBehavior final : public Behavior
|
|
{
|
|
public:
|
|
LOT m_lot;
|
|
float m_Distance;
|
|
// The spawned object moves with the one that spawned it (its parent)
|
|
bool m_UpdatePositionWithParent;
|
|
|
|
/*
|
|
* Inherited
|
|
*/
|
|
explicit SpawnBehavior(const uint32_t behaviorId) : Behavior(behaviorId) {
|
|
}
|
|
|
|
void Handle(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) override;
|
|
|
|
void Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) override;
|
|
|
|
void Timer(BehaviorContext* context, BehaviorBranchContext branch, LWOOBJID second) override;
|
|
|
|
void End(BehaviorContext* context, BehaviorBranchContext branch, LWOOBJID second) override;
|
|
|
|
void Load() override;
|
|
};
|