diff options
author | MW | 2007-08-29 15:39:57 +0000 |
---|---|---|
committer | MW | 2007-08-29 15:39:57 +0000 |
commit | 36fba5e7e29667544e84541d9d116cda98655f0b (patch) | |
tree | e4c1b43dcfee9d639d1dc1a540ec923437798ae2 | |
parent | Attempt to cut down how often objects are backed up to the database. (diff) | |
download | opensim-SC-36fba5e7e29667544e84541d9d116cda98655f0b.zip opensim-SC-36fba5e7e29667544e84541d9d116cda98655f0b.tar.gz opensim-SC-36fba5e7e29667544e84541d9d116cda98655f0b.tar.bz2 opensim-SC-36fba5e7e29667544e84541d9d116cda98655f0b.tar.xz |
Various small changes (some likely to be removed again soon)
9 files changed, 26 insertions, 13 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index 54136ac..654b901 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Interfaces | |||
39 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); | 39 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); |
40 | public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); | 40 | public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); |
41 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); | 41 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); |
42 | public delegate void StartAnim(LLUUID animID, int seq); | 42 | public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq); |
43 | public delegate void LinkObjects(uint parent, List<uint> children); | 43 | public delegate void LinkObjects(uint parent, List<uint> children); |
44 | public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); | 44 | public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); |
45 | public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); | 45 | public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); |
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. |