From 1fb54b074c243bab1964b4a568d672e87d18655f Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 28 Apr 2008 01:48:21 +0000 Subject: * 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. --- OpenSim/Region/ClientStack/ClientView.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 94de013..aac96d1 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -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; -- cgit v1.1