diff options
author | UbitUmarov | 2017-06-13 13:22:01 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-13 13:22:01 +0100 |
commit | 9526a96b4fd668c8b6d355155a8682868ae56abb (patch) | |
tree | 44aa2ca8a68bb47637717d97ab760e3ca6c9c64f /OpenSim/Region/Framework/Scenes | |
parent | udp is not tcp. If mono versions have bronke udp sento, better update, also h... (diff) | |
download | opensim-SC-9526a96b4fd668c8b6d355155a8682868ae56abb.zip opensim-SC-9526a96b4fd668c8b6d355155a8682868ae56abb.tar.gz opensim-SC-9526a96b4fd668c8b6d355155a8682868ae56abb.tar.bz2 opensim-SC-9526a96b4fd668c8b6d355155a8682868ae56abb.tar.xz |
some cleanup
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 |
4 files changed, 16 insertions, 36 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 6419f11..ae827f4 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1604,13 +1604,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1604 | /// <param name="remoteClient"></param> | 1604 | /// <param name="remoteClient"></param> |
1605 | protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) | 1605 | protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) |
1606 | { | 1606 | { |
1607 | SceneObjectGroup group = GetGroupByPrim(localID); | 1607 | SceneObjectPart part = GetSceneObjectPart(localID); |
1608 | if(part == null) | ||
1609 | return; | ||
1608 | 1610 | ||
1609 | if (group != null) | 1611 | SceneObjectGroup group = part.ParentGroup; |
1612 | if (group != null && !group.IsDeleted) | ||
1610 | { | 1613 | { |
1611 | if (m_parentScene.Permissions.CanEditObject(group, remoteClient)) | 1614 | if (m_parentScene.Permissions.CanEditObject(group, remoteClient)) |
1612 | { | 1615 | { |
1613 | group.UpdateTextureEntry(localID, texture); | 1616 | part.UpdateTextureEntry(texture); |
1614 | } | 1617 | } |
1615 | } | 1618 | } |
1616 | } | 1619 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1695d9b..fdfe8ae 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -4129,20 +4129,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4129 | return Parts.Count(); | 4129 | return Parts.Count(); |
4130 | } | 4130 | } |
4131 | 4131 | ||
4132 | /// <summary> | ||
4133 | /// Update the texture entry for this part | ||
4134 | /// </summary> | ||
4135 | /// <param name="localID"></param> | ||
4136 | /// <param name="textureEntry"></param> | ||
4137 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) | ||
4138 | { | ||
4139 | SceneObjectPart part = GetPart(localID); | ||
4140 | if (part != null) | ||
4141 | { | ||
4142 | part.UpdateTextureEntry(textureEntry); | ||
4143 | } | ||
4144 | } | ||
4145 | |||
4146 | public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) | 4132 | public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive) |
4147 | { | 4133 | { |
4148 | uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits | 4134 | uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff0; // Mask folded bits |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 61aa915..c2eac24 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -5016,6 +5016,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5016 | if (newTex.FaceTextures[i] != null) | 5016 | if (newTex.FaceTextures[i] != null) |
5017 | newFace = newTex.FaceTextures[i]; | 5017 | newFace = newTex.FaceTextures[i]; |
5018 | 5018 | ||
5019 | if (oldFace.TextureID != newFace.TextureID) | ||
5020 | changeFlags |= Changed.TEXTURE; | ||
5021 | |||
5019 | Color4 oldRGBA = oldFace.RGBA; | 5022 | Color4 oldRGBA = oldFace.RGBA; |
5020 | Color4 newRGBA = newFace.RGBA; | 5023 | Color4 newRGBA = newFace.RGBA; |
5021 | 5024 | ||
@@ -5025,9 +5028,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5025 | oldRGBA.A != newRGBA.A) | 5028 | oldRGBA.A != newRGBA.A) |
5026 | changeFlags |= Changed.COLOR; | 5029 | changeFlags |= Changed.COLOR; |
5027 | 5030 | ||
5028 | if (oldFace.TextureID != newFace.TextureID) | ||
5029 | changeFlags |= Changed.TEXTURE; | ||
5030 | |||
5031 | // Max change, skip the rest of testing | 5031 | // Max change, skip the rest of testing |
5032 | if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) | 5032 | if (changeFlags == (Changed.TEXTURE | Changed.COLOR)) |
5033 | break; | 5033 | break; |
@@ -5053,17 +5053,11 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5053 | m_shape.TextureEntry = newTex.GetBytes(); | 5053 | m_shape.TextureEntry = newTex.GetBytes(); |
5054 | if (changeFlags != 0) | 5054 | if (changeFlags != 0) |
5055 | TriggerScriptChangedEvent(changeFlags); | 5055 | TriggerScriptChangedEvent(changeFlags); |
5056 | UpdateFlag = UpdateRequired.FULL; | ||
5057 | ParentGroup.HasGroupChanged = true; | 5056 | ParentGroup.HasGroupChanged = true; |
5058 | |||
5059 | //This is madness.. | ||
5060 | //ParentGroup.ScheduleGroupForFullUpdate(); | ||
5061 | //This is sparta | ||
5062 | ScheduleFullUpdate(); | 5057 | ScheduleFullUpdate(); |
5063 | } | 5058 | } |
5064 | } | 5059 | } |
5065 | 5060 | ||
5066 | |||
5067 | internal void UpdatePhysicsSubscribedEvents() | 5061 | internal void UpdatePhysicsSubscribedEvents() |
5068 | { | 5062 | { |
5069 | PhysicsActor pa = PhysActor; | 5063 | PhysicsActor pa = PhysActor; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2416b87..7e3adb9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2280,18 +2280,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2280 | m_lastChildAgentUpdateDrawDistance = DrawDistance; | 2280 | m_lastChildAgentUpdateDrawDistance = DrawDistance; |
2281 | m_lastChildAgentUpdatePosition = AbsolutePosition; | 2281 | m_lastChildAgentUpdatePosition = AbsolutePosition; |
2282 | m_childUpdatesBusy = false; // allow them | 2282 | m_childUpdatesBusy = false; // allow them |
2283 | |||
2284 | |||
2285 | } | 2283 | } |
2286 | 2284 | ||
2287 | m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2285 | m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2288 | 2286 | ||
2289 | |||
2290 | |||
2291 | // send the rest of the world | 2287 | // send the rest of the world |
2292 | if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) | 2288 | if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) |
2293 | SendInitialDataToMe(); | 2289 | SendInitialDataToMe(); |
2294 | |||
2295 | 2290 | ||
2296 | // priority uses avatar position only | 2291 | // priority uses avatar position only |
2297 | // m_reprioritizationLastPosition = AbsolutePosition; | 2292 | // m_reprioritizationLastPosition = AbsolutePosition; |
@@ -2958,31 +2953,32 @@ namespace OpenSim.Region.Framework.Scenes | |||
2958 | Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); | 2953 | Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); |
2959 | 2954 | ||
2960 | MovementFlag &= noMovFlagsMask; | 2955 | MovementFlag &= noMovFlagsMask; |
2961 | AgentControlFlags &= noMovFlagsMask; | 2956 | uint tmpAgentControlFlags = (uint)m_AgentControlFlags; |
2957 | tmpAgentControlFlags &= noMovFlagsMask; | ||
2962 | 2958 | ||
2963 | if (LocalVectorToTarget3D.X < 0) //MoveBack | 2959 | if (LocalVectorToTarget3D.X < 0) //MoveBack |
2964 | { | 2960 | { |
2965 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; | 2961 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; |
2966 | AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; | 2962 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; |
2967 | updated = true; | 2963 | updated = true; |
2968 | } | 2964 | } |
2969 | else if (LocalVectorToTarget3D.X > 0) //Move Forward | 2965 | else if (LocalVectorToTarget3D.X > 0) //Move Forward |
2970 | { | 2966 | { |
2971 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; | 2967 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; |
2972 | AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; | 2968 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; |
2973 | updated = true; | 2969 | updated = true; |
2974 | } | 2970 | } |
2975 | 2971 | ||
2976 | if (LocalVectorToTarget3D.Y > 0) //MoveLeft | 2972 | if (LocalVectorToTarget3D.Y > 0) //MoveLeft |
2977 | { | 2973 | { |
2978 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; | 2974 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; |
2979 | AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; | 2975 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; |
2980 | updated = true; | 2976 | updated = true; |
2981 | } | 2977 | } |
2982 | else if (LocalVectorToTarget3D.Y < 0) //MoveRight | 2978 | else if (LocalVectorToTarget3D.Y < 0) //MoveRight |
2983 | { | 2979 | { |
2984 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; | 2980 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; |
2985 | AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; | 2981 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; |
2986 | updated = true; | 2982 | updated = true; |
2987 | } | 2983 | } |
2988 | 2984 | ||
@@ -3006,6 +3002,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3006 | // "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", | 3002 | // "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", |
3007 | // LocalVectorToTarget3D, agent_control_v3, Name); | 3003 | // LocalVectorToTarget3D, agent_control_v3, Name); |
3008 | 3004 | ||
3005 | m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags; | ||
3009 | agent_control_v3 += LocalVectorToTarget3D; | 3006 | agent_control_v3 += LocalVectorToTarget3D; |
3010 | } | 3007 | } |
3011 | catch (Exception e) | 3008 | catch (Exception e) |