aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2014-08-16 21:46:25 +0100
committerUbitUmarov2014-08-16 21:46:25 +0100
commit21b3980d2b47addfcefa28dff3b8b2b010258233 (patch)
tree27b355983b035b5dcaeaeb3fe07dfed98c77cdb6 /OpenSim/Region/CoreModules
parentchange how avatar data, appearance and animations are sent, specially (diff)
downloadopensim-SC_OLD-21b3980d2b47addfcefa28dff3b8b2b010258233.zip
opensim-SC_OLD-21b3980d2b47addfcefa28dff3b8b2b010258233.tar.gz
opensim-SC_OLD-21b3980d2b47addfcefa28dff3b8b2b010258233.tar.bz2
opensim-SC_OLD-21b3980d2b47addfcefa28dff3b8b2b010258233.tar.xz
send avatar Height to children, use it in region tp height check
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8d2a276..890160b 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -430,7 +430,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
430 } 430 }
431 431
432 // TODO: Get proper AVG Height 432 // TODO: Get proper AVG Height
433 float localAVHeight = 1.56f; 433 float localHalfAVHeight = 0.8f;
434 if (sp.Appearance != null)
435 localHalfAVHeight = sp.Appearance.AvatarHeight / 2;
436
434 float posZLimit = 22; 437 float posZLimit = 22;
435 438
436 // TODO: Check other Scene HeightField 439 // TODO: Check other Scene HeightField
@@ -439,10 +442,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
439 posZLimit = (float)sp.Scene.Heightmap[(int)position.X, (int)position.Y]; 442 posZLimit = (float)sp.Scene.Heightmap[(int)position.X, (int)position.Y];
440 } 443 }
441 444
442 float newPosZ = posZLimit + localAVHeight; 445 posZLimit += localHalfAVHeight + 0.1f;
443 if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) 446
447 if ((position.Z < posZLimit) && !(Single.IsInfinity(posZLimit) || Single.IsNaN(posZLimit)))
444 { 448 {
445 position.Z = newPosZ; 449 position.Z = posZLimit;
446 } 450 }
447 451
448 if (sp.Flying) 452 if (sp.Flying)
@@ -724,6 +728,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
724// agentCircuit.Appearance = sp.Appearance; 728// agentCircuit.Appearance = sp.Appearance;
725// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false); 729// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false);
726 agentCircuit.Appearance = new AvatarAppearance(); 730 agentCircuit.Appearance = new AvatarAppearance();
731 agentCircuit.Appearance.AvatarHeight = sp.Appearance.AvatarHeight;
727 732
728 if (currentAgentCircuit != null) 733 if (currentAgentCircuit != null)
729 { 734 {
@@ -1851,6 +1856,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1851 //agent.Appearance = sp.Appearance; 1856 //agent.Appearance = sp.Appearance;
1852 //agent.Appearance = new AvatarAppearance(sp.Appearance, true, false); 1857 //agent.Appearance = new AvatarAppearance(sp.Appearance, true, false);
1853 agent.Appearance = new AvatarAppearance(); 1858 agent.Appearance = new AvatarAppearance();
1859 agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight;
1854 1860
1855 agent.CapsPath = CapsUtil.GetRandomCapsObjectPath(); 1861 agent.CapsPath = CapsUtil.GetRandomCapsObjectPath();
1856 1862
@@ -1969,6 +1975,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1969 // agent.Appearance = sp.Appearance; 1975 // agent.Appearance = sp.Appearance;
1970 // agent.Appearance = new AvatarAppearance(sp.Appearance, true, false); 1976 // agent.Appearance = new AvatarAppearance(sp.Appearance, true, false);
1971 agent.Appearance = new AvatarAppearance(); 1977 agent.Appearance = new AvatarAppearance();
1978 agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight;
1979
1972 if (currentAgentCircuit != null) 1980 if (currentAgentCircuit != null)
1973 { 1981 {
1974 agent.ServiceURLs = currentAgentCircuit.ServiceURLs; 1982 agent.ServiceURLs = currentAgentCircuit.ServiceURLs;