aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJeff Ames2007-10-28 03:58:46 +0000
committerJeff Ames2007-10-28 03:58:46 +0000
commit2cf117cc6c2c7cf106fa83785621577a8b713529 (patch)
tree2978d78b209cd891133521e3b7f618af5113e78a /OpenSim/Region/ClientStack
parent*Replaced -useexecutepath with an updated -inifile extension. You can now spe... (diff)
downloadopensim-SC-2cf117cc6c2c7cf106fa83785621577a8b713529.zip
opensim-SC-2cf117cc6c2c7cf106fa83785621577a8b713529.tar.gz
opensim-SC-2cf117cc6c2c7cf106fa83785621577a8b713529.tar.bz2
opensim-SC-2cf117cc6c2c7cf106fa83785621577a8b713529.tar.xz
Added preliminary support for sitting on prims
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs18
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs16
2 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index a1e4b56..74f1824 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -54,6 +54,8 @@ namespace OpenSim.Region.ClientStack
54 public event SetAppearance OnSetAppearance; 54 public event SetAppearance OnSetAppearance;
55 public event GenericCall2 OnCompleteMovementToRegion; 55 public event GenericCall2 OnCompleteMovementToRegion;
56 public event UpdateAgent OnAgentUpdate; 56 public event UpdateAgent OnAgentUpdate;
57 public event AgentRequestSit OnAgentRequestSit;
58 public event AgentSit OnAgentSit;
57 public event StartAnim OnStartAnim; 59 public event StartAnim OnStartAnim;
58 public event GenericCall OnRequestAvatarsData; 60 public event GenericCall OnRequestAvatarsData;
59 public event LinkObjects OnLinkObjects; 61 public event LinkObjects OnLinkObjects;
@@ -807,6 +809,19 @@ namespace OpenSim.Region.ClientStack
807 avatarReply.PropertiesData.PartnerID = partnerID; 809 avatarReply.PropertiesData.PartnerID = partnerID;
808 OutPacket(avatarReply); 810 OutPacket(avatarReply);
809 } 811 }
812
813 public void SendSitResponse(LLUUID targetID, LLVector3 offset)
814 {
815 AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket();
816
817 avatarSitResponse.SitObject.ID = targetID;
818
819 avatarSitResponse.SitTransform.AutoPilot = true;
820 avatarSitResponse.SitTransform.SitPosition = offset;
821 avatarSitResponse.SitTransform.SitRotation = new LLQuaternion(0.0f, 0.0f, 0.0f, 1.0f);
822
823 OutPacket(avatarSitResponse);
824 }
810 #endregion 825 #endregion
811 826
812 #region Appearance/ Wearables Methods 827 #region Appearance/ Wearables Methods
@@ -889,7 +904,7 @@ namespace OpenSim.Region.ClientStack
889 /// <param name="avatarID"></param> 904 /// <param name="avatarID"></param>
890 /// <param name="avatarLocalID"></param> 905 /// <param name="avatarLocalID"></param>
891 /// <param name="Pos"></param> 906 /// <param name="Pos"></param>
892 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) 907 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID)
893 { 908 {
894 ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); 909 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
895 objupdate.RegionData.RegionHandle = regionHandle; 910 objupdate.RegionData.RegionHandle = regionHandle;
@@ -900,6 +915,7 @@ namespace OpenSim.Region.ClientStack
900 //give this avatar object a local id and assign the user a name 915 //give this avatar object a local id and assign the user a name
901 objupdate.ObjectData[0].ID = avatarLocalID; 916 objupdate.ObjectData[0].ID = avatarLocalID;
902 objupdate.ObjectData[0].FullID = avatarID; 917 objupdate.ObjectData[0].FullID = avatarID;
918 objupdate.ObjectData[0].ParentID = parentID;
903 objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName); 919 objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName);
904 LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); 920 LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
905 byte[] pb = pos2.GetBytes(); 921 byte[] pb = pos2.GetBytes();
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index 05b1118..65a0e44 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -34,6 +34,7 @@ using OpenSim.Framework.Inventory;
34using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
37using OpenSim.Region.Environment.Scenes;
37 38
38namespace OpenSim.Region.ClientStack 39namespace OpenSim.Region.ClientStack
39{ 40{
@@ -198,6 +199,21 @@ namespace OpenSim.Region.ClientStack
198 } 199 }
199 } 200 }
200 break; 201 break;
202 case PacketType.AgentRequestSit:
203 AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack;
204 SendSitResponse(agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
205 if (OnAgentRequestSit != null)
206 {
207 OnAgentRequestSit(this, agentRequestSit.AgentData.AgentID, agentRequestSit.TargetObject.TargetID);
208 }
209 break;
210 case PacketType.AgentSit:
211 if (OnAgentSit != null)
212 {
213 AgentSitPacket agentSit = (AgentSitPacket) Pack;
214 OnAgentSit(this, agentSit.AgentData.AgentID);
215 }
216 break;
201 217
202 #endregion 218 #endregion
203 219