aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2015-05-20 23:40:52 +0200
committerMelanie Thielker2015-05-20 23:40:52 +0200
commitedcba95ab561abeedc4023c319c578d8ddd83c61 (patch)
tree82830abcd2c68a2cad5e2f002a4e2eabae557b7f /OpenSim
parentRemoving duplicate definition (diff)
parentNew values returned by llGetEnv (diff)
downloadopensim-SC_OLD-edcba95ab561abeedc4023c319c578d8ddd83c61.zip
opensim-SC_OLD-edcba95ab561abeedc4023c319c578d8ddd83c61.tar.gz
opensim-SC_OLD-edcba95ab561abeedc4023c319c578d8ddd83c61.tar.bz2
opensim-SC_OLD-edcba95ab561abeedc4023c319c578d8ddd83c61.tar.xz
Merge branch 'master' into moses
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs34
2 files changed, 41 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7913f42..c539f1f 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -457,6 +457,12 @@ namespace OpenSim.Region.Framework.Scenes
457 457
458 private string m_defaultScriptEngine; 458 private string m_defaultScriptEngine;
459 459
460 private int m_unixStartTime;
461 public int UnixStartTime
462 {
463 get { return m_unixStartTime; }
464 }
465
460 /// <summary> 466 /// <summary>
461 /// Tick at which the last login occurred. 467 /// Tick at which the last login occurred.
462 /// </summary> 468 /// </summary>
@@ -1461,7 +1467,8 @@ namespace OpenSim.Region.Framework.Scenes
1461 m_isRunning = true; 1467 m_isRunning = true;
1462 m_active = true; 1468 m_active = true;
1463 1469
1464 // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); 1470 m_unixStartTime = Util.UnixTimeSinceEpoch();
1471// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName);
1465 if (m_heartbeatThread != null) 1472 if (m_heartbeatThread != null)
1466 { 1473 {
1467 m_heartbeatThread.Abort(); 1474 m_heartbeatThread.Abort();
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 "";