aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/IClientAPI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r--OpenSim/Framework/IClientAPI.cs59
1 files changed, 47 insertions, 12 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index eea9107..f187468 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -576,34 +576,69 @@ namespace OpenSim.Framework
576 576
577 public class IEntityUpdate 577 public class IEntityUpdate
578 { 578 {
579 public ISceneEntity Entity; 579 private ISceneEntity m_entity;
580 public uint Flags; 580 private uint m_flags;
581 private int m_updateTime;
582
583 public ISceneEntity Entity
584 {
585 get { return m_entity; }
586 }
587
588 public uint Flags
589 {
590 get { return m_flags; }
591 }
592
593 public int UpdateTime
594 {
595 get { return m_updateTime; }
596 }
581 597
582 public virtual void Update(IEntityUpdate update) 598 public virtual void Update(IEntityUpdate update)
583 { 599 {
584 this.Flags |= update.Flags; 600 m_flags |= update.Flags;
601
602 // Use the older of the updates as the updateTime
603 if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0)
604 m_updateTime = update.UpdateTime;
585 } 605 }
586 606
587 public IEntityUpdate(ISceneEntity entity, uint flags) 607 public IEntityUpdate(ISceneEntity entity, uint flags)
588 { 608 {
589 Entity = entity; 609 m_entity = entity;
590 Flags = flags; 610 m_flags = flags;
611 m_updateTime = Util.EnvironmentTickCount();
612 }
613
614 public IEntityUpdate(ISceneEntity entity, uint flags, Int32 updateTime)
615 {
616 m_entity = entity;
617 m_flags = flags;
618 m_updateTime = updateTime;
591 } 619 }
592 } 620 }
593
594 621
595 public class EntityUpdate : IEntityUpdate 622 public class EntityUpdate : IEntityUpdate
596 { 623 {
597 // public ISceneEntity Entity; 624 private float m_timeDilation;
598 // public PrimUpdateFlags Flags; 625
599 public float TimeDilation; 626 public float TimeDilation
627 {
628 get { return m_timeDilation; }
629 }
600 630
601 public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation) 631 public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation)
602 : base(entity,(uint)flags) 632 : base(entity, (uint)flags)
603 { 633 {
604 //Entity = entity;
605 // Flags = flags; 634 // Flags = flags;
606 TimeDilation = timedilation; 635 m_timeDilation = timedilation;
636 }
637
638 public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime)
639 : base(entity,(uint)flags,updateTime)
640 {
641 m_timeDilation = timedilation;
607 } 642 }
608 } 643 }
609 644