aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2014-08-03 06:16:30 +0100
committerUbitUmarov2014-08-03 06:16:30 +0100
commitbcab663ad7b6495dc63a6dae46f939d530284cc0 (patch)
tree01f1935922f8940d511c47297949114fdd82b4a0 /OpenSim/Region/Framework
parent.... (diff)
downloadopensim-SC_OLD-bcab663ad7b6495dc63a6dae46f939d530284cc0.zip
opensim-SC_OLD-bcab663ad7b6495dc63a6dae46f939d530284cc0.tar.gz
opensim-SC_OLD-bcab663ad7b6495dc63a6dae46f939d530284cc0.tar.bz2
opensim-SC_OLD-bcab663ad7b6495dc63a6dae46f939d530284cc0.tar.xz
debug...
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs135
1 files changed, 110 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 61f66d9..7b0b103 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3868,14 +3868,21 @@ namespace OpenSim.Region.Framework.Scenes
3868 /// </summary> 3868 /// </summary>
3869 protected bool CrossToNewRegion() 3869 protected bool CrossToNewRegion()
3870 { 3870 {
3871 bool result = false;
3872 parcelRegionCross(false);
3871 try 3873 try
3872 { 3874 {
3873 return m_scene.CrossAgentToNewRegion(this, Flying); 3875 result = m_scene.CrossAgentToNewRegion(this, Flying);
3874 } 3876 }
3875 catch 3877 catch
3876 { 3878 {
3877 return m_scene.CrossAgentToNewRegion(this, false); 3879 result = m_scene.CrossAgentToNewRegion(this, false);
3878 } 3880 }
3881 if(!result)
3882 parcelRegionCross(true);
3883
3884 return result;
3885
3879 } 3886 }
3880 3887
3881 public void Reset() 3888 public void Reset()
@@ -5384,7 +5391,7 @@ namespace OpenSim.Region.Framework.Scenes
5384 5391
5385 } 5392 }
5386 5393
5387 private void parcelGodCheck(UUID currentParcelUUID, bool isGod) 5394 private void parcelGodCheck(UUID currentParcelID, bool isGod)
5388 { 5395 {
5389 List<ScenePresence> allpresences = null; 5396 List<ScenePresence> allpresences = null;
5390 5397
@@ -5400,7 +5407,7 @@ namespace OpenSim.Region.Framework.Scenes
5400 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) 5407 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
5401 continue; 5408 continue;
5402 5409
5403 if (p.ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID) 5410 if (p.ParcelHideThisAvatar && p.currentParcelUUID != currentParcelID)
5404 { 5411 {
5405 viewsToSendme.Add(p); // i see them 5412 viewsToSendme.Add(p); // i see them
5406 } 5413 }
@@ -5410,6 +5417,7 @@ namespace OpenSim.Region.Framework.Scenes
5410 { 5417 {
5411 foreach (ScenePresence p in viewsToSendme) 5418 foreach (ScenePresence p in viewsToSendme)
5412 { 5419 {
5420 m_log.Debug("[AVATAR]: viewMe: " + Lastname + " " + p.Lastname);
5413 ControllingClient.SendAvatarDataImmediate(p); 5421 ControllingClient.SendAvatarDataImmediate(p);
5414 p.SendAppearanceToAgent(this); 5422 p.SendAppearanceToAgent(this);
5415 p.SendAttachmentsToClient(ControllingClient); 5423 p.SendAttachmentsToClient(ControllingClient);
@@ -5427,16 +5435,17 @@ namespace OpenSim.Region.Framework.Scenes
5427 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) 5435 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
5428 continue; 5436 continue;
5429 5437
5430 if (p.ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID) 5438 if (p.ParcelHideThisAvatar && p.currentParcelUUID != currentParcelID)
5431 { 5439 {
5432 killsToSendme.Add(p); 5440 killsToSendme.Add(p);
5433 } 5441 }
5434 } 5442 }
5435 5443
5436 if (killsToSendme.Count > 0 && PresenceType != PresenceType.Npc) 5444 if (killsToSendme.Count > 0)
5437 { 5445 {
5438 foreach (ScenePresence p in killsToSendme) 5446 foreach (ScenePresence p in killsToSendme)
5439 { 5447 {
5448 m_log.Debug("[AVATAR]: killMe: " + Lastname + " " + p.Lastname);
5440 try { ControllingClient.SendKillObject(new List<uint> { p.LocalId }); } 5449 try { ControllingClient.SendKillObject(new List<uint> { p.LocalId }); }
5441 catch (NullReferenceException) { } 5450 catch (NullReferenceException) { }
5442 } 5451 }
@@ -5445,7 +5454,7 @@ namespace OpenSim.Region.Framework.Scenes
5445 5454
5446 } 5455 }
5447 5456
5448 private void ParcelLoginCheck(UUID currentParcelUUID) 5457 private void ParcelLoginCheck(UUID currentParcelID)
5449 { 5458 {
5450 List<ScenePresence> killsToSendto = new List<ScenePresence>(); 5459 List<ScenePresence> killsToSendto = new List<ScenePresence>();
5451 List<ScenePresence> killsToSendme = new List<ScenePresence>(); 5460 List<ScenePresence> killsToSendme = new List<ScenePresence>();
@@ -5460,7 +5469,7 @@ namespace OpenSim.Region.Framework.Scenes
5460 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) 5469 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
5461 continue; 5470 continue;
5462 5471
5463 if (currentParcelUUID != p.currentParcelUUID) 5472 if (currentParcelID != p.currentParcelUUID)
5464 { 5473 {
5465 if (p.GodLevel < 200) 5474 if (p.GodLevel < 200)
5466 killsToSendto.Add(p); 5475 killsToSendto.Add(p);
@@ -5477,28 +5486,31 @@ namespace OpenSim.Region.Framework.Scenes
5477 5486
5478 // send the things 5487 // send the things
5479 // kill main avatar object 5488 // kill main avatar object
5480 if (killsToSendto.Count > 0) 5489 if (killsToSendto.Count > 0 && PresenceType != PresenceType.Npc)
5481 { 5490 {
5482 foreach (ScenePresence p in killsToSendto) 5491 foreach (ScenePresence p in killsToSendto)
5483 { 5492 {
5493 m_log.Debug("[AVATAR]: killTo: " + Lastname + " " + p.Lastname);
5484 try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); } 5494 try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); }
5485 catch (NullReferenceException) { } 5495 catch (NullReferenceException) { }
5486 } 5496 }
5487 } 5497 }
5488 5498
5489 if (killsToSendme.Count > 0 && PresenceType != PresenceType.Npc) 5499 if (killsToSendme.Count > 0)
5490 { 5500 {
5491 foreach (ScenePresence p in killsToSendme) 5501 foreach (ScenePresence p in killsToSendme)
5492 { 5502 {
5503 m_log.Debug("[AVATAR]: killMe: " + Lastname + " " + p.Lastname);
5493 try { ControllingClient.SendKillObject(new List<uint> { p.LocalId }); } 5504 try { ControllingClient.SendKillObject(new List<uint> { p.LocalId }); }
5494 catch (NullReferenceException) { } 5505 catch (NullReferenceException) { }
5495 } 5506 }
5496 } 5507 }
5497 5508
5498 if (viewsToSendto.Count > 0) 5509 if (viewsToSendto.Count > 0 && PresenceType != PresenceType.Npc)
5499 { 5510 {
5500 foreach (ScenePresence p in viewsToSendto) 5511 foreach (ScenePresence p in viewsToSendto)
5501 { 5512 {
5513 m_log.Debug("[AVATAR]: viewTo: " + Lastname + " " + p.Lastname);
5502 p.ControllingClient.SendAvatarDataImmediate(this); 5514 p.ControllingClient.SendAvatarDataImmediate(this);
5503 SendAppearanceToAgent(p); 5515 SendAppearanceToAgent(p);
5504 SendAttachmentsToClient(p.ControllingClient); 5516 SendAttachmentsToClient(p.ControllingClient);
@@ -5507,10 +5519,11 @@ namespace OpenSim.Region.Framework.Scenes
5507 } 5519 }
5508 } 5520 }
5509 5521
5510 if (viewsToSendme.Count > 0 && PresenceType != PresenceType.Npc) 5522 if (viewsToSendme.Count > 0)
5511 { 5523 {
5512 foreach (ScenePresence p in viewsToSendme) 5524 foreach (ScenePresence p in viewsToSendme)
5513 { 5525 {
5526 m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname);
5514 ControllingClient.SendAvatarDataImmediate(p); 5527 ControllingClient.SendAvatarDataImmediate(p);
5515 p.SendAppearanceToAgent(this); 5528 p.SendAppearanceToAgent(this);
5516 p.SendAttachmentsToClient(ControllingClient); 5529 p.SendAttachmentsToClient(ControllingClient);
@@ -5520,7 +5533,74 @@ namespace OpenSim.Region.Framework.Scenes
5520 } 5533 }
5521 } 5534 }
5522 5535
5523 private void ParcelCrossCheck(UUID currentParcelUUID,UUID previusParcelUUID, 5536 private void parcelRegionCross(bool abort)
5537 {
5538 if (!ParcelHideThisAvatar)
5539 return;
5540
5541 List<ScenePresence> allpresences = null;
5542 allpresences = m_scene.GetScenePresences();
5543
5544 if (abort)
5545 {
5546
5547 List<ScenePresence> viewsToSendme = new List<ScenePresence>();
5548
5549 foreach (ScenePresence p in allpresences)
5550 {
5551 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
5552 continue;
5553
5554 if (p.currentParcelUUID == m_currentParcelUUID)
5555 {
5556 viewsToSendme.Add(p);
5557 }
5558 }
5559
5560 if (viewsToSendme.Count > 0)
5561 {
5562 foreach (ScenePresence p in viewsToSendme)
5563 {
5564 m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname);
5565 ControllingClient.SendAvatarDataImmediate(p);
5566 p.SendAppearanceToAgent(this);
5567 p.SendAttachmentsToClient(ControllingClient);
5568 if (p.Animator != null)
5569 p.Animator.SendAnimPackToClient(ControllingClient);
5570 }
5571 }
5572 }
5573 else
5574 {
5575 if (GodLevel >= 200)
5576 return;
5577
5578 List<ScenePresence> killsToSendme = new List<ScenePresence>();
5579 foreach (ScenePresence p in allpresences)
5580 {
5581 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
5582 continue;
5583
5584 if (p.currentParcelUUID == m_currentParcelUUID)
5585 {
5586 killsToSendme.Add(p);
5587 }
5588 }
5589
5590 if (killsToSendme.Count > 0)
5591 {
5592 foreach (ScenePresence p in killsToSendme)
5593 {
5594 m_log.Debug("[AVATAR]: killMe: " + Lastname + " " + p.Lastname);
5595 try { ControllingClient.SendKillObject(new List<uint> { p.LocalId }); }
5596 catch (NullReferenceException) { }
5597 }
5598 }
5599 }
5600 }
5601
5602
5603 private void ParcelCrossCheck(UUID currentParcelID,UUID previusParcelID,
5524 bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check) 5604 bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check)
5525 { 5605 {
5526 List<ScenePresence> killsToSendto = new List<ScenePresence>(); 5606 List<ScenePresence> killsToSendto = new List<ScenePresence>();
@@ -5548,8 +5628,9 @@ namespace OpenSim.Region.Framework.Scenes
5548 continue; 5628 continue;
5549 5629
5550 // those on not on parcel see me 5630 // those on not on parcel see me
5551 if (currentParcelUUID != p.currentParcelUUID) 5631 if (currentParcelID != p.currentParcelUUID)
5552 { 5632 {
5633 m_log.Debug("[AVATAR]: viewTo: " + Lastname + " " + p.Lastname);
5553 viewsToSendto.Add(p); // they see me 5634 viewsToSendto.Add(p); // they see me
5554 } 5635 }
5555 } 5636 }
@@ -5563,7 +5644,7 @@ namespace OpenSim.Region.Framework.Scenes
5563 continue; 5644 continue;
5564 5645
5565 // those not on parcel dont see me 5646 // those not on parcel dont see me
5566 if (currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) 5647 if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200)
5567 { 5648 {
5568 killsToSendto.Add(p); // they dont see me 5649 killsToSendto.Add(p); // they dont see me
5569 } 5650 }
@@ -5579,7 +5660,7 @@ namespace OpenSim.Region.Framework.Scenes
5579 // now on a private parcel 5660 // now on a private parcel
5580 allpresences = m_scene.GetScenePresences(); 5661 allpresences = m_scene.GetScenePresences();
5581 5662
5582 if (previusParcelHide && previusParcelUUID != UUID.Zero) 5663 if (previusParcelHide && previusParcelID != UUID.Zero)
5583 { 5664 {
5584 foreach (ScenePresence p in allpresences) 5665 foreach (ScenePresence p in allpresences)
5585 { 5666 {
@@ -5587,7 +5668,7 @@ namespace OpenSim.Region.Framework.Scenes
5587 continue; 5668 continue;
5588 5669
5589 // only those on previus parcel need receive kills 5670 // only those on previus parcel need receive kills
5590 if (previusParcelUUID == p.currentParcelUUID) 5671 if (previusParcelID == p.currentParcelUUID)
5591 { 5672 {
5592 if(p.GodLevel < 200) 5673 if(p.GodLevel < 200)
5593 killsToSendto.Add(p); // they dont see me 5674 killsToSendto.Add(p); // they dont see me
@@ -5595,7 +5676,7 @@ namespace OpenSim.Region.Framework.Scenes
5595 killsToSendme.Add(p); // i dont see them 5676 killsToSendme.Add(p); // i dont see them
5596 } 5677 }
5597 // only those on new parcel need see 5678 // only those on new parcel need see
5598 if (currentParcelUUID == p.currentParcelUUID) 5679 if (currentParcelID == p.currentParcelUUID)
5599 { 5680 {
5600 viewsToSendto.Add(p); // they see me 5681 viewsToSendto.Add(p); // they see me
5601 viewsToSendme.Add(p); // i see them 5682 viewsToSendme.Add(p); // i see them
@@ -5613,7 +5694,7 @@ namespace OpenSim.Region.Framework.Scenes
5613 continue; 5694 continue;
5614 5695
5615 // those not on new parcel dont see me 5696 // those not on new parcel dont see me
5616 if (currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) 5697 if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200)
5617 { 5698 {
5618 killsToSendto.Add(p); // they dont see me 5699 killsToSendto.Add(p); // they dont see me
5619 } 5700 }
@@ -5629,7 +5710,7 @@ namespace OpenSim.Region.Framework.Scenes
5629 else 5710 else
5630 { 5711 {
5631 // now on public parcel 5712 // now on public parcel
5632 if (previusParcelHide && previusParcelUUID != UUID.Zero) 5713 if (previusParcelHide && previusParcelID != UUID.Zero)
5633 { 5714 {
5634 // was on private area 5715 // was on private area
5635 allpresences = m_scene.GetScenePresences(); 5716 allpresences = m_scene.GetScenePresences();
@@ -5639,7 +5720,7 @@ namespace OpenSim.Region.Framework.Scenes
5639 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) 5720 if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
5640 continue; 5721 continue;
5641 // only those old parcel need receive kills 5722 // only those old parcel need receive kills
5642 if (previusParcelUUID == p.currentParcelUUID && GodLevel < 200) 5723 if (previusParcelID == p.currentParcelUUID && GodLevel < 200)
5643 { 5724 {
5644 killsToSendme.Add(p); // i dont see them 5725 killsToSendme.Add(p); // i dont see them
5645 } 5726 }
@@ -5656,28 +5737,31 @@ namespace OpenSim.Region.Framework.Scenes
5656 5737
5657 // send the things 5738 // send the things
5658 // kill main avatar object 5739 // kill main avatar object
5659 if (killsToSendto.Count > 0) 5740 if (killsToSendto.Count > 0 && PresenceType != PresenceType.Npc)
5660 { 5741 {
5661 foreach (ScenePresence p in killsToSendto) 5742 foreach (ScenePresence p in killsToSendto)
5662 { 5743 {
5744 m_log.Debug("[AVATAR]: killTo: " + Lastname + " " + p.Lastname);
5663 try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); } 5745 try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); }
5664 catch (NullReferenceException) { } 5746 catch (NullReferenceException) { }
5665 } 5747 }
5666 } 5748 }
5667 5749
5668 if (killsToSendme.Count > 0 && PresenceType != PresenceType.Npc) 5750 if (killsToSendme.Count > 0 )
5669 { 5751 {
5670 foreach (ScenePresence p in killsToSendme) 5752 foreach (ScenePresence p in killsToSendme)
5671 { 5753 {
5754 m_log.Debug("[AVATAR]: killMe: " + Lastname + " " + p.Lastname);
5672 try {ControllingClient.SendKillObject(new List<uint> { p.LocalId }); } 5755 try {ControllingClient.SendKillObject(new List<uint> { p.LocalId }); }
5673 catch (NullReferenceException) { } 5756 catch (NullReferenceException) { }
5674 } 5757 }
5675 } 5758 }
5676 5759
5677 if (viewsToSendto.Count > 0) 5760 if (viewsToSendto.Count > 0 && PresenceType != PresenceType.Npc)
5678 { 5761 {
5679 foreach (ScenePresence p in viewsToSendto) 5762 foreach (ScenePresence p in viewsToSendto)
5680 { 5763 {
5764 m_log.Debug("[AVATAR]: viewTo: " + Lastname + " " + p.Lastname);
5681 p.ControllingClient.SendAvatarDataImmediate(this); 5765 p.ControllingClient.SendAvatarDataImmediate(this);
5682 SendAppearanceToAgent(p); 5766 SendAppearanceToAgent(p);
5683 SendAttachmentsToClient(p.ControllingClient); 5767 SendAttachmentsToClient(p.ControllingClient);
@@ -5686,10 +5770,11 @@ namespace OpenSim.Region.Framework.Scenes
5686 } 5770 }
5687 } 5771 }
5688 5772
5689 if (viewsToSendme.Count > 0 && PresenceType != PresenceType.Npc) 5773 if (viewsToSendme.Count > 0 )
5690 { 5774 {
5691 foreach (ScenePresence p in viewsToSendme) 5775 foreach (ScenePresence p in viewsToSendme)
5692 { 5776 {
5777 m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname);
5693 ControllingClient.SendAvatarDataImmediate(p); 5778 ControllingClient.SendAvatarDataImmediate(p);
5694 p.SendAppearanceToAgent(this); 5779 p.SendAppearanceToAgent(this);
5695 p.SendAttachmentsToClient(ControllingClient); 5780 p.SendAttachmentsToClient(ControllingClient);