From dde21314e75acdaeff27af70077f283493401961 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 15 Aug 2008 10:24:04 +0000 Subject: Update svn properties, formatting cleanup, fix a couple compiler warnings. --- OpenSim/Region/Environment/Scenes/Scene.cs | 14 +++++++------- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 +++++++++++++--------- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') 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 LLVector3 homePostion = new LLVector3(UserProfile.HomeLocationX,UserProfile.HomeLocationY,UserProfile.HomeLocationZ); LLVector3 homeLookat = new LLVector3(UserProfile.HomeLookAt); ulong homeRegionHandle = UserProfile.HomeRegion; - if(homeRegionID == LLUUID.Zero) + if (homeRegionID == LLUUID.Zero) { RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); - if(info == null) + if (info == null) { // can't find the region: Tell viewer and abort client.SendTeleportFailed("Your home-region could not be found."); @@ -2137,7 +2137,7 @@ namespace OpenSim.Region.Environment.Scenes else { RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(homeRegionID); - if(info == null) + if (info == null) { // can't find the region: Tell viewer and abort client.SendTeleportFailed("Your home-region could not be found."); @@ -2762,7 +2762,7 @@ namespace OpenSim.Region.Environment.Scenes public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) { RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); - if(info == null) + if (info == null) { // can't find the region: Tell viewer and abort remoteClient.SendTeleportFailed("The teleport destination could not be found."); @@ -3518,10 +3518,10 @@ namespace OpenSim.Region.Environment.Scenes // their scripts will actually run. // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 SceneObjectPart parent = part.ParentGroup.RootPart; - if( parent != null && parent.IsAttachment ) - return scriptDanger(parent, parent.GetWorldPosition() ); + if (parent != null && parent.IsAttachment) + return scriptDanger(parent, parent.GetWorldPosition()); else - return scriptDanger(part, part.GetWorldPosition() ); + return scriptDanger(part, part.GetWorldPosition()); } else { 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 // Get our own copy of the part array, and sort into the order we want to test SceneObjectPart[] partArray = targetPart.ParentGroup.GetParts(); - Array.Sort(partArray, delegate(SceneObjectPart p1, SceneObjectPart p2) { - // we want the originally selected part first, then the rest in link order -- so make the selected part link num (-1) - int linkNum1 = p1==targetPart ? -1 : p1.LinkNum; - int linkNum2 = p2==targetPart ? -1 : p2.LinkNum; - return linkNum1 - linkNum2; - } + Array.Sort(partArray, delegate(SceneObjectPart p1, SceneObjectPart p2) + { + // we want the originally selected part first, then the rest in link order -- so make the selected part link num (-1) + int linkNum1 = p1==targetPart ? -1 : p1.LinkNum; + int linkNum2 = p2==targetPart ? -1 : p2.LinkNum; + return linkNum1 - linkNum2; + } ); //look for prims with explicit sit targets that are available @@ -1772,7 +1773,8 @@ namespace OpenSim.Region.Environment.Scenes // Because appearance setting is in a module, we actually need // to give it access to our appearance directly, otherwise we // get a synchronization issue. - public AvatarAppearance Appearance { + public AvatarAppearance Appearance + { get { return m_appearance; } set { m_appearance = value; } } @@ -2789,7 +2791,8 @@ namespace OpenSim.Region.Environment.Scenes } // optimization; we have to check per script, but if nothing is pressed and nothing changed, we can skip that - if(allflags != ScriptControlled.CONTROL_ZERO || allflags != LastCommands) { + if (allflags != ScriptControlled.CONTROL_ZERO || allflags != LastCommands) + { lock (scriptedcontrols) { foreach (LLUUID scriptUUID in scriptedcontrols.Keys) @@ -2798,7 +2801,8 @@ namespace OpenSim.Region.Environment.Scenes ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle ScriptControlled localChange = localHeld ^ localLast; // the changed bits - if(localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO) { + if (localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO) + { // only send if still pressed or just changed m_scene.EventManager.TriggerControlEvent(scriptControlData.objID, scriptUUID, UUID, (uint)localHeld, (uint)localChange); } -- cgit v1.1