diff options
author | MW | 2007-05-29 17:10:31 +0000 |
---|---|---|
committer | MW | 2007-05-29 17:10:31 +0000 |
commit | 36bcda6cfaec008d51cc47838912aa49a889c18c (patch) | |
tree | e20281b278a845e4ebdc432a32d3d2c70d3af89b | |
parent | number of changes (diff) | |
download | opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.zip opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.tar.gz opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.tar.bz2 opensim-SC_OLD-36bcda6cfaec008d51cc47838912aa49a889c18c.tar.xz |
-rw-r--r-- | OpenSim/OpenSim.RegionServer/ClientView.API.cs | 2 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/Avatar.cs | 11 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/World.cs | 57 |
3 files changed, 58 insertions, 12 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs index 55ff8a1..7b1e537 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim | |||
101 | avp.ObjectData.TextureEntry = textureEntry; | 101 | avp.ObjectData.TextureEntry = textureEntry; |
102 | 102 | ||
103 | AvatarAppearancePacket.VisualParamBlock avblock = null; | 103 | AvatarAppearancePacket.VisualParamBlock avblock = null; |
104 | for (int i = 0; i < 218; i++) | 104 | for (int i = 0; i < visualParams.Length; i++) |
105 | { | 105 | { |
106 | avblock = new AvatarAppearancePacket.VisualParamBlock(); | 106 | avblock = new AvatarAppearancePacket.VisualParamBlock(); |
107 | avblock.ParamValue = visualParams[i]; | 107 | avblock.ParamValue = visualParams[i]; |
diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs index 77c18bf..2469860 100644 --- a/OpenSim/OpenSim.World/Avatar.cs +++ b/OpenSim/OpenSim.World/Avatar.cs | |||
@@ -37,15 +37,16 @@ namespace OpenSim.world | |||
37 | private ushort m_regionWaterHeight; | 37 | private ushort m_regionWaterHeight; |
38 | private bool m_regionTerraform; | 38 | private bool m_regionTerraform; |
39 | private bool childAvatar = false; | 39 | private bool childAvatar = false; |
40 | private RegionInfo regionData; | ||
40 | 41 | ||
41 | public Avatar(IClientAPI TheClient, World world, string regionName, Dictionary<uint, IClientAPI> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater) | 42 | public Avatar(IClientAPI TheClient, World world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionDat) |
42 | { | 43 | { |
43 | m_world = world; | 44 | m_world = world; |
44 | // m_clientThreads = clientThreads; | 45 | // m_clientThreads = clientThreads; |
45 | m_regionName = regionName; | 46 | m_regionName = regionData.RegionName; |
46 | m_regionHandle = regionHandle; | 47 | m_regionHandle = regionData.RegionHandle; |
47 | m_regionTerraform = regionTerraform; | 48 | m_regionTerraform = regionData.RegionTerraform; |
48 | m_regionWaterHeight = regionWater; | 49 | m_regionWaterHeight = regionData.RegionWaterHeight; |
49 | 50 | ||
50 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); | 51 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Avatar.cs - Loading details from grid (DUMMY)"); |
51 | ControllingClient = TheClient; | 52 | ControllingClient = TheClient; |
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 | ||