diff options
author | Melanie | 2013-05-08 21:51:48 +0100 |
---|---|---|
committer | Melanie | 2013-05-08 21:51:48 +0100 |
commit | cdaceea5a633683c713f084d9beb93a14061772f (patch) | |
tree | 66798e45deff0d13e78740130dde68955a3ba86c /OpenSim/Region/ClientStack/Linden | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Guard the scene list when estates are updated (diff) | |
download | opensim-SC-cdaceea5a633683c713f084d9beb93a14061772f.zip opensim-SC-cdaceea5a633683c713f084d9beb93a14061772f.tar.gz opensim-SC-cdaceea5a633683c713f084d9beb93a14061772f.tar.bz2 opensim-SC-cdaceea5a633683c713f084d9beb93a14061772f.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/IClientAPI.cs
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 800488d..17b59da 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -84,6 +84,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
84 | public event ModifyTerrain OnModifyTerrain; | 84 | public event ModifyTerrain OnModifyTerrain; |
85 | public event Action<IClientAPI> OnRegionHandShakeReply; | 85 | public event Action<IClientAPI> OnRegionHandShakeReply; |
86 | public event GenericCall1 OnRequestWearables; | 86 | public event GenericCall1 OnRequestWearables; |
87 | public event CachedTextureRequest OnCachedTextureRequest; | ||
87 | public event SetAppearance OnSetAppearance; | 88 | public event SetAppearance OnSetAppearance; |
88 | public event AvatarNowWearing OnAvatarNowWearing; | 89 | public event AvatarNowWearing OnAvatarNowWearing; |
89 | public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; | 90 | public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; |
@@ -11707,8 +11708,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11707 | } | 11708 | } |
11708 | 11709 | ||
11709 | /// <summary> | 11710 | /// <summary> |
11710 | /// Send a response back to a client when it asks the asset server (via the region server) if it has | ||
11711 | /// its appearance texture cached. | ||
11712 | /// </summary> | 11711 | /// </summary> |
11713 | /// <remarks> | 11712 | /// <remarks> |
11714 | /// At the moment, we always reply that there is no cached texture. | 11713 | /// At the moment, we always reply that there is no cached texture. |
@@ -11716,6 +11715,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11716 | /// <param name="simclient"></param> | 11715 | /// <param name="simclient"></param> |
11717 | /// <param name="packet"></param> | 11716 | /// <param name="packet"></param> |
11718 | /// <returns></returns> | 11717 | /// <returns></returns> |
11718 | // TODO: Convert old handler to use new method | ||
11719 | /*protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet) | ||
11720 | { | ||
11721 | AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet; | ||
11722 | |||
11723 | if (cachedtex.AgentData.SessionID != SessionId) | ||
11724 | return false; | ||
11725 | |||
11726 | |||
11727 | List<CachedTextureRequestArg> requestArgs = new List<CachedTextureRequestArg>(); | ||
11728 | |||
11729 | for (int i = 0; i < cachedtex.WearableData.Length; i++) | ||
11730 | { | ||
11731 | CachedTextureRequestArg arg = new CachedTextureRequestArg(); | ||
11732 | arg.BakedTextureIndex = cachedtex.WearableData[i].TextureIndex; | ||
11733 | arg.WearableHashID = cachedtex.WearableData[i].ID; | ||
11734 | |||
11735 | requestArgs.Add(arg); | ||
11736 | } | ||
11737 | |||
11738 | CachedTextureRequest handlerCachedTextureRequest = OnCachedTextureRequest; | ||
11739 | if (handlerCachedTextureRequest != null) | ||
11740 | { | ||
11741 | handlerCachedTextureRequest(simclient,cachedtex.AgentData.SerialNum,requestArgs); | ||
11742 | } | ||
11743 | |||
11744 | return true; | ||
11745 | }*/ | ||
11746 | |||
11719 | protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet) | 11747 | protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet) |
11720 | { | 11748 | { |
11721 | //m_log.Debug("texture cached: " + packet.ToString()); | 11749 | //m_log.Debug("texture cached: " + packet.ToString()); |
@@ -11874,6 +11902,40 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11874 | return true; | 11902 | return true; |
11875 | } | 11903 | } |
11876 | 11904 | ||
11905 | /// <summary> | ||
11906 | /// Send a response back to a client when it asks the asset server (via the region server) if it has | ||
11907 | /// its appearance texture cached. | ||
11908 | /// </summary> | ||
11909 | /// <param name="avatar"></param> | ||
11910 | /// <param name="serial"></param> | ||
11911 | /// <param name="cachedTextures"></param> | ||
11912 | /// <returns></returns> | ||
11913 | public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures) | ||
11914 | { | ||
11915 | ScenePresence presence = avatar as ScenePresence; | ||
11916 | if (presence == null) | ||
11917 | return; | ||
11918 | |||
11919 | AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse); | ||
11920 | |||
11921 | // TODO: don't create new blocks if recycling an old packet | ||
11922 | cachedresp.AgentData.AgentID = m_agentId; | ||
11923 | cachedresp.AgentData.SessionID = m_sessionId; | ||
11924 | cachedresp.AgentData.SerialNum = serial; | ||
11925 | cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[cachedTextures.Count]; | ||
11926 | |||
11927 | for (int i = 0; i < cachedTextures.Count; i++) | ||
11928 | { | ||
11929 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); | ||
11930 | cachedresp.WearableData[i].TextureIndex = (byte)cachedTextures[i].BakedTextureIndex; | ||
11931 | cachedresp.WearableData[i].TextureID = cachedTextures[i].BakedTextureID; | ||
11932 | cachedresp.WearableData[i].HostName = new byte[0]; | ||
11933 | } | ||
11934 | |||
11935 | cachedresp.Header.Zerocoded = true; | ||
11936 | OutPacket(cachedresp, ThrottleOutPacketType.Task); | ||
11937 | } | ||
11938 | |||
11877 | protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet) | 11939 | protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet) |
11878 | { | 11940 | { |
11879 | MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; | 11941 | MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; |