remove some more of obsolete ninha joints code

This commit is contained in:
UbitUmarov
2022-03-19 01:06:44 +00:00
parent 0b205b91a6
commit 9bd8e45b30
9 changed files with 120 additions and 1163 deletions

View File

@@ -487,7 +487,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((functionControl & AllowedControlFlags.PARCEL_OWNER) != 0)
{
ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
if (land.LandData.OwnerID == ownerID)
if (land.LandData.OwnerID.Equals(ownerID))
{
return String.Empty;
}
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((functionControl & AllowedControlFlags.ESTATE_MANAGER) != 0)
{
//Only Estate Managers may use the function
if (World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(ownerID) && World.RegionInfo.EstateSettings.EstateOwner != ownerID)
if (World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(ownerID) && World.RegionInfo.EstateSettings.EstateOwner.NotEqual(ownerID))
{
return String.Empty;
}
@@ -516,7 +516,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
//Only regionowners may use the function
if ((functionControl & AllowedControlFlags.ESTATE_OWNER) != 0)
{
if (World.RegionInfo.EstateSettings.EstateOwner == ownerID)
if (World.RegionInfo.EstateSettings.EstateOwner.Equals(ownerID))
{
return String.Empty;
}
@@ -559,7 +559,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.",
function));
if (m_item.CreatorID != ownerID)
if (m_item.CreatorID.NotEqual(ownerID))
{
if ((m_item.CurrentPermissions & (uint)PermissionMask.Modify) != 0)
return String.Format("{0} permission denied. Script creator is not prim owner.", function);
@@ -956,10 +956,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
UUID hostOwner = m_host.OwnerID;
if(hostOwner == agentId)
if(hostOwner.Equals(agentId))
return true;
if (m_item.PermsGranter == agentId)
if (m_item.PermsGranter.Equals(agentId))
{
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TELEPORT) != 0)
return true;
@@ -973,7 +973,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if(landdata == null)
return true;
if(landdata.OwnerID == hostOwner)
if(landdata.OwnerID.Equals(hostOwner))
return true;
EstateSettings es = World.RegionInfo.EstateSettings;
@@ -987,7 +987,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if(landGroup.IsZero())
return false;
if(landGroup == m_host.GroupID)
if(landGroup.Equals(m_host.GroupID))
return true;
return false;
@@ -1868,7 +1868,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
break;
case ScriptBaseClass.PARCEL_DETAILS_GROUP:
if(m_host.OwnerID == newLand.OwnerID || es == null || es.IsEstateManagerOrOwner(m_host.OwnerID))
if(m_host.OwnerID.Equals(newLand.OwnerID) || es == null || es.IsEstateManagerOrOwner(m_host.OwnerID))
{
if (UUID.TryParse(arg, out uuid))
{
@@ -1962,7 +1962,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (avatar == null || avatar.IsDeleted || avatar.IsInTransit)
return;
if(changedSeeAvs && avatar.currentParcelUUID == parcelID )
if(changedSeeAvs && avatar.currentParcelUUID.Equals(parcelID))
avatar.currentParcelUUID = parcelID; // force parcel flags review
if(avatar.ControllingClient == null)
@@ -2199,14 +2199,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
// harakiri check
if(sceneOG.UUID == m_host.ParentGroup.UUID)
if(sceneOG.UUID.Equals(m_host.ParentGroup.UUID))
{
m_LSL_Api.llDie();
return;
}
// restrict to objects rezzed by host
if(sceneOG.RezzerID == m_host.ParentGroup.UUID)
if(sceneOG.RezzerID.Equals(m_host.ParentGroup.UUID))
World.DeleteSceneObject(sceneOG, false);
}
@@ -2544,9 +2544,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (uInfo != null)
{
if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out UUID userUUID,
out string gridURL, out string firstName,
out string lastName, out string tmp))
if (Util.ParseFullUniversalUserIdentifier(uInfo.UserID, out UUID userUUID,
out string gridURL, out string firstName, out string lastName))
{
string grid = new Uri(gridURL).Authority;
return firstName + "." + lastName + " @" + grid;
@@ -4949,7 +4948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return true;
UUID hostOwner = m_host.OwnerID;
if(landdata.OwnerID == hostOwner)
if(landdata.OwnerID.Equals(hostOwner))
return true;
EstateSettings es = World.RegionInfo.EstateSettings;
@@ -4963,7 +4962,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if(landGroup.IsZero())
return false;
if(landGroup == m_host.GroupID)
if(landGroup.Equals(m_host.GroupID))
return true;
return false;
@@ -4999,7 +4998,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if(sog== null || sog.IsDeleted || sog.inTransit)
return -1;
if(sog.OwnerID != m_host.OwnerID)
if(sog.OwnerID.NotEqual(m_host.OwnerID))
{
Vector3 pos = sog.AbsolutePosition;
if(!checkAllowObjectTPbyLandOwner(pos))
@@ -5675,7 +5674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
foreach(TaskInventoryItem script in scripts)
{
if(script.ItemID == me)
if(script.ItemID.Equals(me))
continue;
m_ScriptEngine.ResetScript(script.ItemID);
}

View File

@@ -224,7 +224,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
List<string> toremove = new List<string>(DataserverRequests.Count);
foreach (DataserverRequest ds in DataserverRequests.Values)
{
if (ds.itemID == itemID)
if (ds.itemID.Equals(itemID))
toremove.Add(ds.handle);
}
foreach (string s in toremove)

View File

@@ -166,7 +166,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
foreach (TimerInfo ts in tvals)
{
if (ts.itemID == itemID)
if (ts.itemID.Equals(itemID))
{
data.Add(ts.interval);
data.Add(ts.next-DateTime.Now.Ticks);

View File

@@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
}
else
{
if (ent.Velocity.Equals(ZeroVector))
if (ent.Velocity.IsZero())
{
objtype |= PASSIVE; // Passive non-moving
}
@@ -560,7 +560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
// if the object the script is in is attached and the avatar is the owner
// then this one is not wanted
if (attached && presence.UUID == SensePoint.OwnerID)
if (attached && presence.UUID.Equals(SensePoint.OwnerID))
return;
toRegionPos = presence.AbsolutePosition;