Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-11-16 21:15:15 +00:00
commit c4eb430ad2
11 changed files with 71 additions and 8 deletions

View File

@ -673,8 +673,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
catch (Exception e) catch (Exception e)
{ {
// Make sure that we see any exception caused by the asynchronous operation. // Make sure that we see any exception caused by the asynchronous operation.
m_log.Error( m_log.ErrorFormat(
string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); "[LLCLIENTVIEW]: Caught exception while processing {0} for {1}, {2} {3}",
packetObject.Pack, Name, e.Message, e.StackTrace);
} }
} }

View File

@ -97,7 +97,6 @@ namespace OpenSim.Region.CoreModules.World.Sound
else else
gain = (float)((double)gain * ((radius - dis) / radius)); gain = (float)((double)gain * ((radius - dis) / radius));
m_log.DebugFormat("Play sound, gain {0}", gain);
sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags);
}); });
} }

View File

@ -3270,6 +3270,9 @@ namespace OpenSim.Region.Framework.Scenes
m_eventManager.TriggerOnRemovePresence(agentID); m_eventManager.TriggerOnRemovePresence(agentID);
m_log.Debug("[Scene] Finished OnRemovePresence"); m_log.Debug("[Scene] Finished OnRemovePresence");
if (avatar != null && (!avatar.IsChildAgent))
avatar.SaveChangedAttachments();
if (avatar != null && (!avatar.IsChildAgent)) if (avatar != null && (!avatar.IsChildAgent))
avatar.SaveChangedAttachments(); avatar.SaveChangedAttachments();

View File

@ -10493,6 +10493,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case "4": case "4":
ret = ret + new LSL_List(land.Area); ret = ret + new LSL_List(land.Area);
break; break;
case "5":
ret = ret + new LSL_List(land.GlobalID);
break;
default: default:
ret = ret + new LSL_List(0); ret = ret + new LSL_List(0);
break; break;

View File

@ -648,6 +648,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// //
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent"); CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
TeleportAgent(agent, regionName, position, lookat);
}
private void TeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
{
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID agentId = new UUID(); UUID agentId = new UUID();
if (UUID.TryParse(agent, out agentId)) if (UUID.TryParse(agent, out agentId))
@ -660,7 +665,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
== World.LandChannel.GetLandObject( == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
{ {
// Check for hostname , attempt to make a hglink // Check for hostname , attempt to make a hglink
// and convert the regionName to the target region // and convert the regionName to the target region
if (regionName.Contains(".") && regionName.Contains(":")) if (regionName.Contains(".") && regionName.Contains(":"))
@ -670,7 +674,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (regions != null && regions.Count > 0) if (regions != null && regions.Count > 0)
{ {
GridRegion regInfo = regions[0]; GridRegion regInfo = regions[0];
regionName = regInfo.RegionName; string[] parts = regInfo.RegionName.Split(new char[] { ':' });
if (parts.Length > 2)
regionName = parts[2];
else
regionName = parts[0];
} }
} }
World.RequestTeleportLocation(presence.ControllingClient, regionName, World.RequestTeleportLocation(presence.ControllingClient, regionName,
@ -683,13 +691,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
// Teleport functions
public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
{ {
// High because there is no security check. High griefer potential // High because there is no security check. High griefer potential
// //
CheckThreatLevel(ThreatLevel.High, "osTeleportAgent"); CheckThreatLevel(ThreatLevel.High, "osTeleportAgent");
TeleportAgent(agent, regionX, regionY, position, lookat);
}
private void TeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
{
ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize)); ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -718,6 +730,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat); osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat);
} }
public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
{
// Threat level None because this is what can already be done with the World Map in the viewer
CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat);
}
public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
{
osTeleportOwner(World.RegionInfo.RegionName, position, lookat);
}
public void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
{
CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
TeleportAgent(m_host.OwnerID.ToString(), regionX, regionY, position, lookat);
}
// Functions that get information from the agent itself. // Functions that get information from the agent itself.
// //
// osGetAgentIP - this is used to determine the IP address of // osGetAgentIP - this is used to determine the IP address of

View File

@ -86,6 +86,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
// Animation commands // Animation commands
void osAvatarPlayAnimation(string avatar, string animation); void osAvatarPlayAnimation(string avatar, string animation);

View File

@ -508,6 +508,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int PARCEL_DETAILS_OWNER = 2; public const int PARCEL_DETAILS_OWNER = 2;
public const int PARCEL_DETAILS_GROUP = 3; public const int PARCEL_DETAILS_GROUP = 3;
public const int PARCEL_DETAILS_AREA = 4; public const int PARCEL_DETAILS_AREA = 4;
public const int PARCEL_DETAILS_ID = 5;
// constants for llSetClickAction // constants for llSetClickAction
public const int CLICK_ACTION_NONE = 0; public const int CLICK_ACTION_NONE = 0;

View File

@ -227,6 +227,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_OSSL_Functions.osTeleportAgent(agent, position, lookat); m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
} }
public void osTeleportOwner(string regionName, vector position, vector lookat)
{
m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
}
public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
{
m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
}
public void osTeleportOwner(vector position, vector lookat)
{
m_OSSL_Functions.osTeleportOwner(position, lookat);
}
// Avatar info functions // Avatar info functions
public string osGetAgentIP(string agent) public string osGetAgentIP(string agent)
{ {

View File

@ -4,6 +4,9 @@
StorageProvider = "OpenSim.Data.SQLiteLegacy.dll" StorageProvider = "OpenSim.Data.SQLiteLegacy.dll"
ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True"
[AssetService]
ConnectionString = "URI=file:Asset.db,version=3"
[AvatarService] [AvatarService]
ConnectionString = "URI=file:avatars.db,version=3" ConnectionString = "URI=file:avatars.db,version=3"

View File

@ -4,6 +4,9 @@
StorageProvider = "OpenSim.Data.SQLite.dll" StorageProvider = "OpenSim.Data.SQLite.dll"
ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True"
[AssetService]
ConnectionString = "URI=file:Asset.db,version=3"
[InventoryService] [InventoryService]
;ConnectionString = "URI=file:inventory.db,version=3" ;ConnectionString = "URI=file:inventory.db,version=3"
; if you have a legacy inventory store use the connection string below ; if you have a legacy inventory store use the connection string below

View File

@ -2185,7 +2185,7 @@
<Reference name="OpenSim.Region.Framework"/> <Reference name="OpenSim.Region.Framework"/>
<Reference name="OpenMetaverseTypes" path="../../../bin/"/> <Reference name="OpenMetaverseTypes" path="../../../bin/"/>
<Reference name="OpenMetaverse" path="../../../bin/"/> <Reference name="OpenMetaverse" path="../../../bin/"/>
<Reference name="Mono.Data.SqliteClient"/> <Reference name="Mono.Data.SqliteClient" path="../../../bin/"/>
<Reference name="Mono.Addins" path="../../../bin/"/> <Reference name="Mono.Addins" path="../../../bin/"/>
<Reference name="log4net" path="../../../bin/"/> <Reference name="log4net" path="../../../bin/"/>
@ -2534,7 +2534,7 @@
<Reference name="OpenSim.Framework.Servers.HttpServer"/> <Reference name="OpenSim.Framework.Servers.HttpServer"/>
<Reference name="OpenSim.Framework.Statistics"/> <Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Region.Physics.Manager"/> <Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="Mono.Data.SqliteClient"/> <Reference name="Mono.Data.SqliteClient" path="../../../bin/"/>
<Reference name="Mono.Addins"/> <Reference name="Mono.Addins"/>
<!-- For scripting in funny languages by default --> <!-- For scripting in funny languages by default -->