some cleanup
parent
3ba63dde6e
commit
9526a96b4f
|
@ -1604,13 +1604,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
|
protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = GetGroupByPrim(localID);
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
if(part == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (group != null)
|
SceneObjectGroup group = part.ParentGroup;
|
||||||
|
if (group != null && !group.IsDeleted)
|
||||||
{
|
{
|
||||||
if (m_parentScene.Permissions.CanEditObject(group, remoteClient))
|
if (m_parentScene.Permissions.CanEditObject(group, remoteClient))
|
||||||
{
|
{
|
||||||
group.UpdateTextureEntry(localID, texture);
|
part.UpdateTextureEntry(texture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4129,20 +4129,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return Parts.Count();
|
return Parts.Count();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the texture entry for this part
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="localID"></param>
|
|
||||||
/// <param name="textureEntry"></param>
|
|
||||||
public void UpdateTextureEntry(uint localID, byte[] textureEntry)
|
|
||||||
{
|
|
||||||
SceneObjectPart part = GetPart(localID);
|
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
part.UpdateTextureEntry(textureEntry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive)
|
public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive)
|
||||||
{
|
{
|
||||||
uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits
|
uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits
|
||||||
|
|
|
@ -5016,6 +5016,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
|
||||||
if (newTex.FaceTextures[i] != null)
|
if (newTex.FaceTextures[i] != null)
|
||||||
newFace = newTex.FaceTextures[i];
|
newFace = newTex.FaceTextures[i];
|
||||||
|
|
||||||
|
if (oldFace.TextureID != newFace.TextureID)
|
||||||
|
changeFlags |= Changed.TEXTURE;
|
||||||
|
|
||||||
Color4 oldRGBA = oldFace.RGBA;
|
Color4 oldRGBA = oldFace.RGBA;
|
||||||
Color4 newRGBA = newFace.RGBA;
|
Color4 newRGBA = newFace.RGBA;
|
||||||
|
|
||||||
|
@ -5025,9 +5028,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
|
||||||
oldRGBA.A != newRGBA.A)
|
oldRGBA.A != newRGBA.A)
|
||||||
changeFlags |= Changed.COLOR;
|
changeFlags |= Changed.COLOR;
|
||||||
|
|
||||||
if (oldFace.TextureID != newFace.TextureID)
|
|
||||||
changeFlags |= Changed.TEXTURE;
|
|
||||||
|
|
||||||
// Max change, skip the rest of testing
|
// Max change, skip the rest of testing
|
||||||
if (changeFlags == (Changed.TEXTURE | Changed.COLOR))
|
if (changeFlags == (Changed.TEXTURE | Changed.COLOR))
|
||||||
break;
|
break;
|
||||||
|
@ -5053,17 +5053,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
|
||||||
m_shape.TextureEntry = newTex.GetBytes();
|
m_shape.TextureEntry = newTex.GetBytes();
|
||||||
if (changeFlags != 0)
|
if (changeFlags != 0)
|
||||||
TriggerScriptChangedEvent(changeFlags);
|
TriggerScriptChangedEvent(changeFlags);
|
||||||
UpdateFlag = UpdateRequired.FULL;
|
|
||||||
ParentGroup.HasGroupChanged = true;
|
ParentGroup.HasGroupChanged = true;
|
||||||
|
|
||||||
//This is madness..
|
|
||||||
//ParentGroup.ScheduleGroupForFullUpdate();
|
|
||||||
//This is sparta
|
|
||||||
ScheduleFullUpdate();
|
ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal void UpdatePhysicsSubscribedEvents()
|
internal void UpdatePhysicsSubscribedEvents()
|
||||||
{
|
{
|
||||||
PhysicsActor pa = PhysActor;
|
PhysicsActor pa = PhysActor;
|
||||||
|
|
|
@ -2280,19 +2280,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_lastChildAgentUpdateDrawDistance = DrawDistance;
|
m_lastChildAgentUpdateDrawDistance = DrawDistance;
|
||||||
m_lastChildAgentUpdatePosition = AbsolutePosition;
|
m_lastChildAgentUpdatePosition = AbsolutePosition;
|
||||||
m_childUpdatesBusy = false; // allow them
|
m_childUpdatesBusy = false; // allow them
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// send the rest of the world
|
// send the rest of the world
|
||||||
if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide)
|
if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide)
|
||||||
SendInitialDataToMe();
|
SendInitialDataToMe();
|
||||||
|
|
||||||
|
|
||||||
// priority uses avatar position only
|
// priority uses avatar position only
|
||||||
// m_reprioritizationLastPosition = AbsolutePosition;
|
// m_reprioritizationLastPosition = AbsolutePosition;
|
||||||
// m_reprioritizationLastDrawDistance = DrawDistance;
|
// m_reprioritizationLastDrawDistance = DrawDistance;
|
||||||
|
@ -2958,31 +2953,32 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN));
|
Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN));
|
||||||
|
|
||||||
MovementFlag &= noMovFlagsMask;
|
MovementFlag &= noMovFlagsMask;
|
||||||
AgentControlFlags &= noMovFlagsMask;
|
uint tmpAgentControlFlags = (uint)m_AgentControlFlags;
|
||||||
|
tmpAgentControlFlags &= noMovFlagsMask;
|
||||||
|
|
||||||
if (LocalVectorToTarget3D.X < 0) //MoveBack
|
if (LocalVectorToTarget3D.X < 0) //MoveBack
|
||||||
{
|
{
|
||||||
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK;
|
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK;
|
||||||
AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK;
|
tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
else if (LocalVectorToTarget3D.X > 0) //Move Forward
|
else if (LocalVectorToTarget3D.X > 0) //Move Forward
|
||||||
{
|
{
|
||||||
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD;
|
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD;
|
||||||
AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD;
|
tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LocalVectorToTarget3D.Y > 0) //MoveLeft
|
if (LocalVectorToTarget3D.Y > 0) //MoveLeft
|
||||||
{
|
{
|
||||||
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT;
|
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT;
|
||||||
AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT;
|
tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
else if (LocalVectorToTarget3D.Y < 0) //MoveRight
|
else if (LocalVectorToTarget3D.Y < 0) //MoveRight
|
||||||
{
|
{
|
||||||
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT;
|
MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT;
|
||||||
AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT;
|
tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3006,6 +3002,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}",
|
// "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}",
|
||||||
// LocalVectorToTarget3D, agent_control_v3, Name);
|
// LocalVectorToTarget3D, agent_control_v3, Name);
|
||||||
|
|
||||||
|
m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags;
|
||||||
agent_control_v3 += LocalVectorToTarget3D;
|
agent_control_v3 += LocalVectorToTarget3D;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Reference in New Issue