From 70d5b1c34cf2eb6621f383169fdee03966850762 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 4 Jan 2010 06:10:45 +0900
Subject: Formatting cleanup. Add copyright headers.
---
.../Shared/Api/Implementation/LSL_Api.cs | 6 +-
.../Shared/Api/Implementation/OSSL_Api.cs | 158 ++++++++++-----------
.../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 2 +-
.../Shared/Api/Runtime/LSL_Constants.cs | 46 +++---
.../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 12 +-
5 files changed, 112 insertions(+), 112 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
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
{
m_host.AddScriptLPS(1);
m_host.CollisionFilter.Clear();
- if(id != null)
+ if (id != null)
{
m_host.CollisionFilter.Add(accept,id);
}
@@ -4240,7 +4240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llPassCollisions(int pass)
{
m_host.AddScriptLPS(1);
- if(pass == 0)
+ if (pass == 0)
{
m_host.ParentGroup.PassCollision = false;
}
@@ -7437,7 +7437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// makes it more difficult to determine a child prim's actual inworld position).
if (part.ParentID != 0)
v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition();
- res.Add( v );
+ res.Add(v);
break;
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
return key.ToString();
}
-
+
///
/// Return information regarding various simulator statistics (sim fps, physics fps, time
/// dilation, total number of prims, total number of active scripts, script lps, various
@@ -1956,19 +1956,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// client's Statistics Bar (Ctrl-Shift-1)
///
/// List of floats
- public LSL_List osGetRegionStats()
- {
+ public LSL_List osGetRegionStats()
+ {
CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats");
m_host.AddScriptLPS(1);
LSL_List ret = new LSL_List();
- float[] stats = World.SimulatorStats;
-
- for (int i = 0; i < 21; i++)
- {
- ret.Add(new LSL_Float( stats[i] ));
- }
- return ret;
- }
+ float[] stats = World.SimulatorStats;
+
+ for (int i = 0; i < 21; i++)
+ {
+ ret.Add(new LSL_Float(stats[i]));
+ }
+ return ret;
+ }
public int osGetSimulatorMemory()
{
@@ -1984,81 +1984,81 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return (int)pws;
}
public void osSetSpeed(string UUID, float SpeedModifier)
- {
- CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
+ {
+ CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
m_host.AddScriptLPS(1);
- ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
- avatar.SpeedModifier = SpeedModifier;
- }
+ ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
+ avatar.SpeedModifier = SpeedModifier;
+ }
public void osKickAvatar(string FirstName,string SurName,string alert)
- {
- CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
- if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
- {
- foreach (ScenePresence presence in World.GetAvatars())
- {
- if ((presence.Firstname == FirstName) &&
- presence.Lastname == SurName)
- {
- // kick client...
- if (alert != null)
- presence.ControllingClient.Kick(alert);
-
- // ...and close on our side
- presence.Scene.IncomingCloseAgent(presence.UUID);
- }
- }
- }
- }
+ {
+ CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
+ if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
+ {
+ foreach (ScenePresence presence in World.GetAvatars())
+ {
+ if ((presence.Firstname == FirstName) &&
+ presence.Lastname == SurName)
+ {
+ // kick client...
+ if (alert != null)
+ presence.ControllingClient.Kick(alert);
+
+ // ...and close on our side
+ presence.Scene.IncomingCloseAgent(presence.UUID);
+ }
+ }
+ }
+ }
public void osCauseDamage(string avatar, double damage)
{
- CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
- m_host.AddScriptLPS(1);
-
- UUID avatarId = new UUID(avatar);
- Vector3 pos = m_host.GetWorldPosition();
-
- ScenePresence presence = World.GetScenePresence(avatarId);
- if (presence != null)
- {
- LandData land = World.GetLandData((float)pos.X, (float)pos.Y);
- if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
- {
- float health = presence.Health;
- health -= (float)damage;
- presence.setHealthWithUpdate(health);
- if (health <= 0)
- {
- float healthliveagain = 100;
- presence.ControllingClient.SendAgentAlertMessage("You died!", true);
- presence.setHealthWithUpdate(healthliveagain);
- presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient);
- }
- }
- }
+ CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
+ m_host.AddScriptLPS(1);
+
+ UUID avatarId = new UUID(avatar);
+ Vector3 pos = m_host.GetWorldPosition();
+
+ ScenePresence presence = World.GetScenePresence(avatarId);
+ if (presence != null)
+ {
+ LandData land = World.GetLandData((float)pos.X, (float)pos.Y);
+ if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage)
+ {
+ float health = presence.Health;
+ health -= (float)damage;
+ presence.setHealthWithUpdate(health);
+ if (health <= 0)
+ {
+ float healthliveagain = 100;
+ presence.ControllingClient.SendAgentAlertMessage("You died!", true);
+ presence.setHealthWithUpdate(healthliveagain);
+ presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient);
+ }
+ }
+ }
}
public void osCauseHealing(string avatar, double healing)
{
- CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
- m_host.AddScriptLPS(1);
-
- UUID avatarId = new UUID(avatar);
- ScenePresence presence = World.GetScenePresence(avatarId);
- Vector3 pos = m_host.GetWorldPosition();
- bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z));
- if (result)
- {
- if (presence != null)
- {
- float health = presence.Health;
- health += (float)healing;
- if (health >= 100)
- {
- health = 100;
- }
- presence.setHealthWithUpdate(health);
- }
- }
+ CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
+ m_host.AddScriptLPS(1);
+
+ UUID avatarId = new UUID(avatar);
+ ScenePresence presence = World.GetScenePresence(avatarId);
+ Vector3 pos = m_host.GetWorldPosition();
+ bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z));
+ if (result)
+ {
+ if (presence != null)
+ {
+ float health = presence.Health;
+ health += (float)healing;
+ if (health >= 100)
+ {
+ health = 100;
+ }
+ presence.setHealthWithUpdate(health);
+ }
+ }
}
}
}
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
key osGetMapTexture();
key osGetRegionMapTexture(string regionName);
- LSL_List osGetRegionStats();
+ LSL_List osGetRegionStats();
int osGetSimulatorMemory();
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
public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f";
public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903";
public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361";
-
- // Constants for osGetRegionStats
- public const int STATS_TIME_DILATION = 0;
- public const int STATS_SIM_FPS = 1;
- public const int STATS_PHYSICS_FPS = 2;
- public const int STATS_AGENT_UPDATES = 3;
- public const int STATS_ROOT_AGENTS = 4;
- public const int STATS_CHILD_AGENTS = 5;
- public const int STATS_TOTAL_PRIMS = 6;
- public const int STATS_ACTIVE_PRIMS = 7;
- public const int STATS_FRAME_MS = 8;
- public const int STATS_NET_MS = 9;
- public const int STATS_PHYSICS_MS = 10;
- public const int STATS_IMAGE_MS = 11;
- public const int STATS_OTHER_MS = 12;
- public const int STATS_IN_PACKETS_PER_SECOND = 13;
- public const int STATS_OUT_PACKETS_PER_SECOND = 14;
- public const int STATS_UNACKED_BYTES = 15;
- public const int STATS_AGENT_MS = 16;
- public const int STATS_PENDING_DOWNLOADS = 17;
- public const int STATS_PENDING_UPLOADS = 18;
- public const int STATS_ACTIVE_SCRIPTS = 19;
- public const int STATS_SCRIPT_LPS = 20;
+
+ // Constants for osGetRegionStats
+ public const int STATS_TIME_DILATION = 0;
+ public const int STATS_SIM_FPS = 1;
+ public const int STATS_PHYSICS_FPS = 2;
+ public const int STATS_AGENT_UPDATES = 3;
+ public const int STATS_ROOT_AGENTS = 4;
+ public const int STATS_CHILD_AGENTS = 5;
+ public const int STATS_TOTAL_PRIMS = 6;
+ public const int STATS_ACTIVE_PRIMS = 7;
+ public const int STATS_FRAME_MS = 8;
+ public const int STATS_NET_MS = 9;
+ public const int STATS_PHYSICS_MS = 10;
+ public const int STATS_IMAGE_MS = 11;
+ public const int STATS_OTHER_MS = 12;
+ public const int STATS_IN_PACKETS_PER_SECOND = 13;
+ public const int STATS_OUT_PACKETS_PER_SECOND = 14;
+ public const int STATS_UNACKED_BYTES = 15;
+ public const int STATS_AGENT_MS = 16;
+ public const int STATS_PENDING_DOWNLOADS = 17;
+ public const int STATS_PENDING_UPLOADS = 18;
+ public const int STATS_ACTIVE_SCRIPTS = 19;
+ public const int STATS_SCRIPT_LPS = 20;
}
}
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
{
return m_OSSL_Functions.osGetRegionMapTexture(regionName);
}
-
- public LSL_List osGetRegionStats()
- {
- return m_OSSL_Functions.osGetRegionStats();
- }
+
+ public LSL_List osGetRegionStats()
+ {
+ return m_OSSL_Functions.osGetRegionStats();
+ }
///
/// Returns the amount of memory in use by the Simulator Daemon.
@@ -649,7 +649,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
}
public void osKickAvatar(string FirstName,string SurName,string alert)
{
- m_OSSL_Functions.osKickAvatar( FirstName, SurName, alert);
+ m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
}
public void osSetSpeed(string UUID, float SpeedModifier)
{
--
cgit v1.1