git merge
parent
1c0f27b013
commit
dd144e12ba
|
@ -26,7 +26,6 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
@ -114,33 +113,6 @@ namespace OpenSim.Data.NHibernate
|
|||
return null;
|
||||
}
|
||||
|
||||
private void SaveOrUpdate(SceneObjectPart p)
|
||||
{
|
||||
try
|
||||
{
|
||||
ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart));
|
||||
criteria.Add(Expression.Eq("UUID", p.UUID));
|
||||
if (criteria.List().Count < 1)
|
||||
{
|
||||
session.Save(p);
|
||||
}
|
||||
else if (criteria.List().Count == 1)
|
||||
{
|
||||
SceneObjectPart old = (SceneObjectPart)criteria.List()[0];
|
||||
session.Evict(old);
|
||||
session.Update(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("Not unique");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[NHIBERNATE] issue saving asset", e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds an object into region storage
|
||||
/// </summary>
|
||||
|
@ -153,7 +125,7 @@ namespace OpenSim.Data.NHibernate
|
|||
foreach (SceneObjectPart part in obj.Children.Values)
|
||||
{
|
||||
m_log.InfoFormat("Storing part {0}", part.UUID);
|
||||
SaveOrUpdate(part);
|
||||
session.SaveOrUpdate(part);
|
||||
}
|
||||
session.Flush();
|
||||
}
|
||||
|
|
|
@ -82,26 +82,7 @@
|
|||
<column name="ScaleY" />
|
||||
<column name="ScaleZ" />
|
||||
</property>
|
||||
<property name="PCode" type="System.Byte" />
|
||||
<property name="PathBegin" type="System.UInt16" />
|
||||
<property name="PathEnd" type="System.UInt16" />
|
||||
<property name="PathScaleX" type="System.Byte" />
|
||||
<property name="PathScaleY" type="System.Byte" />
|
||||
<property name="PathShearX" type="System.Byte" />
|
||||
<property name="PathShearY" type="System.Byte" />
|
||||
<property name="PathSkew" type="System.SByte" />
|
||||
<property name="PathCurve" type="System.Byte" />
|
||||
<property name="PathRadiusOffset" type="System.SByte" />
|
||||
<property name="PathRevolutions" type="System.Byte" />
|
||||
<property name="PathTaperX" type="System.SByte" />
|
||||
<property name="PathTwist" type="System.SByte" />
|
||||
<property name="ProfileBegin" type="System.UInt16" />
|
||||
<property name="ProfileEnd" type="System.UInt16" />
|
||||
<property name="ProfileCurve" type="System.Byte" />
|
||||
<property name="ProfileHollow" type="System.UInt16" />
|
||||
<property name="TextureEntry" column="Texture" type="System.Byte[]" />
|
||||
<property name="ExtraParams" type="System.Byte[]" />
|
||||
<property name="State" type="System.Byte" />
|
||||
|
||||
</component>
|
||||
|
||||
</class>
|
||||
|
|
|
@ -49,16 +49,8 @@ namespace OpenSim.Data.NHibernate
|
|||
|
||||
public object DeepCopy(object texture)
|
||||
{
|
||||
if (texture == null)
|
||||
{
|
||||
// TODO: should parametrize this texture out
|
||||
return new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f"));
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes();
|
||||
return new LLObject.TextureEntry(bytes, 0, bytes.Length);
|
||||
}
|
||||
byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes();
|
||||
return new LLObject.TextureEntry(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
public object Disassemble(object texture)
|
||||
|
|
|
@ -197,13 +197,7 @@ namespace OpenSim.Framework
|
|||
{
|
||||
get { return m_textureEntry; }
|
||||
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
m_textureEntry = new byte[1];
|
||||
else
|
||||
m_textureEntry = value;
|
||||
}
|
||||
set { m_textureEntry = value; }
|
||||
}
|
||||
|
||||
|
||||
|
@ -844,9 +838,6 @@ namespace OpenSim.Framework
|
|||
|
||||
public void ReadInExtraParamsBytes(byte[] data)
|
||||
{
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
const ushort FlexiEP = 0x10;
|
||||
const ushort LightEP = 0x20;
|
||||
const ushort SculptEP = 0x30;
|
||||
|
|
Loading…
Reference in New Issue