aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
authorMW2007-12-01 14:20:37 +0000
committerMW2007-12-01 14:20:37 +0000
commit27f182ac54ffee16da730b2053480944f9ca5412 (patch)
tree86b7188f3d05afd3753d833a2000827a623e0b55 /OpenSim/Region/ClientStack/ClientView.cs
parentset svn:eol-style (diff)
downloadopensim-SC_OLD-27f182ac54ffee16da730b2053480944f9ca5412.zip
opensim-SC_OLD-27f182ac54ffee16da730b2053480944f9ca5412.tar.gz
opensim-SC_OLD-27f182ac54ffee16da730b2053480944f9ca5412.tar.bz2
opensim-SC_OLD-27f182ac54ffee16da730b2053480944f9ca5412.tar.xz
Part 1 of a commit. This revision will not compile, part 2 will be added in a couple of minutes that should fix that.
Some work towards persisting Avatar Appearance (what is being worn). Added OnAvatarNowWearing event to IClientAPI that is triggered by AgentIsNowWearing packets. stub code to subscribe to this event in AvatarFactoryModule. Todo: code needs to be added to AvatarFactoryModule to save the uuids to a database and then read them back when that modules TryGetIntialAvatarAppearance() method is called. Done some changes to Scene to make it easier to subclass it: including changed some private fields to protected and made some methods virtual.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 86efac1..e3a40ea 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -568,6 +568,7 @@ namespace OpenSim.Region.ClientStack
568 public event Action<IClientAPI> OnRegionHandShakeReply; 568 public event Action<IClientAPI> OnRegionHandShakeReply;
569 public event GenericCall2 OnRequestWearables; 569 public event GenericCall2 OnRequestWearables;
570 public event SetAppearance OnSetAppearance; 570 public event SetAppearance OnSetAppearance;
571 public event AvatarNowWearing OnAvatarNowWearing;
571 public event GenericCall2 OnCompleteMovementToRegion; 572 public event GenericCall2 OnCompleteMovementToRegion;
572 public event UpdateAgent OnAgentUpdate; 573 public event UpdateAgent OnAgentUpdate;
573 public event AgentRequestSit OnAgentRequestSit; 574 public event AgentRequestSit OnAgentRequestSit;
@@ -2662,6 +2663,19 @@ namespace OpenSim.Region.ClientStack
2662 OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam); 2663 OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam);
2663 } 2664 }
2664 break; 2665 break;
2666 case PacketType.AgentIsNowWearing:
2667 if (OnAvatarNowWearing != null)
2668 {
2669 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack;
2670 AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
2671 for (int i = 0; i < nowWearing.WearableData.Length; i++)
2672 {
2673 AvatarWearingArgs.Wearable wearable = new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, nowWearing.WearableData[i].WearableType);
2674 wearingArgs.NowWearing.Add(wearable);
2675 }
2676 OnAvatarNowWearing(this, wearingArgs);
2677 }
2678 break;
2665 case PacketType.SetAlwaysRun: 2679 case PacketType.SetAlwaysRun:
2666 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; 2680 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack;
2667 2681
@@ -3606,10 +3620,6 @@ namespace OpenSim.Region.ClientStack
3606 3620
3607 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 3621 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
3608 break; 3622 break;
3609 case PacketType.AgentIsNowWearing:
3610 // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
3611 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
3612 break;
3613 case PacketType.ObjectScale: 3623 case PacketType.ObjectScale:
3614 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); 3624 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
3615 break; 3625 break;