Core/Objects: Support creating client position entity fragment for non-WorldObject entities

This commit is contained in:
Shauren
2025-12-27 16:06:01 +01:00
parent 0ff5cf4d00
commit e654f0a15b
3 changed files with 5 additions and 2 deletions

View File

@@ -198,7 +198,7 @@ void BaseEntity::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, P
if (IsGameObject())
PauseTimes = static_cast<GameObject const*>(this)->GetPauseTimes();
data->WriteBit(IsWorldObject()); // HasPositionFragment
data->WriteBit(flags.HasEntityPosition);
data->WriteBit(flags.NoBirthAnim);
data->WriteBit(flags.EnablePortals);
data->WriteBit(flags.PlayHoverAnim);

View File

@@ -33,9 +33,11 @@ typedef std::unordered_map<Player*, UpdateData> UpdateDataMapType;
struct CreateObjectBits
{
bool HasEntityPosition : 1;
bool NoBirthAnim : 1;
bool EnablePortals : 1;
bool PlayHoverAnim : 1;
bool ThisIsYou : 1;
bool MovementUpdate : 1;
bool MovementTransport : 1;
bool Stationary : 1;
@@ -46,7 +48,6 @@ struct CreateObjectBits
bool Rotation : 1;
bool GameObject : 1;
bool SmoothPhasing : 1;
bool ThisIsYou : 1;
bool SceneObject : 1;
bool ActivePlayer : 1;
bool Conversation : 1;

View File

@@ -188,6 +188,8 @@ m_movementInfo(), m_name(), m_isActive(false), m_isFarVisible(false), m_isStored
m_transport(nullptr), m_zoneId(0), m_areaId(0), m_staticFloorZ(VMAP_INVALID_HEIGHT), m_outdoors(false), m_liquidStatus(LIQUID_MAP_NO_WATER),
m_currMap(nullptr), m_InstanceId(0), _dbPhase(0), m_notifyflags(0), _heartbeatTimer(HEARTBEAT_INTERVAL)
{
m_updateFlag.HasEntityPosition = true;
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE | GHOST_VISIBILITY_GHOST);
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE);
}