diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AvatarAppearance.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 36 |
2 files changed, 25 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs index b027845..2ec4dbe 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs | |||
@@ -88,7 +88,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
88 | m_textureEntry = GetDefaultTextureEntry(); | 88 | m_textureEntry = GetDefaultTextureEntry(); |
89 | } | 89 | } |
90 | 90 | ||
91 | |||
92 | /// <summary> | 91 | /// <summary> |
93 | /// | 92 | /// |
94 | /// </summary> | 93 | /// </summary> |
@@ -109,7 +108,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
109 | // (float)m_visualParams[125] = LegLength | 108 | // (float)m_visualParams[125] = LegLength |
110 | m_avatarHeight = (1.50856f + (((float)m_visualParams[25] / 255.0f) * (2.525506f - 1.50856f))) | 109 | m_avatarHeight = (1.50856f + (((float)m_visualParams[25] / 255.0f) * (2.525506f - 1.50856f))) |
111 | + (((float)m_visualParams[125] / 255.0f) / 1.5f); | 110 | + (((float)m_visualParams[125] / 255.0f) / 1.5f); |
112 | |||
113 | } | 111 | } |
114 | 112 | ||
115 | /// <summary> | 113 | /// <summary> |
@@ -119,7 +117,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
119 | public void SendAppearanceToOtherAgent(ScenePresence avatar) | 117 | public void SendAppearanceToOtherAgent(ScenePresence avatar) |
120 | { | 118 | { |
121 | avatar.ControllingClient.SendAppearance(m_scenePresenceID, m_visualParams, | 119 | avatar.ControllingClient.SendAppearance(m_scenePresenceID, m_visualParams, |
122 | m_textureEntry.ToBytes()); | 120 | m_textureEntry.ToBytes()); |
123 | } | 121 | } |
124 | 122 | ||
125 | public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable) | 123 | public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable) |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 91b6463..89701d7 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1233,25 +1233,37 @@ namespace OpenSim.Region.Environment.Scenes | |||
1233 | uint neighbourx = m_regionInfo.RegionLocX; | 1233 | uint neighbourx = m_regionInfo.RegionLocX; |
1234 | uint neighboury = m_regionInfo.RegionLocY; | 1234 | uint neighboury = m_regionInfo.RegionLocY; |
1235 | 1235 | ||
1236 | if (pos.X < 1.7F) | 1236 | // distance to edge that will trigger crossing |
1237 | const float boundaryDistance = 1.7f; | ||
1238 | |||
1239 | // distance into new region to place avatar | ||
1240 | const float enterDistance = 0.1f; | ||
1241 | |||
1242 | // region size | ||
1243 | // TODO: this should be hard-coded in some common place | ||
1244 | const float regionWidth = 256; | ||
1245 | const float regionHeight = 256; | ||
1246 | |||
1247 | if (pos.X < boundaryDistance) | ||
1237 | { | 1248 | { |
1238 | neighbourx -= 1; | 1249 | neighbourx--; |
1239 | newpos.X = 255.9F; | 1250 | newpos.X = regionWidth - enterDistance; |
1240 | } | 1251 | } |
1241 | if (pos.X > 254.3F) | 1252 | else if (pos.X > regionWidth - boundaryDistance) |
1242 | { | 1253 | { |
1243 | neighbourx += 1; | 1254 | neighbourx++; |
1244 | newpos.X = 0.1F; | 1255 | newpos.X = enterDistance; |
1245 | } | 1256 | } |
1246 | if (pos.Y < 1.7F) | 1257 | |
1258 | if (pos.Y < boundaryDistance) | ||
1247 | { | 1259 | { |
1248 | neighboury -= 1; | 1260 | neighboury--; |
1249 | newpos.Y = 255.9F; | 1261 | newpos.Y = regionHeight - enterDistance; |
1250 | } | 1262 | } |
1251 | if (pos.Y > 254.3F) | 1263 | else if (pos.Y > regionHeight - boundaryDistance) |
1252 | { | 1264 | { |
1253 | neighboury += 1; | 1265 | neighboury++; |
1254 | newpos.Y = 0.1F; | 1266 | newpos.Y = enterDistance; |
1255 | } | 1267 | } |
1256 | 1268 | ||
1257 | LLVector3 vel = m_velocity; | 1269 | LLVector3 vel = m_velocity; |