diff options
author | MW | 2007-05-21 19:12:18 +0000 |
---|---|---|
committer | MW | 2007-05-21 19:12:18 +0000 |
commit | f96083a903024550243ada885c8edccad7e0eed7 (patch) | |
tree | e789d0d973490b0d5fdca86a41bacf319fe80f31 /OpenSim.RegionServer/world/Avatar.Update.cs | |
parent | Merged the new ODE stuff (diff) | |
download | opensim-SC_OLD-f96083a903024550243ada885c8edccad7e0eed7.zip opensim-SC_OLD-f96083a903024550243ada885c8edccad7e0eed7.tar.gz opensim-SC_OLD-f96083a903024550243ada885c8edccad7e0eed7.tar.bz2 opensim-SC_OLD-f96083a903024550243ada885c8edccad7e0eed7.tar.xz |
More work on adding Events to ClientView (and registering to handle those events in Avatar and World)
Diffstat (limited to 'OpenSim.RegionServer/world/Avatar.Update.cs')
-rw-r--r-- | OpenSim.RegionServer/world/Avatar.Update.cs | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/OpenSim.RegionServer/world/Avatar.Update.cs b/OpenSim.RegionServer/world/Avatar.Update.cs index 75f0bb4..ee72ba3 100644 --- a/OpenSim.RegionServer/world/Avatar.Update.cs +++ b/OpenSim.RegionServer/world/Avatar.Update.cs | |||
@@ -148,25 +148,15 @@ namespace OpenSim.world | |||
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | public void SendInitialAppearance() | 151 | public void SendOurAppearance() |
152 | { | 152 | { |
153 | AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); | 153 | ControllingClient.SendAppearance(this.Wearables); |
154 | aw.AgentData.AgentID = this.ControllingClient.AgentID; | 154 | } |
155 | aw.AgentData.SerialNum = 0; | ||
156 | aw.AgentData.SessionID = ControllingClient.SessionID; | ||
157 | |||
158 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; | ||
159 | AgentWearablesUpdatePacket.WearableDataBlock awb; | ||
160 | for (int i = 0; i < 13; i++) | ||
161 | { | ||
162 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | ||
163 | awb.WearableType = (byte)i; | ||
164 | awb.AssetID = this.Wearables[i].AssetID; | ||
165 | awb.ItemID = this.Wearables[i].ItemID; | ||
166 | aw.WearableData[i] = awb; | ||
167 | } | ||
168 | 155 | ||
169 | ControllingClient.OutPacket(aw); | 156 | public void SendOurAppearance(ClientView OurClient) |
157 | { | ||
158 | //event handler for wearables request | ||
159 | this.SendOurAppearance(); | ||
170 | } | 160 | } |
171 | 161 | ||
172 | public void SendAppearanceToOtherAgent(Avatar avatarInfo) | 162 | public void SendAppearanceToOtherAgent(Avatar avatarInfo) |
@@ -188,13 +178,14 @@ namespace OpenSim.world | |||
188 | avatarInfo.SendPacketToViewer(avp); | 178 | avatarInfo.SendPacketToViewer(avp); |
189 | } | 179 | } |
190 | 180 | ||
191 | public void SetAppearance(AgentSetAppearancePacket appear) | 181 | public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam) |
192 | { | 182 | { |
193 | LLObject.TextureEntry tex = new LLObject.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); | 183 | LLObject.TextureEntry tex = new LLObject.TextureEntry(texture, 0, texture.Length); |
194 | this.avatarAppearanceTexture = tex; | 184 | this.avatarAppearanceTexture = tex; |
195 | for (int i = 0; i < appear.VisualParam.Length; i++) | 185 | |
186 | for (int i = 0; i < visualParam.Length; i++) | ||
196 | { | 187 | { |
197 | this.visualParams[i] = appear.VisualParam[i].ParamValue; | 188 | this.visualParams[i] = visualParam[i].ParamValue; |
198 | } | 189 | } |
199 | 190 | ||
200 | List<Avatar> avList = this.m_world.RequestAvatarList(); | 191 | List<Avatar> avList = this.m_world.RequestAvatarList(); |
@@ -291,7 +282,7 @@ namespace OpenSim.world | |||
291 | } | 282 | } |
292 | 283 | ||
293 | // Sends animation update | 284 | // Sends animation update |
294 | public void SendAnimPack() | 285 | public void SendAnimPack(LLUUID animID, int seq) |
295 | { | 286 | { |
296 | AvatarAnimationPacket ani = new AvatarAnimationPacket(); | 287 | AvatarAnimationPacket ani = new AvatarAnimationPacket(); |
297 | ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1]; | 288 | ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1]; |
@@ -301,8 +292,8 @@ namespace OpenSim.world | |||
301 | ani.Sender.ID = ControllingClient.AgentID; | 292 | ani.Sender.ID = ControllingClient.AgentID; |
302 | ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1]; | 293 | ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1]; |
303 | ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock(); | 294 | ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock(); |
304 | ani.AnimationList[0].AnimID = this.current_anim; | 295 | ani.AnimationList[0].AnimID = this.current_anim = animID; |
305 | ani.AnimationList[0].AnimSequenceID = this.anim_seq; | 296 | ani.AnimationList[0].AnimSequenceID = this.anim_seq = seq; |
306 | 297 | ||
307 | List<Avatar> avList = this.m_world.RequestAvatarList(); | 298 | List<Avatar> avList = this.m_world.RequestAvatarList(); |
308 | foreach (Avatar client in avList) | 299 | foreach (Avatar client in avList) |
@@ -312,5 +303,10 @@ namespace OpenSim.world | |||
312 | 303 | ||
313 | } | 304 | } |
314 | 305 | ||
306 | public void SendAnimPack() | ||
307 | { | ||
308 | this.SendAnimPack(this.current_anim, this.anim_seq); | ||
309 | } | ||
310 | |||
315 | } | 311 | } |
316 | } | 312 | } |