aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-05-25 19:09:19 +0000
committerMW2007-05-25 19:09:19 +0000
commit64741b55a6d68eb2853ca2f33047e6a2f459b513 (patch)
tree01ebe1336f9e2e0391bea8baf8618bd81f69ec12 /OpenSim
parentPossible my last ever OpenSim/OGS contribution (if I continue to feel like th... (diff)
downloadopensim-SC_OLD-64741b55a6d68eb2853ca2f33047e6a2f459b513.zip
opensim-SC_OLD-64741b55a6d68eb2853ca2f33047e6a2f459b513.tar.gz
opensim-SC_OLD-64741b55a6d68eb2853ca2f33047e6a2f459b513.tar.bz2
opensim-SC_OLD-64741b55a6d68eb2853ca2f33047e6a2f459b513.tar.xz
First part of border crossing fix.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.cs30
-rw-r--r--OpenSim/OpenSim.RegionServer/PacketServer.cs1
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs130
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.cs32
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.cs16
-rw-r--r--OpenSim/OpenSim.RegionServer/world/WorldBase.cs4
7 files changed, 131 insertions, 84 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index a6ad8d2..ed3355f 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -30,6 +30,7 @@ namespace OpenSim
30 public delegate void UpdatePrimTexture(uint localID, byte[] texture, ClientView remoteClient); 30 public delegate void UpdatePrimTexture(uint localID, byte[] texture, ClientView remoteClient);
31 public delegate void UpdatePrimVector(uint localID, LLVector3 pos, ClientView remoteClient); 31 public delegate void UpdatePrimVector(uint localID, LLVector3 pos, ClientView remoteClient);
32 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, ClientView remoteClient); 32 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, ClientView remoteClient);
33 public delegate void StatusChange(bool status);
33 34
34 public event ChatFromViewer OnChatFromViewer; 35 public event ChatFromViewer OnChatFromViewer;
35 public event RezObject OnRezObject; 36 public event RezObject OnRezObject;
@@ -51,6 +52,7 @@ namespace OpenSim
51 public event UpdatePrimVector OnUpdatePrimPosition; 52 public event UpdatePrimVector OnUpdatePrimPosition;
52 public event UpdatePrimRotation OnUpdatePrimRotation; 53 public event UpdatePrimRotation OnUpdatePrimRotation;
53 public event UpdatePrimVector OnUpdatePrimScale; 54 public event UpdatePrimVector OnUpdatePrimScale;
55 public event StatusChange OnChildAgentStatus;
54 56
55 protected override void ProcessInPacket(Packet Pack) 57 protected override void ProcessInPacket(Packet Pack)
56 { 58 {
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs
index e66b830..295cd7b 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.cs
@@ -86,6 +86,18 @@ namespace OpenSim
86 } 86 }
87 } 87 }
88 88
89 public LLVector3 StartPos
90 {
91 get
92 {
93 return startpos;
94 }
95 set
96 {
97 startpos = value;
98 }
99 }
100
89 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary<uint, ClientView> clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimNetworkHandler application, InventoryCache inventoryCache, bool sandboxMode, bool child, RegionInfo regionDat, AuthenticateSessionsBase authenSessions) 101 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary<uint, ClientView> clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimNetworkHandler application, InventoryCache inventoryCache, bool sandboxMode, bool child, RegionInfo regionDat, AuthenticateSessionsBase authenSessions)
90 { 102 {
91 m_world = world; 103 m_world = world;
@@ -133,21 +145,23 @@ namespace OpenSim
133 { 145 {
134 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent"); 146 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent");
135 this.m_child = false; 147 this.m_child = false;
136 this.m_world.RemoveViewerAgent(this); 148 //this.m_world.RemoveViewerAgent(this);
137 if (!this.m_sandboxMode) 149 if (!this.m_sandboxMode)
138 { 150 {
139 this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode); 151 this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode);
140 m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false); 152 m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false);
141 } 153 }
142 this.InitNewClient(); 154 OnChildAgentStatus(this.m_child);
155 //this.InitNewClient();
143 } 156 }
144 157
145 public void DowngradeClient() 158 public void DowngradeClient()
146 { 159 {
147 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - changing full agent to child"); 160 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - changing full agent to child");
148 this.m_child = true; 161 this.m_child = true;
149 this.m_world.RemoveViewerAgent(this); 162 OnChildAgentStatus(this.m_child);
150 this.m_world.AddViewerAgent(this); 163 //this.m_world.RemoveViewerAgent(this);
164 //this.m_world.AddViewerAgent(this);
151 } 165 }
152 166
153 public void KillClient() 167 public void KillClient()
@@ -256,11 +270,7 @@ namespace OpenSim
256 protected virtual void InitNewClient() 270 protected virtual void InitNewClient()
257 { 271 {
258 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); 272 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
259 273 this.ClientAvatar = m_world.AddViewerAgent(this);
260 m_world.AddViewerAgent(this);
261 world.Entity tempent = m_world.Entities[this.AgentID];
262
263 this.ClientAvatar = (world.Avatar)tempent;
264 } 274 }
265 275
266 protected virtual void AuthUser() 276 protected virtual void AuthUser()
@@ -280,7 +290,7 @@ namespace OpenSim
280 this.AgentID = cirpack.CircuitCode.ID; 290 this.AgentID = cirpack.CircuitCode.ID;
281 this.SessionID = cirpack.CircuitCode.SessionID; 291 this.SessionID = cirpack.CircuitCode.SessionID;
282 this.CircuitCode = cirpack.CircuitCode.Code; 292 this.CircuitCode = cirpack.CircuitCode.Code;
283 InitNewClient(); //shouldn't be called here as we might be a child agent and not want a full avatar 293 InitNewClient();
284 this.ClientAvatar.firstname = sessionInfo.LoginInfo.First; 294 this.ClientAvatar.firstname = sessionInfo.LoginInfo.First;
285 this.ClientAvatar.lastname = sessionInfo.LoginInfo.Last; 295 this.ClientAvatar.lastname = sessionInfo.LoginInfo.Last;
286 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero) 296 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero)
diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/OpenSim.RegionServer/PacketServer.cs
index fb35723..9c8f65c 100644
--- a/OpenSim/OpenSim.RegionServer/PacketServer.cs
+++ b/OpenSim/OpenSim.RegionServer/PacketServer.cs
@@ -58,7 +58,6 @@ namespace OpenSim
58 { 58 {
59 if (this._localWorld != null) 59 if (this._localWorld != null)
60 { 60 {
61 //ClientView.AddPacketHandler(PacketType.DeRezObject, _localWorld.DeRezObject);
62 ClientView.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName); 61 ClientView.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName);
63 } 62 }
64 } 63 }
diff --git a/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs b/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
index e49fab3..ed1ffc0 100644
--- a/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
+++ b/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
@@ -10,89 +10,93 @@ namespace OpenSim.world
10 { 10 {
11 public override void update() 11 public override void update()
12 { 12 {
13 if (this._physActor == null) 13 if (!this.childAvatar)
14 { 14 {
15 //HACKHACK: Note to work out why this entity does not have a physics actor 15 if (this._physActor == null)
16 // and prehaps create one.
17 return;
18 }
19 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
20 if (this.updateflag)
21 {
22 //need to send movement info
23 //so create the improvedterseobjectupdate packet
24 //use CreateTerseBlock()
25 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
26 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
27 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
28 terse.RegionData.TimeDilation = 64096;
29 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
30 terse.ObjectData[0] = terseBlock;
31 List<Avatar> avList = this.m_world.RequestAvatarList();
32 foreach (Avatar client in avList)
33 { 16 {
34 client.SendPacketToViewer(terse); 17 //HACKHACK: Note to work out why this entity does not have a physics actor
18 // and prehaps create one.
19 return;
35 } 20 }
21 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
22 if (this.updateflag)
23 {
24 //need to send movement info
25 //so create the improvedterseobjectupdate packet
26 //use CreateTerseBlock()
27 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
28 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
29 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
30 terse.RegionData.TimeDilation = 64096;
31 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
32 terse.ObjectData[0] = terseBlock;
33 List<Avatar> avList = this.m_world.RequestAvatarList();
34 foreach (Avatar client in avList)
35 {
36 client.SendPacketToViewer(terse);
37 }
36 38
37 updateflag = false; 39 updateflag = false;
38 //this._updateCount = 0; 40 //this._updateCount = 0;
39 } 41 }
40 else 42 else
41 {
42
43 if ((pos2 != this.positionLastFrame) || (this.movementflag == 16))
44 { 43 {
45 _updateCount++; 44
46 if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0)) 45 if ((pos2 != this.positionLastFrame) || (this.movementflag == 16))
47 { 46 {
48 //It has been a while since last update was sent so lets send one. 47 _updateCount++;
49 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); 48 if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0))
50 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
51 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
52 terse.RegionData.TimeDilation = 64096;
53 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
54 terse.ObjectData[0] = terseBlock;
55 List<Avatar> avList = this.m_world.RequestAvatarList();
56 foreach (Avatar client in avList)
57 { 49 {
58 client.SendPacketToViewer(terse); 50 //It has been a while since last update was sent so lets send one.
51 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
52 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
53 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
54 terse.RegionData.TimeDilation = 64096;
55 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
56 terse.ObjectData[0] = terseBlock;
57 List<Avatar> avList = this.m_world.RequestAvatarList();
58 foreach (Avatar client in avList)
59 {
60 client.SendPacketToViewer(terse);
61 }
62 _updateCount = 0;
59 } 63 }
60 _updateCount = 0;
61 }
62 64
63 if (this.movementflag == 16) 65 if (this.movementflag == 16)
64 { 66 {
65 movementflag = 0; 67 movementflag = 0;
68 }
66 } 69 }
67 }
68
69 }
70 this.positionLastFrame = pos2;
71 70
72 if (!this.ControllingClient.m_sandboxMode)
73 {
74 if (pos2.X < 0)
75 {
76 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
77 } 71 }
72 this.positionLastFrame = pos2;
78 73
79 if (pos2.Y < 0) 74 if (!this.ControllingClient.m_sandboxMode)
80 { 75 {
81 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); 76 if (pos2.X < 0)
82 } 77 {
78 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
79 }
83 80
84 if (pos2.X > 255) 81 if (pos2.Y < 0)
85 { 82 {
86 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); 83 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
87 } 84 }
88 85
89 if (pos2.Y > 255) 86 if (pos2.X > 255)
90 { 87 {
91 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); 88 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
89 }
90
91 if (pos2.Y > 255)
92 {
93 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
94 }
92 } 95 }
93 } 96 }
94 97
95 } 98 }
99
96 public void SendUpdateToOtherClient(Avatar remoteAvatar) 100 public void SendUpdateToOtherClient(Avatar remoteAvatar)
97 { 101 {
98 ObjectUpdatePacket objupdate = CreateUpdatePacket(); 102 ObjectUpdatePacket objupdate = CreateUpdatePacket();
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)
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs
index 921da3c..2edb8e7 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.cs
@@ -530,7 +530,7 @@ namespace OpenSim.world
530 530
531 #region Add/Remove Avatar Methods 531 #region Add/Remove Avatar Methods
532 532
533 public override void AddViewerAgent(ClientView agentClient) 533 public override Avatar AddViewerAgent(ClientView agentClient)
534 { 534 {
535 //register for events 535 //register for events
536 agentClient.OnChatFromViewer += new ChatFromViewer(this.SimChat); 536 agentClient.OnChatFromViewer += new ChatFromViewer(this.SimChat);
@@ -549,22 +549,23 @@ namespace OpenSim.world
549 agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation); 549 agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation);
550 agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale); 550 agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale);
551 agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject); 551 agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject);
552 552 Avatar newAvatar = null;
553 try 553 try
554 { 554 {
555 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 555 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
556 Avatar newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); 556 newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20);
557 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); 557 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
558 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); 558 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
559 newAvatar.SendRegionHandshake(this); 559 newAvatar.SendRegionHandshake(this);
560 if (!agentClient.m_child) 560 //if (!agentClient.m_child)
561 { 561 //{
562
562 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); 563 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
563 lock (this.LockPhysicsEngine) 564 lock (this.LockPhysicsEngine)
564 { 565 {
565 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); 566 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
566 } 567 }
567 } 568 // }
568 lock (Entities) 569 lock (Entities)
569 { 570 {
570 if (!Entities.ContainsKey(agentClient.AgentID)) 571 if (!Entities.ContainsKey(agentClient.AgentID))
@@ -592,6 +593,7 @@ namespace OpenSim.world
592 { 593 {
593 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); 594 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
594 } 595 }
596 return newAvatar;
595 } 597 }
596 598
597 public override void RemoveViewerAgent(ClientView agentClient) 599 public override void RemoveViewerAgent(ClientView agentClient)
@@ -608,7 +610,7 @@ namespace OpenSim.world
608 } 610 }
609 if (agentClient.ClientAvatar.PhysActor != null) 611 if (agentClient.ClientAvatar.PhysActor != null)
610 { 612 {
611 //this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor); 613 this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor);
612 } 614 }
613 } 615 }
614 catch (Exception e) 616 catch (Exception e)
diff --git a/OpenSim/OpenSim.RegionServer/world/WorldBase.cs b/OpenSim/OpenSim.RegionServer/world/WorldBase.cs
index edc5518..ea71411 100644
--- a/OpenSim/OpenSim.RegionServer/world/WorldBase.cs
+++ b/OpenSim/OpenSim.RegionServer/world/WorldBase.cs
@@ -148,9 +148,9 @@ namespace OpenSim.world
148 /// Add a new Agent's avatar 148 /// Add a new Agent's avatar
149 /// </summary> 149 /// </summary>
150 /// <param name="agentClient"></param> 150 /// <param name="agentClient"></param>
151 public virtual void AddViewerAgent(ClientView agentClient) 151 public virtual Avatar AddViewerAgent(ClientView agentClient)
152 { 152 {
153 153 return null;
154 } 154 }
155 155
156 /// <summary> 156 /// <summary>