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