diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs index 7b6676b..c91701a 100644 --- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs +++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs | |||
@@ -172,14 +172,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
172 | } | 172 | } |
173 | #endregion | 173 | #endregion |
174 | 174 | ||
175 | //might not end up being used | ||
176 | protected bool m_isRoot; | ||
177 | public bool IsRoot | ||
178 | { | ||
179 | set { m_isRoot = value; } | ||
180 | get { return this.m_isRoot; } | ||
181 | } | ||
182 | |||
183 | #region Constructors | 175 | #region Constructors |
184 | /// <summary> | 176 | /// <summary> |
185 | /// | 177 | /// |
@@ -209,9 +201,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
209 | this.LastOwnerID = LLUUID.Zero; | 201 | this.LastOwnerID = LLUUID.Zero; |
210 | this.UUID = LLUUID.Random(); | 202 | this.UUID = LLUUID.Random(); |
211 | this.LocalID = (uint)(localID); | 203 | this.LocalID = (uint)(localID); |
212 | this.m_shape = shape; | 204 | this.Shape = shape; |
213 | 205 | ||
214 | this.m_groupPosition = groupPosition; | 206 | this.GroupPosition = groupPosition; |
215 | this.OffsetPosition = offsetPosition; | 207 | this.OffsetPosition = offsetPosition; |
216 | this.RotationOffset = LLQuaternion.Identity; | 208 | this.RotationOffset = LLQuaternion.Identity; |
217 | this.Velocity = new LLVector3(0, 0, 0); | 209 | this.Velocity = new LLVector3(0, 0, 0); |
@@ -245,7 +237,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
245 | this.LastOwnerID = lastOwnerID; | 237 | this.LastOwnerID = lastOwnerID; |
246 | this.UUID = LLUUID.Random(); | 238 | this.UUID = LLUUID.Random(); |
247 | this.LocalID = (uint)(localID); | 239 | this.LocalID = (uint)(localID); |
248 | this.m_shape = shape; | 240 | this.Shape = shape; |
249 | 241 | ||
250 | this.OffsetPosition = position; | 242 | this.OffsetPosition = position; |
251 | this.RotationOffset = rotation; | 243 | this.RotationOffset = rotation; |
@@ -265,12 +257,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
265 | dupe.m_regionHandle = m_regionHandle; | 257 | dupe.m_regionHandle = m_regionHandle; |
266 | dupe.UUID = LLUUID.Random(); | 258 | dupe.UUID = LLUUID.Random(); |
267 | dupe.LocalID = localID; | 259 | dupe.LocalID = localID; |
260 | dupe.GroupPosition = new LLVector3(GroupPosition.X, GroupPosition.Y, GroupPosition.Z); | ||
268 | dupe.OffsetPosition = new LLVector3(OffsetPosition.X, OffsetPosition.Y, OffsetPosition.Z); | 261 | dupe.OffsetPosition = new LLVector3(OffsetPosition.X, OffsetPosition.Y, OffsetPosition.Z); |
269 | dupe.RotationOffset = new LLQuaternion(RotationOffset.X, RotationOffset.Y, RotationOffset.Z, RotationOffset.W); | 262 | dupe.RotationOffset = new LLQuaternion(RotationOffset.X, RotationOffset.Y, RotationOffset.Z, RotationOffset.W); |
270 | dupe.Velocity = new LLVector3(0, 0, 0); | 263 | dupe.Velocity = new LLVector3(0, 0, 0); |
271 | dupe.Acceleration = new LLVector3(0, 0, 0); | 264 | dupe.Acceleration = new LLVector3(0, 0, 0); |
272 | dupe.AngularVelocity = new LLVector3(0, 0, 0); | 265 | dupe.AngularVelocity = new LLVector3(0, 0, 0); |
273 | dupe.ObjectFlags = this.ObjectFlags; | 266 | dupe.ObjectFlags = this.ObjectFlags; |
267 | //TODO copy extraparams data and anything else not currently copied | ||
274 | return dupe; | 268 | return dupe; |
275 | } | 269 | } |
276 | #endregion | 270 | #endregion |
@@ -439,13 +433,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
439 | List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars(); | 433 | List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars(); |
440 | for (int i = 0; i < avatars.Count; i++) | 434 | for (int i = 0; i < avatars.Count; i++) |
441 | { | 435 | { |
442 | SendFullUpdateToClient(avatars[i].ControllingClient); | 436 | m_parentGroup.SendPartFullUpdate(avatars[i].ControllingClient, this); |
443 | } | 437 | } |
444 | } | 438 | } |
445 | 439 | ||
446 | 440 | /// <summary> | |
447 | 441 | /// | |
448 | public void FullUpdate(IClientAPI remoteClient) | 442 | /// </summary> |
443 | /// <param name="remoteClient"></param> | ||
444 | public void SendFullUpdate(IClientAPI remoteClient) | ||
449 | { | 445 | { |
450 | m_parentGroup.SendPartFullUpdate( remoteClient, this ); | 446 | m_parentGroup.SendPartFullUpdate( remoteClient, this ); |
451 | } | 447 | } |
@@ -461,6 +457,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
461 | SendFullUpdateToClient(remoteClient, lPos); | 457 | SendFullUpdateToClient(remoteClient, lPos); |
462 | } | 458 | } |
463 | 459 | ||
460 | /// <summary> | ||
461 | /// | ||
462 | /// </summary> | ||
463 | /// <param name="remoteClient"></param> | ||
464 | /// <param name="lPos"></param> | ||
464 | public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos) | 465 | public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos) |
465 | { | 466 | { |
466 | LLQuaternion lRot; | 467 | LLQuaternion lRot; |
@@ -478,20 +479,39 @@ namespace OpenSim.Region.Environment.Scenes | |||
478 | List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars(); | 479 | List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars(); |
479 | for (int i = 0; i < avatars.Count; i++) | 480 | for (int i = 0; i < avatars.Count; i++) |
480 | { | 481 | { |
481 | SendTerseUpdateToClient(avatars[i].ControllingClient); | 482 | m_parentGroup.SendPartTerseUpdate(avatars[i].ControllingClient, this); |
482 | } | 483 | } |
483 | } | 484 | } |
484 | 485 | ||
485 | /// <summary> | 486 | /// <summary> |
486 | /// | 487 | /// |
487 | /// </summary> | 488 | /// </summary> |
489 | /// <param name="remoteClient"></param> | ||
490 | public void SendTerseUpdate(IClientAPI remoteClient) | ||
491 | { | ||
492 | m_parentGroup.SendPartTerseUpdate(remoteClient, this); | ||
493 | } | ||
494 | |||
495 | /// <summary> | ||
496 | /// | ||
497 | /// </summary> | ||
488 | /// <param name="RemoteClient"></param> | 498 | /// <param name="RemoteClient"></param> |
489 | public void SendTerseUpdateToClient(IClientAPI remoteClient) | 499 | public void SendTerseUpdateToClient(IClientAPI remoteClient) |
490 | { | 500 | { |
491 | LLVector3 lPos; | 501 | LLVector3 lPos; |
492 | lPos = this.OffsetPosition; | 502 | lPos = this.OffsetPosition; |
493 | LLQuaternion mRot = this.RotationOffset; | 503 | LLQuaternion mRot = this.RotationOffset; |
504 | remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); | ||
505 | } | ||
494 | 506 | ||
507 | /// <summary> | ||
508 | /// | ||
509 | /// </summary> | ||
510 | /// <param name="remoteClient"></param> | ||
511 | /// <param name="lPos"></param> | ||
512 | public void SendTerseUpdateToClient(IClientAPI remoteClient, LLVector3 lPos) | ||
513 | { | ||
514 | LLQuaternion mRot = this.RotationOffset; | ||
495 | remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); | 515 | remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot); |
496 | } | 516 | } |
497 | #endregion | 517 | #endregion |