diff options
author | Robert Adams | 2014-03-16 21:31:38 -0700 |
---|---|---|
committer | Robert Adams | 2014-05-31 12:19:49 -0700 |
commit | db5a42ffac7e46d88ef434b939230290d78530a7 (patch) | |
tree | 423eced17c42e19d5468e0d79fc54ebad815624c /OpenSim/Region/Framework | |
parent | Fix a bug where estate not found would result in a dummy estate record with e... (diff) | |
download | opensim-SC-db5a42ffac7e46d88ef434b939230290d78530a7.zip opensim-SC-db5a42ffac7e46d88ef434b939230290d78530a7.tar.gz opensim-SC-db5a42ffac7e46d88ef434b939230290d78530a7.tar.bz2 opensim-SC-db5a42ffac7e46d88ef434b939230290d78530a7.tar.xz |
varregion: send terrain patches from where the avatar outward if the parameter
[Terrain]SendTerrainUpdatesByViewDistance=true.
This tracks which patches have been sent to each client and outputs the
patches as the avatar moves.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ITerrainModule.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneBase.cs | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs index a6f5d98..28f797a 100644 --- a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs | |||
@@ -24,9 +24,10 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | using System.IO; | ||
27 | 28 | ||
29 | using OpenSim.Framework; | ||
28 | 30 | ||
29 | using System.IO; | ||
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | 32 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 33 | namespace OpenSim.Region.Framework.Interfaces |
@@ -44,6 +45,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
44 | void TaintTerrain(); | 45 | void TaintTerrain(); |
45 | 46 | ||
46 | /// <summary> | 47 | /// <summary> |
48 | /// When a client initially connects, all the terrain must be pushed to the viewer. | ||
49 | /// This call causes all the terrain patches to be sent to the client. | ||
50 | /// </summary> | ||
51 | void PushTerrain(IClientAPI pClient); | ||
52 | |||
53 | /// <summary> | ||
47 | /// Load a terrain from a stream. | 54 | /// Load a terrain from a stream. |
48 | /// </summary> | 55 | /// </summary> |
49 | /// <param name="filename"> | 56 | /// <param name="filename"> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 4208669..0445268 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -213,7 +213,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
213 | /// <param name="RemoteClient">Client to send to</param> | 213 | /// <param name="RemoteClient">Client to send to</param> |
214 | public virtual void SendLayerData(IClientAPI RemoteClient) | 214 | public virtual void SendLayerData(IClientAPI RemoteClient) |
215 | { | 215 | { |
216 | RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised()); | 216 | // RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised()); |
217 | ITerrainModule terrModule = RequestModuleInterface<ITerrainModule>(); | ||
218 | if (terrModule != null) | ||
219 | { | ||
220 | terrModule.PushTerrain(RemoteClient); | ||
221 | } | ||
217 | } | 222 | } |
218 | 223 | ||
219 | #endregion | 224 | #endregion |