Merge branch 'master' into careminster

avinationmerge
Melanie 2009-12-21 22:07:22 +00:00
commit 84a1a0a729
5 changed files with 39 additions and 9 deletions

View File

@ -142,6 +142,7 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile != null) if (userProfile != null)
{ {
if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)
@ -177,6 +178,7 @@ namespace OpenSim.Framework.Communications.Cache
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID);
if (userProfile != null) if (userProfile != null)
{ {
if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)

View File

@ -56,6 +56,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private ISessionAuthInventoryService m_HGService; private ISessionAuthInventoryService m_HGService;
private string m_LocalGridInventoryURI = string.Empty; private string m_LocalGridInventoryURI = string.Empty;
private string LocalGridInventory
{
get
{
if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "")
m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL;
return m_LocalGridInventoryURI;
}
}
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
get { return null; } get { return null; }
@ -533,7 +544,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI); string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI);
string uri = m_LocalGridInventoryURI.TrimEnd('/'); string uri = LocalGridInventory.TrimEnd('/');
if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) if ((userInventoryServerURI == uri) || (userInventoryServerURI == ""))
{ {
@ -545,7 +556,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private string GetUserInventoryURI(UUID userID) private string GetUserInventoryURI(UUID userID)
{ {
string invURI = m_LocalGridInventoryURI; string invURI = LocalGridInventory;
CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID);
if ((uinfo == null) || (uinfo.UserProfile == null)) if ((uinfo == null) || (uinfo.UserProfile == null))

View File

@ -345,6 +345,7 @@ namespace OpenSim.Region.Framework.Scenes
break; break;
} }
} }
m_part.ParentGroup.m_savedScriptState.Remove(oldID);
} }
} }

View File

@ -7467,9 +7467,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
break; break;
case (int)ScriptBaseClass.PRIM_POSITION: case (int)ScriptBaseClass.PRIM_POSITION:
res.Add(new LSL_Vector(part.AbsolutePosition.X, LSL_Vector v = new LSL_Vector(part.AbsolutePosition.X,
part.AbsolutePosition.Y, part.AbsolutePosition.Y,
part.AbsolutePosition.Z)); part.AbsolutePosition.Z);
// For some reason, the part.AbsolutePosition.* values do not change if the
// linkset is rotated; they always reflect the child prim's world position
// as though the linkset is unrotated. This is incompatible behavior with SL's
// implementation, so will break scripts imported from there (not to mention it
// makes it more difficult to determine a child prim's actual inworld position).
if (part.ParentID != 0)
v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition();
res.Add( v );
break; break;
case (int)ScriptBaseClass.PRIM_SIZE: case (int)ScriptBaseClass.PRIM_SIZE:
@ -7487,6 +7495,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
PrimitiveBaseShape Shape = part.Shape; PrimitiveBaseShape Shape = part.Shape;
int primType = getScriptPrimType(part.Shape); int primType = getScriptPrimType(part.Shape);
res.Add(new LSL_Integer(primType)); res.Add(new LSL_Integer(primType));
double topshearx = (double)(sbyte)Shape.PathShearX / 100.0; // Fix negative values for PathShearX
double topsheary = (double)(sbyte)Shape.PathShearY / 100.0; // and PathShearY.
switch (primType) switch (primType)
{ {
case ScriptBaseClass.PRIM_TYPE_BOX: case ScriptBaseClass.PRIM_TYPE_BOX:
@ -7497,7 +7507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0)); res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0));
res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); res.Add(new LSL_Vector(topshearx, topsheary, 0));
break; break;
case ScriptBaseClass.PRIM_TYPE_SPHERE: case ScriptBaseClass.PRIM_TYPE_SPHERE:
@ -7532,7 +7542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0));
// vector topshear // vector topshear
res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); res.Add(new LSL_Vector(topshearx, topsheary, 0));
// vector profilecut // vector profilecut
res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
@ -7541,7 +7551,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0));
// float revolutions // float revolutions
res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :( res.Add(new LSL_Float((Shape.PathRevolutions * 0.015) + 1.0)); // Slightly inaccurate, because an unsigned
// byte is being used to represent the entire
// range of floating-point values from 1.0
// through 4.0 (which is how SL does it).
// float radiusoffset // float radiusoffset
res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0)); res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0));

View File

@ -151,6 +151,9 @@ namespace OpenSim.Services.Connectors.Grid
m_AssetService.Store(ass); m_AssetService.Store(ass);
// finally
info.TerrainImage = ass.FullID;
} }
catch // LEGIT: Catching problems caused by OpenJPEG p/invoke catch // LEGIT: Catching problems caused by OpenJPEG p/invoke
{ {