aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs57
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs2
2 files changed, 59 insertions, 0 deletions
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 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using Nini.Config;
6using OpenSim.Framework.Types;
7using OpenSim.Region.Environment.Interfaces;
8using OpenSim.Region.Environment.Scenes;
9
10namespace OpenSim.Region.Environment.Modules
11{
12 public class AvatarFactoryModule : IAvatarFactory
13 {
14 public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, out byte[] visualParams)
15 {
16 GetDefaultAvatarAppearance(out wearables, out visualParams);
17 return true;
18 }
19
20 public void Initialise(Scene scene, IConfigSource source)
21 {
22 scene.RegisterModuleInterface<IAvatarFactory>(this);
23 }
24
25 public void PostInitialise()
26 {
27 }
28
29 public void Close()
30 {
31 }
32
33 public string Name
34 {
35 get { return "Default Avatar Factory"; }
36 }
37
38 public bool IsSharedModule
39 {
40 get { return true; }
41 }
42
43 public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams)
44 {
45 visualParams = new byte[218];
46 for (int i = 0; i < 218; i++)
47 {
48 visualParams[i] = 100;
49 }
50
51 wearables = AvatarWearable.DefaultWearables;
52 }
53 }
54
55
56
57}
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
126 LLUUID fromAgentID = LLUUID.Zero; 126 LLUUID fromAgentID = LLUUID.Zero;
127 127
128 if (e.Sender != null) 128 if (e.Sender != null)
129 {
129 avatar = scene.GetScenePresence(e.Sender.AgentId); 130 avatar = scene.GetScenePresence(e.Sender.AgentId);
131 }
130 132
131 if (avatar != null) 133 if (avatar != null)
132 { 134 {