mirror of
git://opensimulator.org/git/opensim
synced 2026-08-14 00:58:07 +00:00
very useless changes
This commit is contained in:
@@ -1582,6 +1582,5 @@ namespace OpenSim.Groups
|
||||
{
|
||||
return client is null ? UUID.Zero : client.AgentId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,8 +88,8 @@ namespace OpenSim.OfflineIM
|
||||
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
sendData["PrincipalID"] = principalID;
|
||||
Dictionary<string, object> ret = MakeRequest("GET", sendData);
|
||||
|
||||
Dictionary<string, object> ret = MakeRequest("GET", sendData);
|
||||
if (ret == null)
|
||||
return ims;
|
||||
|
||||
@@ -118,14 +118,12 @@ namespace OpenSim.OfflineIM
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ims;
|
||||
}
|
||||
|
||||
public bool StoreMessage(GridInstantMessage im, out string reason)
|
||||
{
|
||||
Dictionary<string, object> sendData = OfflineIMDataUtils.GridInstantMessage(im);
|
||||
|
||||
Dictionary<string, object> ret = MakeRequest("STORE", sendData);
|
||||
|
||||
if (ret == null)
|
||||
|
||||
@@ -163,6 +163,5 @@ namespace OpenSim.OfflineIM
|
||||
m_Database.Delete("PrincipalID", userID.ToString());
|
||||
m_Database.Delete("FromID", userID.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
|
||||
List<LLSDFetchInventoryDescendents> folders;
|
||||
List<UUID> bad_folders = new();
|
||||
|
||||
try
|
||||
{
|
||||
OSDArray foldersrequested = null;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace OpenSim.Framework.Capabilities
|
||||
{
|
||||
writer.Formatting = Formatting.None;
|
||||
|
||||
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "llsd", string.Empty);
|
||||
LLSDWriteOne(writer, obj);
|
||||
writer.WriteEndElement();
|
||||
writer.Flush();
|
||||
@@ -132,32 +132,32 @@ namespace OpenSim.Framework.Capabilities
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "undef", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "undef", string.Empty);
|
||||
writer.WriteEndElement();
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is string s)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "string", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "string", string.Empty);
|
||||
writer.WriteString(s);
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
else if (obj is int)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "integer", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "integer", string.Empty);
|
||||
writer.WriteString(obj.ToString());
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
else if (obj is double || obj is float)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "real", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "real", string.Empty);
|
||||
writer.WriteString(obj.ToString());
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
else if (obj is bool b)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "boolean", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "boolean", string.Empty);
|
||||
writer.WriteString(b ? "1" : "0");
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
@@ -167,7 +167,7 @@ namespace OpenSim.Framework.Capabilities
|
||||
}
|
||||
else if (obj is UUID u)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "uuid", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "uuid", string.Empty);
|
||||
writer.WriteString(u.ToString());
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
@@ -185,10 +185,10 @@ namespace OpenSim.Framework.Capabilities
|
||||
}
|
||||
else if (obj is Dictionary<string,object> dict)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "map", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "map", string.Empty);
|
||||
foreach (KeyValuePair<string,object> kvp in dict)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "key", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "key", string.Empty);
|
||||
writer.WriteString(kvp.Key);
|
||||
writer.WriteEndElement();
|
||||
LLSDWriteOne(writer, kvp.Value);
|
||||
@@ -197,7 +197,7 @@ namespace OpenSim.Framework.Capabilities
|
||||
}
|
||||
else if (obj is ArrayList a)
|
||||
{
|
||||
writer.WriteStartElement(String.Empty, "array", String.Empty);
|
||||
writer.WriteStartElement(string.Empty, "array", string.Empty);
|
||||
foreach (object item in a)
|
||||
{
|
||||
LLSDWriteOne(writer, item);
|
||||
|
||||
@@ -341,6 +341,7 @@ namespace OpenSim.Data.MySQL
|
||||
while (reader.Read())
|
||||
{
|
||||
SceneObjectPart prim = BuildPrim(reader);
|
||||
|
||||
if (reader["Shape"] is DBNull)
|
||||
prim.Shape = PrimitiveBaseShape.Default;
|
||||
else
|
||||
|
||||
@@ -295,7 +295,6 @@ namespace OpenSim.Data.MySQL
|
||||
ad.SimName = reader.GetString("simname");
|
||||
ad.GlobalPos = reader.GetString("posglobal");
|
||||
ad.ParcelName = reader.GetString("parcelname");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace OpenSim.Data.PGSQL
|
||||
{
|
||||
return (bool)value;
|
||||
}
|
||||
if (valueType == typeof(Byte[]))
|
||||
if (valueType == typeof(byte[]))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ CREATE TABLE Tmp_inventoryitems
|
||||
|
||||
|
||||
INSERT INTO Tmp_inventoryitems ("inventoryID", "assetID", "assetType", "parentFolderID", "avatarID", "inventoryName", "inventoryDescription", "inventoryNextPermissions", "inventoryCurrentPermissions", "invType", "creatorID", "inventoryBasePermissions", "inventoryEveryOnePermissions", "salePrice", "SaleType", "creationDate", "groupID", "groupOwned", "flags", "inventoryGroupPermissions")
|
||||
SELECT cast("inventoryID" as uuid), cast("assetID" as uuid), "assetType", cast("parentFolderID" as uuid), cast("avatarID" as uuid), "inventoryName", "inventoryDescription", "inventoryNextPermissions", "inventoryCurrentPermissions", "invType", cast("creatorID" as uuid), "inventoryBasePermissions", "inventoryEveryOnePermissions", "salePrice", "SaleType", "creationDate", cast("groupID" as uuid), "groupOwned", "flags", "inventoryGroupPermissions"
|
||||
SELECT cast("inventoryID" as uuid), cast("assetID" as uuid), "assetType", cast("parentFolderID" as uuid), cast("avatarID" as uuid), "inventoryName", "inventoryDescription", "inventoryNextPermissions", "inventoryCurrentPermissions", "invType", cast("creatorID" as uuid), "inventoryBasePermissions", "inventoryEveryOnePermissions", "salePrice", "saleType", "creationDate", cast("groupID" as uuid), "groupOwned", "flags", "inventoryGroupPermissions"
|
||||
FROM inventoryitems ;
|
||||
|
||||
DROP TABLE inventoryitems;
|
||||
|
||||
@@ -669,8 +669,6 @@ namespace OpenSim.Data.SQLite
|
||||
createdObjects.Add(group.UUID, group);
|
||||
retvals.Add(group);
|
||||
LoadItems(prim);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -1301,8 +1299,8 @@ namespace OpenSim.Data.SQLite
|
||||
createCol(shapes, "LastAttachPoint", typeof(Int32));
|
||||
// text TODO: this isn't right, but I'm not sure the right
|
||||
// way to specify this as a blob atm
|
||||
createCol(shapes, "Texture", typeof(Byte[]));
|
||||
createCol(shapes, "ExtraParams", typeof(Byte[]));
|
||||
createCol(shapes, "Texture", typeof(byte[]));
|
||||
createCol(shapes, "ExtraParams", typeof(byte[]));
|
||||
createCol(shapes, "Media", typeof(String));
|
||||
createCol(shapes, "MatOvrd", typeof(byte[]));
|
||||
shapes.PrimaryKey = new DataColumn[] { shapes.Columns["UUID"] };
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace OpenSim.Framework
|
||||
sb.AppendASCII($"{kvp.Key} {kvp.Value.Value} {kvp.Value.Key}\n");
|
||||
return OSUTF8Cached.GetArrayAndRelease(sb);
|
||||
}
|
||||
|
||||
/*
|
||||
public bool Validate(AnimationSetValidator val)
|
||||
{
|
||||
|
||||
@@ -216,7 +216,6 @@ namespace OpenSim.Framework
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -312,7 +311,6 @@ namespace OpenSim.Framework
|
||||
return controldata;
|
||||
}
|
||||
|
||||
|
||||
public void UnpackUpdateMessage(OSDMap args)
|
||||
{
|
||||
OSD osdtmp;
|
||||
|
||||
@@ -320,9 +320,7 @@ namespace OpenSim.Framework
|
||||
get
|
||||
{
|
||||
PrimitiveBaseShape boxShape = CreateBox();
|
||||
|
||||
boxShape.SetScale(0.5f);
|
||||
|
||||
return boxShape;
|
||||
}
|
||||
}
|
||||
@@ -1541,6 +1539,7 @@ namespace OpenSim.Framework
|
||||
|
||||
if (data is null || data.Length < 1)
|
||||
return;
|
||||
|
||||
int nentries = data[0];
|
||||
if (nentries > 128)
|
||||
return;
|
||||
|
||||
@@ -402,6 +402,5 @@ namespace OpenSim.Framework
|
||||
client?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace OpenSim.Framework.Servers
|
||||
{
|
||||
m_log.Info("[STARTUP]: Beginning startup processing");
|
||||
|
||||
m_log.Info("[STARTUP]: version: " + m_version);
|
||||
m_log.Info("[STARTUP]: Version: " + m_version);
|
||||
m_log.Info($"[STARTUP]: Operating system version: {Environment.OSVersion}, .NET platform {Util.RuntimePlatformStr}, Runtime {Environment.Version}");
|
||||
m_log.Info($"[STARTUP]: Processor Architecture: {RuntimeInformation.ProcessArchitecture}({(BitConverter.IsLittleEndian ? "le" : "be")} {(Environment.Is64BitProcess ? "64" : "32")}bit)");
|
||||
try
|
||||
|
||||
@@ -219,6 +219,7 @@ namespace OSHttpServer
|
||||
/// </remarks>
|
||||
public virtual void Cleanup()
|
||||
{
|
||||
|
||||
if (StreamPassedOff)
|
||||
return;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.Servers
|
||||
protected DateTime m_startuptime;
|
||||
protected string m_startupDirectory = Environment.CurrentDirectory;
|
||||
|
||||
protected string m_pidFile = String.Empty;
|
||||
protected string m_pidFile = string.Empty;
|
||||
|
||||
protected ServerStatsCollector m_serverStatsCollector;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace OpenSim.Framework.Servers
|
||||
|
||||
using (FileStream fs = File.Create(path))
|
||||
{
|
||||
Byte[] buf = Encoding.ASCII.GetBytes(pidstring);
|
||||
byte[] buf = Encoding.ASCII.GetBytes(pidstring);
|
||||
fs.Write(buf, 0, buf.Length);
|
||||
}
|
||||
|
||||
@@ -116,8 +116,7 @@ namespace OpenSim.Framework.Servers
|
||||
{
|
||||
m_log.Error($"[SERVER BASE]: Error whilst removing {m_pidFile}", e);
|
||||
}
|
||||
|
||||
m_pidFile = String.Empty;
|
||||
m_pidFile = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace OpenSim.Framework
|
||||
private readonly int m_mapStride;
|
||||
private readonly int m_mapPatchsStride;
|
||||
|
||||
|
||||
// legacy CompressionFactor
|
||||
public float CompressionFactor { get; private set; }
|
||||
|
||||
@@ -469,7 +468,6 @@ namespace OpenSim.Framework
|
||||
for (int jj = 0; jj < SizeY; jj++)
|
||||
{
|
||||
m_heightmap[ii, jj] = (float)pTerrain[ii, jj];
|
||||
|
||||
}
|
||||
}
|
||||
// m_log.DebugFormat("{0} new by doubles. sizeX={1}, sizeY={2}, sizeZ={3}", LogHeader, SizeX, SizeY, SizeZ);
|
||||
|
||||
@@ -316,7 +316,6 @@ namespace OpenSim.Framework
|
||||
return;
|
||||
|
||||
OSD otmp;
|
||||
|
||||
if (map.TryGetValue("day_cycle", out otmp) && otmp is OSDMap)
|
||||
{
|
||||
Cycle = new DayCycle();
|
||||
|
||||
@@ -533,7 +533,6 @@ namespace OpenSim.Framework
|
||||
{
|
||||
int reqnum = RequestNumber++;
|
||||
string method = (data is not null && data["RequestMethod"] is not null) ? data["RequestMethod"] : "unknown";
|
||||
|
||||
if (DebugLevel >= 3)
|
||||
m_log.Debug($"[LOGHTTP]: HTTP OUT {reqnum} ServiceForm '{method}' to {url}");
|
||||
|
||||
@@ -1150,7 +1149,7 @@ namespace OpenSim.Framework
|
||||
HttpResponseMessage responseMessage = null;
|
||||
HttpRequestMessage request = null;
|
||||
HttpClient client = null;
|
||||
string respstring = String.Empty;
|
||||
string respstring = string.Empty;
|
||||
int sendlen = 0;
|
||||
int rcvlen = 0;
|
||||
try
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace OpenSim
|
||||
|
||||
AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);
|
||||
|
||||
/*
|
||||
|
||||
// pre load System.Drawing.Common.dll for the platform
|
||||
// this will fail if a newer version is present on GAC, bin folder, etc, since LoadFrom only accepts the path, if it cannot find it elsewhere
|
||||
string targetdll = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"lib",
|
||||
|
||||
@@ -168,6 +168,5 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
_ = new BunchOfCaps(m_Scene, agentID, caps, ConfigOptions);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public float PhysicalPrimScaleMax = 10f;
|
||||
public int ObjectLinkedPartsMax = 512;
|
||||
|
||||
|
||||
public ModelCost(Scene scene)
|
||||
{
|
||||
PrimScaleMin = scene.m_minNonphys;
|
||||
@@ -152,7 +151,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
resources.instance_list == null ||
|
||||
resources.instance_list.Array.Count == 0)
|
||||
{
|
||||
error = "Missing model information.";
|
||||
error = "missing model information.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
if (avatarSkeleton)
|
||||
{
|
||||
error = "Model can only contain a avatar skeleton";
|
||||
error = "model can only contain a avatar skeleton";
|
||||
return false;
|
||||
}
|
||||
avatarSkeleton = true;
|
||||
|
||||
@@ -184,6 +184,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
if (m_ExportSupported)
|
||||
extrasMap["ExportSupported"] = true;
|
||||
|
||||
m_features["OpenSimExtras"] = extrasMap;
|
||||
}
|
||||
}
|
||||
@@ -434,7 +435,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
while ((s = sr.ReadLine()) is not null)
|
||||
{
|
||||
s = s.Trim(trimc);
|
||||
if (String.IsNullOrEmpty(s) || s.StartsWith("<!--"))
|
||||
if (string.IsNullOrEmpty(s) || s.StartsWith("<!--"))
|
||||
continue;
|
||||
sb.Append(s);
|
||||
}
|
||||
|
||||
@@ -414,7 +414,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
public int viewHeight { get; set; } = 480;
|
||||
public int viewWidth { get; set; } = 640;
|
||||
|
||||
|
||||
public UUID AgentId { get { return m_agentId; } }
|
||||
public UUID ScopeId { get { return m_scopeId; } }
|
||||
public ISceneAgent SceneAgent { get; set; }
|
||||
@@ -876,7 +875,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
0xff, 0xff, 0, 1, 148 // ID 148 (low frequency bigendian) zero encoded
|
||||
};
|
||||
|
||||
|
||||
public void SendRegionHandshake()
|
||||
{
|
||||
GetViewerCaps(); // make sure this is up to date
|
||||
@@ -3196,8 +3194,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
OutPacket(viewertime, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
|
||||
{
|
||||
ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
|
||||
@@ -3411,7 +3407,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||
@@ -8057,7 +8052,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
pathScaleY = 150;
|
||||
}
|
||||
|
||||
|
||||
// first is primFlags
|
||||
zc.AddUInt((uint)primflags);
|
||||
|
||||
@@ -9317,7 +9311,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y = avatar.AbsolutePosition.Y;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
c.OnSetStartLocationRequest?.Invoke(c, 0, avSetStartLocationRequestPacket.StartLocationData.LocationPos,
|
||||
avSetStartLocationRequestPacket.StartLocationData.LocationLookAt,
|
||||
@@ -9562,7 +9555,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
bool IsPhantom = (data[48] != 0) ? true : false;
|
||||
handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, this);
|
||||
*/
|
||||
bool UsePhysics = flags.AgentData.UsePhysics;
|
||||
bool UsePhysics = flags.AgentData.UsePhysics;
|
||||
bool IsPhantom = flags.AgentData.IsPhantom;
|
||||
bool IsTemporary = flags.AgentData.IsTemporary;
|
||||
ObjectFlagUpdatePacket.ExtraPhysicsBlock[] blocks = flags.ExtraPhysics;
|
||||
@@ -11202,7 +11195,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
private static void HandleGetScriptRunning(LLClientView c, Packet Pack)
|
||||
{
|
||||
GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
|
||||
|
||||
c.OnGetScriptRunning?.Invoke(c, scriptRunning.Script.ObjectID, scriptRunning.Script.ItemID);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
public CancellationTokenSource InboundCancellationSource = new();
|
||||
|
||||
|
||||
/// <summary>Returns true if the server is currently sending outbound packets, otherwise false</summary>
|
||||
/// <remarks>If IsRunningOut = false, then any request to send a packet is simply dropped.</remarks>
|
||||
internal bool m_IsRunningOutbound;
|
||||
@@ -200,7 +199,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
const int SIO_UDP_CONNRESET = -1744830452;
|
||||
|
||||
|
||||
m_udpSocket = new Socket( AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
|
||||
try
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
@@ -41,7 +41,6 @@ using CSJ2K;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
{
|
||||
@@ -137,9 +136,9 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
// If it's cached, return the cached results
|
||||
if (m_decodedCache.TryGetValue(assetID, out result))
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[J2KDecoderModule]: Returning existing cached {0} layers j2k decode for {1}",
|
||||
// result.Length, assetID);
|
||||
//m_log.DebugFormat(
|
||||
// "[J2KDecoderModule]: Returning existing cached {0} layers j2k decode for {1}",
|
||||
// result.Length, assetID);
|
||||
|
||||
callback(assetID, result);
|
||||
}
|
||||
@@ -186,7 +185,9 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||
public Image DecodeToImage(byte[] j2kData)
|
||||
{
|
||||
if (m_useCSJ2K)
|
||||
{
|
||||
return J2kImage.FromBytes(j2kData);
|
||||
}
|
||||
else
|
||||
{
|
||||
ManagedImage mimage;
|
||||
|
||||
@@ -53,7 +53,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
HGFriendsServicesConnector fConn = new(friendsServerURI);
|
||||
|
||||
List<UUID> friendsOnline = fConn.StatusNotification(ids, userID, online);
|
||||
|
||||
if (friendsOnline.Count > 0)
|
||||
{
|
||||
IClientAPI client = m_FriendsModule.LocateClientObject(userID);
|
||||
|
||||
@@ -206,7 +206,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Record the creator of this item for user record purposes (which might go away soon)
|
||||
m_userUuids[inventoryItem.CreatorIdAsUuid] = 1;
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
bool foreign = GetUserProfileServerURI(req.agent, out string serverURI);
|
||||
bool ok = serverURI.Length > 0;
|
||||
|
||||
Byte[] membershipType = new Byte[1];
|
||||
byte[] membershipType = new byte[1];
|
||||
string born = string.Empty;
|
||||
uint flags = 0x00;
|
||||
|
||||
@@ -729,6 +729,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
remoteClient.SendAgentAlertMessage("Error fetching classifieds", false);
|
||||
return;
|
||||
}
|
||||
|
||||
parameters = (OSDMap)osdtmp;
|
||||
OSDArray list = (OSDArray)parameters["result"];
|
||||
bool exists = list.Cast<OSDMap>().Where(map => map.ContainsKey("classifieduuid"))
|
||||
@@ -1809,7 +1810,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
/// </returns>
|
||||
bool GetProfileData(ref UserProfileProperties properties, bool foreign, string serverURI, out string message)
|
||||
{
|
||||
if (String.IsNullOrEmpty(serverURI))
|
||||
if (string.IsNullOrEmpty(serverURI))
|
||||
{
|
||||
message = "User profile service unknown at this time";
|
||||
return false;
|
||||
@@ -1887,7 +1888,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
// Is Foreign
|
||||
string home_url = UserManagementModule.GetUserServerURL(userID, "HomeURI", out bool recentFailedWeb);
|
||||
if (recentFailedWeb || String.IsNullOrEmpty(home_url))
|
||||
if (recentFailedWeb || string.IsNullOrEmpty(home_url))
|
||||
return false;
|
||||
|
||||
UserAgentServiceConnector uConn = new(home_url);
|
||||
@@ -1995,6 +1996,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
Services.Interfaces.PresenceInfo[] pi = Scene.PresenceService?.GetAgents(new string[] { agent.ToString() });
|
||||
return pi is not null && pi.Length > 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
MaxConnectionsPerServer = maxThreads < 10 ? maxThreads : 10,
|
||||
PooledConnectionLifetime = TimeSpan.FromMinutes(3)
|
||||
};
|
||||
|
||||
//shhnc.SslOptions.ClientCertificates = null,
|
||||
shh.SslOptions.EnabledSslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13;
|
||||
shh.SslOptions.CertificateRevocationCheckMode = X509RevocationMode.NoCheck;
|
||||
@@ -579,7 +580,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
public int MaxRedirects { get; set; } = 10;
|
||||
|
||||
public string OutboundBody;
|
||||
|
||||
public string ResponseBody;
|
||||
public Dictionary<string, string> Headers;
|
||||
public int Status;
|
||||
|
||||
+1
-2
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
string serviceDll = inventoryConfig.GetString("LocalServiceModule", String.Empty);
|
||||
string serviceDll = inventoryConfig.GetString("LocalServiceModule", string.Empty);
|
||||
|
||||
if (serviceDll.Length == 0)
|
||||
{
|
||||
@@ -198,7 +198,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||
}
|
||||
|
||||
return invColl;
|
||||
|
||||
}
|
||||
|
||||
public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
|
||||
|
||||
@@ -210,7 +210,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// mapTile.Save( // DEBUG DEBUG
|
||||
// String.Format("maptiles/raw-{0}-{1}-{2}.jpg", regionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY),
|
||||
// ImageFormat.Jpeg);
|
||||
|
||||
@@ -147,9 +147,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
if (options.ContainsKey("all") && (bool)options["all"])
|
||||
MultiRegionFormat = true;
|
||||
|
||||
|
||||
if (options.ContainsKey("noassets") && (bool)options["noassets"])
|
||||
SaveAssets = false;
|
||||
|
||||
|
||||
if (options.TryGetValue("checkPermissions", out Object temp))
|
||||
FilterContent = (string)temp;
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
|
||||
foreach (KeyValuePair<UUID, sbyte> kvp in m_uuids)
|
||||
{
|
||||
|
||||
string thiskey = kvp.Key.ToString();
|
||||
try
|
||||
{
|
||||
|
||||
@@ -2322,7 +2322,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
land.LandData.AuthBuyerID = UUID.Zero;
|
||||
land.LandData.Category = ParcelCategory.None;
|
||||
land.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
|
||||
land.LandData.Description = String.Empty;
|
||||
land.LandData.Description = string.Empty;
|
||||
land.LandData.Dwell = 0;
|
||||
land.LandData.Flags = (uint)ParcelFlags.AllowFly | (uint)ParcelFlags.AllowLandmark |
|
||||
(uint)ParcelFlags.AllowAPrimitiveEntry |
|
||||
@@ -2337,9 +2337,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
land.LandData.MediaID = UUID.Zero;
|
||||
land.LandData.MediaLoop = false;
|
||||
land.LandData.MediaType = "none/none";
|
||||
land.LandData.MediaURL = String.Empty;
|
||||
land.LandData.MediaURL = string.Empty;
|
||||
land.LandData.MediaWidth = 0;
|
||||
land.LandData.MusicURL = String.Empty;
|
||||
land.LandData.MusicURL = string.Empty;
|
||||
land.LandData.ObscureMedia = false;
|
||||
land.LandData.ObscureMusic = false;
|
||||
land.LandData.OtherCleanTime = 0;
|
||||
@@ -2376,11 +2376,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
private void ClientOnSimWideDeletes(IClientAPI client, UUID agentID, int flags, UUID targetID)
|
||||
{
|
||||
if(!((Scene)client.Scene).TryGetScenePresence(client.AgentId, out ScenePresence SP))
|
||||
if(!((Scene)client.Scene).TryGetScenePresence(client.AgentId, out ScenePresence sp))
|
||||
return;
|
||||
|
||||
List<SceneObjectGroup> returns = new();
|
||||
if (SP.GodController.UserLevel != 0)
|
||||
if (sp.GodController.UserLevel != 0)
|
||||
{
|
||||
if (flags == 0) //All parcels, scripted or not
|
||||
{
|
||||
|
||||
@@ -1779,7 +1779,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
foreach (SceneObjectGroup obj in primsOverMe)
|
||||
{
|
||||
if (!ownersAndCount.ContainsKey(obj.OwnerID))
|
||||
|
||||
@@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
|
||||
Enabled = true;
|
||||
|
||||
|
||||
m_log.InfoFormat("[{0}]: Module is enabled.", Name);
|
||||
}
|
||||
|
||||
@@ -777,7 +776,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
Name, m_scene.Name, e.Message, e.StackTrace);
|
||||
|
||||
success = false;
|
||||
fail_reason = String.Format("Environment Set for region {0} has failed, settings not saved.", m_scene.Name);
|
||||
fail_reason = string.Format("Environment Set for region {0} has failed, settings not saved.", m_scene.Name);
|
||||
}
|
||||
|
||||
Error:
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
return m_friendsModule;
|
||||
}
|
||||
}
|
||||
|
||||
private IGroupsModule m_groupsModule;
|
||||
private IGroupsModule GroupsModule
|
||||
{
|
||||
|
||||
@@ -222,7 +222,6 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
return;
|
||||
if (!ssp.ParcelAllowThisAvatarSounds)
|
||||
return;
|
||||
|
||||
radius = MaxDistance;
|
||||
}
|
||||
else
|
||||
@@ -236,7 +235,6 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
|
||||
if (!ssp.ParcelAllowThisAvatarSounds)
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
radius = (float)part.SoundRadius;
|
||||
|
||||
@@ -172,7 +172,6 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
detailTexture[i].Save(stream, ImageFormat.Png);
|
||||
data = stream.ToArray();
|
||||
}
|
||||
|
||||
// Cache a PNG copy of this terrain texture
|
||||
AssetBase newAsset = new AssetBase
|
||||
{
|
||||
@@ -278,7 +277,6 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
mapColorsBlue[t] = DEFAULT_TERRAIN_COLOR[t].B;
|
||||
}
|
||||
}
|
||||
|
||||
#region Layer Map
|
||||
|
||||
float xFactor = terrain.Width / twidth;
|
||||
|
||||
@@ -431,6 +431,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ResetLinksetData - clear the list and update the accounting.
|
||||
/// </summary>
|
||||
@@ -524,6 +525,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
catch { }
|
||||
ms.SetLength(0);
|
||||
}
|
||||
|
||||
public static LinksetData FromBin(byte[] data)
|
||||
{
|
||||
if (data.Length < 8)
|
||||
|
||||
@@ -92,7 +92,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//m_log.InfoFormat("[SCENE]: Starting scripts in {0}, please wait.", RegionInfo.RegionName);
|
||||
|
||||
IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>();
|
||||
|
||||
foreach (IScriptModule engine in engines)
|
||||
engine.StartProcessing();
|
||||
}
|
||||
@@ -1175,7 +1174,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// special AnimationSet case
|
||||
if (item.InvType == (int)CustomInventoryType.AnimationSet)
|
||||
AnimationSet.enforceItemPermitions(item,true);
|
||||
|
||||
if (AddInventoryItem(item))
|
||||
{
|
||||
remoteClient.SendInventoryItemCreateUpdate(item, callbackID);
|
||||
@@ -2972,7 +2970,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// and on ALL contents of ALL prims, he may loose rights, making the object useless
|
||||
sog.ApplyNextOwnerPermissions();
|
||||
sog.InvalidateEffectivePerms();
|
||||
|
||||
sog.ScheduleGroupForFullUpdate();
|
||||
|
||||
SceneObjectPart[] partList = sog.Parts;
|
||||
|
||||
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
IConfig restartConfig = config.Configs["RestartModule"];
|
||||
if (restartConfig is not null)
|
||||
{
|
||||
string markerPath = restartConfig.GetString("MarkerPath", String.Empty);
|
||||
string markerPath = restartConfig.GetString("MarkerPath", string.Empty);
|
||||
if (!string.IsNullOrEmpty(markerPath))
|
||||
{
|
||||
string path = Path.Combine(markerPath, RegionInfo.RegionID.ToString() + ".started");
|
||||
@@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
IConfig restartConfig = m_config.Configs["RestartModule"];
|
||||
if (restartConfig is not null)
|
||||
{
|
||||
string markerPath = restartConfig.GetString("MarkerPath", String.Empty);
|
||||
string markerPath = restartConfig.GetString("MarkerPath", string.Empty);
|
||||
|
||||
if (!string.IsNullOrEmpty(markerPath))
|
||||
{
|
||||
@@ -4385,7 +4385,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because: {4}",
|
||||
agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1303,6 +1303,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_scenePartsLock.ExitReadLock();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a part contained in this scene.
|
||||
/// </summary>
|
||||
@@ -2229,7 +2230,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (!m_scenePartsByID.ContainsKey(part.UUID))
|
||||
{
|
||||
|
||||
if (part.GetPrimType() == PrimType.SCULPT)
|
||||
m_numMesh++;
|
||||
else
|
||||
|
||||
@@ -183,7 +183,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
taskItem.NextPermissions = item.NextPermissions;
|
||||
}
|
||||
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}",
|
||||
// taskItem.Flags, taskItem.Name, localID, remoteClient.Name);
|
||||
@@ -201,7 +200,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop);
|
||||
part.ParentGroup.InvalidateDeepEffectivePerms();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1829,7 +1829,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
Vector3 offset = Vector3.Zero;
|
||||
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
SceneObjectPart p = parts[i];
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public bool IsRoot
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return Object.ReferenceEquals(ParentGroup.RootPart, this); }
|
||||
get { return object.ReferenceEquals(ParentGroup.RootPart, this); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -733,7 +733,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
set { m_scriptAccessPin = (int)value; }
|
||||
}
|
||||
|
||||
public Byte[] TextureAnimation
|
||||
public byte[] TextureAnimation
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_TextureAnimation; }
|
||||
@@ -815,6 +815,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
set
|
||||
{
|
||||
m_groupPosition = value;
|
||||
|
||||
PhysicsActor actor = PhysActor;
|
||||
if (actor != null && ParentGroup.Scene.PhysicsScene != null)
|
||||
{
|
||||
@@ -2535,7 +2536,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return pa is null ? AbsolutePosition : pa.CenterOfMass;
|
||||
}
|
||||
|
||||
|
||||
public Vector3 GetForce()
|
||||
{
|
||||
return Force;
|
||||
@@ -4489,6 +4489,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val, data);
|
||||
}
|
||||
|
||||
|
||||
public void TrimPermissions()
|
||||
{
|
||||
BaseMask &= (uint)(PermissionMask.All | PermissionMask.Export);
|
||||
@@ -5706,7 +5707,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public Byte[] SerializeAnimations()
|
||||
public byte[] SerializeAnimations()
|
||||
{
|
||||
if (AnimationsNames == null)
|
||||
return null;
|
||||
@@ -5740,7 +5741,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void DeSerializeAnimations(Byte[] data)
|
||||
public void DeSerializeAnimations(byte[] data)
|
||||
{
|
||||
if(data == null)
|
||||
{
|
||||
|
||||
@@ -1131,6 +1131,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<TaskInventoryItem> GetInventoryItems(ReadOnlySpan<char> name)
|
||||
{
|
||||
List<TaskInventoryItem> items = [];
|
||||
@@ -1497,7 +1498,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData);
|
||||
client.SendTaskInventory(m_part.UUID, (short)m_inventoryFileNameSerial,
|
||||
m_inventoryFileNameBytes);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -532,7 +532,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
private readonly object m_originRegionIDAccessLock = new();
|
||||
|
||||
|
||||
private AutoResetEvent m_updateAgentReceivedAfterTransferEvent = new(false);
|
||||
|
||||
/// <summary>
|
||||
@@ -1713,6 +1712,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SendKillTo(p);
|
||||
}
|
||||
});
|
||||
|
||||
m_scene.AuthenticateHandler.UpdateAgentChildStatus(ControllingClient.CircuitCode, true);
|
||||
|
||||
m_scene.EventManager.TriggerOnMakeChildAgent(this);
|
||||
@@ -3287,7 +3287,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
private void SendSitResponse(UUID targetID, Vector3 offset, Quaternion sitOrientation)
|
||||
{
|
||||
|
||||
SceneObjectPart part = FindNextAvailableSitTarget(targetID);
|
||||
if (part == null)
|
||||
return;
|
||||
@@ -3646,10 +3645,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_AngularVelocity = Vector3.Zero;
|
||||
Velocity = Vector3.Zero;
|
||||
|
||||
|
||||
SendAvatarDataToAllAgents();
|
||||
|
||||
if (String.IsNullOrEmpty(part.SitAnimation))
|
||||
if (string.IsNullOrEmpty(part.SitAnimation))
|
||||
sitAnimation = "SIT";
|
||||
else
|
||||
sitAnimation = part.SitAnimation;
|
||||
|
||||
@@ -334,7 +334,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||
// We override that here
|
||||
if (originalLinkNum != 0)
|
||||
part.LinkNum = originalLinkNum;
|
||||
|
||||
}
|
||||
|
||||
XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion");
|
||||
@@ -841,7 +840,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||
private static void ProcessVehicle(SceneObjectPart obj, XmlReader reader)
|
||||
{
|
||||
SOPVehicle vehicle = SOPVehicle.FromXml2(reader);
|
||||
|
||||
if (vehicle == null)
|
||||
{
|
||||
obj.VehicleParams = null;
|
||||
|
||||
@@ -947,7 +947,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
if (ed < 0)
|
||||
return -1;
|
||||
|
||||
h = data.SubUTF8(st, ed - st);
|
||||
h.SelfTrim();
|
||||
++ed;
|
||||
@@ -1015,7 +1014,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// bad ugly
|
||||
private static readonly byte[] UUIDB = osUTF8.GetASCIIBytes("UUID");
|
||||
private static readonly byte[] uuidB = osUTF8.GetASCIIBytes("uuid");
|
||||
|
||||
@@ -388,7 +388,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
|
||||
{
|
||||
if (client is IStatsCollector collector)
|
||||
{
|
||||
|
||||
bool isChild = client.SceneAgent.IsChildAgent;
|
||||
if (isChild && !showChildren)
|
||||
return;
|
||||
|
||||
@@ -982,7 +982,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||
|
||||
broll /= m_bankingTimescale;
|
||||
|
||||
|
||||
tmpV = Vector3.UnitZRotated(irotq);
|
||||
tmpV *= broll;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using OpenMetaverse;
|
||||
|
||||
|
||||
@@ -180,15 +179,15 @@ namespace PrimMesher
|
||||
if (stopAngle <= startAngle)
|
||||
throw new Exception("stopAngle not greater than startAngle");
|
||||
|
||||
Angle[] sourceAngles = sides switch
|
||||
{
|
||||
3 => angles3,
|
||||
4 => angles4,
|
||||
6 => angles6,
|
||||
12 => angles12,
|
||||
Angle[] sourceAngles = sides switch
|
||||
{
|
||||
3 => angles3,
|
||||
4 => angles4,
|
||||
6 => angles6,
|
||||
12 => angles12,
|
||||
24 => angles24,
|
||||
_ => null
|
||||
};
|
||||
};
|
||||
|
||||
if (sourceAngles != null)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,6 @@ using OpenMetaverse;
|
||||
|
||||
namespace PrimMesher
|
||||
{
|
||||
|
||||
public class SculptMesh
|
||||
{
|
||||
public List<Vector3> coords;
|
||||
|
||||
@@ -579,7 +579,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
[DebuggerNonUserCode]
|
||||
public void llResetScript()
|
||||
{
|
||||
|
||||
// We need to tell the URL module, if we hav one, to release
|
||||
// the allocated URLs
|
||||
m_UrlModule?.ScriptRemoved(m_item.ItemID);
|
||||
@@ -1314,7 +1313,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (gr is not null)
|
||||
return gr.GroupName;
|
||||
}
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return SensedObject.Name;
|
||||
@@ -1680,7 +1679,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llSetContentType(LSL_Key reqid, LSL_Integer type)
|
||||
{
|
||||
|
||||
if (m_UrlModule == null)
|
||||
return;
|
||||
|
||||
@@ -2228,7 +2226,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llScaleTexture(double u, double v, int face)
|
||||
{
|
||||
|
||||
ScaleTexture(m_host, u, v, face);
|
||||
ScriptSleep(m_sleepMsOnScaleTexture);
|
||||
}
|
||||
@@ -2532,7 +2529,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llSetRot(LSL_Rotation rot)
|
||||
{
|
||||
|
||||
// try to let this work as in SL...
|
||||
if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart))
|
||||
{
|
||||
@@ -2999,7 +2995,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// </summary>
|
||||
public LSL_String llGetSubString(string src, int start, int end)
|
||||
{
|
||||
|
||||
// Normalize indices (if negative).
|
||||
// After normlaization they may still be
|
||||
// negative, but that is now relative to
|
||||
@@ -3936,7 +3931,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Float llGetMass()
|
||||
{
|
||||
|
||||
if (m_host.ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence attachedAvatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
|
||||
@@ -4391,7 +4385,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void llStopAnimation(string anim)
|
||||
{
|
||||
|
||||
@@ -4965,7 +4958,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_String llGetLinkName(int linknum)
|
||||
{
|
||||
|
||||
ISceneEntity entity = GetLinkEntity(m_host, linknum);
|
||||
return (entity is null) ? ScriptBaseClass.NULL_KEY : entity.Name;
|
||||
}
|
||||
@@ -5117,7 +5109,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
if (visualparams.Length < 1)
|
||||
return new LSL_List();
|
||||
|
||||
if (UUID.TryParse(id, out UUID agentid))
|
||||
{
|
||||
ScenePresence agent = World.GetScenePresence(agentid);
|
||||
@@ -5125,7 +5116,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return new LSL_List();
|
||||
|
||||
LSL_List returns = new LSL_List();
|
||||
|
||||
for (int i = 0; i < visualparams.Length; i++)
|
||||
{
|
||||
int val = visualparams[i].ToString() switch
|
||||
@@ -5154,7 +5144,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
returns.Add(fval.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
if (returns.Length > 0)
|
||||
return returns;
|
||||
}
|
||||
@@ -5273,7 +5262,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
Error("llRequestAgentData","Invalid UUID passed to llRequestAgentData.");
|
||||
}
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
//bad if lm is HG
|
||||
@@ -5281,7 +5270,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
void act(string eventID)
|
||||
{
|
||||
string reply = String.Empty;
|
||||
string reply = string.Empty;
|
||||
foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems())
|
||||
{
|
||||
if (item.Type == 3 && item.Name == name)
|
||||
@@ -5685,7 +5674,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
float scaling_factor = 1f;
|
||||
scaling_factor *= distance_attenuation;
|
||||
applied_linear_impulse *= scaling_factor;
|
||||
|
||||
}
|
||||
|
||||
if (pusheeIsAvatar)
|
||||
@@ -5720,8 +5708,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_String llGetScriptName()
|
||||
{
|
||||
|
||||
return m_item.Name ?? String.Empty;
|
||||
return m_item.Name ?? string.Empty;
|
||||
}
|
||||
|
||||
public LSL_Integer llGetLinkNumberOfSides(int link)
|
||||
@@ -5741,7 +5728,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Integer llGetNumberOfSides()
|
||||
{
|
||||
|
||||
return m_host.GetNumberOfSides();
|
||||
}
|
||||
|
||||
@@ -5755,7 +5741,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2))
|
||||
public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle)
|
||||
{
|
||||
|
||||
double x, y, z, s, t;
|
||||
|
||||
s = Math.Cos(angle * 0.5);
|
||||
@@ -5775,7 +5760,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// <param name='rot'></param>
|
||||
public LSL_Vector llRot2Axis(LSL_Rotation rot)
|
||||
{
|
||||
|
||||
rot.Normalize();
|
||||
|
||||
double s = Math.Sqrt(1 - rot.s * rot.s);
|
||||
@@ -5792,7 +5776,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// Returns the angle of a quaternion (see llRot2Axis for the axis)
|
||||
public LSL_Float llRot2Angle(LSL_Rotation rot)
|
||||
{
|
||||
|
||||
rot.Normalize();
|
||||
|
||||
double angle = 2 * Math.Acos(rot.s);
|
||||
@@ -5815,7 +5798,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// jcochran 5/jan/2012
|
||||
public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b)
|
||||
{
|
||||
|
||||
double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s);
|
||||
double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s);
|
||||
double aa_bb = aa * bb;
|
||||
@@ -5828,7 +5810,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Key llGetInventoryKey(string name)
|
||||
{
|
||||
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
|
||||
if (item is null)
|
||||
return ScriptBaseClass.NULL_KEY;
|
||||
@@ -6070,7 +6051,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if(item is LSL_Vector vec)
|
||||
return vec;
|
||||
|
||||
if (item is LSL_String lsv)
|
||||
return new LSL_Vector(lsv);
|
||||
if (item is string sv) // xengine sees string
|
||||
@@ -6140,7 +6120,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Process the supplied list and return the
|
||||
/// content of the list formatted as a comma
|
||||
@@ -6280,8 +6259,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride)
|
||||
{
|
||||
if (start < 0)
|
||||
@@ -6357,6 +6334,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (end < 0)
|
||||
end = 0;
|
||||
}
|
||||
|
||||
if (start > end)
|
||||
{
|
||||
start = 0;
|
||||
@@ -6369,8 +6347,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (end >= src.Length)
|
||||
end = src.Length - 1;
|
||||
}
|
||||
|
||||
if (stride < 1)
|
||||
stride = 1;
|
||||
|
||||
if (stride_index < 0)
|
||||
{
|
||||
stride_index += stride;
|
||||
@@ -6379,6 +6359,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else if (stride_index >= stride)
|
||||
return new LSL_List();
|
||||
|
||||
int size;
|
||||
if (stride > 1)
|
||||
{
|
||||
@@ -6388,6 +6369,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
sst *= stride;
|
||||
if (sst != start)
|
||||
start = sst + stride;
|
||||
|
||||
if (start > end)
|
||||
return new LSL_List();
|
||||
}
|
||||
@@ -6400,6 +6382,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else
|
||||
size = end - start + 1;
|
||||
|
||||
object[] res = new object[size];
|
||||
int j = 0;
|
||||
for (int i = start; i <= end; i += stride, j++)
|
||||
@@ -6548,6 +6531,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the index of the first occurrence of test
|
||||
/// in src.
|
||||
@@ -6675,7 +6660,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -7080,7 +7064,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Key llName2Key(LSL_String name)
|
||||
{
|
||||
|
||||
if(string.IsNullOrWhiteSpace(name))
|
||||
return ScriptBaseClass.NULL_KEY;
|
||||
|
||||
@@ -7107,7 +7090,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Key llRequestUserKey(LSL_String username)
|
||||
{
|
||||
|
||||
if (string.IsNullOrWhiteSpace(username))
|
||||
return ScriptBaseClass.NULL_KEY;
|
||||
|
||||
@@ -7220,7 +7202,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
private static void SetTextureAnim(SceneObjectPart part, int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
{
|
||||
|
||||
//ALL_SIDES
|
||||
if (face == ScriptBaseClass.ALL_SIDES)
|
||||
face = 255;
|
||||
@@ -7481,7 +7462,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_List llGetAttachedList(LSL_Key id)
|
||||
{
|
||||
|
||||
if(!UUID.TryParse(id, out UUID avID) || avID.IsZero())
|
||||
return new LSL_List("NOT_FOUND");
|
||||
|
||||
@@ -9003,7 +8983,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llSetPrimitiveParams(LSL_List rules)
|
||||
{
|
||||
|
||||
SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams");
|
||||
|
||||
ScriptSleep(m_sleepMsOnSetPrimitiveParams);
|
||||
@@ -9011,7 +8990,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
|
||||
{
|
||||
|
||||
SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams");
|
||||
|
||||
ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams);
|
||||
@@ -9019,7 +8997,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules)
|
||||
{
|
||||
|
||||
SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast");
|
||||
}
|
||||
|
||||
@@ -12888,7 +12865,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
int i, j;
|
||||
string d;
|
||||
|
||||
|
||||
/*
|
||||
* Convert separator and spacer lists to C# strings.
|
||||
* Also filter out null strings so we don't hang.
|
||||
@@ -13172,7 +13148,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (item is null)
|
||||
{
|
||||
Error("llGetInventoryCreator", $"Can't find item '{itemName}'");
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return item.CreatorID.ToString();
|
||||
@@ -13180,7 +13156,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_String llGetInventoryAcquireTime(string itemName)
|
||||
{
|
||||
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName);
|
||||
if (item is null)
|
||||
{
|
||||
@@ -13405,7 +13380,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
LSL_List pref;
|
||||
|
||||
|
||||
// Note that although we have normalized, both
|
||||
// indices could still be negative.
|
||||
if (start < 0)
|
||||
@@ -13785,7 +13759,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later)
|
||||
for (int i = 0; i < aList.Data.Length; i++)
|
||||
{
|
||||
|
||||
if (aList.Data[i] != null)
|
||||
{
|
||||
switch ((ParcelMediaCommandEnum) Convert.ToInt32(aList.Data[i].ToString()))
|
||||
@@ -13838,7 +13811,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Integer llGetInventoryType(string name)
|
||||
{
|
||||
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
|
||||
return item is null ? -1 : item.Type;
|
||||
}
|
||||
@@ -13887,7 +13859,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Rotation llGetCameraRot()
|
||||
{
|
||||
|
||||
if (m_item.PermsGranter.IsZero())
|
||||
return LSL_Rotation.Identity;
|
||||
|
||||
@@ -14697,7 +14668,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return reqID.IsZero() ? string.Empty : reqID.ToString();
|
||||
}
|
||||
|
||||
|
||||
public void llHTTPResponse(LSL_Key id, int status, string body)
|
||||
{
|
||||
// Partial implementation: support for parameter flags needed
|
||||
@@ -14800,7 +14770,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Integer llGetObjectPrimCount(LSL_Key object_id)
|
||||
{
|
||||
|
||||
if(!UUID.TryParse(object_id, out UUID id) || id.IsZero())
|
||||
return 0;
|
||||
|
||||
@@ -15198,7 +15167,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_ROT:
|
||||
Quaternion rot;
|
||||
|
||||
if (obj.ParentGroup.IsAttachment)
|
||||
{
|
||||
ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar);
|
||||
@@ -15844,7 +15812,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
void act(string eventID)
|
||||
{
|
||||
string name = String.Empty;
|
||||
string name = string.Empty;
|
||||
ScenePresence presence = World.GetScenePresence(key);
|
||||
if (presence is not null)
|
||||
{
|
||||
@@ -17385,7 +17353,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llGodLikeRezObject(string inventory, LSL_Vector pos)
|
||||
{
|
||||
|
||||
if (!World.Permissions.IsGod(m_host.OwnerID))
|
||||
NotImplemented("llGodLikeRezObject");
|
||||
|
||||
@@ -18097,7 +18064,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return LSL_String.Empty;
|
||||
}
|
||||
|
||||
string state = String.Empty;
|
||||
string state = string.Empty;
|
||||
|
||||
foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
|
||||
{
|
||||
|
||||
@@ -529,7 +529,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
if ((m_item.CurrentPermissions & (uint)PermissionMask.Modify) != 0)
|
||||
return $"{function} permission denied. Script creator is not prim owner";
|
||||
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
@@ -3175,7 +3174,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
|
||||
ScenePresence sp = World.GetScenePresence(npcId);
|
||||
|
||||
if (sp is not null)
|
||||
sp.Rotation = rotation;
|
||||
}
|
||||
@@ -5672,7 +5670,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
== (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
|
||||
ret.Add(inv.Value.ItemID.ToString());
|
||||
}
|
||||
|
||||
m_host.TaskInventory.LockItemsForRead(false);
|
||||
return ret;
|
||||
}
|
||||
@@ -5735,7 +5732,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void osRemoveLinkInventory(LSL_Integer linkNumber, LSL_String name)
|
||||
{
|
||||
|
||||
SceneObjectPart part = GetSingleLinkPart(linkNumber);
|
||||
if(part == null)
|
||||
return;
|
||||
@@ -5780,7 +5776,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if(!World.TryGetScenePresence(destId, out ScenePresence _))
|
||||
{
|
||||
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, destId);
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
GridUserInfo info = World.GridUserService.GetGridUserInfo(destId.ToString());
|
||||
@@ -5982,7 +5977,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_UrlModule?.ScriptRemoved(me);
|
||||
|
||||
m_ScriptEngine.ApiResetScript(me);
|
||||
|
||||
}
|
||||
|
||||
public LSL_Integer osIsNotValidNumber(LSL_Float v)
|
||||
@@ -6186,7 +6180,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
bool changed = false;
|
||||
if (!string.IsNullOrEmpty(daycycle) && (daycycle != ScriptBaseClass.NULL_KEY))
|
||||
{
|
||||
|
||||
UUID envID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, daycycle);
|
||||
if (envID.IsZero())
|
||||
return -4;
|
||||
|
||||
@@ -175,7 +175,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
newSenseRepeaters.Add(ts);
|
||||
}
|
||||
}
|
||||
|
||||
SenseRepeaters = newSenseRepeaters;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,7 +470,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_String llXorBase64StringsCorrect(string str1, string str2);
|
||||
LSL_Integer llGetLinkNumberOfSides(LSL_Integer link);
|
||||
void llSetPhysicsMaterial(int material_bits, LSL_Float material_gravity_modifier, LSL_Float material_restitution, LSL_Float material_friction, LSL_Float material_density);
|
||||
|
||||
void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules, string originFunc);
|
||||
void llSetKeyframedMotion(LSL_List frames, LSL_List options);
|
||||
LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
|
||||
@@ -484,7 +483,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_String llJsonSetValue(LSL_String json, LSL_List specifiers, LSL_String value);
|
||||
LSL_String llJsonValueType(LSL_String json, LSL_List specifiers);
|
||||
|
||||
|
||||
LSL_Integer llGetDayLength();
|
||||
LSL_Integer llGetRegionDayLength();
|
||||
LSL_Integer llGetDayOffset();
|
||||
|
||||
@@ -1754,6 +1754,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
return m_OSSL_Functions.osGetParcelIDs();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Key osGetParcelID()
|
||||
{
|
||||
|
||||
@@ -602,7 +602,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
double invLength = 1.0 / Math.Sqrt(lengthsq);
|
||||
x *= invLength;
|
||||
y *= invLength;
|
||||
@@ -909,7 +908,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return new LSL_Types.LSLFloat(io);
|
||||
if (o is float fo)
|
||||
return new LSL_Types.LSLFloat(fo);
|
||||
if (o is Double dov)
|
||||
if (o is double dov)
|
||||
return new LSL_Types.LSLFloat(dov);
|
||||
if (o is LSL_Types.LSLString lso)
|
||||
return new LSL_Types.LSLFloat(lso.m_string);
|
||||
@@ -1008,7 +1007,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
o is not null ? o.GetType().Name : "null"));
|
||||
}
|
||||
|
||||
|
||||
public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex)
|
||||
{
|
||||
object o = Data[itemIndex];
|
||||
@@ -1300,7 +1298,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
public list GetSublist(int start, int end)
|
||||
{
|
||||
|
||||
object[] ret;
|
||||
|
||||
// Take care of neg start or end's
|
||||
@@ -1324,7 +1321,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
if (start <= end)
|
||||
{
|
||||
|
||||
// Start sublist beyond length
|
||||
// Also deals with start AND end still negative
|
||||
if (start >= Data.Length || end < 0)
|
||||
@@ -1339,7 +1335,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
start = 0;
|
||||
|
||||
ret = new object[end - start + 1];
|
||||
|
||||
Array.Copy(Data, start, ret, 0, end - start + 1);
|
||||
|
||||
return new list(ret);
|
||||
@@ -1350,9 +1345,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
list result;
|
||||
|
||||
// If end is negative, then prefix list is empty
|
||||
if (end < 0)
|
||||
{
|
||||
@@ -1967,9 +1960,9 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
public string ToCSV()
|
||||
{
|
||||
if (m_data is null || m_data.Length == 0)
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
|
||||
Object o = m_data[0];
|
||||
object o = m_data[0];
|
||||
int len = m_data.Length;
|
||||
if (len == 1)
|
||||
return o.ToString();
|
||||
@@ -1987,7 +1980,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
private string ToSoup()
|
||||
{
|
||||
if (m_data is null || m_data.Length == 0)
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
|
||||
StringBuilder sb = osStringBuilderCache.Acquire();
|
||||
foreach (object o in m_data)
|
||||
@@ -2420,7 +2413,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
}
|
||||
}
|
||||
|
||||
static public implicit operator String(LSLString s)
|
||||
static public implicit operator string(LSLString s)
|
||||
{
|
||||
return s.m_string;
|
||||
}
|
||||
@@ -2658,7 +2651,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Operators
|
||||
@@ -3140,7 +3132,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format(Culture.FormatProvider, "{0:0.000000}", this.value);
|
||||
return string.Format(Culture.FormatProvider, "{0:0.000000}", this.value);
|
||||
}
|
||||
|
||||
public override bool Equals(Object o)
|
||||
@@ -3155,7 +3147,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
return value.GetHashCode();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
|
||||
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
|
||||
@@ -43,7 +44,6 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief This class is used to catalog the code emit routines based on a key string
|
||||
* The key string has the two types (eg, "integer", "rotation") and the operator (eg, "*", "!=")
|
||||
|
||||
@@ -39,10 +39,8 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
{
|
||||
|
||||
public class ScriptConst
|
||||
{
|
||||
|
||||
public static Dictionary<string, ScriptConst> scriptConstants = Init();
|
||||
|
||||
/**
|
||||
@@ -225,7 +223,6 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
CompValu z = new CompValuFloat(new TokenTypeFloat(null), v.z);
|
||||
cv = new CompValuVec(new TokenTypeVec(null), x, y, z);
|
||||
}
|
||||
|
||||
else if (value is OpenMetaverse.Quaternion or)
|
||||
{
|
||||
CompValu x = new CompValuFloat(new TokenTypeFloat(null), or.X);
|
||||
|
||||
@@ -4207,7 +4207,6 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
TokenList values = null;
|
||||
while(true)
|
||||
{
|
||||
|
||||
// open brace means start a (sub-)list
|
||||
if(token is TokenKwBrcOpen)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,6 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
{
|
||||
|
||||
public class TypeCast
|
||||
{
|
||||
private delegate void CastDelegate(IScriptCodeGen scg, Token errorAt);
|
||||
|
||||
@@ -1122,12 +1122,12 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
{
|
||||
XMRInstance instance = GetInstance(itemID);
|
||||
if(instance == null)
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
|
||||
TraceCalls("[YEngine]: YEngine.GetXMLState({0})", itemID.ToString());
|
||||
|
||||
if(!instance.m_HasRun)
|
||||
return String.Empty;
|
||||
return string.Empty;
|
||||
|
||||
XmlDocument doc = new();
|
||||
|
||||
@@ -1221,7 +1221,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool PostScriptEvent(UUID itemID, string name, Object[] p)
|
||||
public bool PostScriptEvent(UUID itemID, string name, object[] p)
|
||||
{
|
||||
if(!m_Enabled)
|
||||
return false;
|
||||
@@ -1232,7 +1232,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool PostObjectEvent(UUID itemID, string name, Object[] p)
|
||||
public bool PostObjectEvent(UUID itemID, string name, object[] p)
|
||||
{
|
||||
if(!m_Enabled)
|
||||
return false;
|
||||
|
||||
@@ -395,6 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
m_InstEHEvent++;
|
||||
e = StartEventHandler(evc, evt.Params);
|
||||
}
|
||||
|
||||
//m_RunOnePhase = "done running";
|
||||
m_CPUTime += Util.GetTimeStampMS() - m_SliceStart;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenSim.Services.Base
|
||||
|
||||
dllName = pathRoot + parts[0];
|
||||
|
||||
string className = String.Empty;
|
||||
string className = string.Empty;
|
||||
|
||||
if (parts.Length > 1)
|
||||
className = parts[1];
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_ServerURI = String.Empty;
|
||||
private string m_ServerURI = string.Empty;
|
||||
private ExpiringCache<string, List<EstateSettings>> m_EstateCache = new ExpiringCache<string, List<EstateSettings>>();
|
||||
private const int EXPIRATION = 5 * 60; // 5 minutes in secs
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace OpenSim.Services.Connectors
|
||||
{
|
||||
string uri = m_ServerURI + "/estates";
|
||||
string reply = MakeRequest("GET", uri, string.Empty);
|
||||
if (String.IsNullOrEmpty(reply))
|
||||
if (string.IsNullOrEmpty(reply))
|
||||
return [];
|
||||
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
@@ -153,7 +153,7 @@ namespace OpenSim.Services.Connectors
|
||||
string uri = m_ServerURI + "/estates/regions/?eid=" + estateID.ToString();
|
||||
|
||||
string reply = MakeRequest("GET", uri, string.Empty);
|
||||
if (String.IsNullOrEmpty(reply))
|
||||
if (string.IsNullOrEmpty(reply))
|
||||
return [];
|
||||
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
@@ -179,7 +179,7 @@ namespace OpenSim.Services.Connectors
|
||||
// /estates/estate/?region=uuid&create=[t|f]
|
||||
string uri = m_ServerURI + $"/estates/estate/?region={regionID}&create={create}";
|
||||
string reply = MakeRequest("GET", uri, string.Empty);
|
||||
if (String.IsNullOrEmpty(reply))
|
||||
if (string.IsNullOrEmpty(reply))
|
||||
return null;
|
||||
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
@@ -202,7 +202,7 @@ namespace OpenSim.Services.Connectors
|
||||
string uri = m_ServerURI + $"/estates/estate/?eid={estateID}";
|
||||
|
||||
string reply = MakeRequest("GET", uri, string.Empty);
|
||||
if (String.IsNullOrEmpty(reply))
|
||||
if (string.IsNullOrEmpty(reply))
|
||||
return null;
|
||||
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
@@ -257,7 +257,7 @@ namespace OpenSim.Services.Connectors
|
||||
string reqString = ServerUtils.BuildQueryString(sendData);
|
||||
|
||||
string reply = MakeRequest("POST", uri, reqString);
|
||||
if (String.IsNullOrEmpty(reply))
|
||||
if (string.IsNullOrEmpty(reply))
|
||||
return false;
|
||||
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace OpenSim.Services.Connectors
|
||||
public class GridServicesConnector : BaseServiceConnector, IGridService
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private string m_ServerURI = String.Empty;
|
||||
private string m_ServerURI = string.Empty;
|
||||
private string m_ServerGridURI = string.Empty;
|
||||
|
||||
public GridServicesConnector()
|
||||
@@ -788,7 +788,7 @@ namespace OpenSim.Services.Connectors
|
||||
|
||||
return [];
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace OpenSim.Services.HypergridService
|
||||
}
|
||||
}
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(m_DeniedMacs))
|
||||
if (!string.IsNullOrWhiteSpace(m_DeniedMacs))
|
||||
{
|
||||
//m_log.InfoFormat("[GATEKEEPER SERVICE]: Checking users Mac {0} against list of denied macs {1} ...", curMac, m_DeniedMacs);
|
||||
if (m_DeniedMacs.Contains(curMac, StringComparison.InvariantCultureIgnoreCase))
|
||||
|
||||
@@ -39,8 +39,8 @@ namespace OpenSim.Services.HypergridService
|
||||
public UserAgentServiceBase(IConfigSource config)
|
||||
: base(config)
|
||||
{
|
||||
string dllName = String.Empty;
|
||||
string connString = String.Empty;
|
||||
string dllName = string.Empty;
|
||||
string connString = string.Empty;
|
||||
string realm = "hg_traveling_data";
|
||||
|
||||
//
|
||||
@@ -50,9 +50,9 @@ namespace OpenSim.Services.HypergridService
|
||||
if (dbConfig is not null)
|
||||
{
|
||||
if (dllName.Length == 0)
|
||||
dllName = dbConfig.GetString("StorageProvider", String.Empty);
|
||||
dllName = dbConfig.GetString("StorageProvider", string.Empty);
|
||||
if (connString.Length == 0)
|
||||
connString = dbConfig.GetString("ConnectionString", String.Empty);
|
||||
connString = dbConfig.GetString("ConnectionString", string.Empty);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -56,8 +56,8 @@ namespace OpenSim.Services.InventoryService
|
||||
if (configName != string.Empty)
|
||||
m_ConfigName = configName;
|
||||
|
||||
string dllName = String.Empty;
|
||||
string connString = String.Empty;
|
||||
string dllName = string.Empty;
|
||||
string connString = string.Empty;
|
||||
//string realm = "Inventory"; // OSG version doesn't use this
|
||||
|
||||
//
|
||||
@@ -79,9 +79,9 @@ namespace OpenSim.Services.InventoryService
|
||||
if (dbConfig != null)
|
||||
{
|
||||
if (dllName.Length == 0)
|
||||
dllName = dbConfig.GetString("StorageProvider", String.Empty);
|
||||
dllName = dbConfig.GetString("StorageProvider", string.Empty);
|
||||
if (connString.Length == 0)
|
||||
connString = dbConfig.GetString("ConnectionString", String.Empty);
|
||||
connString = dbConfig.GetString("ConnectionString", string.Empty);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -382,7 +382,6 @@ namespace OpenSim.Services.LLLoginService
|
||||
y,
|
||||
pinfo.HomePosition.X, pinfo.HomePosition.Y, pinfo.HomePosition.Z,
|
||||
pinfo.HomeLookAt.X, pinfo.HomeLookAt.Y, pinfo.HomeLookAt.Z);
|
||||
|
||||
}
|
||||
|
||||
private void FillOutRegionData(GridRegion destination)
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace OpenSim.Services.MapImageService
|
||||
|
||||
public bool RemoveMapTile(int x, int y, UUID scopeID, out string reason)
|
||||
{
|
||||
reason = String.Empty;
|
||||
reason = string.Empty;
|
||||
string fileName = GetFileName(1, x, y, scopeID);
|
||||
|
||||
lock (m_Sync)
|
||||
@@ -212,13 +212,13 @@ namespace OpenSim.Services.MapImageService
|
||||
return File.ReadAllBytes(fullName);
|
||||
}
|
||||
}
|
||||
|
||||
catch
|
||||
{
|
||||
format = ".jpg";
|
||||
return m_WaterJPEGBytes is null ? Array.Empty<byte>() : m_WaterJPEGBytes;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private string GetFileName(int zoomLevel, int x, int y, UUID scopeID)
|
||||
|
||||
@@ -280,7 +280,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
|
||||
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
|
||||
{
|
||||
UserAccountData[] ret = m_Database.GetUsersWhere(scopeID, "PrincipalID in ('" + String.Join("', '", IDs) + "')");
|
||||
UserAccountData[] ret = m_Database.GetUsersWhere(scopeID, "PrincipalID in ('" + string.Join("', '", IDs) + "')");
|
||||
if(ret == null || ret.Length == 0)
|
||||
return [];
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ namespace OpenSim.Services.ProfilesService
|
||||
public OSD AvatarClassifiedsRequest(UUID creatorId)
|
||||
{
|
||||
OSDArray records = ProfilesData.GetClassifiedRecords(creatorId);
|
||||
|
||||
return records;
|
||||
}
|
||||
|
||||
@@ -104,7 +103,6 @@ namespace OpenSim.Services.ProfilesService
|
||||
public OSD AvatarPicksRequest(UUID creatorId)
|
||||
{
|
||||
OSDArray records = ProfilesData.GetAvatarPicks(creatorId);
|
||||
|
||||
return records;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user