mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
avoid some unnecessary sog saves
This commit is contained in:
@@ -661,10 +661,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_passTouches; }
|
||||
set
|
||||
{
|
||||
m_passTouches = value;
|
||||
|
||||
if (ParentGroup != null)
|
||||
if(m_passTouches != value)
|
||||
{
|
||||
m_passTouches = value;
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,10 +675,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_passCollisions; }
|
||||
set
|
||||
{
|
||||
m_passCollisions = value;
|
||||
|
||||
if (ParentGroup != null)
|
||||
if(m_passCollisions != value)
|
||||
{
|
||||
m_passCollisions = value;
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -992,9 +994,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <summary>Update angular velocity and schedule terse update.</summary>
|
||||
public void UpdateAngularVelocity(Vector3 avel)
|
||||
{
|
||||
AngularVelocity = avel;
|
||||
ScheduleTerseUpdate();
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
if(m_angularVelocity.NotEqual(avel))
|
||||
{
|
||||
AngularVelocity = avel;
|
||||
ScheduleTerseUpdate();
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Get or set angular velocity. Does not schedule update.</summary>
|
||||
@@ -1683,17 +1688,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
update = true;
|
||||
m_material = (Material)value;
|
||||
}
|
||||
|
||||
if (m_friction != SOPMaterialData.friction(m_material))
|
||||
float newfriction = SOPMaterialData.friction(m_material);
|
||||
if (m_friction != newfriction)
|
||||
{
|
||||
update = true;
|
||||
m_friction = SOPMaterialData.friction(m_material);
|
||||
m_friction = newfriction;
|
||||
}
|
||||
|
||||
if (m_bounce != SOPMaterialData.bounce(m_material))
|
||||
float newbounce = SOPMaterialData.bounce(m_material);
|
||||
if (m_bounce != newbounce)
|
||||
{
|
||||
update = true;
|
||||
m_bounce = SOPMaterialData.bounce(m_material);
|
||||
m_bounce = newbounce;
|
||||
}
|
||||
|
||||
if (update)
|
||||
@@ -1841,11 +1847,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_density; }
|
||||
set
|
||||
{
|
||||
if (value >=1 && value <= 22587.0)
|
||||
if (value >=1 && value <= 22587.0 && value != m_density)
|
||||
{
|
||||
m_density = value;
|
||||
|
||||
|
||||
if (ParentGroup != null)
|
||||
{
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
@@ -1865,7 +1870,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_gravitymod; }
|
||||
set
|
||||
{
|
||||
if( value >= -1 && value <=28.0f)
|
||||
if(value >= -1f && value <= 28.0f && value != m_gravitymod)
|
||||
{
|
||||
m_gravitymod = value;
|
||||
|
||||
@@ -1888,7 +1893,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_friction; }
|
||||
set
|
||||
{
|
||||
if (value >= 0 && value <= 255.0f)
|
||||
if (value >= 0 && value <= 255.0f && value != m_friction)
|
||||
{
|
||||
m_friction = value;
|
||||
|
||||
@@ -1911,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
get { return m_bounce; }
|
||||
set
|
||||
{
|
||||
if (value >= 0 && value <= 1.0f)
|
||||
if (value >= 0 && value <= 1.0f && value != m_bounce)
|
||||
{
|
||||
m_bounce = value;
|
||||
|
||||
@@ -4048,16 +4053,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Set the text displayed for this part.
|
||||
/// </summary>
|
||||
/// <param name="text"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <param name="alpha"></param>
|
||||
public void SetText(string text, Vector3 color, double alpha)
|
||||
/// <param name="newcolor"></param>
|
||||
/// <param name="newalpha"></param>
|
||||
public void SetText(string text, Vector3 newcolor, double newalpha)
|
||||
{
|
||||
Color oldcolor = Color;
|
||||
|
||||
Color = Color.FromArgb((int) (alpha * 0xff),
|
||||
(int) (color.X * 0xff),
|
||||
(int) (color.Y * 0xff),
|
||||
(int) (color.Z * 0xff));
|
||||
Color = Color.FromArgb((int) (newalpha * 0xff),
|
||||
(int) (newcolor.X * 0xff),
|
||||
(int) (newcolor.Y * 0xff),
|
||||
(int) (newcolor.Z * 0xff));
|
||||
osUTF8 old = osUTF8Text;
|
||||
if(string.IsNullOrEmpty(text))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user