diff options
author | Dan Lake | 2011-11-02 14:59:00 -0700 |
---|---|---|
committer | Dan Lake | 2011-11-02 14:59:00 -0700 |
commit | e2c51a977d42822fe78ae0744117afb7bf509d35 (patch) | |
tree | bf145756d32fec7dc295510269447f458ccaf1ea /OpenSim/Region/ScriptEngine | |
parent | Removed redundant SceneContents property from Scene. It's the same as SceneGr... (diff) | |
download | opensim-SC_OLD-e2c51a977d42822fe78ae0744117afb7bf509d35.zip opensim-SC_OLD-e2c51a977d42822fe78ae0744117afb7bf509d35.tar.gz opensim-SC_OLD-e2c51a977d42822fe78ae0744117afb7bf509d35.tar.bz2 opensim-SC_OLD-e2c51a977d42822fe78ae0744117afb7bf509d35.tar.xz |
Changes UpdateFlag in SOP to an enumeration of NONE, TERSE and FULL.
UpdateFlag is now referenced/used only within SOP and SOG. Outsiders are
using ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule on
SOP consistently now. Also started working toward eliminating those
calls to ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule
from outside SOP in favor of just setting properties on SOP and let SOP
decide if an update should be scheduled. This consolidates the update
policy within SOP and the client rather than everywhere that makes
changes to SOP. Some places forget to call update while others call it
multiple times, "just to be sure".
UpdateFlag and Schedule*Update will both be made private shortly.
UpdateFlag is intended to be transient and internal to SOP so it has
been removed from XML serializer for SOPs.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 83c3b78..b3d0dd5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3330,10 +3330,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3330 | 3330 | ||
3331 | protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) | 3331 | protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) |
3332 | { | 3332 | { |
3333 | part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 3333 | part.UpdateAngularVelocity(new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate))); |
3334 | part.ScheduleTerseUpdate(); | ||
3335 | part.SendTerseUpdateToAllClients(); | ||
3336 | part.ParentGroup.HasGroupChanged = true; | ||
3337 | } | 3334 | } |
3338 | 3335 | ||
3339 | public LSL_Integer llGetStartParameter() | 3336 | public LSL_Integer llGetStartParameter() |
@@ -3595,11 +3592,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3595 | parentPrim = targetPart.ParentGroup; | 3592 | parentPrim = targetPart.ParentGroup; |
3596 | childPrim = m_host.ParentGroup; | 3593 | childPrim = m_host.ParentGroup; |
3597 | } | 3594 | } |
3598 | // byte uf = childPrim.RootPart.UpdateFlag; | 3595 | |
3599 | childPrim.RootPart.UpdateFlag = 0; | 3596 | // Required for linking |
3597 | childPrim.RootPart.ClearUpdateSchedule(); | ||
3600 | parentPrim.LinkToGroup(childPrim); | 3598 | parentPrim.LinkToGroup(childPrim); |
3601 | // if (uf != (Byte)0) | ||
3602 | // parent.RootPart.UpdateFlag = uf; | ||
3603 | } | 3599 | } |
3604 | 3600 | ||
3605 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); | 3601 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); |
@@ -3680,7 +3676,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3680 | parts.Remove(newRoot); | 3676 | parts.Remove(newRoot); |
3681 | foreach (SceneObjectPart part in parts) | 3677 | foreach (SceneObjectPart part in parts) |
3682 | { | 3678 | { |
3683 | part.UpdateFlag = 0; | 3679 | // Required for linking |
3680 | part.ClearUpdateSchedule(); | ||
3684 | newRoot.ParentGroup.LinkToGroup(part.ParentGroup); | 3681 | newRoot.ParentGroup.LinkToGroup(part.ParentGroup); |
3685 | } | 3682 | } |
3686 | newRoot.ParentGroup.HasGroupChanged = true; | 3683 | newRoot.ParentGroup.HasGroupChanged = true; |