From e9f2a9bddbb47ac8c80aeccea0022ad534cbd552 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 23 Nov 2011 21:19:10 +0000 Subject: get pCampBot to extract nearby and store nearby region information --- OpenSim/Tools/pCampBot/Bot.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 7f941a4..7c16bf4 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -218,7 +218,19 @@ namespace pCampBot { MakeDefaultAppearance(wear); } + Client.Self.Jump(true); + + // Extract nearby region information. + Client.Grid.GridRegion += BotManager.Grid_GridRegion; + uint xUint, yUint; + Utils.LongToUInts(Client.Network.CurrentSim.Handle, out xUint, out yUint); + ushort minX, minY, maxX, maxY; + minX = (ushort)Math.Min(0, xUint - 5); + minY = (ushort)Math.Min(0, yUint - 5); + maxX = (ushort)(xUint + 5); + maxY = (ushort)(yUint + 5); + Client.Grid.RequestMapBlocks(GridLayerType.Terrain, minX, minY, maxX, maxY, false); } else { -- cgit v1.1