From aa704172d17633c690f619258abeb55384425c64 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 24 Jul 2007 06:01:11 +0000 Subject: * Several functions should now be more efficient with sending packets to the client (at the expense of some server CPU while editing) --- .../Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs index 5715c70..e6e5a9a 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs @@ -74,8 +74,6 @@ namespace libTerrain public void Set(int x, int y, double val) { - SetDiff(x, y); - if (x >= w) throw new Exception("Bounds error while setting pixel (width)"); if (y >= h) @@ -85,7 +83,12 @@ namespace libTerrain if (y < 0) throw new Exception("Bounds error while setting pixel (height)"); - map[x, y] = val; + if (map[x, y] != val) + { + SetDiff(x, y); + + map[x, y] = val; + } } public void SetClip(int x, int y, double val) -- cgit v1.1