Complete country support

avinationmerge
Melanie 2011-01-24 03:08:00 +01:00
parent 3d098bf27d
commit aa6c097cca
1 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,7 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.CoreModules;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
namespace OpenSim.Region.ScriptEngine.Shared
{
@ -95,6 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
Type = 0;
Velocity = new LSL_Types.Vector3();
initializeSurfaceTouch();
Country = String.Empty;
}
public UUID Key;
@ -126,6 +128,8 @@ namespace OpenSim.Region.ScriptEngine.Shared
private int touchFace;
public int TouchFace { get { return touchFace; } }
public string Country;
// This can be done in two places including the constructor
// so be carefull what gets added here
private void initializeSurfaceTouch()
@ -173,6 +177,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
return;
Name = presence.Firstname + " " + presence.Lastname;
UserAccount account = scene.UserAccountService.GetUserAccount(scene.RegionInfo.ScopeID, Key);
if (account != null)
Country = account.UserCountry;
Owner = Key;
Position = new LSL_Types.Vector3(
presence.AbsolutePosition.X,