mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* Implements retrieving child primitives via World.Objects[id] (MRM)
* Optimizes SceneGraph - fetches on primitives via "GetGroupByPrim" wont search the entire list if the primitive is infact the root. (Core) * Updates Test MRM.
This commit is contained in:
@@ -53,10 +53,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
/// <returns></returns>
|
||||
private SceneObjectPart GetSOP()
|
||||
{
|
||||
if (m_rootScene.Entities.ContainsKey(m_localID))
|
||||
return ((SceneObjectGroup) m_rootScene.Entities[m_localID]).RootPart;
|
||||
|
||||
return null;
|
||||
return m_rootScene.GetSceneObjectPart(m_localID);
|
||||
}
|
||||
|
||||
#region OnTouch
|
||||
|
||||
@@ -33,7 +33,18 @@ namespace OpenSim
|
||||
{
|
||||
public override void Start()
|
||||
{
|
||||
Host.Console.Info("Hello World!");
|
||||
// Say Hello
|
||||
Host.Object.Say("Hello, Avatar!");
|
||||
|
||||
// Register ourselves to listen
|
||||
// for touch events.
|
||||
Host.Object.OnTouch += OnTouched;
|
||||
}
|
||||
|
||||
// This is our touch event handler
|
||||
void OnTouched(IObject sender, TouchEventArgs e)
|
||||
{
|
||||
Host.Object.Say("Touched.");
|
||||
}
|
||||
|
||||
public override void Stop()
|
||||
|
||||
Reference in New Issue
Block a user