mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
fix saving appearence to notecard, so they can work on older regions
This commit is contained in:
@@ -3456,10 +3456,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return SaveAppearanceToNotecard(m_host.OwnerID, notecard);
|
||||
}
|
||||
|
||||
public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard)
|
||||
public LSL_Key osAgentSaveAppearance(LSL_Key avatarKey, string notecard)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryHigh, "osAgentSaveAppearance");
|
||||
|
||||
UUID avatarId;
|
||||
if (!UUID.TryParse(avatarKey, out avatarId))
|
||||
return new LSL_Key(UUID.Zero.ToString());
|
||||
|
||||
return SaveAppearanceToNotecard(avatarId, notecard);
|
||||
}
|
||||
|
||||
@@ -3470,8 +3474,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (appearanceModule != null)
|
||||
{
|
||||
appearanceModule.SaveBakedTextures(sp.UUID);
|
||||
EntityTransferContext ctx = new EntityTransferContext();
|
||||
OSDMap appearancePacked = sp.Appearance.Pack(ctx);
|
||||
OSDMap appearancePacked = sp.Appearance.PackForNotecard();
|
||||
|
||||
TaskInventoryItem item
|
||||
= SaveNotecard(notecard, "Avatar Appearance", Util.GetFormattedXml(appearancePacked as OSD), true);
|
||||
@@ -3494,15 +3497,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return SaveAppearanceToNotecard(sp, notecard);
|
||||
}
|
||||
|
||||
protected LSL_Key SaveAppearanceToNotecard(LSL_Key rawAvatarId, string notecard)
|
||||
{
|
||||
UUID avatarId;
|
||||
if (!UUID.TryParse(rawAvatarId, out avatarId))
|
||||
return new LSL_Key(UUID.Zero.ToString());
|
||||
|
||||
return SaveAppearanceToNotecard(avatarId, notecard);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the gender as specified in avatar appearance for a given avatar key
|
||||
/// </summary>
|
||||
|
||||
@@ -451,9 +451,9 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
double scale;
|
||||
double invscale;
|
||||
|
||||
if ((angle + 1f) > 0.05f)
|
||||
if ((angle + 1.0) > 0.0005)
|
||||
{
|
||||
if ((1f - angle) >= 0.05f)
|
||||
if ((1f - angle) >= 0.0005)
|
||||
{
|
||||
// slerp
|
||||
double theta = Math.Acos(angle);
|
||||
|
||||
Reference in New Issue
Block a user