aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/world/Avatar.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/world/Avatar.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/Avatar.cs b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
index 680d059..2c1ccdf 100644
--- a/OpenSim/OpenSim.RegionServer/world/Avatar.cs
+++ b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
@@ -35,7 +35,7 @@ namespace OpenSim.world
35 private string m_regionName; 35 private string m_regionName;
36 private ushort m_regionWaterHeight; 36 private ushort m_regionWaterHeight;
37 private bool m_regionTerraform; 37 private bool m_regionTerraform;
38 //private bool childShadowAvatar = false; 38 private bool childAvatar = false;
39 39
40 public Avatar(ClientView TheClient, World world, string regionName, Dictionary<uint, ClientView> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater) 40 public Avatar(ClientView TheClient, World world, string regionName, Dictionary<uint, ClientView> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater)
41 { 41 {
@@ -72,6 +72,7 @@ namespace OpenSim.world
72 ControllingClient.OnCompleteMovementToRegion += new ClientView.GenericCall2(this.SendInitialPosition); 72 ControllingClient.OnCompleteMovementToRegion += new ClientView.GenericCall2(this.SendInitialPosition);
73 ControllingClient.OnAgentUpdate += new ClientView.GenericCall3(this.HandleAgentUpdate); 73 ControllingClient.OnAgentUpdate += new ClientView.GenericCall3(this.HandleAgentUpdate);
74 ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); 74 ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
75 ControllingClient.OnChildAgentStatus += new ClientView.StatusChange(this.ChildStatusChange);
75 76
76 } 77 }
77 78
@@ -87,6 +88,35 @@ namespace OpenSim.world
87 } 88 }
88 } 89 }
89 90
91 public void ChildStatusChange(bool status)
92 {
93 this.childAvatar = status;
94
95 if (this.childAvatar == true)
96 {
97 this._physActor.Velocity = new PhysicsVector(0, 0, 0);
98 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
99 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
100 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
101 terse.RegionData.TimeDilation = 64096;
102 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
103 terse.ObjectData[0] = terseBlock;
104 List<Avatar> avList = this.m_world.RequestAvatarList();
105 foreach (Avatar client in avList)
106 {
107 client.SendPacketToViewer(terse);
108 }
109 }
110 else
111 {
112 LLVector3 startp = ControllingClient.StartPos;
113 lock (m_world.LockPhysicsEngine)
114 {
115 this._physActor.Position = new PhysicsVector(startp.X, startp.Y, startp.Z);
116 }
117 }
118 }
119
90 public override void addForces() 120 public override void addForces()
91 { 121 {
92 lock (this.forcesList) 122 lock (this.forcesList)