aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-27 03:25:00 +0000
committerTeravus Ovares2007-12-27 03:25:00 +0000
commit87d55443d3fd3cc86dce0b8efe05a8c304f7d6c8 (patch)
tree69599226423b5a4620ab4308b3e0088328894bde /OpenSim/Region/ClientStack
parentPrim inventory persistence phase 1: Creation of preliminary table in sqlite. (diff)
downloadopensim-SC_OLD-87d55443d3fd3cc86dce0b8efe05a8c304f7d6c8.zip
opensim-SC_OLD-87d55443d3fd3cc86dce0b8efe05a8c304f7d6c8.tar.gz
opensim-SC_OLD-87d55443d3fd3cc86dce0b8efe05a8c304f7d6c8.tar.bz2
opensim-SC_OLD-87d55443d3fd3cc86dce0b8efe05a8c304f7d6c8.tar.xz
* Added slightly better object sit handling
* Added sit handling for sit targets * Implemented llSitTarget() * Implemented llAvatarOnSitTarget() * Sit targets do not persist sim restart.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs182
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs4
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs12
3 files changed, 104 insertions, 94 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 823214a..45806ff 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -1999,118 +1999,128 @@ namespace OpenSim.Region.ClientStack
1999 { 1999 {
2000 // Can't act on Null Data 2000 // Can't act on Null Data
2001 if (multipleupdate.ObjectData[i].Data != null) 2001 if (multipleupdate.ObjectData[i].Data != null)
2002 { 2002 {
2003 if (tScene.PermissionsMngr.CanEditObjectPosition(simClient.AgentId, tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID)) 2003 LLUUID editobj = tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID;
2004 if (editobj != null)
2004 { 2005 {
2005 #region position 2006 if (tScene.PermissionsMngr.CanEditObjectPosition(simClient.AgentId, editobj))
2006
2007 if (multipleupdate.ObjectData[i].Type == 9) //change position
2008 { 2007 {
2009 if (OnUpdatePrimGroupPosition != null) 2008 #region position
2009
2010 if (multipleupdate.ObjectData[i].Type == 9) //change position
2010 { 2011 {
2011 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2012 if (OnUpdatePrimGroupPosition != null)
2012 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2013 {
2014 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2015 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2016 }
2013 } 2017 }
2014 } 2018 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
2015 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
2016 {
2017 if (OnUpdatePrimSinglePosition != null)
2018 { 2019 {
2019 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2020 if (OnUpdatePrimSinglePosition != null)
2020 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2021 {
2021 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2022 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2023 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2024 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2025 }
2022 } 2026 }
2023 } 2027 #endregion position
2024 #endregion position 2028 #region rotation
2025 #region rotation
2026 2029
2027 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab 2030 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab
2028 {
2029 if (OnUpdatePrimSingleRotation != null)
2030 { 2031 {
2031 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 2032 if (OnUpdatePrimSingleRotation != null)
2032 //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2033 {
2033 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2034 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
2035 //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2036 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2037 }
2034 } 2038 }
2035 } 2039 else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
2036 else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
2037 {
2038 if (OnUpdatePrimSingleRotation != null)
2039 { 2040 {
2040 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2041 if (OnUpdatePrimSingleRotation != null)
2041 //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2042 {
2042 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2043 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2044 //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2045 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2046 }
2043 } 2047 }
2044 } 2048 else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
2045 else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
2046 {
2047 if (OnUpdatePrimGroupRotation != null)
2048 { 2049 {
2049 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 2050 if (OnUpdatePrimGroupRotation != null)
2050 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2051 {
2051 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 2052 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
2053 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2054 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
2055 }
2052 } 2056 }
2053 } 2057 else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
2054 else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
2055 {
2056 if (OnUpdatePrimGroupMouseRotation != null)
2057 { 2058 {
2058 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2059 if (OnUpdatePrimGroupMouseRotation != null)
2059 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2060 {
2060 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2061 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2061 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2062 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2062 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); 2063 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2064 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2065 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
2066 }
2063 } 2067 }
2064 } 2068 #endregion
2065 #endregion 2069 #region scale
2066 #region scale
2067 2070
2068 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab 2071 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab
2069 {
2070 if (OnUpdatePrimScale != null)
2071 { 2072 {
2072 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2073 if (OnUpdatePrimScale != null)
2073 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2074 {
2074 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2075 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2075 2076 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2076 // Change the position based on scale (for bug number 246) 2077 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2077 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2078
2078 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2079 // Change the position based on scale (for bug number 246)
2079 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2080 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2081 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2082 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2083 }
2080 } 2084 }
2081 } 2085 else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
2082 else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
2083 {
2084 if (OnUpdatePrimScale != null)
2085 { 2086 {
2086 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2087 if (OnUpdatePrimScale != null)
2087 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); 2088 {
2088 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2089 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2089 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 2090 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
2090 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2091 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2092 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
2093 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2094 }
2091 } 2095 }
2092 } 2096 else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
2093 else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
2094 {
2095 if (OnUpdatePrimScale != null)
2096 { 2097 {
2097 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2098 if (OnUpdatePrimScale != null)
2098 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2099 {
2099 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2100 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2101 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2102 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2103 }
2100 } 2104 }
2101 } 2105 else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
2102 else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
2103 {
2104 if (OnUpdatePrimScale != null)
2105 { 2106 {
2106 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 2107 if (OnUpdatePrimScale != null)
2107 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 2108 {
2108 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 2109 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
2110 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
2111 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
2112 }
2109 } 2113 }
2110 }
2111 2114
2112 #endregion 2115 #endregion
2116 }
2117 } // editobj != null;
2118 else
2119 {
2120 // It's a ghost! tell the client to delete it from view.
2121 simClient.SendKillObject(this.Scene.RegionInfo.RegionHandle, multipleupdate.ObjectData[i].ObjectLocalID);
2113 } 2122 }
2123
2114 } 2124 }
2115 } 2125 }
2116 return true; 2126 return true;
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index a4c18d0..a232db8 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -123,9 +123,9 @@ namespace OpenSim.Region.ClientStack
123 /// <param name="circuitcode"></param> 123 /// <param name="circuitcode"></param>
124 public virtual void CloseCircuit(uint circuitcode) 124 public virtual void CloseCircuit(uint circuitcode)
125 { 125 {
126 OpenSim.Framework.Console.MainLog.Instance.Debug("PACKETSERVER", "Removing Circuit Code"); 126
127 m_networkHandler.RemoveClientCircuit(circuitcode); 127 m_networkHandler.RemoveClientCircuit(circuitcode);
128 OpenSim.Framework.Console.MainLog.Instance.Debug("PACKETSERVER", "Removed Circuit Code"); 128
129 //m_scene.ClientManager.CloseAllAgents(circuitcode); 129 //m_scene.ClientManager.CloseAllAgents(circuitcode);
130 } 130 }
131 131
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index a8a1ff6..47e0b3c 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -326,9 +326,9 @@ namespace OpenSim.Region.ClientStack
326 uint circuit; 326 uint circuit;
327 if (clientCircuits.TryGetValue(sender, out circuit)) 327 if (clientCircuits.TryGetValue(sender, out circuit))
328 { 328 {
329 MainLog.Instance.Debug("UDPSERVER", "CloseEndPoint:ClosingCircuit"); 329
330 m_packetServer.CloseCircuit(circuit); 330 m_packetServer.CloseCircuit(circuit);
331 MainLog.Instance.Debug("UDPSERVER", "CloseEndPoint:ClosedCircuit"); 331
332 } 332 }
333 } 333 }
334 334
@@ -381,13 +381,13 @@ namespace OpenSim.Region.ClientStack
381 EndPoint sendto = null; 381 EndPoint sendto = null;
382 if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto)) 382 if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto))
383 { 383 {
384 MainLog.Instance.Debug("UDPSERVER", "RemovingClientCircuit"); 384
385 clientCircuits.Remove(sendto); 385 clientCircuits.Remove(sendto);
386 MainLog.Instance.Debug("UDPSERVER", "Removed Client Circuit"); 386
387 387
388 MainLog.Instance.Debug("UDPSERVER", "Removing Reverse ClientCircuit"); 388
389 clientCircuits_reverse.Remove(circuitcode); 389 clientCircuits_reverse.Remove(circuitcode);
390 MainLog.Instance.Debug("UDPSERVER", "Removed Reverse ClientCircuit"); 390
391 } 391 }
392 } 392 }
393 } 393 }