cosmetics

This commit is contained in:
UbitUmarov
2020-09-23 21:07:07 +01:00
parent f1e9d5a878
commit d0d1ab9f2a
6 changed files with 18 additions and 23 deletions

View File

@@ -495,11 +495,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
protected virtual void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features) protected virtual void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features)
{ {
OSD extras = new OSDMap(); OSD extras;
if (features.ContainsKey("OpenSimExtras")) if (!features.TryGetValue("OpenSimExtras", out extras))
extras = features["OpenSimExtras"]; extras = new OSDMap();
else
features["OpenSimExtras"] = extras;
if (m_SayRange == null) if (m_SayRange == null)
{ {

View File

@@ -163,10 +163,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// Is the user a local user? // Is the user a local user?
string url = string.Empty; string url = string.Empty;
bool foreigner = false; bool foreigner = false;
if (UserManagementModule != null && !UserManagementModule.IsLocalGridUser(toAgentID)) // foreign user if (UserManagementModule != null) // foreign user
{ {
url = UserManagementModule.GetUserServerURL(toAgentID, "IMServerURI"); url = UserManagementModule.GetUserServerURL(toAgentID, "IMServerURI");
foreigner = true; foreigner = UserManagementModule.IsLocalGridUser(toAgentID);
} }
Util.FireAndForget(delegate Util.FireAndForget(delegate
@@ -178,12 +178,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
m_log.DebugFormat("[HG MESSAGE TRANSFER]: Got UUI {0}", recipientUUI); m_log.DebugFormat("[HG MESSAGE TRANSFER]: Got UUI {0}", recipientUUI);
if (recipientUUI != string.Empty) if (recipientUUI != string.Empty)
{ {
UUID id; string u = string.Empty, first = string.Empty, last = string.Empty, secret = string.Empty; UUID id; string tourl = string.Empty, first = string.Empty, last = string.Empty, secret = string.Empty;
if (Util.ParseUniversalUserIdentifier(recipientUUI, out id, out u, out first, out last, out secret)) if (Util.ParseUniversalUserIdentifier(recipientUUI, out id, out tourl, out first, out last, out secret))
{ {
success = m_IMService.OutgoingInstantMessage(im, u, true); success = m_IMService.OutgoingInstantMessage(im, tourl, true);
if (success) if (success)
UserManagementModule.AddUser(toAgentID, u + ";" + first + " " + last); UserManagementModule.AddUser(toAgentID, first, last, tourl);
} }
} }
} }

View File

@@ -311,7 +311,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
{ {
float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
renderer.AddPlane("Water", m_scene.RegionInfo.RegionSizeX * 0.5f); renderer.AddPlane("Water", m_scene.RegionInfo.RegionSizeX * 0.5f, false);
renderer.Scene.sceneobject("Water").setPos(m_scene.RegionInfo.RegionSizeX * 0.5f, renderer.Scene.sceneobject("Water").setPos(m_scene.RegionInfo.RegionSizeX * 0.5f,
waterHeight, waterHeight,
m_scene.RegionInfo.RegionSizeY * 0.5f); m_scene.RegionInfo.RegionSizeY * 0.5f);

View File

@@ -78,6 +78,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid
Util.GetConfigVarFromSections<bool>(source, "ExportMapAddScale", configSections, m_exportPrintScale); Util.GetConfigVarFromSections<bool>(source, "ExportMapAddScale", configSections, m_exportPrintScale);
m_exportPrintRegionName = m_exportPrintRegionName =
Util.GetConfigVarFromSections<bool>(source, "ExportMapAddRegionName", configSections, m_exportPrintRegionName); Util.GetConfigVarFromSections<bool>(source, "ExportMapAddRegionName", configSections, m_exportPrintRegionName);
m_localV1MapAssets =
Util.GetConfigVarFromSections<bool>(source, "LocalV1MapAssets", configSections, m_localV1MapAssets);
} }
} }
@@ -174,11 +176,9 @@ namespace OpenSim.Region.CoreModules.Hypergrid
{ {
if (m_UserManagement != null && !string.IsNullOrEmpty(m_MapImageServerURL) && !m_UserManagement.IsLocalGridUser(agentID)) if (m_UserManagement != null && !string.IsNullOrEmpty(m_MapImageServerURL) && !m_UserManagement.IsLocalGridUser(agentID))
{ {
OSD extras = new OSDMap(); OSD extras;
if (features.ContainsKey("OpenSimExtras")) if (!features.TryGetValue("OpenSimExtras", out extras))
extras = features["OpenSimExtras"]; extras = new OSDMap();
else
features["OpenSimExtras"] = extras;
((OSDMap)extras)["map-server-url"] = m_MapImageServerURL; ((OSDMap)extras)["map-server-url"] = m_MapImageServerURL;

View File

@@ -157,7 +157,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
Util.GetConfigVarFromSections<bool>(config, "ExportMapAddRegionName", configSections, m_exportPrintRegionName); Util.GetConfigVarFromSections<bool>(config, "ExportMapAddRegionName", configSections, m_exportPrintRegionName);
m_localV1MapAssets = m_localV1MapAssets =
Util.GetConfigVarFromSections<bool>(config, "LocalV1MapAssets", configSections, m_localV1MapAssets); Util.GetConfigVarFromSections<bool>(config, "LocalV1MapAssets", configSections, m_localV1MapAssets);
} }
public virtual void AddRegion(Scene scene) public virtual void AddRegion(Scene scene)

View File

@@ -119,20 +119,18 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
m_log.DebugFormat("[SPECIAL UI]: OnSimulatorFeaturesRequest in {0}", m_scene.RegionInfo.RegionName); m_log.DebugFormat("[SPECIAL UI]: OnSimulatorFeaturesRequest in {0}", m_scene.RegionInfo.RegionName);
if (m_Helper.UserLevel(agentID) <= m_UserLevel) if (m_Helper.UserLevel(agentID) <= m_UserLevel)
{ {
OSDMap extrasMap; OSD extrasMap;
OSDMap specialUI = new OSDMap(); OSDMap specialUI = new OSDMap();
using (StreamReader s = new StreamReader(Path.Combine(VIEWER_SUPPORT_DIR, "panel_toolbar.xml"))) using (StreamReader s = new StreamReader(Path.Combine(VIEWER_SUPPORT_DIR, "panel_toolbar.xml")))
{ {
if (features.ContainsKey("OpenSimExtras")) if (!features.TryGetValue("OpenSimExtras", out extrasMap))
extrasMap = (OSDMap)features["OpenSimExtras"];
else
{ {
extrasMap = new OSDMap(); extrasMap = new OSDMap();
features["OpenSimExtras"] = extrasMap; features["OpenSimExtras"] = extrasMap;
} }
specialUI["toolbar"] = OSDMap.FromString(s.ReadToEnd()); specialUI["toolbar"] = OSDMap.FromString(s.ReadToEnd());
extrasMap["special-ui"] = specialUI; ((OSDMap)extrasMap)["special-ui"] = specialUI;
} }
m_log.DebugFormat("[SPECIAL UI]: Sending panel_toolbar.xml in {0}", m_scene.RegionInfo.RegionName); m_log.DebugFormat("[SPECIAL UI]: Sending panel_toolbar.xml in {0}", m_scene.RegionInfo.RegionName);