diff options
author | Teravus Ovares | 2008-05-14 04:57:32 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-14 04:57:32 +0000 |
commit | 9e8dd941f13c0a0b2a5e76cb69b055d7af02d3bc (patch) | |
tree | fcd58d2d0cce49d8052cb9419a0b2890152f82fa | |
parent | * Removed 19 warnings (diff) | |
download | opensim-SC-9e8dd941f13c0a0b2a5e76cb69b055d7af02d3bc.zip opensim-SC-9e8dd941f13c0a0b2a5e76cb69b055d7af02d3bc.tar.gz opensim-SC-9e8dd941f13c0a0b2a5e76cb69b055d7af02d3bc.tar.bz2 opensim-SC-9e8dd941f13c0a0b2a5e76cb69b055d7af02d3bc.tar.xz |
* Refactored OutPacket out of ScenePresence
* Down to 65 warnings.
Diffstat (limited to '')
6 files changed, 68 insertions, 29 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 87e8ace..690b04e 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -634,9 +634,9 @@ namespace OpenSim.Framework | |||
634 | 634 | ||
635 | LLUUID SecureSessionId { get; } | 635 | LLUUID SecureSessionId { get; } |
636 | 636 | ||
637 | [Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names")] | 637 | [Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names. Adam, this is impossible to completely refactor out. Nor would I suggest it. All applications that i've ever dealt with have firstname and lastname. However the firstname and lastname are not always the username.")] |
638 | string FirstName { get; } | 638 | string FirstName { get; } |
639 | [Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names")] | 639 | [Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names. Adam, this is impossible to completely refactor out. Nor would I suggest it. All applications that i've ever dealt with have firstname and lastname. However the firstname and lastname are not always the username.")] |
640 | string LastName { get; } | 640 | string LastName { get; } |
641 | 641 | ||
642 | [Obsolete("LLClientView Specific - Replace with ???")] | 642 | [Obsolete("LLClientView Specific - Replace with ???")] |
@@ -809,7 +809,7 @@ namespace OpenSim.Framework | |||
809 | 809 | ||
810 | 810 | ||
811 | 811 | ||
812 | [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST please refactor appropriately.")] | 812 | [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] |
813 | void OutPacket(Packet newPack, ThrottleOutPacketType packType); | 813 | void OutPacket(Packet newPack, ThrottleOutPacketType packType); |
814 | void SendWearables(AvatarWearable[] wearables, int serial); | 814 | void SendWearables(AvatarWearable[] wearables, int serial); |
815 | void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry); | 815 | void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry); |
@@ -969,6 +969,11 @@ namespace OpenSim.Framework | |||
969 | 969 | ||
970 | void SendAgentOnline(LLUUID[] agentIDs); | 970 | void SendAgentOnline(LLUUID[] agentIDs); |
971 | 971 | ||
972 | void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, | ||
973 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); | ||
974 | |||
975 | void SendAdminResponse(LLUUID Token, uint AdminLevel); | ||
976 | |||
972 | byte[] GetThrottlesPacked(float multiplier); | 977 | byte[] GetThrottlesPacked(float multiplier); |
973 | 978 | ||
974 | 979 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e1e8854..b8f055e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5739,6 +5739,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5739 | offp.AgentBlock = offpb; | 5739 | offp.AgentBlock = offpb; |
5740 | OutPacket(offp, ThrottleOutPacketType.Task); | 5740 | OutPacket(offp, ThrottleOutPacketType.Task); |
5741 | } | 5741 | } |
5742 | |||
5743 | public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, | ||
5744 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) | ||
5745 | { | ||
5746 | AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); | ||
5747 | avatarSitResponse.SitObject.ID = TargetID; | ||
5748 | if (CameraAtOffset != LLVector3.Zero) | ||
5749 | { | ||
5750 | avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset; | ||
5751 | avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset; | ||
5752 | } | ||
5753 | avatarSitResponse.SitTransform.ForceMouselook = ForceMouseLook; | ||
5754 | avatarSitResponse.SitTransform.AutoPilot = autopilot; | ||
5755 | avatarSitResponse.SitTransform.SitPosition = OffsetPos; | ||
5756 | avatarSitResponse.SitTransform.SitRotation = SitOrientation; | ||
5757 | |||
5758 | OutPacket(avatarSitResponse, ThrottleOutPacketType.Task); | ||
5759 | } | ||
5760 | public void SendAdminResponse(LLUUID Token, uint AdminLevel) | ||
5761 | { | ||
5762 | GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); | ||
5763 | GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); | ||
5764 | GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock(); | ||
5765 | |||
5766 | adb.AgentID = AgentId; | ||
5767 | adb.SessionID = SessionId; // More security | ||
5768 | gdb.GodLevel = (byte)AdminLevel; | ||
5769 | gdb.Token = Token; | ||
5770 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; | ||
5771 | respondPacket.GrantData = gdb; | ||
5772 | respondPacket.AgentData = adb; | ||
5773 | OutPacket(respondPacket, ThrottleOutPacketType.Task); | ||
5774 | } | ||
5742 | public ClientInfo GetClientInfo() | 5775 | public ClientInfo GetClientInfo() |
5743 | { | 5776 | { |
5744 | //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); | 5777 | //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs index f9e81f0..0f7f2f2 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs | |||
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
176 | ActiveGroupTitle = grp.ActiveGroupTitle; | 176 | ActiveGroupTitle = grp.ActiveGroupTitle; |
177 | } | 177 | } |
178 | 178 | ||
179 | //remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname, lastname, ActiveGroupPowers, ActiveGroupName, ActiveGroupTitle); | 179 | remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname, lastname, ActiveGroupPowers, ActiveGroupName, ActiveGroupTitle); |
180 | } | 180 | } |
181 | } | 181 | } |
182 | } | 182 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index e5d295b..3126f1c 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -92,7 +92,16 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
92 | { | 92 | { |
93 | 93 | ||
94 | } | 94 | } |
95 | public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, | ||
96 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) | ||
97 | { | ||
98 | |||
99 | } | ||
95 | 100 | ||
101 | public void SendAdminResponse(LLUUID Token, uint AdminLevel) | ||
102 | { | ||
103 | |||
104 | } | ||
96 | public LLUUID GetDefaultAnimation(string name) | 105 | public LLUUID GetDefaultAnimation(string name) |
97 | { | 106 | { |
98 | return LLUUID.Zero; | 107 | return LLUUID.Zero; |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 3189b10..6f0fbdf 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -942,10 +942,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
942 | 942 | ||
943 | private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) | 943 | private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) |
944 | { | 944 | { |
945 | AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); | 945 | |
946 | |||
947 | avatarSitResponse.SitObject.ID = targetID; | ||
948 | 946 | ||
947 | |||
948 | |||
949 | bool autopilot = true; | 949 | bool autopilot = true; |
950 | LLVector3 pos = new LLVector3(); | 950 | LLVector3 pos = new LLVector3(); |
951 | LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); | 951 | LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); |
@@ -1000,12 +1000,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1000 | } | 1000 | } |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | avatarSitResponse.SitTransform.AutoPilot = autopilot; | 1003 | ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false); |
1004 | avatarSitResponse.SitTransform.SitPosition = offset; | 1004 | |
1005 | avatarSitResponse.SitTransform.SitRotation = sitOrientation; | ||
1006 | |||
1007 | remoteClient.OutPacket(avatarSitResponse, ThrottleOutPacketType.Task); | ||
1008 | |||
1009 | // This calls HandleAgentSit twice, once from here, and the client calls | 1005 | // This calls HandleAgentSit twice, once from here, and the client calls |
1010 | // HandleAgentSit itself after it gets to the location | 1006 | // HandleAgentSit itself after it gets to the location |
1011 | // It doesn't get to the location until we've moved them there though | 1007 | // It doesn't get to the location until we've moved them there though |
@@ -1710,29 +1706,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1710 | /// </summary> | 1706 | /// </summary> |
1711 | public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godStatus) | 1707 | public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godStatus) |
1712 | { | 1708 | { |
1713 | GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); | ||
1714 | GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); | ||
1715 | GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock(); | ||
1716 | |||
1717 | adb.AgentID = agentID; | ||
1718 | adb.SessionID = sessionID; // More security | ||
1719 | |||
1720 | if (godStatus) | 1709 | if (godStatus) |
1721 | { | 1710 | { |
1722 | gdb.GodLevel = (byte)250; | ||
1723 | m_godlevel = 250; | 1711 | m_godlevel = 250; |
1724 | } | 1712 | } |
1725 | else | 1713 | else |
1726 | { | 1714 | { |
1727 | gdb.GodLevel = (byte)0; | ||
1728 | m_godlevel = 0; | 1715 | m_godlevel = 0; |
1729 | } | 1716 | } |
1730 | 1717 | ||
1731 | gdb.Token = token; | 1718 | ControllingClient.SendAdminResponse(token, (uint)m_godlevel); |
1732 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; | ||
1733 | respondPacket.GrantData = gdb; | ||
1734 | respondPacket.AgentData = adb; | ||
1735 | ControllingClient.OutPacket(respondPacket, ThrottleOutPacketType.Task); | ||
1736 | } | 1719 | } |
1737 | 1720 | ||
1738 | /// <summary> | 1721 | /// <summary> |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 19494c2..68f3ecb 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -563,7 +563,6 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
563 | { | 563 | { |
564 | } | 564 | } |
565 | 565 | ||
566 | |||
567 | public void SendAgentOffline(LLUUID[] agentIDs) | 566 | public void SendAgentOffline(LLUUID[] agentIDs) |
568 | { | 567 | { |
569 | 568 | ||
@@ -574,6 +573,16 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
574 | 573 | ||
575 | } | 574 | } |
576 | 575 | ||
576 | public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, | ||
577 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) | ||
578 | { | ||
579 | } | ||
580 | |||
581 | public void SendAdminResponse(LLUUID Token, uint AdminLevel) | ||
582 | { | ||
583 | |||
584 | } | ||
585 | |||
577 | private void Update() | 586 | private void Update() |
578 | { | 587 | { |
579 | frame++; | 588 | frame++; |