aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-19 03:01:54 +0100
committerJustin Clark-Casey (justincc)2011-07-19 03:01:54 +0100
commit430a4aeba8e98b8285ea3ebdf264baf429a55e22 (patch)
tree68ca3695b7422f0d73aaa45555a77f2babae51d7 /OpenSim/Region/ClientStack
parentremove undo state storage in a few places where it's pointless (diff)
downloadopensim-SC_OLD-430a4aeba8e98b8285ea3ebdf264baf429a55e22.zip
opensim-SC_OLD-430a4aeba8e98b8285ea3ebdf264baf429a55e22.tar.gz
opensim-SC_OLD-430a4aeba8e98b8285ea3ebdf264baf429a55e22.tar.bz2
opensim-SC_OLD-430a4aeba8e98b8285ea3ebdf264baf429a55e22.tar.xz
Fix undo for resizing linksets
This involves implementing a boolean in UndoState to signal whether the undo needs to be done for an entire group/linkset or just a single prim Resizing individual components of linksets is still dodgy. Resizing still has to be down twice, since for some reason the client is sending two multiobjectupdate packets on every resize except the very first. This applies to single prims and linksets. Need to look into this.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs37
1 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index fa35bd8..4c0b53c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11220,8 +11220,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11220 protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet) 11220 protected bool HandleMultipleObjUpdate(IClientAPI simClient, Packet packet)
11221 { 11221 {
11222 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; 11222 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
11223 if (multipleupdate.AgentData.SessionID != SessionId) return false; 11223
11224 // m_log.Debug("new multi update packet " + multipleupdate.ToString()); 11224 if (multipleupdate.AgentData.SessionID != SessionId)
11225 return false;
11226
11227// m_log.DebugFormat(
11228// "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
11229
11225 Scene tScene = (Scene)m_scene; 11230 Scene tScene = (Scene)m_scene;
11226 11231
11227 for (int i = 0; i < multipleupdate.ObjectData.Length; i++) 11232 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
@@ -11242,15 +11247,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11242 } 11247 }
11243 else 11248 else
11244 { 11249 {
11245 // Do this once since fetch parts creates a new array. 11250// m_log.DebugFormat(
11246 SceneObjectPart[] parts = part.ParentGroup.Parts; 11251// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
11247 for (int j = 0; j < parts.Length; j++) 11252// i, block.Type, part.Name, part.LocalId);
11248 { 11253
11249 part.StoreUndoState(); 11254// // Do this once since fetch parts creates a new array.
11250 parts[j].IgnoreUndoUpdate = true; 11255// SceneObjectPart[] parts = part.ParentGroup.Parts;
11251 } 11256// for (int j = 0; j < parts.Length; j++)
11257// {
11258// part.StoreUndoState();
11259// parts[j].IgnoreUndoUpdate = true;
11260// }
11252 11261
11253 // UUID partId = part.UUID;
11254 UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; 11262 UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
11255 11263
11256 switch (block.Type) 11264 switch (block.Type)
@@ -11394,6 +11402,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11394 if (handlerUpdatePrimGroupScale != null) 11402 if (handlerUpdatePrimGroupScale != null)
11395 { 11403 {
11396 // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 11404 // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
11405 part.StoreUndoState(true);
11406 part.IgnoreUndoUpdate = true;
11397 handlerUpdatePrimGroupScale(localId, scale5, this); 11407 handlerUpdatePrimGroupScale(localId, scale5, this);
11398 handlerUpdateVector = OnUpdatePrimGroupPosition; 11408 handlerUpdateVector = OnUpdatePrimGroupPosition;
11399 11409
@@ -11401,7 +11411,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11401 { 11411 {
11402 handlerUpdateVector(localId, pos5, this); 11412 handlerUpdateVector(localId, pos5, this);
11403 } 11413 }
11414
11415 part.IgnoreUndoUpdate = false;
11404 } 11416 }
11417
11405 break; 11418 break;
11406 11419
11407 case 21: 11420 case 21:
@@ -11426,8 +11439,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11426 break; 11439 break;
11427 } 11440 }
11428 11441
11429 for (int j = 0; j < parts.Length; j++) 11442// for (int j = 0; j < parts.Length; j++)
11430 parts[j].IgnoreUndoUpdate = false; 11443// parts[j].IgnoreUndoUpdate = false;
11431 } 11444 }
11432 } 11445 }
11433 } 11446 }