* Added basic 3-5 level undo on prim position/rotation/scale.

* In the future this should be a config option...   and, hopefully this tides the builders over for a little while.
This commit is contained in:
Teravus Ovares
2008-04-28 01:48:21 +00:00
parent 7693a7dac9
commit 1fb54b074c
9 changed files with 370 additions and 8 deletions

View File

@@ -238,6 +238,7 @@ namespace OpenSim.Region.ClientStack
private ScriptAnswer handlerScriptAnswer = null;
private RequestPayPrice handlerRequestPayPrice = null;
private ObjectDeselect handlerObjectDetach = null;
private AgentSit handlerOnUndo = null;
/* Properties */
@@ -799,6 +800,7 @@ namespace OpenSim.Region.ClientStack
public event ScriptAnswer OnScriptAnswer;
public event RequestPayPrice OnRequestPayPrice;
public event AgentSit OnUndo;
#region Scene/Avatar to Client
@@ -3884,6 +3886,23 @@ namespace OpenSim.Region.ClientStack
// That means multiple object perms may be updated in a single packet.
break;
case PacketType.Undo:
UndoPacket undoitem = (UndoPacket)Pack;
if (undoitem.ObjectData.Length > 0)
{
for (int i = 0; i < undoitem.ObjectData.Length; i++)
{
LLUUID objiD = undoitem.ObjectData[i].ObjectID;
handlerOnUndo = OnUndo;
if (handlerOnUndo != null)
{
handlerOnUndo(this, objiD);
}
}
}
break;
case PacketType.ObjectDuplicateOnRay:
ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack;