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 051c4fa..7d51323 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; |
@@ -11517,22 +11518,151 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11517 | // parts[j].IgnoreUndoUpdate = true; | 11518 | // parts[j].IgnoreUndoUpdate = true; |
11518 | // } | 11519 | // } |
11519 | 11520 | ||
11520 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; | 11521 | // UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; |
11521 | UpdateVector handlerUpdatePrimGroupScale; | 11522 | // UpdateVector handlerUpdatePrimGroupScale; |
11522 | 11523 | ||
11523 | Quaternion arot; | 11524 | ClientChangeObject updatehandler = onClientChangeObject; |
11524 | Vector3 ascale; | 11525 | |
11525 | Vector3 apos; | 11526 | if (updatehandler != null) |
11526 | /*ubit from ll JIRA: | 11527 | { |
11527 | * 0x01 position | 11528 | ObjectChangeData udata = new ObjectChangeData(); |
11528 | * 0x02 rotation | 11529 | |
11529 | * 0x04 scale | 11530 | /*ubit from ll JIRA: |
11531 | * 0x01 position | ||
11532 | * 0x02 rotation | ||
11533 | * 0x04 scale | ||
11530 | 11534 | ||
11531 | * 0x08 LINK_SET | 11535 | * 0x08 LINK_SET |
11532 | * 0x10 UNIFORM for scale | 11536 | * 0x10 UNIFORM for scale |
11533 | */ | 11537 | */ |
11538 | |||
11539 | // translate to internal changes | ||
11540 | // not all cases .. just the ones older code did | ||
11541 | |||
11542 | switch (block.Type) | ||
11543 | { | ||
11544 | case 1: //change position sp | ||
11545 | udata.position = new Vector3(block.Data, 0); | ||
11546 | |||
11547 | udata.what = ObjectChangeWhat.primP; | ||
11548 | updatehandler(localId, udata, this); | ||
11549 | break; | ||
11550 | |||
11551 | case 2: // rotation sp | ||
11552 | udata.rotation = new Quaternion(block.Data, 0, true); | ||
11553 | |||
11554 | udata.what = ObjectChangeWhat.primR; | ||
11555 | updatehandler(localId, udata, this); | ||
11556 | break; | ||
11557 | |||
11558 | case 3: // position plus rotation | ||
11559 | udata.position = new Vector3(block.Data, 0); | ||
11560 | udata.rotation = new Quaternion(block.Data, 12, true); | ||
11561 | |||
11562 | udata.what = ObjectChangeWhat.primPR; | ||
11563 | updatehandler(localId, udata, this); | ||
11564 | |||
11565 | break; | ||
11566 | |||
11567 | case 4: // scale sp | ||
11568 | udata.scale = new Vector3(block.Data, 0); | ||
11569 | udata.what = ObjectChangeWhat.primS; | ||
11570 | |||
11571 | updatehandler(localId, udata, this); | ||
11572 | break; | ||
11573 | |||
11574 | case 0x14: // uniform scale sp | ||
11575 | udata.scale = new Vector3(block.Data, 0); | ||
11576 | |||
11577 | udata.what = ObjectChangeWhat.primUS; | ||
11578 | updatehandler(localId, udata, this); | ||
11579 | break; | ||
11580 | |||
11581 | case 5: // scale and position sp | ||
11582 | udata.position = new Vector3(block.Data, 0); | ||
11583 | udata.scale = new Vector3(block.Data, 12); | ||
11584 | |||
11585 | udata.what = ObjectChangeWhat.primPS; | ||
11586 | updatehandler(localId, udata, this); | ||
11587 | break; | ||
11588 | |||
11589 | case 0x15: //uniform scale and position | ||
11590 | udata.position = new Vector3(block.Data, 0); | ||
11591 | udata.scale = new Vector3(block.Data, 12); | ||
11592 | |||
11593 | udata.what = ObjectChangeWhat.primPUS; | ||
11594 | updatehandler(localId, udata, this); | ||
11595 | break; | ||
11534 | 11596 | ||
11597 | // now group related (bit 4) | ||
11598 | case 9: //( 8 + 1 )group position | ||
11599 | udata.position = new Vector3(block.Data, 0); | ||
11535 | 11600 | ||
11601 | udata.what = ObjectChangeWhat.groupP; | ||
11602 | updatehandler(localId, udata, this); | ||
11603 | break; | ||
11604 | |||
11605 | case 0x0A: // (8 + 2) group rotation | ||
11606 | udata.rotation = new Quaternion(block.Data, 0, true); | ||
11607 | |||
11608 | udata.what = ObjectChangeWhat.groupR; | ||
11609 | updatehandler(localId, udata, this); | ||
11610 | break; | ||
11611 | |||
11612 | case 0x0B: //( 8 + 2 + 1) group rotation and position | ||
11613 | udata.position = new Vector3(block.Data, 0); | ||
11614 | udata.rotation = new Quaternion(block.Data, 12, true); | ||
11615 | |||
11616 | udata.what = ObjectChangeWhat.groupPR; | ||
11617 | updatehandler(localId, udata, this); | ||
11618 | break; | ||
11619 | |||
11620 | case 0x0C: // (8 + 4) group scale | ||
11621 | // only afects root prim and only sent by viewer editor object tab scaling | ||
11622 | // mouse edition only allows uniform scaling | ||
11623 | // SL MAY CHANGE THIS in viewers | ||
11624 | |||
11625 | udata.scale = new Vector3(block.Data, 0); | ||
11626 | |||
11627 | // udata.what = ObjectChangeWhat.groupS; | ||
11628 | udata.what = ObjectChangeWhat.primS; // to conform to current SL | ||
11629 | updatehandler(localId, udata, this); | ||
11630 | |||
11631 | break; | ||
11632 | |||
11633 | case 0x0D: //(8 + 4 + 1) group scale and position | ||
11634 | // exception as above | ||
11635 | |||
11636 | udata.position = new Vector3(block.Data, 0); | ||
11637 | udata.scale = new Vector3(block.Data, 12); | ||
11638 | |||
11639 | // udata.what = ObjectChangeWhat.groupPS; | ||
11640 | udata.what = ObjectChangeWhat.primPS; // to conform to current SL | ||
11641 | updatehandler(localId, udata, this); | ||
11642 | break; | ||
11643 | |||
11644 | case 0x1C: // (0x10 + 8 + 4 ) group scale UNIFORM | ||
11645 | udata.scale = new Vector3(block.Data, 0); | ||
11646 | |||
11647 | udata.what = ObjectChangeWhat.groupUS; | ||
11648 | updatehandler(localId, udata, this); | ||
11649 | break; | ||
11650 | |||
11651 | case 0x1D: // (UNIFORM + GROUP + SCALE + POS) | ||
11652 | udata.position = new Vector3(block.Data, 0); | ||
11653 | udata.scale = new Vector3(block.Data, 12); | ||
11654 | |||
11655 | udata.what = ObjectChangeWhat.groupPUS; | ||
11656 | updatehandler(localId, udata, this); | ||
11657 | break; | ||
11658 | |||
11659 | default: | ||
11660 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); | ||
11661 | break; | ||
11662 | } | ||
11663 | } | ||
11664 | |||
11665 | /* | ||
11536 | switch (block.Type) | 11666 | switch (block.Type) |
11537 | { | 11667 | { |
11538 | case 1: //change position sp | 11668 | case 1: //change position sp |
@@ -11788,7 +11918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11788 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); | 11918 | m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); |
11789 | break; | 11919 | break; |
11790 | } | 11920 | } |
11791 | 11921 | */ | |
11792 | // for (int j = 0; j < parts.Length; j++) | 11922 | // for (int j = 0; j < parts.Length; j++) |
11793 | // parts[j].IgnoreUndoUpdate = false; | 11923 | // parts[j].IgnoreUndoUpdate = false; |
11794 | 11924 | ||