diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 |
3 files changed, 43 insertions, 5 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 3874c47..257997e 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -72,6 +72,7 @@ namespace OpenSim.Framework | |||
72 | protected float m_avatarAnimOffset = 0; | 72 | protected float m_avatarAnimOffset = 0; |
73 | protected WearableCacheItem[] m_cacheitems; | 73 | protected WearableCacheItem[] m_cacheitems; |
74 | protected bool m_cacheItemsDirty = true; | 74 | protected bool m_cacheItemsDirty = true; |
75 | public static Primitive.TextureEntry Invisible = null; | ||
75 | 76 | ||
76 | public virtual int Serial | 77 | public virtual int Serial |
77 | { | 78 | { |
@@ -134,8 +135,30 @@ namespace OpenSim.Framework | |||
134 | set { m_cacheItemsDirty = value; } | 135 | set { m_cacheItemsDirty = value; } |
135 | } | 136 | } |
136 | 137 | ||
138 | private void CreateInvisibleTextureEntry() | ||
139 | { | ||
140 | if (Invisible != null) | ||
141 | return; | ||
142 | Invisible = new Primitive.TextureEntry(new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); | ||
143 | |||
144 | Invisible.FaceTextures[8] = new Primitive.TextureEntryFace(null); | ||
145 | Invisible.FaceTextures[8].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
146 | Invisible.FaceTextures[9] = new Primitive.TextureEntryFace(null); | ||
147 | Invisible.FaceTextures[9].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
148 | Invisible.FaceTextures[10] = new Primitive.TextureEntryFace(null); | ||
149 | Invisible.FaceTextures[10].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
150 | Invisible.FaceTextures[11] = new Primitive.TextureEntryFace(null); | ||
151 | Invisible.FaceTextures[11].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
152 | Invisible.FaceTextures[19] = new Primitive.TextureEntryFace(null); | ||
153 | Invisible.FaceTextures[19].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
154 | Invisible.FaceTextures[20] = new Primitive.TextureEntryFace(null); | ||
155 | Invisible.FaceTextures[20].TextureID = new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); | ||
156 | } | ||
157 | |||
137 | public AvatarAppearance() | 158 | public AvatarAppearance() |
138 | { | 159 | { |
160 | CreateInvisibleTextureEntry(); | ||
161 | |||
139 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); | 162 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); |
140 | 163 | ||
141 | m_serial = 0; | 164 | m_serial = 0; |
@@ -149,6 +172,9 @@ namespace OpenSim.Framework | |||
149 | 172 | ||
150 | public AvatarAppearance(OSDMap map) | 173 | public AvatarAppearance(OSDMap map) |
151 | { | 174 | { |
175 | CreateInvisibleTextureEntry(); | ||
176 | |||
177 | Invisible = new Primitive.TextureEntry(new UUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); | ||
152 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance from OSDMap"); | 178 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance from OSDMap"); |
153 | 179 | ||
154 | Unpack(map); | 180 | Unpack(map); |
@@ -157,6 +183,7 @@ namespace OpenSim.Framework | |||
157 | 183 | ||
158 | public AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) | 184 | public AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) |
159 | { | 185 | { |
186 | CreateInvisibleTextureEntry(); | ||
160 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance"); | 187 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance"); |
161 | 188 | ||
162 | m_serial = 0; | 189 | m_serial = 0; |
@@ -194,6 +221,7 @@ namespace OpenSim.Framework | |||
194 | 221 | ||
195 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked) | 222 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked) |
196 | { | 223 | { |
224 | CreateInvisibleTextureEntry(); | ||
197 | // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); | 225 | // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); |
198 | 226 | ||
199 | if (appearance == null) | 227 | if (appearance == null) |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f2f7cf9..b7a4b93 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5142,7 +5142,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5142 | acceleration = Vector3.Zero; | 5142 | acceleration = Vector3.Zero; |
5143 | 5143 | ||
5144 | if (sendTexture) | 5144 | if (sendTexture) |
5145 | textureEntry = presence.Appearance.Texture.GetBytes(); | 5145 | { |
5146 | if (presence.Invisible) | ||
5147 | textureEntry = AvatarAppearance.Invisible.GetBytes(); | ||
5148 | else | ||
5149 | textureEntry = presence.Appearance.Texture.GetBytes(); | ||
5150 | } | ||
5146 | else | 5151 | else |
5147 | textureEntry = null; | 5152 | textureEntry = null; |
5148 | } | 5153 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7086b52..5a3e554 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -90,6 +90,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
90 | 90 | ||
91 | public bool isNPC { get; private set; } | 91 | public bool isNPC { get; private set; } |
92 | 92 | ||
93 | public bool Invisible { get; set; } | ||
93 | private PresenceType m_presenceType; | 94 | private PresenceType m_presenceType; |
94 | public PresenceType PresenceType { | 95 | public PresenceType PresenceType { |
95 | get {return m_presenceType;} | 96 | get {return m_presenceType;} |
@@ -949,6 +950,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
949 | public ScenePresence( | 950 | public ScenePresence( |
950 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 951 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
951 | { | 952 | { |
953 | Invisible = false; | ||
952 | AttachmentsSyncLock = new Object(); | 954 | AttachmentsSyncLock = new Object(); |
953 | AllowMovement = true; | 955 | AllowMovement = true; |
954 | IsChildAgent = true; | 956 | IsChildAgent = true; |
@@ -3709,14 +3711,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
3709 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); | 3711 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); |
3710 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 3712 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) |
3711 | return; | 3713 | return; |
3712 | avatar.ControllingClient.SendAppearance( | 3714 | SendAppearanceToAgentNF(avatar); |
3713 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); | ||
3714 | } | 3715 | } |
3715 | 3716 | ||
3716 | public void SendAppearanceToAgentNF(ScenePresence avatar) | 3717 | public void SendAppearanceToAgentNF(ScenePresence avatar) |
3717 | { | 3718 | { |
3718 | avatar.ControllingClient.SendAppearance( | 3719 | if (Invisible) |
3719 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); | 3720 | avatar.ControllingClient.SendAppearance( |
3721 | UUID, Appearance.VisualParams, AvatarAppearance.Invisible.GetBytes()); | ||
3722 | else | ||
3723 | avatar.ControllingClient.SendAppearance( | ||
3724 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); | ||
3720 | } | 3725 | } |
3721 | 3726 | ||
3722 | public void SendAnimPackToAgent(ScenePresence p) | 3727 | public void SendAnimPackToAgent(ScenePresence p) |