Various small changes (some likely to be removed again soon)
parent
1a33582c05
commit
36fba5e7e2
|
@ -39,7 +39,7 @@ namespace OpenSim.Framework.Interfaces
|
|||
public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos);
|
||||
public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient);
|
||||
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
|
||||
public delegate void StartAnim(LLUUID animID, int seq);
|
||||
public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq);
|
||||
public delegate void LinkObjects(uint parent, List<uint> children);
|
||||
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
|
||||
public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
|
||||
|
|
|
@ -197,9 +197,10 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
if (AgentAni.AnimationList[i].StartAnim)
|
||||
{
|
||||
|
||||
if (OnStartAnim != null)
|
||||
{
|
||||
OnStartAnim(AgentAni.AnimationList[i].AnimID, 1);
|
||||
OnStartAnim(this, AgentAni.AnimationList[i].AnimID, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
m_scene = scene;
|
||||
m_scene.EventManager.OnNewClient += NewClient;
|
||||
|
||||
m_scene.RegisterAPIMethod("API_AddXferFile", new ModuleAPIMethod<bool, string, byte[]>(this.AddNewFile));
|
||||
m_scene.RegisterAPIMethod("API_AddXferFile", new ModuleAPIMethod2<bool, string, byte[]>(this.AddNewFile));
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
|
|
@ -9,7 +9,8 @@ using OpenSim.Region.Environment.LandManagement;
|
|||
|
||||
namespace OpenSim.Region.Environment
|
||||
{
|
||||
public delegate TResult ModuleAPIMethod<TResult, TParam0, TParam1>(TParam0 param0, TParam1 param1);
|
||||
public delegate TResult ModuleAPIMethod1<TResult, TParam0>(TParam0 param0);
|
||||
public delegate TResult ModuleAPIMethod2<TResult, TParam0, TParam1>(TParam0 param0, TParam1 param1);
|
||||
|
||||
public class RegionManager
|
||||
{
|
||||
|
|
|
@ -554,6 +554,15 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void StartAnimation(IClientAPI client, LLUUID animID, int seq)
|
||||
{
|
||||
List<ScenePresence> avatars = this.RequestAvatarList();
|
||||
for (int i = 0; i < avatars.Count; i++)
|
||||
{
|
||||
avatars[i].ControllingClient.SendAnimation(animID, seq, client.AgentId);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
//API method Delegates
|
||||
|
||||
// this most likely shouldn't be handled as a API method like this, but doing it for testing purposes
|
||||
public ModuleAPIMethod<bool, string, byte[]>AddXferFile = null;
|
||||
public ModuleAPIMethod2<bool, string, byte[]>AddXferFile = null;
|
||||
|
||||
#region Properties
|
||||
|
||||
|
@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
private void SetMethodDelegates()
|
||||
{
|
||||
AddXferFile = (ModuleAPIMethod<bool, string, byte[]>)this.RequestAPIMethod("API_AddXferFile");
|
||||
AddXferFile = (ModuleAPIMethod2<bool, string, byte[]>)this.RequestAPIMethod("API_AddXferFile");
|
||||
}
|
||||
|
||||
#region Script Handling Methods
|
||||
|
@ -267,7 +267,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
//backup scene data
|
||||
storageCount++;
|
||||
if (storageCount > 600) //set to how often you want to backup
|
||||
if (storageCount > 1200) //set to how often you want to backup
|
||||
{
|
||||
Backup();
|
||||
storageCount = 0;
|
||||
|
@ -692,6 +692,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
protected virtual void SubscribeToClientEvents(IClientAPI client)
|
||||
{
|
||||
// client.OnStartAnim += StartAnimation;
|
||||
client.OnRegionHandShakeReply += SendLayerData;
|
||||
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
||||
client.OnModifyTerrain += ModifyTerrain;
|
||||
|
|
|
@ -35,6 +35,7 @@ using OpenSim.Framework.Types;
|
|||
using OpenSim.Framework.Communications.Caches;
|
||||
using OpenSim.Region.Terrain;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
|
|
|
@ -72,8 +72,8 @@ namespace OpenSim.Region.ExtensionsScriptModule
|
|||
System.Console.WriteLine("Initialising Extensions Scripting Module");
|
||||
m_scene = scene;
|
||||
|
||||
m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod<bool, string, int>(Compile));
|
||||
m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod<bool, IScript, int>(AddPreCompiledScript));
|
||||
m_scene.RegisterAPIMethod("API_CompileExtensionScript", new ModuleAPIMethod1<bool, string>(Compile));
|
||||
m_scene.RegisterAPIMethod("API_AddExtensionScript", new ModuleAPIMethod1<bool, IScript>(AddPreCompiledScript));
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
@ -91,7 +91,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
|
|||
return "ExtensionsScriptingModule";
|
||||
}
|
||||
|
||||
public bool Compile(string filename, int dummyParam)
|
||||
public bool Compile(string filename)
|
||||
{
|
||||
foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
|
|||
switch (args[0])
|
||||
{
|
||||
case "load":
|
||||
Compile(args[1], 0);
|
||||
Compile(args[1]);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -119,7 +119,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
|
|||
}
|
||||
}
|
||||
|
||||
public bool AddPreCompiledScript(IScript script, int dummyParam)
|
||||
public bool AddPreCompiledScript(IScript script)
|
||||
{
|
||||
MainLog.Instance.Verbose("Loading script " + script.Name);
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue