diff options
author | Justin Clark-Casey (justincc) | 2011-07-18 04:54:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-18 04:54:21 +0100 |
commit | 6fc74b36d1d0f7dcd6f013893c3189a3f989431c (patch) | |
tree | a82bdd3fe6f15298624a142a3705f2739a8ee031 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | use standard sdk stack in terrain model rather than OpenSim.Framework.UndoStack. (diff) | |
download | opensim-SC-6fc74b36d1d0f7dcd6f013893c3189a3f989431c.zip opensim-SC-6fc74b36d1d0f7dcd6f013893c3189a3f989431c.tar.gz opensim-SC-6fc74b36d1d0f7dcd6f013893c3189a3f989431c.tar.bz2 opensim-SC-6fc74b36d1d0f7dcd6f013893c3189a3f989431c.tar.xz |
Make various tweaks to undo code in an effort to get things working better.
Undo rotation and position appear to be working.
Resizing a single prim appears to be working, though the undo has to be done twice.
Resizing a group of prims still does not work properly - possibly because in the UndoState we don't store a knowledge of when we're resizing a whole group rather than individual prims.
This needs to be addressed.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8414f8b..fa35bd8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -11242,6 +11242,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11242 | } | 11242 | } |
11243 | else | 11243 | else |
11244 | { | 11244 | { |
11245 | // Do this once since fetch parts creates a new array. | ||
11246 | SceneObjectPart[] parts = part.ParentGroup.Parts; | ||
11247 | for (int j = 0; j < parts.Length; j++) | ||
11248 | { | ||
11249 | part.StoreUndoState(); | ||
11250 | parts[j].IgnoreUndoUpdate = true; | ||
11251 | } | ||
11252 | |||
11245 | // UUID partId = part.UUID; | 11253 | // UUID partId = part.UUID; |
11246 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; | 11254 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; |
11247 | 11255 | ||
@@ -11257,6 +11265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11257 | handlerUpdatePrimSinglePosition(localId, pos1, this); | 11265 | handlerUpdatePrimSinglePosition(localId, pos1, this); |
11258 | } | 11266 | } |
11259 | break; | 11267 | break; |
11268 | |||
11260 | case 2: | 11269 | case 2: |
11261 | Quaternion rot1 = new Quaternion(block.Data, 0, true); | 11270 | Quaternion rot1 = new Quaternion(block.Data, 0, true); |
11262 | 11271 | ||
@@ -11267,6 +11276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11267 | handlerUpdatePrimSingleRotation(localId, rot1, this); | 11276 | handlerUpdatePrimSingleRotation(localId, rot1, this); |
11268 | } | 11277 | } |
11269 | break; | 11278 | break; |
11279 | |||
11270 | case 3: | 11280 | case 3: |
11271 | Vector3 rotPos = new Vector3(block.Data, 0); | 11281 | Vector3 rotPos = new Vector3(block.Data, 0); |
11272 | Quaternion rot2 = new Quaternion(block.Data, 12, true); | 11282 | Quaternion rot2 = new Quaternion(block.Data, 12, true); |
@@ -11279,6 +11289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11279 | handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this); | 11289 | handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this); |
11280 | } | 11290 | } |
11281 | break; | 11291 | break; |
11292 | |||
11282 | case 4: | 11293 | case 4: |
11283 | case 20: | 11294 | case 20: |
11284 | Vector3 scale4 = new Vector3(block.Data, 0); | 11295 | Vector3 scale4 = new Vector3(block.Data, 0); |
@@ -11290,8 +11301,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11290 | handlerUpdatePrimScale(localId, scale4, this); | 11301 | handlerUpdatePrimScale(localId, scale4, this); |
11291 | } | 11302 | } |
11292 | break; | 11303 | break; |
11293 | case 5: | ||
11294 | 11304 | ||
11305 | case 5: | ||
11295 | Vector3 scale1 = new Vector3(block.Data, 12); | 11306 | Vector3 scale1 = new Vector3(block.Data, 12); |
11296 | Vector3 pos11 = new Vector3(block.Data, 0); | 11307 | Vector3 pos11 = new Vector3(block.Data, 0); |
11297 | 11308 | ||
@@ -11308,6 +11319,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11308 | } | 11319 | } |
11309 | } | 11320 | } |
11310 | break; | 11321 | break; |
11322 | |||
11311 | case 9: | 11323 | case 9: |
11312 | Vector3 pos2 = new Vector3(block.Data, 0); | 11324 | Vector3 pos2 = new Vector3(block.Data, 0); |
11313 | 11325 | ||
@@ -11315,10 +11327,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11315 | 11327 | ||
11316 | if (handlerUpdateVector != null) | 11328 | if (handlerUpdateVector != null) |
11317 | { | 11329 | { |
11318 | |||
11319 | handlerUpdateVector(localId, pos2, this); | 11330 | handlerUpdateVector(localId, pos2, this); |
11320 | } | 11331 | } |
11321 | break; | 11332 | break; |
11333 | |||
11322 | case 10: | 11334 | case 10: |
11323 | Quaternion rot3 = new Quaternion(block.Data, 0, true); | 11335 | Quaternion rot3 = new Quaternion(block.Data, 0, true); |
11324 | 11336 | ||
@@ -11329,6 +11341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11329 | handlerUpdatePrimRotation(localId, rot3, this); | 11341 | handlerUpdatePrimRotation(localId, rot3, this); |
11330 | } | 11342 | } |
11331 | break; | 11343 | break; |
11344 | |||
11332 | case 11: | 11345 | case 11: |
11333 | Vector3 pos3 = new Vector3(block.Data, 0); | 11346 | Vector3 pos3 = new Vector3(block.Data, 0); |
11334 | Quaternion rot4 = new Quaternion(block.Data, 12, true); | 11347 | Quaternion rot4 = new Quaternion(block.Data, 12, true); |
@@ -11352,6 +11365,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11352 | handlerUpdatePrimGroupScale(localId, scale7, this); | 11365 | handlerUpdatePrimGroupScale(localId, scale7, this); |
11353 | } | 11366 | } |
11354 | break; | 11367 | break; |
11368 | |||
11355 | case 13: | 11369 | case 13: |
11356 | Vector3 scale2 = new Vector3(block.Data, 12); | 11370 | Vector3 scale2 = new Vector3(block.Data, 12); |
11357 | Vector3 pos4 = new Vector3(block.Data, 0); | 11371 | Vector3 pos4 = new Vector3(block.Data, 0); |
@@ -11371,6 +11385,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11371 | } | 11385 | } |
11372 | } | 11386 | } |
11373 | break; | 11387 | break; |
11388 | |||
11374 | case 29: | 11389 | case 29: |
11375 | Vector3 scale5 = new Vector3(block.Data, 12); | 11390 | Vector3 scale5 = new Vector3(block.Data, 12); |
11376 | Vector3 pos5 = new Vector3(block.Data, 0); | 11391 | Vector3 pos5 = new Vector3(block.Data, 0); |
@@ -11388,6 +11403,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11388 | } | 11403 | } |
11389 | } | 11404 | } |
11390 | break; | 11405 | break; |
11406 | |||
11391 | case 21: | 11407 | case 21: |
11392 | Vector3 scale6 = new Vector3(block.Data, 12); | 11408 | Vector3 scale6 = new Vector3(block.Data, 12); |
11393 | Vector3 pos6 = new Vector3(block.Data, 0); | 11409 | Vector3 pos6 = new Vector3(block.Data, 0); |
@@ -11404,13 +11420,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11404 | } | 11420 | } |
11405 | } | 11421 | } |
11406 | break; | 11422 | break; |
11423 | |||
11407 | default: | 11424 | default: |
11408 | m_log.Debug("[CLIENT] MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); | 11425 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); |
11409 | break; | 11426 | break; |
11410 | } | 11427 | } |
11428 | |||
11429 | for (int j = 0; j < parts.Length; j++) | ||
11430 | parts[j].IgnoreUndoUpdate = false; | ||
11411 | } | 11431 | } |
11412 | } | 11432 | } |
11413 | } | 11433 | } |
11434 | |||
11414 | return true; | 11435 | return true; |
11415 | } | 11436 | } |
11416 | 11437 | ||