cosmetics, cleanup and other things

This commit is contained in:
UbitUmarov
2022-12-17 22:04:03 +00:00
parent 38ddb92cc3
commit bf952817fa
6 changed files with 453 additions and 534 deletions

View File

@@ -4034,9 +4034,7 @@ namespace OpenSim.Region.Framework.Scenes
if (sp is not null && !sp.IsDeleted && sp.IsChildAgent &&
(sp.LifecycleState == ScenePresenceState.Running || sp.LifecycleState == ScenePresenceState.PreRemove))
{
m_log.DebugFormat(
"[SCENE]: Reusing existing child scene presence for {0}, state {1} in {2}",
sp.Name, sp.LifecycleState, Name);
m_log.Debug($"[SCENE]: Reusing existing child scene presence for {sp.Name}, state {sp.LifecycleState} in {Name}");
// In the case where, for example, an A B C D region layout, an avatar may
// teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C
@@ -4064,17 +4062,14 @@ namespace OpenSim.Region.Framework.Scenes
if (EntityTransferModule.IsInTransit(sp.UUID))
{
sp.DoNotCloseAfterTeleport = true;
m_log.DebugFormat(
"[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.",
sp.Name, Name);
m_log.Debug($"[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {sp.Name} in {Name} because this region will attempt end-of-teleport close from a previous close.");
}
}
}
// Need to poll here in case we are currently deleting an sp. Letting threads run over each other will
// allow unpredictable things to happen.
if (sp is not null)
if (sp is not null && sp.LifecycleState == ScenePresenceState.Removing)
{
const int polls = 10;
const int pollInterval = 1000;

File diff suppressed because it is too large Load Diff

View File

@@ -2201,7 +2201,7 @@ namespace OpenSim.Region.Framework.Scenes
dupe.LocalId = plocalID;
// This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
if(OwnerID != GroupID)
if(OwnerID.NotEqual(GroupID))
dupe.LastOwnerID = OwnerID;
else
dupe.LastOwnerID = LastOwnerID; // redundant ?
@@ -5366,9 +5366,9 @@ namespace OpenSim.Region.Framework.Scenes
GroupMask = 0; // DO NOT propagate here
}
if (OwnerID != item.Owner)
if (OwnerID.NotEqual(item.Owner))
{
if(OwnerID != GroupID)
if(OwnerID.NotEqual(GroupID))
LastOwnerID = OwnerID;
OwnerID = item.Owner;
Inventory.ChangeInventoryOwner(item.Owner);

View File

@@ -1199,9 +1199,9 @@ namespace OpenSim.Region.Framework.Scenes
foreach (SceneObjectPart part in partList)
{
if ((part.OwnerID != NewOwner))
if ((part.OwnerID.NotEqual(NewOwner)))
{
if(part.GroupID != part.OwnerID)
if(part.GroupID.NotEqual(part.OwnerID))
part.LastOwnerID = part.OwnerID;
part.OwnerID = NewOwner;
part.Inventory.ChangeInventoryOwner(NewOwner);