From 69a6f6e3cd5cf1146a2d11d1393df0851c051e67 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Jul 2012 23:26:40 +0100 Subject: refactor: use sit orientation argument passed in to SP.SendSitResponse() rather than creating a new copy There are no issues with side-effects since this is a struct. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c644ea5..a8c98ed 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1857,10 +1857,8 @@ namespace OpenSim.Region.Framework.Scenes return targetPart; } - private void SendSitResponse(UUID targetID, Vector3 offset, Quaternion pSitOrientation) + private void SendSitResponse(UUID targetID, Vector3 offset, Quaternion sitOrientation) { - Vector3 pos = new Vector3(); - Quaternion sitOrientation = pSitOrientation; Vector3 cameraEyeOffset = Vector3.Zero; Vector3 cameraAtOffset = Vector3.Zero; bool forceMouselook = false; @@ -1876,7 +1874,7 @@ namespace OpenSim.Region.Framework.Scenes m_sitAvatarHeight = PhysicsActor.Size.Z; bool canSit = false; - pos = part.AbsolutePosition + offset; + Vector3 pos = part.AbsolutePosition + offset; if (part.IsSitTargetSet) { -- cgit v1.1