cleanup + comments

avinationmerge
UbitUmarov 2012-03-11 03:28:17 +00:00
parent 53bda83cc2
commit 1f7c0c2ea0
1 changed files with 0 additions and 277 deletions

View File

@ -11506,21 +11506,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
else else
{ {
// m_log.DebugFormat(
// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
// i, block.Type, part.Name, part.LocalId);
// // Do this once since fetch parts creates a new array.
// SceneObjectPart[] parts = part.ParentGroup.Parts;
// for (int j = 0; j < parts.Length; j++)
// {
// part.StoreUndoState();
// parts[j].IgnoreUndoUpdate = true;
// }
// UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
// UpdateVector handlerUpdatePrimGroupScale;
ClientChangeObject updatehandler = onClientChangeObject; ClientChangeObject updatehandler = onClientChangeObject;
if (updatehandler != null) if (updatehandler != null)
@ -11561,7 +11546,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
udata.what = ObjectChangeWhat.primPR; udata.what = ObjectChangeWhat.primPR;
updatehandler(localId, udata, this); updatehandler(localId, udata, this);
break; break;
case 4: // scale sp case 4: // scale sp
@ -11662,270 +11646,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
} }
/*
switch (block.Type)
{
case 1: //change position sp
apos = new Vector3(block.Data, 0);
UpdateVector handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
{
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
handlerUpdatePrimSinglePosition(localId, apos, this);
part.IgnoreUndoUpdate = false;
}
break;
case 2: // rotation sp
arot = new Quaternion(block.Data, 0, true);
UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
if (handlerUpdatePrimSingleRotation != null)
{
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
handlerUpdatePrimSingleRotation(localId, arot, this);
part.IgnoreUndoUpdate = false;
}
break;
case 3: // position plus rotation
apos = new Vector3(block.Data, 0);
arot = new Quaternion(block.Data, 12, true);
UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition;
if (handlerUpdatePrimSingleRotationPosition != null)
{
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
handlerUpdatePrimSingleRotationPosition(localId, arot, apos, this);
part.IgnoreUndoUpdate = false;
}
break;
case 4: // scale sp
case 0x14: // uniform scale sp
ascale = new Vector3(block.Data, 0);
UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
part.IgnoreUndoUpdate = false;
}
break;
case 5: // scale and position sp
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
case 0x15: //uniform scale and position
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
part.StoreUndoState(false);
part.IgnoreUndoUpdate = true;
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, ascale, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
// now group related (bit 4)
case 9: //( 8 + 1 )group position
apos = new Vector3(block.Data, 0);
UpdateVector handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null)
{
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdateVector(localId, apos, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0A: // (8 + 2) group rotation
arot = new Quaternion(block.Data, 0, true);
UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
if (handlerUpdatePrimRotation != null)
{
// Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimRotation(localId, arot, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0B: //( 8 + 2 + 1) group rotation and position
apos = new Vector3(block.Data, 0);
arot = new Quaternion(block.Data, 12, true);
handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
if (handlerUpdatePrimGroupRotation != null)
{
// m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupRotation(localId, apos, arot, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0C: // (8 + 4) group scale
// only afects root prim and only sent by viewer editor object tab scaling
// mouse edition only allows uniform scaling
// SL MAY CHANGE THIS in viewers
ascale = new Vector3(block.Data, 0);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
part.StoreUndoState(false); // <- SL Exception make it apply to root prim and not group
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0D: //(8 + 4 + 1) group scale and position
// exception as above
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
//m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
part.StoreUndoState(false); // <- make it apply to root prim and not group
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
// Change the position based on scale (for bug number 246)
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
case 0x1C: // (0x10 + 8 + 4 ) group scale UNIFORM
ascale = new Vector3(block.Data, 0);
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, ascale, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x1D: // (UNIFORM + GROUP + SCALE + POS)
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, ascale, this);
handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null)
{
handlerUpdateVector(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
default:
m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type));
break;
}
*/
// for (int j = 0; j < parts.Length; j++)
// parts[j].IgnoreUndoUpdate = false;
} }
} }
} }
return true; return true;
} }