diff options
author | MW | 2007-05-29 17:49:39 +0000 |
---|---|---|
committer | MW | 2007-05-29 17:49:39 +0000 |
commit | cb33169fe6836bb3d5b300a01d12f78246a45780 (patch) | |
tree | 4b45e8f5da2c777846aa3b2e47d04d5a8b6cd605 /OpenSim | |
parent | (no commit message) (diff) | |
download | opensim-SC-cb33169fe6836bb3d5b300a01d12f78246a45780.zip opensim-SC-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.gz opensim-SC-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.bz2 opensim-SC-cb33169fe6836bb3d5b300a01d12f78246a45780.tar.xz |
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/OpenSim.World/Avatar.cs | 4 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/World.cs | 4 | ||||
-rw-r--r-- | OpenSim/OpenSim.World/WorldBase.cs | 40 |
3 files changed, 6 insertions, 42 deletions
diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs index 2469860..3c22db2 100644 --- a/OpenSim/OpenSim.World/Avatar.cs +++ b/OpenSim/OpenSim.World/Avatar.cs | |||
@@ -130,9 +130,9 @@ namespace OpenSim.world | |||
130 | } | 130 | } |
131 | 131 | ||
132 | //really really should be moved somewhere else (RegionInfo.cs ?) | 132 | //really really should be moved somewhere else (RegionInfo.cs ?) |
133 | public void SendRegionHandshake(World regionInfo) | 133 | public void SendRegionHandshake(RegionInfo regionInfo) |
134 | { | 134 | { |
135 | 135 | this.ControllingClient.SendRegionHandshake(regionInfo); | |
136 | } | 136 | } |
137 | 137 | ||
138 | public static void LoadAnims() | 138 | public static void LoadAnims() |
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs index c67366a..8e8ab3e 100644 --- a/OpenSim/OpenSim.World/World.cs +++ b/OpenSim/OpenSim.World/World.cs | |||
@@ -504,7 +504,7 @@ namespace OpenSim.world | |||
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 | remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData); | 506 | remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData); |
507 | remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); | 507 | //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); |
508 | 508 | ||
509 | Avatar newAvatar = null; | 509 | Avatar newAvatar = null; |
510 | try | 510 | try |
@@ -513,7 +513,7 @@ namespace OpenSim.world | |||
513 | newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo); | 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"); | 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 "); | 515 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); |
516 | newAvatar.SendRegionHandshake(this); | 516 | newAvatar.SendRegionHandshake(this.m_regInfo); |
517 | 517 | ||
518 | PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); | 518 | PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); |
519 | lock (this.LockPhysicsEngine) | 519 | lock (this.LockPhysicsEngine) |
diff --git a/OpenSim/OpenSim.World/WorldBase.cs b/OpenSim/OpenSim.World/WorldBase.cs index f8a4eda..4371b6d 100644 --- a/OpenSim/OpenSim.World/WorldBase.cs +++ b/OpenSim/OpenSim.World/WorldBase.cs | |||
@@ -85,28 +85,7 @@ namespace OpenSim.world | |||
85 | /// <param name="RemoteClient">Client to send to</param> | 85 | /// <param name="RemoteClient">Client to send to</param> |
86 | public virtual void SendLayerData(IClientAPI RemoteClient) | 86 | public virtual void SendLayerData(IClientAPI RemoteClient) |
87 | { | 87 | { |
88 | try | 88 | RemoteClient.SendLayerData(Terrain.getHeights1D()); |
89 | { | ||
90 | int[] patches = new int[4]; | ||
91 | |||
92 | for (int y = 0; y < 16; y++) | ||
93 | { | ||
94 | for (int x = 0; x < 16; x = x + 4) | ||
95 | { | ||
96 | patches[0] = x + 0 + y * 16; | ||
97 | patches[1] = x + 1 + y * 16; | ||
98 | patches[2] = x + 2 + y * 16; | ||
99 | patches[3] = x + 3 + y * 16; | ||
100 | |||
101 | Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches); | ||
102 | RemoteClient.OutPacket(layerpack); | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | catch (Exception e) | ||
107 | { | ||
108 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString()); | ||
109 | } | ||
110 | } | 89 | } |
111 | 90 | ||
112 | /// <summary> | 91 | /// <summary> |
@@ -117,22 +96,7 @@ namespace OpenSim.world | |||
117 | /// <param name="RemoteClient">The client to send to</param> | 96 | /// <param name="RemoteClient">The client to send to</param> |
118 | public void SendLayerData(int px, int py, IClientAPI RemoteClient) | 97 | public void SendLayerData(int px, int py, IClientAPI RemoteClient) |
119 | { | 98 | { |
120 | try | 99 | |
121 | { | ||
122 | int[] patches = new int[1]; | ||
123 | int patchx, patchy; | ||
124 | patchx = px / 16; | ||
125 | patchy = py / 16; | ||
126 | |||
127 | patches[0] = patchx + 0 + patchy * 16; | ||
128 | |||
129 | Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches); | ||
130 | RemoteClient.OutPacket(layerpack); | ||
131 | } | ||
132 | catch (Exception e) | ||
133 | { | ||
134 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: SendLayerData() - Failed with exception " + e.ToString()); | ||
135 | } | ||
136 | } | 100 | } |
137 | #endregion | 101 | #endregion |
138 | 102 | ||