aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs56
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs6
4 files changed, 71 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
index 3b84d57..4d49794 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
117 117
118 m_module.Scene.RegionInfo.RegionSettings.Save(); 118 m_module.Scene.RegionInfo.RegionSettings.Save();
119 m_module.TriggerRegionInfoChange(); 119 m_module.TriggerRegionInfoChange();
120 m_module.sendRegionInfoPacketToAll(); 120 m_module.sendRegionHandshakeToAll();
121 } 121 }
122 } 122 }
123 } 123 }
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index ac5f433..052a05e 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -550,6 +550,20 @@ namespace OpenSim.Region.Framework.Scenes
550 /// </remarks> 550 /// </remarks>
551 public event ScriptControlEvent OnScriptControlEvent; 551 public event ScriptControlEvent OnScriptControlEvent;
552 552
553 public delegate void ScriptMovingStartEvent(uint localID);
554
555 /// <summary>
556 /// TODO: Should be triggered when a physics object starts moving.
557 /// </summary>
558 public event ScriptMovingStartEvent OnScriptMovingStartEvent;
559
560 public delegate void ScriptMovingEndEvent(uint localID);
561
562 /// <summary>
563 /// TODO: Should be triggered when a physics object stops moving.
564 /// </summary>
565 public event ScriptMovingEndEvent OnScriptMovingEndEvent;
566
553 public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); 567 public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
554 568
555 /// <summary> 569 /// <summary>
@@ -2238,6 +2252,48 @@ namespace OpenSim.Region.Framework.Scenes
2238 } 2252 }
2239 } 2253 }
2240 2254
2255 public void TriggerMovingStartEvent(uint localID)
2256 {
2257 ScriptMovingStartEvent handlerScriptMovingStartEvent = OnScriptMovingStartEvent;
2258 if (handlerScriptMovingStartEvent != null)
2259 {
2260 foreach (ScriptMovingStartEvent d in handlerScriptMovingStartEvent.GetInvocationList())
2261 {
2262 try
2263 {
2264 d(localID);
2265 }
2266 catch (Exception e)
2267 {
2268 m_log.ErrorFormat(
2269 "[EVENT MANAGER]: Delegate for TriggerMovingStartEvent failed - continuing. {0} {1}",
2270 e.Message, e.StackTrace);
2271 }
2272 }
2273 }
2274 }
2275
2276 public void TriggerMovingEndEvent(uint localID)
2277 {
2278 ScriptMovingEndEvent handlerScriptMovingEndEvent = OnScriptMovingEndEvent;
2279 if (handlerScriptMovingEndEvent != null)
2280 {
2281 foreach (ScriptMovingEndEvent d in handlerScriptMovingEndEvent.GetInvocationList())
2282 {
2283 try
2284 {
2285 d(localID);
2286 }
2287 catch (Exception e)
2288 {
2289 m_log.ErrorFormat(
2290 "[EVENT MANAGER]: Delegate for TriggerMovingEndEvent failed - continuing. {0} {1}",
2291 e.Message, e.StackTrace);
2292 }
2293 }
2294 }
2295 }
2296
2241 public void TriggerRequestChangeWaterHeight(float height) 2297 public void TriggerRequestChangeWaterHeight(float height)
2242 { 2298 {
2243 if (height < 0) 2299 if (height < 0)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1be2776..38a9cb0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1907,10 +1907,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1907 part.Shape.FlexiForceX = (float)Force.x; 1907 part.Shape.FlexiForceX = (float)Force.x;
1908 part.Shape.FlexiForceY = (float)Force.y; 1908 part.Shape.FlexiForceY = (float)Force.y;
1909 part.Shape.FlexiForceZ = (float)Force.z; 1909 part.Shape.FlexiForceZ = (float)Force.z;
1910 part.Shape.PathCurve = 0x80; 1910 part.Shape.PathCurve = (byte)Extrusion.Flexible;
1911 part.ParentGroup.HasGroupChanged = true; 1911 }
1912 part.ScheduleFullUpdate(); 1912 else
1913 {
1914 // Other values not set, they do not seem to be sent to the viewer
1915 // Setting PathCurve appears to be what actually toggles the check box and turns Flexi on and off
1916 part.Shape.PathCurve = (byte)Extrusion.Straight;
1917 part.Shape.FlexiEntry = false;
1913 } 1918 }
1919 part.ParentGroup.HasGroupChanged = true;
1920 part.ScheduleFullUpdate();
1914 } 1921 }
1915 1922
1916 /// <summary> 1923 /// <summary>
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index afde685..0ff2da3 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -62,6 +62,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
62 myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target; 62 myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target;
63 myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target; 63 myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target;
64 myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target; 64 myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target;
65 myScriptEngine.World.EventManager.OnScriptMovingStartEvent += moving_start;
66 myScriptEngine.World.EventManager.OnScriptMovingEndEvent += moving_end;
65 myScriptEngine.World.EventManager.OnScriptControlEvent += control; 67 myScriptEngine.World.EventManager.OnScriptControlEvent += control;
66 myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start; 68 myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start;
67 myScriptEngine.World.EventManager.OnScriptColliding += collision; 69 myScriptEngine.World.EventManager.OnScriptColliding += collision;
@@ -419,14 +421,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
419 // dataserver: not handled here 421 // dataserver: not handled here
420 // link_message: not handled here 422 // link_message: not handled here
421 423
422 public void moving_start(uint localID, UUID itemID) 424 public void moving_start(uint localID)
423 { 425 {
424 myScriptEngine.PostObjectEvent(localID, new EventParams( 426 myScriptEngine.PostObjectEvent(localID, new EventParams(
425 "moving_start",new object[0], 427 "moving_start",new object[0],
426 new DetectParams[0])); 428 new DetectParams[0]));
427 } 429 }
428 430
429 public void moving_end(uint localID, UUID itemID) 431 public void moving_end(uint localID)
430 { 432 {
431 myScriptEngine.PostObjectEvent(localID, new EventParams( 433 myScriptEngine.PostObjectEvent(localID, new EventParams(
432 "moving_end",new object[0], 434 "moving_end",new object[0],