aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-14 04:57:32 +0000
committerTeravus Ovares2008-05-14 04:57:32 +0000
commit9e8dd941f13c0a0b2a5e76cb69b055d7af02d3bc (patch)
treefcd58d2d0cce49d8052cb9419a0b2890152f82fa /OpenSim/Region/Environment/Scenes/ScenePresence.cs
parent* Removed 19 warnings (diff)
downloadopensim-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 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs31
1 files changed, 7 insertions, 24 deletions
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>