Closed Misterblue closed 11 months ago
I think you are missing a change to size of the Simulator.Terrain Array initialization in the Simulator Constructor.
if (client.Settings.STORE_LAND_PATCHES)
{
Terrain = new TerrainPatch[16 * 16]; // something like: new TerrainPatch[SizeY /16 * SizeX /16];
WindSpeeds = new Vector2[16 * 16];
}
This adds the fields RegionSizeX and RegionSizeY to the Simulator class and the logic to collect that information from the new region messages. If the region size info is not supplied in the event messages (like in SL), the region size is defaulted to Simulator.DefaultRegionSizeX (or Y) which is 256.
The OpenSimulator message that contain the region size are LoginResponse, EnableSimulator, TeleportFinishMessage, and CrossedRegionMessage. These are all event messages. The binary, UDP packet versions of these messages do not contain the region size info so old, old, old sims might not get the correct info.
Also added the display of the region size in the TestClient "regioninfo" command.