diff options
fixed the bug where changing the rotation of a selection of prims in a linkset, made each of those prims rotate around its own centre rather than around the geometric centre of the selection like they should do (and like the client expects).
This involved adding a new OnUpdatePrimSingleRotationPosition event to IClientAPI so that we can get the changed position from the client.
Btw adding new events to IClientAPI is really tedious where you have to copy the change across to at least 5 or 6 other files.
[Note this doesn't fix the bug where any rotation changes to the root prim (but not the whole linkset) cause rotation errors on the child prims.]
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3fdb386..a13f6d4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -267,6 +267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
267 | 267 | ||
268 | private UpdateVector handlerUpdatePrimSinglePosition; //OnUpdatePrimSinglePosition; | 268 | private UpdateVector handlerUpdatePrimSinglePosition; //OnUpdatePrimSinglePosition; |
269 | private UpdatePrimSingleRotation handlerUpdatePrimSingleRotation; //OnUpdatePrimSingleRotation; | 269 | private UpdatePrimSingleRotation handlerUpdatePrimSingleRotation; //OnUpdatePrimSingleRotation; |
270 | private UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition; //OnUpdatePrimSingleRotation; | ||
270 | private UpdateVector handlerUpdatePrimScale; //OnUpdatePrimScale; | 271 | private UpdateVector handlerUpdatePrimScale; //OnUpdatePrimScale; |
271 | private UpdateVector handlerUpdatePrimGroupScale; //OnUpdateGroupScale; | 272 | private UpdateVector handlerUpdatePrimGroupScale; //OnUpdateGroupScale; |
272 | private UpdateVector handlerUpdateVector; //OnUpdatePrimGroupPosition; | 273 | private UpdateVector handlerUpdateVector; //OnUpdatePrimGroupPosition; |
@@ -1095,6 +1096,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1095 | public event UpdateVector OnUpdatePrimSinglePosition; | 1096 | public event UpdateVector OnUpdatePrimSinglePosition; |
1096 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; | 1097 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; |
1097 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; | 1098 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; |
1099 | public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; | ||
1098 | public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; | 1100 | public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; |
1099 | public event UpdateVector OnUpdatePrimScale; | 1101 | public event UpdateVector OnUpdatePrimScale; |
1100 | public event UpdateVector OnUpdatePrimGroupScale; | 1102 | public event UpdateVector OnUpdatePrimGroupScale; |
@@ -4481,18 +4483,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4481 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; | 4483 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; |
4482 | if (handlerUpdatePrimSingleRotation != null) | 4484 | if (handlerUpdatePrimSingleRotation != null) |
4483 | { | 4485 | { |
4484 | //m_log.Debug("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 4486 | // m_log.Info("new tab rotation is " + rot1.X + " , " + rot1.Y + " , " + rot1.Z + " , " + rot1.W); |
4485 | handlerUpdatePrimSingleRotation(localId, rot1, this); | 4487 | handlerUpdatePrimSingleRotation(localId, rot1, this); |
4486 | } | 4488 | } |
4487 | break; | 4489 | break; |
4488 | case 3: | 4490 | case 3: |
4489 | 4491 | Vector3 rotPos = new Vector3(block.Data, 0); | |
4490 | Quaternion rot2 = new Quaternion(block.Data, 12, true); | 4492 | Quaternion rot2 = new Quaternion(block.Data, 12, true); |
4491 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; | 4493 | |
4492 | if (handlerUpdatePrimSingleRotation != null) | 4494 | handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition; |
4495 | if (handlerUpdatePrimSingleRotationPosition != null) | ||
4493 | { | 4496 | { |
4494 | //m_log.Debug("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 4497 | // m_log.Debug("new mouse rotation position is " + rotPos.X + " , " + rotPos.Y + " , " + rotPos.Z); |
4495 | handlerUpdatePrimSingleRotation(localId, rot2, this); | 4498 | // m_log.Info("new mouse rotation is " + rot2.X + " , " + rot2.Y + " , " + rot2.Z + " , " + rot2.W); |
4499 | handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this); | ||
4496 | } | 4500 | } |
4497 | break; | 4501 | break; |
4498 | case 4: | 4502 | case 4: |
@@ -4541,7 +4545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4541 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; | 4545 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; |
4542 | if (handlerUpdatePrimRotation != null) | 4546 | if (handlerUpdatePrimRotation != null) |
4543 | { | 4547 | { |
4544 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 4548 | // Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W); |
4545 | handlerUpdatePrimRotation(localId, rot3, this); | 4549 | handlerUpdatePrimRotation(localId, rot3, this); |
4546 | } | 4550 | } |
4547 | break; | 4551 | break; |
@@ -4552,8 +4556,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4552 | handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; | 4556 | handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; |
4553 | if (handlerUpdatePrimGroupRotation != null) | 4557 | if (handlerUpdatePrimGroupRotation != null) |
4554 | { | 4558 | { |
4555 | //m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 4559 | // m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
4556 | // m_log.Debug("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 4560 | // m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W); |
4557 | handlerUpdatePrimGroupRotation(localId, pos3, rot4, this); | 4561 | handlerUpdatePrimGroupRotation(localId, pos3, rot4, this); |
4558 | } | 4562 | } |
4559 | break; | 4563 | break; |