From 070047ce1bc74cceebd5e817a0e042a7390c5f24 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 26 Oct 2007 14:08:36 +0000 Subject: * Added prototypical AvatarFactory module interface to load avatar parameters * Added dump_assets_to_file option to enable asset dumping for debug * normalized some namespaces * InventoryFolder renamed to InventoryFolderImpl to --- .../Environment/Modules/AvatarFactoryModule.cs | 57 ++++++++++++++++++++++ OpenSim/Region/Environment/Modules/ChatModule.cs | 2 + 2 files changed, 59 insertions(+) create mode 100644 OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs new file mode 100644 index 0000000..f825b7a --- /dev/null +++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using Nini.Config; +using OpenSim.Framework.Types; +using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; + +namespace OpenSim.Region.Environment.Modules +{ + public class AvatarFactoryModule : IAvatarFactory + { + public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, out byte[] visualParams) + { + GetDefaultAvatarAppearance(out wearables, out visualParams); + return true; + } + + public void Initialise(Scene scene, IConfigSource source) + { + scene.RegisterModuleInterface(this); + } + + public void PostInitialise() + { + } + + public void Close() + { + } + + public string Name + { + get { return "Default Avatar Factory"; } + } + + public bool IsSharedModule + { + get { return true; } + } + + public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) + { + visualParams = new byte[218]; + for (int i = 0; i < 218; i++) + { + visualParams[i] = 100; + } + + wearables = AvatarWearable.DefaultWearables; + } + } + + + +} diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 2fe308d..c2611d0 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -126,7 +126,9 @@ namespace OpenSim.Region.Environment.Modules LLUUID fromAgentID = LLUUID.Zero; if (e.Sender != null) + { avatar = scene.GetScenePresence(e.Sender.AgentId); + } if (avatar != null) { -- cgit v1.1