diff options
author | UbitUmarov | 2016-08-07 14:30:27 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-07 21:13:01 +0100 |
commit | ff0ccf9c67e3840c39729e1ce9677b96e0cfd472 (patch) | |
tree | 6288879780f7df9bd5198c13e71f753df56af1af /OpenSim/Framework/IClientAPI.cs | |
parent | if a viewer overloads region capability to process RequestMapBlocks, ignore ... (diff) | |
download | opensim-SC-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.zip opensim-SC-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.gz opensim-SC-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.bz2 opensim-SC-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.xz |
several changes related to culling option
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 018f194..0140733 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -585,10 +585,10 @@ namespace OpenSim.Framework | |||
585 | public float dwell; | 585 | public float dwell; |
586 | } | 586 | } |
587 | 587 | ||
588 | public class IEntityUpdate | 588 | public class EntityUpdate |
589 | { | 589 | { |
590 | private ISceneEntity m_entity; | 590 | private ISceneEntity m_entity; |
591 | private uint m_flags; | 591 | private PrimUpdateFlags m_flags; |
592 | private int m_updateTime; | 592 | private int m_updateTime; |
593 | 593 | ||
594 | public ISceneEntity Entity | 594 | public ISceneEntity Entity |
@@ -596,7 +596,7 @@ namespace OpenSim.Framework | |||
596 | get { return m_entity; } | 596 | get { return m_entity; } |
597 | } | 597 | } |
598 | 598 | ||
599 | public uint Flags | 599 | public PrimUpdateFlags Flags |
600 | { | 600 | { |
601 | get { return m_flags; } | 601 | get { return m_flags; } |
602 | } | 602 | } |
@@ -606,23 +606,31 @@ namespace OpenSim.Framework | |||
606 | get { return m_updateTime; } | 606 | get { return m_updateTime; } |
607 | } | 607 | } |
608 | 608 | ||
609 | public virtual void Update(IEntityUpdate update) | 609 | public virtual void Update(EntityUpdate update) |
610 | { | 610 | { |
611 | m_flags |= update.Flags; | 611 | PrimUpdateFlags updateFlags = update.Flags; |
612 | if(updateFlags.HasFlag(PrimUpdateFlags.CancelKill)) | ||
613 | m_flags = PrimUpdateFlags.FullUpdate; | ||
614 | else if(m_flags.HasFlag(PrimUpdateFlags.Kill)) | ||
615 | return; | ||
616 | else if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) | ||
617 | m_flags = PrimUpdateFlags.Kill; | ||
618 | else | ||
619 | m_flags |= updateFlags; | ||
612 | 620 | ||
613 | // Use the older of the updates as the updateTime | 621 | // Use the older of the updates as the updateTime |
614 | if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) | 622 | if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) |
615 | m_updateTime = update.UpdateTime; | 623 | m_updateTime = update.UpdateTime; |
616 | } | 624 | } |
617 | 625 | ||
618 | public IEntityUpdate(ISceneEntity entity, uint flags) | 626 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) |
619 | { | 627 | { |
620 | m_entity = entity; | 628 | m_entity = entity; |
621 | m_flags = flags; | 629 | m_flags = flags; |
622 | m_updateTime = Util.EnvironmentTickCount(); | 630 | m_updateTime = Util.EnvironmentTickCount(); |
623 | } | 631 | } |
624 | 632 | ||
625 | public IEntityUpdate(ISceneEntity entity, uint flags, Int32 updateTime) | 633 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, Int32 updateTime) |
626 | { | 634 | { |
627 | m_entity = entity; | 635 | m_entity = entity; |
628 | m_flags = flags; | 636 | m_flags = flags; |
@@ -630,29 +638,6 @@ namespace OpenSim.Framework | |||
630 | } | 638 | } |
631 | } | 639 | } |
632 | 640 | ||
633 | public class EntityUpdate : IEntityUpdate | ||
634 | { | ||
635 | private float m_timeDilation; | ||
636 | |||
637 | public float TimeDilation | ||
638 | { | ||
639 | get { return m_timeDilation; } | ||
640 | } | ||
641 | |||
642 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation) | ||
643 | : base(entity, (uint)flags) | ||
644 | { | ||
645 | // Flags = flags; | ||
646 | m_timeDilation = timedilation; | ||
647 | } | ||
648 | |||
649 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime) | ||
650 | : base(entity,(uint)flags,updateTime) | ||
651 | { | ||
652 | m_timeDilation = timedilation; | ||
653 | } | ||
654 | } | ||
655 | |||
656 | public class PlacesReplyData | 641 | public class PlacesReplyData |
657 | { | 642 | { |
658 | public UUID OwnerID; | 643 | public UUID OwnerID; |
@@ -701,9 +686,12 @@ namespace OpenSim.Framework | |||
701 | ExtraData = 1 << 20, | 686 | ExtraData = 1 << 20, |
702 | Sound = 1 << 21, | 687 | Sound = 1 << 21, |
703 | Joint = 1 << 22, | 688 | Joint = 1 << 22, |
704 | FullUpdate = UInt32.MaxValue | 689 | FullUpdate = 0x3fffffff, |
690 | CancelKill = 0x7fffffff, | ||
691 | Kill = 0x80000000 | ||
705 | } | 692 | } |
706 | 693 | ||
694 | /* included in .net 4.0 | ||
707 | public static class PrimUpdateFlagsExtensions | 695 | public static class PrimUpdateFlagsExtensions |
708 | { | 696 | { |
709 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) | 697 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) |
@@ -711,7 +699,7 @@ namespace OpenSim.Framework | |||
711 | return (updateFlags & flag) == flag; | 699 | return (updateFlags & flag) == flag; |
712 | } | 700 | } |
713 | } | 701 | } |
714 | 702 | */ | |
715 | public interface IClientAPI | 703 | public interface IClientAPI |
716 | { | 704 | { |
717 | Vector3 StartPos { get; set; } | 705 | Vector3 StartPos { get; set; } |