diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 156 |
1 files changed, 143 insertions, 13 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index d973a06..fcca1bc 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -125,6 +125,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
125 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | 125 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; |
126 | public event UpdatePrimFlags OnUpdatePrimFlags; | 126 | public event UpdatePrimFlags OnUpdatePrimFlags; |
127 | public event UpdatePrimTexture OnUpdatePrimTexture; | 127 | public event UpdatePrimTexture OnUpdatePrimTexture; |
128 | public event ClientChangeObject onClientChangeObject; | ||
128 | public event UpdateVector OnUpdatePrimGroupPosition; | 129 | public event UpdateVector OnUpdatePrimGroupPosition; |
129 | public event UpdateVector OnUpdatePrimSinglePosition; | 130 | public event UpdateVector OnUpdatePrimSinglePosition; |
130 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; | 131 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; |
@@ -11492,22 +11493,151 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11492 | // parts[j].IgnoreUndoUpdate = true; | 11493 | // parts[j].IgnoreUndoUpdate = true; |
11493 | // } | 11494 | // } |
11494 | 11495 | ||
11495 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; | 11496 | // UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; |
11496 | UpdateVector handlerUpdatePrimGroupScale; | 11497 | // UpdateVector handlerUpdatePrimGroupScale; |
11497 | 11498 | ||
11498 | Quaternion arot; | 11499 | ClientChangeObject updatehandler = onClientChangeObject; |
11499 | Vector3 ascale; | 11500 | |
11500 | Vector3 apos; | 11501 | if (updatehandler != null) |
11501 | /*ubit from ll JIRA: | 11502 | { |
11502 | * 0x01 position | 11503 | ObjectChangeData udata = new ObjectChangeData(); |
11503 | * 0x02 rotation | 11504 | |
11504 | * 0x04 scale | 11505 | /*ubit from ll JIRA: |
11506 | * 0x01 position | ||
11507 | * 0x02 rotation | ||
11508 | * 0x04 scale | ||
11505 | 11509 | ||
11506 | * 0x08 LINK_SET | 11510 | * 0x08 LINK_SET |
11507 | * 0x10 UNIFORM for scale | 11511 | * 0x10 UNIFORM for scale |
11508 | */ | 11512 | */ |
11513 | |||
11514 | // translate to internal changes | ||
11515 | // not all cases .. just the ones older code did | ||
11516 | |||
11517 | switch (block.Type) | ||
11518 | { | ||
11519 | case 1: //change position sp | ||
11520 | udata.position = new Vector3(block.Data, 0); | ||
11521 | |||
11522 | udata.what = ObjectChangeWhat.primP; | ||
11523 | updatehandler(localId, udata, this); | ||
11524 | break; | ||
11525 | |||
11526 | case 2: // rotation sp | ||
11527 | udata.rotation = new Quaternion(block.Data, 0, true); | ||
11528 | |||
11529 | udata.what = ObjectChangeWhat.primR; | ||
11530 | updatehandler(localId, udata, this); | ||
11531 | break; | ||
11532 | |||
11533 | case 3: // position plus rotation | ||
11534 | udata.position = new Vector3(block.Data, 0); | ||
11535 | udata.rotation = new Quaternion(block.Data, 12, true); | ||
11536 | |||
11537 | udata.what = ObjectChangeWhat.primPR; | ||
11538 | updatehandler(localId, udata, this); | ||
11539 | |||
11540 | break; | ||
11541 | |||
11542 | case 4: // scale sp | ||
11543 | udata.scale = new Vector3(block.Data, 0); | ||
11544 | udata.what = ObjectChangeWhat.primS; | ||
11545 | |||
11546 | updatehandler(localId, udata, this); | ||
11547 | break; | ||
11548 | |||
11549 | case 0x14: // uniform scale sp | ||
11550 | udata.scale = new Vector3(block.Data, 0); | ||
11551 | |||
11552 | udata.what = ObjectChangeWhat.primUS; | ||
11553 | updatehandler(localId, udata, this); | ||
11554 | break; | ||
11555 | |||
11556 | case 5: // scale and position sp | ||
11557 | udata.position = new Vector3(block.Data, 0); | ||
11558 | udata.scale = new Vector3(block.Data, 12); | ||
11559 | |||
11560 | udata.what = ObjectChangeWhat.primPS; | ||
11561 | updatehandler(localId, udata, this); | ||
11562 | break; | ||
11563 | |||
11564 | case 0x15: //uniform scale and position | ||
11565 | udata.position = new Vector3(block.Data, 0); | ||
11566 | udata.scale = new Vector3(block.Data, 12); | ||
11567 | |||
11568 | udata.what = ObjectChangeWhat.primPUS; | ||
11569 | updatehandler(localId, udata, this); | ||
11570 | break; | ||
11509 | 11571 | ||
11572 | // now group related (bit 4) | ||
11573 | case 9: //( 8 + 1 )group position | ||
11574 | udata.position = new Vector3(block.Data, 0); | ||
11510 | 11575 | ||
11576 | udata.what = ObjectChangeWhat.groupP; | ||
11577 | updatehandler(localId, udata, this); | ||
11578 | break; | ||
11579 | |||
11580 | case 0x0A: // (8 + 2) group rotation | ||
11581 | udata.rotation = new Quaternion(block.Data, 0, true); | ||
11582 | |||
11583 | udata.what = ObjectChangeWhat.groupR; | ||
11584 | updatehandler(localId, udata, this); | ||
11585 | break; | ||
11586 | |||
11587 | case 0x0B: //( 8 + 2 + 1) group rotation and position | ||
11588 | udata.position = new Vector3(block.Data, 0); | ||
11589 | udata.rotation = new Quaternion(block.Data, 12, true); | ||
11590 | |||
11591 | udata.what = ObjectChangeWhat.groupPR; | ||
11592 | updatehandler(localId, udata, this); | ||
11593 | break; | ||
11594 | |||
11595 | case 0x0C: // (8 + 4) group scale | ||
11596 | // only afects root prim and only sent by viewer editor object tab scaling | ||
11597 | // mouse edition only allows uniform scaling | ||
11598 | // SL MAY CHANGE THIS in viewers | ||
11599 | |||
11600 | udata.scale = new Vector3(block.Data, 0); | ||
11601 | |||
11602 | // udata.what = ObjectChangeWhat.groupS; | ||
11603 | udata.what = ObjectChangeWhat.primS; // to conform to current SL | ||
11604 | updatehandler(localId, udata, this); | ||
11605 | |||
11606 | break; | ||
11607 | |||
11608 | case 0x0D: //(8 + 4 + 1) group scale and position | ||
11609 | // exception as above | ||
11610 | |||
11611 | udata.position = new Vector3(block.Data, 0); | ||
11612 | udata.scale = new Vector3(block.Data, 12); | ||
11613 | |||
11614 | // udata.what = ObjectChangeWhat.groupPS; | ||
11615 | udata.what = ObjectChangeWhat.primPS; // to conform to current SL | ||
11616 | updatehandler(localId, udata, this); | ||
11617 | break; | ||
11618 | |||
11619 | case 0x1C: // (0x10 + 8 + 4 ) group scale UNIFORM | ||
11620 | udata.scale = new Vector3(block.Data, 0); | ||
11621 | |||
11622 | udata.what = ObjectChangeWhat.groupUS; | ||
11623 | updatehandler(localId, udata, this); | ||
11624 | break; | ||
11625 | |||
11626 | case 0x1D: // (UNIFORM + GROUP + SCALE + POS) | ||
11627 | udata.position = new Vector3(block.Data, 0); | ||
11628 | udata.scale = new Vector3(block.Data, 12); | ||
11629 | |||
11630 | udata.what = ObjectChangeWhat.groupPUS; | ||
11631 | updatehandler(localId, udata, this); | ||
11632 | break; | ||
11633 | |||
11634 | default: | ||
11635 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); | ||
11636 | break; | ||
11637 | } | ||
11638 | } | ||
11639 | |||
11640 | /* | ||
11511 | switch (block.Type) | 11641 | switch (block.Type) |
11512 | { | 11642 | { |
11513 | case 1: //change position sp | 11643 | case 1: //change position sp |
@@ -11763,7 +11893,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11763 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); | 11893 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); |
11764 | break; | 11894 | break; |
11765 | } | 11895 | } |
11766 | 11896 | */ | |
11767 | // for (int j = 0; j < parts.Length; j++) | 11897 | // for (int j = 0; j < parts.Length; j++) |
11768 | // parts[j].IgnoreUndoUpdate = false; | 11898 | // parts[j].IgnoreUndoUpdate = false; |
11769 | 11899 | ||