some cleanup

0.9.0-post-fixes
UbitUmarov 2017-06-13 13:22:01 +01:00
parent 3ba63dde6e
commit 9526a96b4f
4 changed files with 16 additions and 36 deletions

View File

@ -1604,13 +1604,16 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="remoteClient"></param>
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))
{
group.UpdateTextureEntry(localID, texture);
part.UpdateTextureEntry(texture);
}
}
}

View File

@ -4129,20 +4129,6 @@ namespace OpenSim.Region.Framework.Scenes
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)
{
uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits

View File

@ -5016,6 +5016,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
if (newTex.FaceTextures[i] != null)
newFace = newTex.FaceTextures[i];
if (oldFace.TextureID != newFace.TextureID)
changeFlags |= Changed.TEXTURE;
Color4 oldRGBA = oldFace.RGBA;
Color4 newRGBA = newFace.RGBA;
@ -5025,9 +5028,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
oldRGBA.A != newRGBA.A)
changeFlags |= Changed.COLOR;
if (oldFace.TextureID != newFace.TextureID)
changeFlags |= Changed.TEXTURE;
// Max change, skip the rest of testing
if (changeFlags == (Changed.TEXTURE | Changed.COLOR))
break;
@ -5053,17 +5053,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
m_shape.TextureEntry = newTex.GetBytes();
if (changeFlags != 0)
TriggerScriptChangedEvent(changeFlags);
UpdateFlag = UpdateRequired.FULL;
ParentGroup.HasGroupChanged = true;
//This is madness..
//ParentGroup.ScheduleGroupForFullUpdate();
//This is sparta
ScheduleFullUpdate();
}
}
internal void UpdatePhysicsSubscribedEvents()
{
PhysicsActor pa = PhysActor;

View File

@ -2280,18 +2280,13 @@ namespace OpenSim.Region.Framework.Scenes
m_lastChildAgentUpdateDrawDistance = DrawDistance;
m_lastChildAgentUpdatePosition = AbsolutePosition;
m_childUpdatesBusy = false; // allow them
}
m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts));
// send the rest of the world
if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide)
SendInitialDataToMe();
// priority uses avatar position only
// m_reprioritizationLastPosition = AbsolutePosition;
@ -2958,31 +2953,32 @@ namespace OpenSim.Region.Framework.Scenes
Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN));
MovementFlag &= noMovFlagsMask;
AgentControlFlags &= noMovFlagsMask;
uint tmpAgentControlFlags = (uint)m_AgentControlFlags;
tmpAgentControlFlags &= noMovFlagsMask;
if (LocalVectorToTarget3D.X < 0) //MoveBack
{
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;
}
else if (LocalVectorToTarget3D.X > 0) //Move 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;
}
if (LocalVectorToTarget3D.Y > 0) //MoveLeft
{
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;
}
else if (LocalVectorToTarget3D.Y < 0) //MoveRight
{
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;
}
@ -3006,6 +3002,7 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}",
// LocalVectorToTarget3D, agent_control_v3, Name);
m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags;
agent_control_v3 += LocalVectorToTarget3D;
}
catch (Exception e)