aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.World/World.cs
diff options
context:
space:
mode:
authorMW2007-05-29 17:10:31 +0000
committerMW2007-05-29 17:10:31 +0000
commit36bcda6cfaec008d51cc47838912aa49a889c18c (patch)
treee20281b278a845e4ebdc432a32d3d2c70d3af89b /OpenSim/OpenSim.World/World.cs
parentnumber of changes (diff)
downloadopensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.zip
opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.tar.gz
opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.tar.bz2
opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.tar.xz
Diffstat (limited to 'OpenSim/OpenSim.World/World.cs')
-rw-r--r--OpenSim/OpenSim.World/World.cs57
1 files changed, 51 insertions, 6 deletions
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs
index 8c8c2a6..c67366a 100644
--- a/OpenSim/OpenSim.World/World.cs
+++ b/OpenSim/OpenSim.World/World.cs
@@ -86,7 +86,7 @@ namespace OpenSim.world
86 this.SetDefaultScripts(); 86 this.SetDefaultScripts();
87 this.LoadScriptEngines(); 87 this.LoadScriptEngines();
88 88
89 89
90 } 90 }
91 catch (Exception e) 91 catch (Exception e)
92 { 92 {
@@ -459,7 +459,7 @@ namespace OpenSim.world
459 /// <param name="RemoteClient">Client to send to</param> 459 /// <param name="RemoteClient">Client to send to</param>
460 public void GetInitialPrims(IClientAPI RemoteClient) 460 public void GetInitialPrims(IClientAPI RemoteClient)
461 { 461 {
462 462
463 } 463 }
464 464
465 /// <summary> 465 /// <summary>
@@ -484,7 +484,7 @@ namespace OpenSim.world
484 /// <param name="prim">The object to load</param> 484 /// <param name="prim">The object to load</param>
485 public void PrimFromStorage(PrimData prim) 485 public void PrimFromStorage(PrimData prim)
486 { 486 {
487 487
488 } 488 }
489 489
490 public void AddNewPrim(Packet addPacket, IClientAPI agentClient) 490 public void AddNewPrim(Packet addPacket, IClientAPI agentClient)
@@ -494,7 +494,7 @@ namespace OpenSim.world
494 494
495 public void AddNewPrim(ObjectAddPacket addPacket, LLUUID ownerID) 495 public void AddNewPrim(ObjectAddPacket addPacket, LLUUID ownerID)
496 { 496 {
497 497
498 } 498 }
499 499
500 #endregion 500 #endregion
@@ -503,12 +503,57 @@ namespace OpenSim.world
503 503
504 public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child) 504 public override void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
505 { 505 {
506 return ; 506 remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData);
507 remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
508
509 Avatar newAvatar = null;
510 try
511 {
512 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
513 newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo);
514 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
515 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
516 newAvatar.SendRegionHandshake(this);
517
518 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
519 lock (this.LockPhysicsEngine)
520 {
521 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
522 }
523
524 lock (Entities)
525 {
526 if (!Entities.ContainsKey(agentID))
527 {
528 this.Entities.Add(agentID, newAvatar);
529 }
530 else
531 {
532 Entities[agentID] = newAvatar;
533 }
534 }
535 lock (Avatars)
536 {
537 if (Avatars.ContainsKey(agentID))
538 {
539 Avatars[agentID] = newAvatar;
540 }
541 else
542 {
543 this.Avatars.Add(agentID, newAvatar);
544 }
545 }
546 }
547 catch (Exception e)
548 {
549 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
550 }
551 return;
507 } 552 }
508 553
509 public override void RemoveAvatar(LLUUID agentID) 554 public override void RemoveAvatar(LLUUID agentID)
510 { 555 {
511 return ; 556 return;
512 } 557 }
513 #endregion 558 #endregion
514 559