aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs158
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs46
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs12
5 files changed, 112 insertions, 112 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d242506..30457c3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2753,7 +2753,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2753 { 2753 {
2754 m_host.AddScriptLPS(1); 2754 m_host.AddScriptLPS(1);
2755 m_host.CollisionFilter.Clear(); 2755 m_host.CollisionFilter.Clear();
2756 if(id != null) 2756 if (id != null)
2757 { 2757 {
2758 m_host.CollisionFilter.Add(accept,id); 2758 m_host.CollisionFilter.Add(accept,id);
2759 } 2759 }
@@ -4240,7 +4240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4240 public void llPassCollisions(int pass) 4240 public void llPassCollisions(int pass)
4241 { 4241 {
4242 m_host.AddScriptLPS(1); 4242 m_host.AddScriptLPS(1);
4243 if(pass == 0) 4243 if (pass == 0)
4244 { 4244 {
4245 m_host.ParentGroup.PassCollision = false; 4245 m_host.ParentGroup.PassCollision = false;
4246 } 4246 }
@@ -7437,7 +7437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7437 // makes it more difficult to determine a child prim's actual inworld position). 7437 // makes it more difficult to determine a child prim's actual inworld position).
7438 if (part.ParentID != 0) 7438 if (part.ParentID != 0)
7439 v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition(); 7439 v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition();
7440 res.Add( v ); 7440 res.Add(v);
7441 break; 7441 break;
7442 7442
7443 case (int)ScriptBaseClass.PRIM_SIZE: 7443 case (int)ScriptBaseClass.PRIM_SIZE:
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 5abe4b1..d8b9159 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1948,7 +1948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1948 1948
1949 return key.ToString(); 1949 return key.ToString();
1950 } 1950 }
1951 1951
1952 /// <summary> 1952 /// <summary>
1953 /// Return information regarding various simulator statistics (sim fps, physics fps, time 1953 /// Return information regarding various simulator statistics (sim fps, physics fps, time
1954 /// dilation, total number of prims, total number of active scripts, script lps, various 1954 /// dilation, total number of prims, total number of active scripts, script lps, various
@@ -1956,19 +1956,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1956 /// client's Statistics Bar (Ctrl-Shift-1) 1956 /// client's Statistics Bar (Ctrl-Shift-1)
1957 /// </summary> 1957 /// </summary>
1958 /// <returns>List of floats</returns> 1958 /// <returns>List of floats</returns>
1959 public LSL_List osGetRegionStats() 1959 public LSL_List osGetRegionStats()
1960 { 1960 {
1961 CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); 1961 CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats");
1962 m_host.AddScriptLPS(1); 1962 m_host.AddScriptLPS(1);
1963 LSL_List ret = new LSL_List(); 1963 LSL_List ret = new LSL_List();
1964 float[] stats = World.SimulatorStats; 1964 float[] stats = World.SimulatorStats;
1965 1965
1966 for (int i = 0; i < 21; i++) 1966 for (int i = 0; i < 21; i++)
1967 { 1967 {
1968 ret.Add(new LSL_Float( stats[i] )); 1968 ret.Add(new LSL_Float(stats[i]));
1969 } 1969 }
1970 return ret; 1970 return ret;
1971 } 1971 }
1972 1972
1973 public int osGetSimulatorMemory() 1973 public int osGetSimulatorMemory()
1974 { 1974 {
@@ -1984,81 +1984,81 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1984 return (int)pws; 1984 return (int)pws;
1985 } 1985 }
1986 public void osSetSpeed(string UUID, float SpeedModifier) 1986 public void osSetSpeed(string UUID, float SpeedModifier)
1987 { 1987 {
1988 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 1988 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
1989 m_host.AddScriptLPS(1); 1989 m_host.AddScriptLPS(1);
1990 ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); 1990 ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
1991 avatar.SpeedModifier = SpeedModifier; 1991 avatar.SpeedModifier = SpeedModifier;
1992 } 1992 }
1993 public void osKickAvatar(string FirstName,string SurName,string alert) 1993 public void osKickAvatar(string FirstName,string SurName,string alert)
1994 { 1994 {
1995 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 1995 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
1996 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) 1996 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
1997 { 1997 {
1998 foreach (ScenePresence presence in World.GetAvatars()) 1998 foreach (ScenePresence presence in World.GetAvatars())
1999 { 1999 {
2000 if ((presence.Firstname == FirstName) && 2000 if ((presence.Firstname == FirstName) &&
2001 presence.Lastname == SurName) 2001 presence.Lastname == SurName)
2002 { 2002 {
2003 // kick client... 2003 // kick client...
2004 if (alert != null) 2004 if (alert != null)
2005 presence.ControllingClient.Kick(alert); 2005 presence.ControllingClient.Kick(alert);
2006 2006
2007 // ...and close on our side 2007 // ...and close on our side
2008 presence.Scene.IncomingCloseAgent(presence.UUID); 2008 presence.Scene.IncomingCloseAgent(presence.UUID);
2009 } 2009 }
2010 } 2010 }
2011 } 2011 }
2012 } 2012 }
2013 public void osCauseDamage(string avatar, double damage) 2013 public void osCauseDamage(string avatar, double damage)
2014 { 2014 {
2015 CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); 2015 CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
2016 m_host.AddScriptLPS(1); 2016 m_host.AddScriptLPS(1);
2017 2017
2018 UUID avatarId = new UUID(avatar); 2018 UUID avatarId = new UUID(avatar);
2019 Vector3 pos = m_host.GetWorldPosition(); 2019 Vector3 pos = m_host.GetWorldPosition();
2020 2020
2021 ScenePresence presence = World.GetScenePresence(avatarId); 2021 ScenePresence presence = World.GetScenePresence(avatarId);
2022 if (presence != null) 2022 if (presence != null)
2023 { 2023 {
2024 LandData land = World.GetLandData((float)pos.X, (float)pos.Y); 2024 LandData land = World.GetLandData((float)pos.X, (float)pos.Y);
2025 if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage) 2025 if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
2026 { 2026 {
2027 float health = presence.Health; 2027 float health = presence.Health;
2028 health -= (float)damage; 2028 health -= (float)damage;
2029 presence.setHealthWithUpdate(health); 2029 presence.setHealthWithUpdate(health);
2030 if (health <= 0) 2030 if (health <= 0)
2031 { 2031 {
2032 float healthliveagain = 100; 2032 float healthliveagain = 100;
2033 presence.ControllingClient.SendAgentAlertMessage("You died!", true); 2033 presence.ControllingClient.SendAgentAlertMessage("You died!", true);
2034 presence.setHealthWithUpdate(healthliveagain); 2034 presence.setHealthWithUpdate(healthliveagain);
2035 presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient); 2035 presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient);
2036 } 2036 }
2037 } 2037 }
2038 } 2038 }
2039 } 2039 }
2040 public void osCauseHealing(string avatar, double healing) 2040 public void osCauseHealing(string avatar, double healing)
2041 { 2041 {
2042 CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); 2042 CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
2043 m_host.AddScriptLPS(1); 2043 m_host.AddScriptLPS(1);
2044 2044
2045 UUID avatarId = new UUID(avatar); 2045 UUID avatarId = new UUID(avatar);
2046 ScenePresence presence = World.GetScenePresence(avatarId); 2046 ScenePresence presence = World.GetScenePresence(avatarId);
2047 Vector3 pos = m_host.GetWorldPosition(); 2047 Vector3 pos = m_host.GetWorldPosition();
2048 bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z)); 2048 bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z));
2049 if (result) 2049 if (result)
2050 { 2050 {
2051 if (presence != null) 2051 if (presence != null)
2052 { 2052 {
2053 float health = presence.Health; 2053 float health = presence.Health;
2054 health += (float)healing; 2054 health += (float)healing;
2055 if (health >= 100) 2055 if (health >= 100)
2056 { 2056 {
2057 health = 100; 2057 health = 100;
2058 } 2058 }
2059 presence.setHealthWithUpdate(health); 2059 presence.setHealthWithUpdate(health);
2060 } 2060 }
2061 } 2061 }
2062 } 2062 }
2063 } 2063 }
2064} 2064}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index ac9405e..60b8050 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
162 162
163 key osGetMapTexture(); 163 key osGetMapTexture();
164 key osGetRegionMapTexture(string regionName); 164 key osGetRegionMapTexture(string regionName);
165 LSL_List osGetRegionStats(); 165 LSL_List osGetRegionStats();
166 166
167 int osGetSimulatorMemory(); 167 int osGetSimulatorMemory();
168 void osKickAvatar(string FirstName,string SurName,string alert); 168 void osKickAvatar(string FirstName,string SurName,string alert);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index acff8fb..13b855f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -515,29 +515,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
515 public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f"; 515 public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f";
516 public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"; 516 public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903";
517 public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"; 517 public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361";
518 518
519 // Constants for osGetRegionStats 519 // Constants for osGetRegionStats
520 public const int STATS_TIME_DILATION = 0; 520 public const int STATS_TIME_DILATION = 0;
521 public const int STATS_SIM_FPS = 1; 521 public const int STATS_SIM_FPS = 1;
522 public const int STATS_PHYSICS_FPS = 2; 522 public const int STATS_PHYSICS_FPS = 2;
523 public const int STATS_AGENT_UPDATES = 3; 523 public const int STATS_AGENT_UPDATES = 3;
524 public const int STATS_ROOT_AGENTS = 4; 524 public const int STATS_ROOT_AGENTS = 4;
525 public const int STATS_CHILD_AGENTS = 5; 525 public const int STATS_CHILD_AGENTS = 5;
526 public const int STATS_TOTAL_PRIMS = 6; 526 public const int STATS_TOTAL_PRIMS = 6;
527 public const int STATS_ACTIVE_PRIMS = 7; 527 public const int STATS_ACTIVE_PRIMS = 7;
528 public const int STATS_FRAME_MS = 8; 528 public const int STATS_FRAME_MS = 8;
529 public const int STATS_NET_MS = 9; 529 public const int STATS_NET_MS = 9;
530 public const int STATS_PHYSICS_MS = 10; 530 public const int STATS_PHYSICS_MS = 10;
531 public const int STATS_IMAGE_MS = 11; 531 public const int STATS_IMAGE_MS = 11;
532 public const int STATS_OTHER_MS = 12; 532 public const int STATS_OTHER_MS = 12;
533 public const int STATS_IN_PACKETS_PER_SECOND = 13; 533 public const int STATS_IN_PACKETS_PER_SECOND = 13;
534 public const int STATS_OUT_PACKETS_PER_SECOND = 14; 534 public const int STATS_OUT_PACKETS_PER_SECOND = 14;
535 public const int STATS_UNACKED_BYTES = 15; 535 public const int STATS_UNACKED_BYTES = 15;
536 public const int STATS_AGENT_MS = 16; 536 public const int STATS_AGENT_MS = 16;
537 public const int STATS_PENDING_DOWNLOADS = 17; 537 public const int STATS_PENDING_DOWNLOADS = 17;
538 public const int STATS_PENDING_UPLOADS = 18; 538 public const int STATS_PENDING_UPLOADS = 18;
539 public const int STATS_ACTIVE_SCRIPTS = 19; 539 public const int STATS_ACTIVE_SCRIPTS = 19;
540 public const int STATS_SCRIPT_LPS = 20; 540 public const int STATS_SCRIPT_LPS = 20;
541 541
542 } 542 }
543} 543}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 2ec6226..3870af3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -632,11 +632,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
632 { 632 {
633 return m_OSSL_Functions.osGetRegionMapTexture(regionName); 633 return m_OSSL_Functions.osGetRegionMapTexture(regionName);
634 } 634 }
635 635
636 public LSL_List osGetRegionStats() 636 public LSL_List osGetRegionStats()
637 { 637 {
638 return m_OSSL_Functions.osGetRegionStats(); 638 return m_OSSL_Functions.osGetRegionStats();
639 } 639 }
640 640
641 /// <summary> 641 /// <summary>
642 /// Returns the amount of memory in use by the Simulator Daemon. 642 /// Returns the amount of memory in use by the Simulator Daemon.
@@ -649,7 +649,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
649 } 649 }
650 public void osKickAvatar(string FirstName,string SurName,string alert) 650 public void osKickAvatar(string FirstName,string SurName,string alert)
651 { 651 {
652 m_OSSL_Functions.osKickAvatar( FirstName, SurName, alert); 652 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
653 } 653 }
654 public void osSetSpeed(string UUID, float SpeedModifier) 654 public void osSetSpeed(string UUID, float SpeedModifier)
655 { 655 {