diff options
Diffstat (limited to 'OpenSim/Region')
8 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index ade7a0d..5e185ed 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -197,9 +197,10 @@ namespace OpenSim.Region.ClientStack | |||
197 | { | 197 | { |
198 | if (AgentAni.AnimationList[i].StartAnim) | 198 | if (AgentAni.AnimationList[i].StartAnim) |
199 | { | 199 | { |
200 | |||
200 | if (OnStartAnim != null) | 201 | if (OnStartAnim != null) |
201 | { | 202 | { |
202 | OnStartAnim(AgentAni.AnimationList[i].AnimID, 1); | 203 | OnStartAnim(this, AgentAni.AnimationList[i].AnimID, 1); |
203 | } | 204 | } |
204 | } | 205 | } |
205 | } | 206 | } |
diff --git a/OpenSim/Region/Environment/Modules/XferModule.cs b/OpenSim/Region/Environment/Modules/XferModule.cs index b0d1bf6..a0327e9 100644 --- a/OpenSim/Region/Environment/Modules/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/XferModule.cs | |||
@@ -27,7 +27,7 @@ namespace OpenSim.Region.Environment.Modules | |||
27 | m_scene = scene; | 27 | m_scene = scene; |
28 | m_scene.EventManager.OnNewClient += NewClient; | 28 | m_scene.EventManager.OnNewClient += NewClient; |
29 | 29 | ||
30 | m_scene.RegisterAPIMethod("API_AddXferFile", new ModuleAPIMethod<bool, string, byte[]>(this.AddNewFile)); | 30 | m_scene.RegisterAPIMethod("API_AddXferFile", new ModuleAPIMethod2<bool, string, byte[]>(this.AddNewFile)); |
31 | } | 31 | } |
32 | 32 | ||
33 | public void PostInitialise() | 33 | public void PostInitialise() |
diff --git a/OpenSim/Region/Environment/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs index 0146b52..86a3626 100644 --- a/OpenSim/Region/Environment/RegionManager.cs +++ b/OpenSim/Region/Environment/RegionManager.cs | |||
@@ -9,7 +9,8 @@ using OpenSim.Region.Environment.LandManagement; | |||
9 | 9 | ||
10 | namespace OpenSim.Region.Environment | 10 | namespace OpenSim.Region.Environment |
11 | { | 11 | { |
12 | public delegate TResult ModuleAPIMethod<TResult, TParam0, TParam1>(TParam0 param0, TParam1 param1); | 12 | public delegate TResult ModuleAPIMethod1<TResult, TParam0>(TParam0 param0); |
13 | public delegate TResult ModuleAPIMethod2<TResult, TParam0, TParam1>(TParam0 param0, TParam1 param1); | ||
13 | 14 | ||
14 | public class RegionManager | 15 | public class RegionManager |
15 | { | 16 | { |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 568639f..a9ded3f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -554,6 +554,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
554 | } | 554 | } |
555 | } | 555 | } |
556 | 556 | ||
557 | public void StartAnimation(IClientAPI client, LLUUID animID, int seq) | ||
558 | { | ||
559 | List<ScenePresence> avatars = this.RequestAvatarList(); | ||
560 | for (int i = 0; i < avatars.Count; i++) | ||
561 | { | ||
562 | avatars[i].ControllingClient.SendAnimation(animID, seq, client.AgentId); | ||
563 | } | ||
564 | } | ||
565 | |||
557 | public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) | 566 | public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) |
558 | { | 567 | { |
559 | this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient); | 568 | this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ba9569e..92f26ef 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
90 | //API method Delegates | 90 | //API method Delegates |
91 | 91 | ||
92 | // this most likely shouldn't be handled as a API method like this, but doing it for testing purposes | 92 | // this most likely shouldn't be handled as a API method like this, but doing it for testing purposes |
93 | public ModuleAPIMethod<bool, string, byte[]>AddXferFile = null; | 93 | public ModuleAPIMethod2<bool, string, byte[]>AddXferFile = null; |
94 | 94 | ||
95 | #region Properties | 95 | #region Properties |
96 | 96 | ||
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
196 | 196 | ||
197 | private void SetMethodDelegates() | 197 | private void SetMethodDelegates() |
198 | { | 198 | { |
199 | AddXferFile = (ModuleAPIMethod<bool, string, byte[]>)this.RequestAPIMethod("API_AddXferFile"); | 199 | AddXferFile = (ModuleAPIMethod2<bool, string, byte[]>)this.RequestAPIMethod("API_AddXferFile"); |
200 | } | 200 | } |
201 | 201 | ||
202 | #region Script Handling Methods | 202 | #region Script Handling Methods |
@@ -267,7 +267,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
267 | 267 | ||
268 | //backup scene data | 268 | //backup scene data |
269 | storageCount++; | 269 | storageCount++; |
270 | if (storageCount > 600) //set to how often you want to backup | 270 | if (storageCount > 1200) //set to how often you want to backup |
271 | { | 271 | { |
272 | Backup(); | 272 | Backup(); |
273 | storageCount = 0; | 273 | storageCount = 0; |
@@ -692,6 +692,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
692 | 692 | ||
693 | protected virtual void SubscribeToClientEvents(IClientAPI client) | 693 | protected virtual void SubscribeToClientEvents(IClientAPI client) |
694 | { | 694 | { |
695 | // client.OnStartAnim += StartAnimation; | ||
695 | client.OnRegionHandShakeReply += SendLayerData; | 696 | client.OnRegionHandShakeReply += SendLayerData; |
696 | //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); | 697 | //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); |
697 | client.OnModifyTerrain += ModifyTerrain; | 698 | client.OnModifyTerrain += ModifyTerrain; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 3a2fab2..3740e1b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -35,6 +35,7 @@ using OpenSim.Framework.Types; | |||
35 | using OpenSim.Framework.Communications.Caches; | 35 | using OpenSim.Framework.Communications.Caches; |
36 | using OpenSim.Region.Terrain; | 36 | using OpenSim.Region.Terrain; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Region.Environment.Interfaces; | ||
38 | 39 | ||
39 | namespace OpenSim.Region.Environment.Scenes | 40 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 41 | { |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 0eeea89..e094ac6 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
157 | this.m_lastname = ControllingClient.LastName; | 157 | this.m_lastname = ControllingClient.LastName; |
158 | m_localId = m_scene.NextLocalId; | 158 | m_localId = m_scene.NextLocalId; |
159 | AbsolutePosition = ControllingClient.StartPos; | 159 | AbsolutePosition = ControllingClient.StartPos; |
160 | 160 | ||
161 | visualParams = new byte[218]; | 161 | visualParams = new byte[218]; |
162 | for (int i = 0; i < 218; i++) | 162 | for (int i = 0; i < 218; i++) |
163 | { | 163 | { |
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs index a97979f..6cacf0c 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | |||
@@ -72,8 +72,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
72 | System.Console.WriteLine("Initialising Extensions Scripting Module"); | 72 | System.Console.WriteLine("Initialising Extensions Scripting Module"); |
73 | m_scene = scene; | 73 | m_scene = scene; |
74 | 74 | ||
75 | m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod<bool, string, int>(Compile)); | 75 | m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1<bool, string>(Compile)); |
76 | m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod<bool, IScript, int>(AddPreCompiledScript)); | 76 | m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1<bool, IScript>(AddPreCompiledScript)); |
77 | } | 77 | } |
78 | 78 | ||
79 | public void PostInitialise() | 79 | public void PostInitialise() |
@@ -91,7 +91,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
91 | return "ExtensionsScriptingModule"; | 91 | return "ExtensionsScriptingModule"; |
92 | } | 92 | } |
93 | 93 | ||
94 | public bool Compile(string filename, int dummyParam) | 94 | public bool Compile(string filename) |
95 | { | 95 | { |
96 | foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers) | 96 | foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers) |
97 | { | 97 | { |
@@ -110,7 +110,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
110 | switch (args[0]) | 110 | switch (args[0]) |
111 | { | 111 | { |
112 | case "load": | 112 | case "load": |
113 | Compile(args[1], 0); | 113 | Compile(args[1]); |
114 | break; | 114 | break; |
115 | 115 | ||
116 | default: | 116 | default: |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | public bool AddPreCompiledScript(IScript script, int dummyParam) | 122 | public bool AddPreCompiledScript(IScript script) |
123 | { | 123 | { |
124 | MainLog.Instance.Verbose("Loading script " + script.Name); | 124 | MainLog.Instance.Verbose("Loading script " + script.Name); |
125 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 125 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |