mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
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.
This commit is contained in:
@@ -24,9 +24,10 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
using System.IO;
|
||||
|
||||
using OpenSim.Framework;
|
||||
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
@@ -43,6 +44,12 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// </summary>
|
||||
void TaintTerrain();
|
||||
|
||||
/// <summary>
|
||||
/// When a client initially connects, all the terrain must be pushed to the viewer.
|
||||
/// This call causes all the terrain patches to be sent to the client.
|
||||
/// </summary>
|
||||
void PushTerrain(IClientAPI pClient);
|
||||
|
||||
/// <summary>
|
||||
/// Load a terrain from a stream.
|
||||
/// </summary>
|
||||
|
||||
@@ -213,7 +213,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="RemoteClient">Client to send to</param>
|
||||
public virtual void SendLayerData(IClientAPI RemoteClient)
|
||||
{
|
||||
RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised());
|
||||
// RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised());
|
||||
ITerrainModule terrModule = RequestModuleInterface<ITerrainModule>();
|
||||
if (terrModule != null)
|
||||
{
|
||||
terrModule.PushTerrain(RemoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user