aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs55
1 files changed, 54 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
index 62f9b93..b0303a3 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
+++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
@@ -316,16 +316,25 @@ namespace OpenSim.Region.Environment.Scenes
316 #endregion 316 #endregion
317 317
318 #region Update Scheduling 318 #region Update Scheduling
319 /// <summary>
320 ///
321 /// </summary>
319 private void ClearUpdateSchedule() 322 private void ClearUpdateSchedule()
320 { 323 {
321 m_updateFlag = 0; 324 m_updateFlag = 0;
322 } 325 }
323 326
327 /// <summary>
328 ///
329 /// </summary>
324 private void ScheduleFullUpdate() 330 private void ScheduleFullUpdate()
325 { 331 {
326 m_updateFlag = 2; 332 m_updateFlag = 2;
327 } 333 }
328 334
335 /// <summary>
336 ///
337 /// </summary>
329 private void ScheduleTerseUpdate() 338 private void ScheduleTerseUpdate()
330 { 339 {
331 if (m_updateFlag < 1) 340 if (m_updateFlag < 1)
@@ -333,6 +342,26 @@ namespace OpenSim.Region.Environment.Scenes
333 m_updateFlag = 1; 342 m_updateFlag = 1;
334 } 343 }
335 } 344 }
345
346 /// <summary>
347 ///
348 /// </summary>
349 public void SendScheduledUpdates()
350 {
351 if (m_updateFlag == 1) //some change has been made so update the clients
352 {
353 SendTerseUpdateToALLClients();
354 ClearUpdateSchedule();
355 }
356 else
357 {
358 if (m_updateFlag == 2) // is a new prim just been created/reloaded or has major changes
359 {
360 SendFullUpdateToAllClients();
361 ClearUpdateSchedule();
362 }
363 }
364 }
336 #endregion 365 #endregion
337 366
338 #region Shape 367 #region Shape
@@ -389,7 +418,7 @@ namespace OpenSim.Region.Environment.Scenes
389 this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256); 418 this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256);
390 Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length); 419 Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length);
391 420
392 //this.ScheduleFullUpdate(); 421 this.ScheduleFullUpdate();
393 } 422 }
394 #endregion 423 #endregion
395 424
@@ -445,6 +474,18 @@ namespace OpenSim.Region.Environment.Scenes
445 /// <summary> 474 /// <summary>
446 /// 475 ///
447 /// </summary> 476 /// </summary>
477 public void SendFullUpdateToAllClients()
478 {
479 List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars();
480 for (int i = 0; i < avatars.Count; i++)
481 {
482 SendFullUpdateToClient(avatars[i].ControllingClient);
483 }
484 }
485
486 /// <summary>
487 ///
488 /// </summary>
448 /// <param name="remoteClient"></param> 489 /// <param name="remoteClient"></param>
449 public void SendFullUpdateToClient(IClientAPI remoteClient) 490 public void SendFullUpdateToClient(IClientAPI remoteClient)
450 { 491 {
@@ -460,6 +501,18 @@ namespace OpenSim.Region.Environment.Scenes
460 /// <summary> 501 /// <summary>
461 /// 502 ///
462 /// </summary> 503 /// </summary>
504 public void SendTerseUpdateToALLClients()
505 {
506 List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars();
507 for (int i = 0; i < avatars.Count; i++)
508 {
509 SendTerseUpdateToClient(avatars[i].ControllingClient);
510 }
511 }
512
513 /// <summary>
514 ///
515 /// </summary>
463 /// <param name="RemoteClient"></param> 516 /// <param name="RemoteClient"></param>
464 public void SendTerseUpdateToClient(IClientAPI remoteClient) 517 public void SendTerseUpdateToClient(IClientAPI remoteClient)
465 { 518 {