diff options
author | Jeff Ames | 2008-08-15 10:24:04 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-15 10:24:04 +0000 |
commit | dde21314e75acdaeff27af70077f283493401961 (patch) | |
tree | 490ab065895adb41ee4771fce623f99faa60b507 /OpenSim/Region/Environment/Scenes | |
parent | Fixes a case where, when inventory is not currently accessible due (diff) | |
download | opensim-SC-dde21314e75acdaeff27af70077f283493401961.zip opensim-SC-dde21314e75acdaeff27af70077f283493401961.tar.gz opensim-SC-dde21314e75acdaeff27af70077f283493401961.tar.bz2 opensim-SC-dde21314e75acdaeff27af70077f283493401961.tar.xz |
Update svn properties, formatting cleanup, fix a couple compiler warnings.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 |
2 files changed, 20 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4e7e764..22251e9 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2122,10 +2122,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2122 | LLVector3 homePostion = new LLVector3(UserProfile.HomeLocationX,UserProfile.HomeLocationY,UserProfile.HomeLocationZ); | 2122 | LLVector3 homePostion = new LLVector3(UserProfile.HomeLocationX,UserProfile.HomeLocationY,UserProfile.HomeLocationZ); |
2123 | LLVector3 homeLookat = new LLVector3(UserProfile.HomeLookAt); | 2123 | LLVector3 homeLookat = new LLVector3(UserProfile.HomeLookAt); |
2124 | ulong homeRegionHandle = UserProfile.HomeRegion; | 2124 | ulong homeRegionHandle = UserProfile.HomeRegion; |
2125 | if(homeRegionID == LLUUID.Zero) | 2125 | if (homeRegionID == LLUUID.Zero) |
2126 | { | 2126 | { |
2127 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); | 2127 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); |
2128 | if(info == null) | 2128 | if (info == null) |
2129 | { | 2129 | { |
2130 | // can't find the region: Tell viewer and abort | 2130 | // can't find the region: Tell viewer and abort |
2131 | client.SendTeleportFailed("Your home-region could not be found."); | 2131 | client.SendTeleportFailed("Your home-region could not be found."); |
@@ -2137,7 +2137,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2137 | else | 2137 | else |
2138 | { | 2138 | { |
2139 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(homeRegionID); | 2139 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(homeRegionID); |
2140 | if(info == null) | 2140 | if (info == null) |
2141 | { | 2141 | { |
2142 | // can't find the region: Tell viewer and abort | 2142 | // can't find the region: Tell viewer and abort |
2143 | client.SendTeleportFailed("Your home-region could not be found."); | 2143 | client.SendTeleportFailed("Your home-region could not be found."); |
@@ -2762,7 +2762,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2762 | public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) | 2762 | public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) |
2763 | { | 2763 | { |
2764 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); | 2764 | RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); |
2765 | if(info == null) | 2765 | if (info == null) |
2766 | { | 2766 | { |
2767 | // can't find the region: Tell viewer and abort | 2767 | // can't find the region: Tell viewer and abort |
2768 | remoteClient.SendTeleportFailed("The teleport destination could not be found."); | 2768 | remoteClient.SendTeleportFailed("The teleport destination could not be found."); |
@@ -3518,10 +3518,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
3518 | // their scripts will actually run. | 3518 | // their scripts will actually run. |
3519 | // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 | 3519 | // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 |
3520 | SceneObjectPart parent = part.ParentGroup.RootPart; | 3520 | SceneObjectPart parent = part.ParentGroup.RootPart; |
3521 | if( parent != null && parent.IsAttachment ) | 3521 | if (parent != null && parent.IsAttachment) |
3522 | return scriptDanger(parent, parent.GetWorldPosition() ); | 3522 | return scriptDanger(parent, parent.GetWorldPosition()); |
3523 | else | 3523 | else |
3524 | return scriptDanger(part, part.GetWorldPosition() ); | 3524 | return scriptDanger(part, part.GetWorldPosition()); |
3525 | } | 3525 | } |
3526 | else | 3526 | else |
3527 | { | 3527 | { |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 636d08c..d8d534e 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1102,12 +1102,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1102 | 1102 | ||
1103 | // Get our own copy of the part array, and sort into the order we want to test | 1103 | // Get our own copy of the part array, and sort into the order we want to test |
1104 | SceneObjectPart[] partArray = targetPart.ParentGroup.GetParts(); | 1104 | SceneObjectPart[] partArray = targetPart.ParentGroup.GetParts(); |
1105 | Array.Sort(partArray, delegate(SceneObjectPart p1, SceneObjectPart p2) { | 1105 | Array.Sort(partArray, delegate(SceneObjectPart p1, SceneObjectPart p2) |
1106 | // we want the originally selected part first, then the rest in link order -- so make the selected part link num (-1) | 1106 | { |
1107 | int linkNum1 = p1==targetPart ? -1 : p1.LinkNum; | 1107 | // we want the originally selected part first, then the rest in link order -- so make the selected part link num (-1) |
1108 | int linkNum2 = p2==targetPart ? -1 : p2.LinkNum; | 1108 | int linkNum1 = p1==targetPart ? -1 : p1.LinkNum; |
1109 | return linkNum1 - linkNum2; | 1109 | int linkNum2 = p2==targetPart ? -1 : p2.LinkNum; |
1110 | } | 1110 | return linkNum1 - linkNum2; |
1111 | } | ||
1111 | ); | 1112 | ); |
1112 | 1113 | ||
1113 | //look for prims with explicit sit targets that are available | 1114 | //look for prims with explicit sit targets that are available |
@@ -1772,7 +1773,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1772 | // Because appearance setting is in a module, we actually need | 1773 | // Because appearance setting is in a module, we actually need |
1773 | // to give it access to our appearance directly, otherwise we | 1774 | // to give it access to our appearance directly, otherwise we |
1774 | // get a synchronization issue. | 1775 | // get a synchronization issue. |
1775 | public AvatarAppearance Appearance { | 1776 | public AvatarAppearance Appearance |
1777 | { | ||
1776 | get { return m_appearance; } | 1778 | get { return m_appearance; } |
1777 | set { m_appearance = value; } | 1779 | set { m_appearance = value; } |
1778 | } | 1780 | } |
@@ -2789,7 +2791,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2789 | } | 2791 | } |
2790 | 2792 | ||
2791 | // optimization; we have to check per script, but if nothing is pressed and nothing changed, we can skip that | 2793 | // optimization; we have to check per script, but if nothing is pressed and nothing changed, we can skip that |
2792 | if(allflags != ScriptControlled.CONTROL_ZERO || allflags != LastCommands) { | 2794 | if (allflags != ScriptControlled.CONTROL_ZERO || allflags != LastCommands) |
2795 | { | ||
2793 | lock (scriptedcontrols) | 2796 | lock (scriptedcontrols) |
2794 | { | 2797 | { |
2795 | foreach (LLUUID scriptUUID in scriptedcontrols.Keys) | 2798 | foreach (LLUUID scriptUUID in scriptedcontrols.Keys) |
@@ -2798,7 +2801,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2798 | ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us | 2801 | ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us |
2799 | ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle | 2802 | ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle |
2800 | ScriptControlled localChange = localHeld ^ localLast; // the changed bits | 2803 | ScriptControlled localChange = localHeld ^ localLast; // the changed bits |
2801 | if(localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO) { | 2804 | if (localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO) |
2805 | { | ||
2802 | // only send if still pressed or just changed | 2806 | // only send if still pressed or just changed |
2803 | m_scene.EventManager.TriggerControlEvent(scriptControlData.objID, scriptUUID, UUID, (uint)localHeld, (uint)localChange); | 2807 | m_scene.EventManager.TriggerControlEvent(scriptControlData.objID, scriptUUID, UUID, (uint)localHeld, (uint)localChange); |
2804 | } | 2808 | } |