refator: simplify UndoState.Compare() code

bulletsim
Justin Clark-Casey (justincc) 2011-07-19 05:58:52 +01:00
parent 9dd5a24495
commit 25c532f2ec
1 changed files with 9 additions and 20 deletions

View File

@ -101,23 +101,15 @@ namespace OpenSim.Region.Framework.Scenes
if (part != null)
{
if (part.ParentID == 0)
{
if (Position == part.ParentGroup.AbsolutePosition
&& Rotation == part.RotationOffset
&& Scale == part.Shape.Scale)
return true;
else
return false;
}
return
Position == part.ParentGroup.AbsolutePosition
&& Rotation == part.RotationOffset
&& Scale == part.Shape.Scale;
else
{
if (Position == part.OffsetPosition
&& Rotation == part.RotationOffset
&& Scale == part.Shape.Scale)
return true;
else
return false;
}
return
Position == part.OffsetPosition
&& Rotation == part.RotationOffset
&& Scale == part.Shape.Scale;
}
return false;
@ -249,10 +241,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool Compare(ITerrainChannel terrainChannel)
{
if (m_terrainChannel != terrainChannel)
return false;
else
return false;
return m_terrainChannel == terrainChannel;
}
public void PlaybackState()