update libomv and apply necessary related changes

This commit is contained in:
UbitUmarov
2020-10-06 17:29:01 +01:00
parent e218c2110d
commit e894b4cafc
13 changed files with 84 additions and 86 deletions

View File

@@ -61,8 +61,8 @@ namespace OpenSim.Region.Framework.Scenes
public osUTF8 osUTF8Name;
public virtual string Name
{
get { return osUTF8Name.ToString(); }
set { osUTF8Name = new osUTF8(value); }
get { return osUTF8Name == null ? string.Empty : osUTF8Name.ToString(); }
set { osUTF8Name = value == null? null : new osUTF8(value); }
}
/// <summary>

View File

@@ -350,11 +350,6 @@ namespace OpenSim.Region.Framework.Scenes
protected bool m_isSelected = false;
/// <summary>
/// Stores media texture data
/// </summary>
protected string m_mediaUrl;
// TODO: Those have to be changed into persistent properties at some later point,
// or sit-camera on vehicles will break on sim-crossing.
private Vector3 m_cameraEyeOffset;
@@ -627,18 +622,28 @@ namespace OpenSim.Region.Framework.Scenes
{
get
{
return osUTF8LargeName.ToString();
return osUTF8LargeName == null ? string.Empty : osUTF8LargeName.ToString();
}
set
{
osUTF8LargeName = new osUTF8(value);
osUTF8Name = new osUTF8(value, 63);
if(ParentGroup != null)
if(string.IsNullOrEmpty(value))
{
osUTF8LargeName = null;
osUTF8Name = null;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.SOPName = string.Empty;
}
else
{
osUTF8LargeName = new osUTF8(value);
osUTF8Name = new osUTF8(value, 63);
PhysicsActor pa = PhysActor;
if (pa != null)
pa.SOPName = value;
}
if (ParentGroup != null)
ParentGroup.InvalidatePartsLinkMaps();
PhysicsActor pa = PhysActor;
if (pa != null)
pa.SOPName = value;
}
}
@@ -1042,11 +1047,11 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public osUTF8 osUTF8description;
public osUTF8 osUTF8Description;
public string Description
{
get {return osUTF8description.ToString(); }
set { osUTF8description = new osUTF8(value, 127);}
get {return osUTF8Description == null ? string.Empty : osUTF8Description.ToString(); }
set { osUTF8Description = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 127);}
}
/// <value>
@@ -1061,22 +1066,22 @@ namespace OpenSim.Region.Framework.Scenes
public osUTF8 osUTF8Text;
public string Text
{
get { return osUTF8Text.ToString(); }
set { osUTF8Text = new osUTF8(value, 254); }
get { return osUTF8Text == null ? string.Empty : osUTF8Text.ToString(); }
set { osUTF8Text = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 254); }
}
public osUTF8 osUTF8SitName;
public string SitName
{
get { return osUTF8SitName.ToString(); }
set { osUTF8SitName = new osUTF8(value, 36); }
get { return osUTF8SitName == null ? string.Empty : osUTF8SitName.ToString(); }
set { osUTF8SitName = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 36); }
}
public osUTF8 osUTF8TouchName;
public string TouchName
{
get { return osUTF8TouchName.ToString(); }
set { osUTF8TouchName = new osUTF8(value, 36); }
get { return osUTF8TouchName == null ? string.Empty : osUTF8TouchName.ToString(); }
set { osUTF8TouchName = string.IsNullOrEmpty(value) ? null : new osUTF8(value, 36); }
}
public int LinkNum
@@ -1196,18 +1201,25 @@ namespace OpenSim.Region.Framework.Scenes
{
get
{
if(osUTFMediaUrl.Length == 0)
return null;
return osUTFMediaUrl.ToString();
return osUTFMediaUrl == null ? string.Empty : osUTFMediaUrl.ToString();
}
set
{
osUTF8 old = osUTFMediaUrl;
osUTFMediaUrl = new osUTF8(value, 254);
if (string.IsNullOrEmpty(value))
{
osUTFMediaUrl = null;
if (old != null && ParentGroup != null)
ParentGroup.HasGroupChanged = true;
}
else
{
osUTFMediaUrl = new osUTF8(value, 254);
if (ParentGroup != null && !osUTFMediaUrl.Equals(old))
ParentGroup.HasGroupChanged = true;
if (ParentGroup != null && !osUTFMediaUrl.Equals(old))
ParentGroup.HasGroupChanged = true;
}
}
}

View File

@@ -828,7 +828,7 @@ namespace OpenSim.Region.Framework.Scenes
if(parts[0].Length == 0)
continue;
parts[0].SelfTrim(wearableSeps);
if (parts[0].ToString() == "parameters")
if (parts[0].Equals(parametersB))
{
if (parts[1].Length == 0)
return;
@@ -841,7 +841,7 @@ namespace OpenSim.Region.Framework.Scenes
return;
}
}
else if (parts[0].ToString() == "textures")
else if (parts[0].Equals(texturesB))
{
if(parts[1].Length == 0)
return;
@@ -960,18 +960,20 @@ namespace OpenSim.Region.Framework.Scenes
// bad ugly
private static osUTF8 UUIDB = new osUTF8("UUID");
private static osUTF8 uuidB = new osUTF8("uuid");
private static osUTF8 SOPAnimsB = new osUTF8("SOPAnims");
private static osUTF8 CollisionSoundB = new osUTF8("CollisionSound");
private static osUTF8 SoundIDB = new osUTF8("SoundID");
private static osUTF8 SculptTextureB = new osUTF8("SculptTexture");
private static osUTF8 ExtraParamsB = new osUTF8("ExtraParams");
private static osUTF8 ParticleSystemB = new osUTF8("ParticleSystem");
private static osUTF8 TextureEntryB = new osUTF8("TextureEntry");
private static osUTF8 TaskInventoryB = new osUTF8("TaskInventory");
private static osUTF8 endTaskInventoryB = new osUTF8("/TaskInventory");
private static osUTF8 UUIDB = new osUTF8("UUID", true);
private static osUTF8 uuidB = new osUTF8("uuid", true);
private static osUTF8 SOPAnimsB = new osUTF8("SOPAnims", true);
private static osUTF8 CollisionSoundB = new osUTF8("CollisionSound", true);
private static osUTF8 SoundIDB = new osUTF8("SoundID", true);
private static osUTF8 SculptTextureB = new osUTF8("SculptTexture", true);
private static osUTF8 ExtraParamsB = new osUTF8("ExtraParams", true);
private static osUTF8 ParticleSystemB = new osUTF8("ParticleSystem", true);
private static osUTF8 TextureEntryB = new osUTF8("TextureEntry", true);
private static osUTF8 TaskInventoryB = new osUTF8("TaskInventory", true);
private static osUTF8 endTaskInventoryB = new osUTF8("/TaskInventory", true);
private static osUTF8 AssetIDB = new osUTF8("AssetID");
private static osUTF8 texturesB = new osUTF8("textures", true);
private static osUTF8 parametersB = new osUTF8("parameters", true);
/// <summary>
/// Get all the asset uuids associated with a given object. This includes both those directly associated with