aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTalun2015-05-19 19:07:48 +0100
committerMichael Cerquoni2015-05-20 14:36:54 -0400
commitd9afe354ac90c9a9b75f2ff05f3b8180225334fb (patch)
tree5de489eadc3312abb5b69ed09eb5903077454e6a /OpenSim
parentresolve possible nullref when sending appearance packet. Thanks to zadark for... (diff)
downloadopensim-SC-d9afe354ac90c9a9b75f2ff05f3b8180225334fb.zip
opensim-SC-d9afe354ac90c9a9b75f2ff05f3b8180225334fb.tar.gz
opensim-SC-d9afe354ac90c9a9b75f2ff05f3b8180225334fb.tar.bz2
opensim-SC-d9afe354ac90c9a9b75f2ff05f3b8180225334fb.tar.xz
New values returned by llGetEnv
Implements recent changes to llGetEnv region_cpu_ratio hardcoded to 1 region_product_sku hardcoded to OpenSim Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs34
2 files changed, 40 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 906c862..643dca3 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -454,6 +454,12 @@ namespace OpenSim.Region.Framework.Scenes
454 454
455 private string m_defaultScriptEngine; 455 private string m_defaultScriptEngine;
456 456
457 private int m_unixStartTime;
458 public int UnixStartTime
459 {
460 get { return m_unixStartTime; }
461 }
462
457 /// <summary> 463 /// <summary>
458 /// Tick at which the last login occurred. 464 /// Tick at which the last login occurred.
459 /// </summary> 465 /// </summary>
@@ -1438,7 +1444,7 @@ namespace OpenSim.Region.Framework.Scenes
1438 1444
1439 m_isRunning = true; 1445 m_isRunning = true;
1440 m_active = true; 1446 m_active = true;
1441 1447 m_unixStartTime = Util.UnixTimeSinceEpoch();
1442// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); 1448// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName);
1443 if (m_heartbeatThread != null) 1449 if (m_heartbeatThread != null)
1444 { 1450 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 089a5a8..8359440 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5785,7 +5785,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5785 public LSL_String llGetEnv(LSL_String name) 5785 public LSL_String llGetEnv(LSL_String name)
5786 { 5786 {
5787 m_host.AddScriptLPS(1); 5787 m_host.AddScriptLPS(1);
5788 if (name == "dynamic_pathfinding") 5788 if (name == "agent_limit")
5789 {
5790 return World.RegionInfo.RegionSettings.AgentLimit.ToString();
5791 }
5792 else if (name == "dynamic_pathfinding")
5789 { 5793 {
5790 return "0"; 5794 return "0";
5791 } 5795 }
@@ -5793,14 +5797,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5793 { 5797 {
5794 return World.RegionInfo.EstateSettings.EstateID.ToString(); 5798 return World.RegionInfo.EstateSettings.EstateID.ToString();
5795 } 5799 }
5800 else if (name == "estate_name")
5801 {
5802 return World.RegionInfo.EstateSettings.EstateName;
5803 }
5796 else if (name == "frame_number") 5804 else if (name == "frame_number")
5797 { 5805 {
5798 return World.Frame.ToString(); 5806 return World.Frame.ToString();
5799 } 5807 }
5808 else if (name == "region_cpu_ratio")
5809 {
5810 return "1";
5811 }
5800 else if (name == "region_idle") 5812 else if (name == "region_idle")
5801 { 5813 {
5802 return "0"; 5814 return "0";
5803 } 5815 }
5816 else if (name == "region_product_name")
5817 {
5818 if (World.RegionInfo.RegionType != String.Empty)
5819 return World.RegionInfo.RegionType;
5820 else
5821 return "";
5822 }
5823 else if (name == "region_product_sku")
5824 {
5825 return "OpenSim";
5826 }
5827 else if (name == "region_start_time")
5828 {
5829 return World.UnixStartTime.ToString();
5830 }
5804 else if (name == "sim_channel") 5831 else if (name == "sim_channel")
5805 { 5832 {
5806 return "OpenSim"; 5833 return "OpenSim";
@@ -5809,6 +5836,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5809 { 5836 {
5810 return World.GetSimulatorVersion(); 5837 return World.GetSimulatorVersion();
5811 } 5838 }
5839 else if (name == "simulator_hostname")
5840 {
5841 IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>();
5842 return UrlModule.ExternalHostNameForLSL;
5843 }
5812 else 5844 else
5813 { 5845 {
5814 return ""; 5846 return "";