diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Helpers.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 4855d64..7e7e278 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |||
@@ -35,6 +35,7 @@ using OpenMetaverse; | |||
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.CoreModules; | 36 | using OpenSim.Region.CoreModules; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Services.Interfaces; | ||
38 | 39 | ||
39 | namespace OpenSim.Region.ScriptEngine.Shared | 40 | namespace OpenSim.Region.ScriptEngine.Shared |
40 | { | 41 | { |
@@ -95,6 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
95 | Type = 0; | 96 | Type = 0; |
96 | Velocity = new LSL_Types.Vector3(); | 97 | Velocity = new LSL_Types.Vector3(); |
97 | initializeSurfaceTouch(); | 98 | initializeSurfaceTouch(); |
99 | Country = String.Empty; | ||
98 | } | 100 | } |
99 | 101 | ||
100 | public UUID Key; | 102 | public UUID Key; |
@@ -126,6 +128,8 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
126 | private int touchFace; | 128 | private int touchFace; |
127 | public int TouchFace { get { return touchFace; } } | 129 | public int TouchFace { get { return touchFace; } } |
128 | 130 | ||
131 | public string Country; | ||
132 | |||
129 | // This can be done in two places including the constructor | 133 | // This can be done in two places including the constructor |
130 | // so be carefull what gets added here | 134 | // so be carefull what gets added here |
131 | private void initializeSurfaceTouch() | 135 | private void initializeSurfaceTouch() |
@@ -173,6 +177,10 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
173 | return; | 177 | return; |
174 | 178 | ||
175 | Name = presence.Firstname + " " + presence.Lastname; | 179 | Name = presence.Firstname + " " + presence.Lastname; |
180 | UserAccount account = scene.UserAccountService.GetUserAccount(scene.RegionInfo.ScopeID, Key); | ||
181 | if (account != null) | ||
182 | Country = account.UserCountry; | ||
183 | |||
176 | Owner = Key; | 184 | Owner = Key; |
177 | Position = new LSL_Types.Vector3( | 185 | Position = new LSL_Types.Vector3( |
178 | presence.AbsolutePosition.X, | 186 | presence.AbsolutePosition.X, |
@@ -197,7 +205,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
197 | return; | 205 | return; |
198 | } | 206 | } |
199 | 207 | ||
200 | part=part.ParentGroup.RootPart; // We detect objects only | 208 | part = part.ParentGroup.RootPart; // We detect objects only |
201 | 209 | ||
202 | LinkNum = 0; // Not relevant | 210 | LinkNum = 0; // Not relevant |
203 | 211 | ||
@@ -209,7 +217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
209 | else | 217 | else |
210 | Type = 0x02; // Passive | 218 | Type = 0x02; // Passive |
211 | 219 | ||
212 | foreach (SceneObjectPart p in part.ParentGroup.Children.Values) | 220 | foreach (SceneObjectPart p in part.ParentGroup.Parts) |
213 | { | 221 | { |
214 | if (p.Inventory.ContainsScripts()) | 222 | if (p.Inventory.ContainsScripts()) |
215 | { | 223 | { |