private void InitializeDefaults() { RegionFlags = RegionFlags.AllowLandmark | RegionFlags.AllowSetHome | RegionFlags.AllowDirectTeleport | RegionFlags.AllowParcelChanges | RegionFlags.ExternallyVisible | RegionFlags.MainlandVisible | RegionFlags.PublicAllowed; SimAccess = SimAccess.PG; TerrainHeightRange00 = 0f; TerrainHeightRange01 = 20f; TerrainHeightRange10 = 0f; TerrainHeightRange11 = 20f; TerrainStartHeight00 = 0f; TerrainStartHeight01 = 40f; TerrainStartHeight10 = 0f; TerrainStartHeight11 = 40f; WaterHeight = 20f; ObjectCapacity = UInt32.MaxValue; MaxAgents = Byte.MaxValue; }
private void Deserialize() { if (m_dataStore != null) { SerializedData regionInfo = m_dataStore.DeserializeOne(m_scene.ID, "regioninfo"); if (regionInfo != null) { OSDMap map = OSDParser.DeserializeJson(Encoding.UTF8.GetString(regionInfo.Data)) as OSDMap; if (map != null) { OwnerID = map["owner_id"]; RegionFlags = (RegionFlags)(uint)map["region_flags"]; SimAccess = (SimAccess)(int)map["sim_access"]; TerrainDetail0 = map["terrain_detail_0"]; TerrainDetail1 = map["terrain_detail_1"]; TerrainDetail2 = map["terrain_detail_2"]; TerrainDetail3 = map["terrain_detail_3"]; TerrainHeightRange00 = map["terrain_height_range_00"]; TerrainHeightRange01 = map["terrain_height_range_01"]; TerrainHeightRange10 = map["terrain_height_range_10"]; TerrainHeightRange11 = map["terrain_height_range_11"]; TerrainStartHeight00 = map["terrain_start_height_00"]; TerrainStartHeight01 = map["terrain_start_height_01"]; TerrainStartHeight10 = map["terrain_start_height_10"]; TerrainStartHeight11 = map["terrain_start_height_11"]; WaterHeight = map["water_height"]; ObjectCapacity = map["object_capacity"]; MaxAgents = map["avatar_capacity"]; UseFixedSun = map["use_fixed_sun"]; UseEstateSun = map["use_estate_sun"]; } // Make sure the simulator access level is set if (SimAccess == SimAccess.Unknown) { SimAccess = SimAccess.PG; } } } }
public static OSDMap TeleportFinish(UUID agentID, int locationID, ulong regionHandle, Uri seedCap, SimAccess simAccess, IPAddress simIP, int simPort, TeleportFlags teleportFlags) { OSDMap info = new OSDMap(8); info.Add("AgentID", OSD.FromUUID(agentID)); info.Add("LocationID", OSD.FromInteger(locationID)); // Unused by the client info.Add("RegionHandle", OSD.FromULong(regionHandle)); info.Add("SeedCapability", OSD.FromUri(seedCap)); info.Add("SimAccess", OSD.FromInteger((byte)simAccess)); info.Add("SimIP", OSD.FromBinary(simIP.GetAddressBytes())); info.Add("SimPort", OSD.FromInteger(simPort)); info.Add("TeleportFlags", OSD.FromUInteger((uint)teleportFlags)); OSDArray infoArray = new OSDArray(1); infoArray.Add(info); OSDMap teleport = new OSDMap(1); teleport.Add("Info", infoArray); return teleport; }
/// <summary> /// Deserialize the message /// </summary> /// <param name="map">An <see cref="OSDMap"/> containing the data</param> public void Deserialize(OSDMap map) { OSDArray array = (OSDArray)map["Info"]; OSDMap blockMap = (OSDMap)array[0]; AgentID = blockMap["AgentID"].AsUUID(); LocationID = blockMap["LocationID"].AsInteger(); RegionHandle = blockMap["RegionHandle"].AsULong(); SeedCapability = blockMap["SeedCapability"].AsUri(); SimAccess = (SimAccess)blockMap["SimAccess"].AsInteger(); IP = MessageUtils.ToIP(blockMap["SimIP"]); Port = blockMap["SimPort"].AsInteger(); Flags = (TeleportFlags)blockMap["TeleportFlags"].AsUInteger(); }
private void InitializeDefaults() { ProductName = "Simian"; ProductSKU = String.Empty; RegionFlags = RegionFlags.SkipCollisions | RegionFlags.SkipScripts; SimAccess = SimAccess.Min; TerrainHeightRange00 = 0f; TerrainHeightRange01 = 20f; TerrainHeightRange10 = 0f; TerrainHeightRange11 = 20f; TerrainStartHeight00 = 0f; TerrainStartHeight01 = 40f; TerrainStartHeight10 = 0f; TerrainStartHeight11 = 40f; WaterHeight = 20f; ObjectCapacity = UInt32.MaxValue; }
private void Deserialize() { if (m_dataStore != null) { SerializedData regionInfo = m_dataStore.DeserializeOne(m_scene.ID, "regioninfo"); if (regionInfo != null) { OSDMap map = OSDParser.DeserializeJson(Encoding.UTF8.GetString(regionInfo.Data)) as OSDMap; if (map != null) { OwnerID = map["owner_id"].AsUUID(); ProductName = map["product_name"].AsString(); ProductSKU = map["product_sku"].AsString(); RegionFlags = (RegionFlags)map["region_flags"].AsUInteger(); SimAccess = (SimAccess)map["sim_access"].AsInteger(); TerrainBase0 = map["terrain_base_0"].AsUUID(); TerrainBase1 = map["terrain_base_1"].AsUUID(); TerrainBase2 = map["terrain_base_2"].AsUUID(); TerrainBase3 = map["terrain_base_3"].AsUUID(); TerrainDetail0 = map["terrain_detail_0"].AsUUID(); TerrainDetail1 = map["terrain_detail_1"].AsUUID(); TerrainDetail2 = map["terrain_detail_2"].AsUUID(); TerrainDetail3 = map["terrain_detail_3"].AsUUID(); TerrainHeightRange00 = (float)map["terrain_height_range_00"].AsReal(); TerrainHeightRange01 = (float)map["terrain_height_range_01"].AsReal(); TerrainHeightRange10 = (float)map["terrain_height_range_10"].AsReal(); TerrainHeightRange11 = (float)map["terrain_height_range_11"].AsReal(); TerrainStartHeight00 = (float)map["terrain_start_height_00"].AsReal(); TerrainStartHeight01 = (float)map["terrain_start_height_01"].AsReal(); TerrainStartHeight10 = (float)map["terrain_start_height_10"].AsReal(); TerrainStartHeight11 = (float)map["terrain_start_height_11"].AsReal(); WaterHeight = (float)map["water_height"].AsReal(); } } } }
private void InitializeDefaults() { RegionFlags = RegionFlags.AllowLandmark | RegionFlags.AllowSetHome | RegionFlags.AllowDirectTeleport | RegionFlags.AllowParcelChanges | RegionFlags.ExternallyVisible | RegionFlags.MainlandVisible | RegionFlags.PublicAllowed; SimAccess = SimAccess.PG; TerrainHeightRange00 = 0f; TerrainHeightRange01 = 20f; TerrainHeightRange10 = 0f; TerrainHeightRange11 = 20f; TerrainStartHeight00 = 0f; TerrainStartHeight01 = 40f; TerrainStartHeight10 = 0f; TerrainStartHeight11 = 40f; WaterHeight = 20f; ObjectCapacity = UInt32.MaxValue; MaxAgents = Byte.MaxValue; }
private void Deserialize() { if (m_dataStore != null) { SerializedData regionInfo = m_dataStore.DeserializeOne(m_scene.ID, "regioninfo"); if (regionInfo != null) { OSDMap map = OSDParser.DeserializeJson(Encoding.UTF8.GetString(regionInfo.Data)) as OSDMap; if (map != null) { OwnerID = map["owner_id"]; RegionFlags = (RegionFlags)(uint)map["region_flags"]; SimAccess = (SimAccess)(int)map["sim_access"]; TerrainDetail0 = map["terrain_detail_0"]; TerrainDetail1 = map["terrain_detail_1"]; TerrainDetail2 = map["terrain_detail_2"]; TerrainDetail3 = map["terrain_detail_3"]; TerrainHeightRange00 = map["terrain_height_range_00"]; TerrainHeightRange01 = map["terrain_height_range_01"]; TerrainHeightRange10 = map["terrain_height_range_10"]; TerrainHeightRange11 = map["terrain_height_range_11"]; TerrainStartHeight00 = map["terrain_start_height_00"]; TerrainStartHeight01 = map["terrain_start_height_01"]; TerrainStartHeight10 = map["terrain_start_height_10"]; TerrainStartHeight11 = map["terrain_start_height_11"]; WaterHeight = map["water_height"]; ObjectCapacity = map["object_capacity"]; MaxAgents = map["avatar_capacity"]; UseFixedSun = map["use_fixed_sun"]; UseEstateSun = map["use_estate_sun"]; } // Make sure the simulator access level is set if (SimAccess == SimAccess.Unknown) SimAccess = SimAccess.PG; } } }