Various small changes (some likely to be removed again soon)

afrisby
MW 2007-08-29 15:39:57 +00:00
parent 1a33582c05
commit 36fba5e7e2
9 changed files with 26 additions and 13 deletions

View File

@ -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);

View File

@ -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);
}
}
}

View File

@ -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()

View File

@ -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
{

View File

@ -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);

View File

@ -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;

View File

@ -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
{

View File

@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes
this.m_lastname = ControllingClient.LastName;
m_localId = m_scene.NextLocalId;
AbsolutePosition = ControllingClient.StartPos;
visualParams = new byte[218];
for (int i = 0; i < 218; i++)
{

View File

@ -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.