Exemple #1
0
        /// <inheritdoc />
        public void Follow(ILivingEntity livingEntity, IWorldEntity targetEntity, float distance = 1f)
        {
            livingEntity.Follow.Target = targetEntity;
            livingEntity.Moves.DestinationPosition.Copy(targetEntity.Object.Position);
            livingEntity.Object.MovingFlags &= ~ObjectState.OBJSTA_STAND;
            livingEntity.Object.MovingFlags |= ObjectState.OBJSTA_FMOVE;

            _moverPacketFactory.SendFollowTarget(livingEntity, targetEntity, distance);
        }