mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
refactor: Use SOP.Flags rather than SOP.ObjectFlags
This commit is contained in:
@@ -1897,7 +1897,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
AddRestoredSceneObject(group, true, true);
|
||||
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||
rootPart.ObjectFlags &= ~(uint)PrimFlags.Scripted;
|
||||
rootPart.Flags &= ~PrimFlags.Scripted;
|
||||
rootPart.TrimPermissions();
|
||||
group.CheckSculptAndLoad();
|
||||
//rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
@@ -2184,7 +2184,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
foreach (SceneObjectPart part in group.Children.Values)
|
||||
{
|
||||
if (part.IsJoint() && ((part.ObjectFlags&(uint)PrimFlags.Physics) != 0))
|
||||
if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
|
||||
{
|
||||
PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
|
||||
}
|
||||
@@ -4852,7 +4852,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
// turn the proxy non-physical, which also stops its client-side interpolation
|
||||
bool wasUsingPhysics = ((jointProxyObject.ObjectFlags & (uint)PrimFlags.Physics) != 0);
|
||||
bool wasUsingPhysics = ((jointProxyObject.Flags & PrimFlags.Physics) != 0);
|
||||
if (wasUsingPhysics)
|
||||
{
|
||||
jointProxyObject.UpdatePrimFlags(false, false, true, false); // FIXME: possible deadlock here; check to make sure all the scene alterations set into motion here won't deadlock
|
||||
|
||||
@@ -1322,9 +1322,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void aggregateScriptEvents()
|
||||
{
|
||||
uint objectflagupdate=(uint)RootPart.GetEffectiveObjectFlags();
|
||||
PrimFlags objectflagupdate = (PrimFlags)RootPart.GetEffectiveObjectFlags();
|
||||
|
||||
scriptEvents aggregateScriptEvents=0;
|
||||
scriptEvents aggregateScriptEvents = 0;
|
||||
|
||||
lock (m_parts)
|
||||
{
|
||||
@@ -1333,7 +1333,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (part == null)
|
||||
continue;
|
||||
if (part != RootPart)
|
||||
part.ObjectFlags = objectflagupdate;
|
||||
part.Flags = objectflagupdate;
|
||||
aggregateScriptEvents |= part.AggregateScriptEvents;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public void AddFlag(PrimFlags flag)
|
||||
{
|
||||
// PrimFlags prevflag = Flags;
|
||||
if ((ObjectFlags & (uint) flag) == 0)
|
||||
if ((Flags & flag) == 0)
|
||||
{
|
||||
//m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
|
||||
Flags |= flag;
|
||||
@@ -1607,7 +1607,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
dupe.Velocity = new Vector3(0, 0, 0);
|
||||
dupe.Acceleration = new Vector3(0, 0, 0);
|
||||
dupe.AngularVelocity = new Vector3(0, 0, 0);
|
||||
dupe.ObjectFlags = ObjectFlags;
|
||||
dupe.Flags = Flags;
|
||||
|
||||
dupe._ownershipCost = _ownershipCost;
|
||||
dupe._objectSaleType = _objectSaleType;
|
||||
@@ -1644,7 +1644,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_parentGroup.Scene.AssetService.Get(dupe.m_shape.SculptTexture.ToString(), dupe, AssetReceived);
|
||||
}
|
||||
|
||||
bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0);
|
||||
bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0);
|
||||
dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
}
|
||||
|
||||
@@ -4271,9 +4271,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void UpdatePrimFlags(bool UsePhysics, bool IsTemporary, bool IsPhantom, bool IsVD)
|
||||
{
|
||||
bool wasUsingPhysics = ((ObjectFlags & (uint) PrimFlags.Physics) != 0);
|
||||
bool wasTemporary = ((ObjectFlags & (uint)PrimFlags.TemporaryOnRez) != 0);
|
||||
bool wasPhantom = ((ObjectFlags & (uint)PrimFlags.Phantom) != 0);
|
||||
bool wasUsingPhysics = ((Flags & PrimFlags.Physics) != 0);
|
||||
bool wasTemporary = ((Flags & PrimFlags.TemporaryOnRez) != 0);
|
||||
bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0);
|
||||
bool wasVD = VolumeDetectActive;
|
||||
|
||||
if ((UsePhysics == wasUsingPhysics) && (wasTemporary == IsTemporary) && (wasPhantom == IsPhantom) && (IsVD==wasVD))
|
||||
|
||||
Reference in New Issue
Block a user