mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
Merge branch 'master' of git://opensimulator.org/git/opensim
This commit is contained in:
@@ -962,10 +962,10 @@ namespace OpenSim.Framework.Capabilities
|
||||
item.AssetType = assType;
|
||||
item.InvType = inType;
|
||||
item.Folder = parentFolder;
|
||||
item.CurrentPermissions = 2147483647;
|
||||
item.BasePermissions = 2147483647;
|
||||
item.CurrentPermissions = (uint)PermissionMask.All;
|
||||
item.BasePermissions = (uint)PermissionMask.All;
|
||||
item.EveryOnePermissions = 0;
|
||||
item.NextPermissions = 2147483647;
|
||||
item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
|
||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||
|
||||
if (AddNewInventoryItem != null)
|
||||
|
||||
@@ -39,4 +39,18 @@ namespace OpenSim.Framework.Capabilities
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[OSDMap]
|
||||
public class LLSDNewFileAngentInventoryVariablePriceReplyResponse
|
||||
{
|
||||
public int resource_cost;
|
||||
public string state;
|
||||
public int upload_price;
|
||||
public string rsvp;
|
||||
|
||||
public LLSDNewFileAngentInventoryVariablePriceReplyResponse()
|
||||
{
|
||||
state = "confirm_upload";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,6 +136,13 @@ namespace OpenSim.Framework
|
||||
[XmlIgnore] private bool _lightEntry;
|
||||
[XmlIgnore] private bool _sculptEntry;
|
||||
|
||||
// Light Projection Filter
|
||||
[XmlIgnore] private bool _projectionEntry;
|
||||
[XmlIgnore] private UUID _projectionTextureID;
|
||||
[XmlIgnore] private float _projectionFOV;
|
||||
[XmlIgnore] private float _projectionFocus;
|
||||
[XmlIgnore] private float _projectionAmb;
|
||||
|
||||
public byte ProfileCurve
|
||||
{
|
||||
get { return (byte)((byte)HollowShape | (byte)ProfileShape); }
|
||||
@@ -795,11 +802,57 @@ namespace OpenSim.Framework
|
||||
}
|
||||
}
|
||||
|
||||
public bool ProjectionEntry {
|
||||
get {
|
||||
return _projectionEntry;
|
||||
}
|
||||
set {
|
||||
_projectionEntry = value;
|
||||
}
|
||||
}
|
||||
|
||||
public UUID ProjectionTextureUUID {
|
||||
get {
|
||||
return _projectionTextureID;
|
||||
}
|
||||
set {
|
||||
_projectionTextureID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public float ProjectionFOV {
|
||||
get {
|
||||
return _projectionFOV;
|
||||
}
|
||||
set {
|
||||
_projectionFOV = value;
|
||||
}
|
||||
}
|
||||
|
||||
public float ProjectionFocus {
|
||||
get {
|
||||
return _projectionFocus;
|
||||
}
|
||||
set {
|
||||
_projectionFocus = value;
|
||||
}
|
||||
}
|
||||
|
||||
public float ProjectionAmbiance {
|
||||
get {
|
||||
return _projectionAmb;
|
||||
}
|
||||
set {
|
||||
_projectionAmb = value;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] ExtraParamsToBytes()
|
||||
{
|
||||
ushort FlexiEP = 0x10;
|
||||
ushort LightEP = 0x20;
|
||||
ushort SculptEP = 0x30;
|
||||
ushort ProjectionEP = 0x40;
|
||||
|
||||
int i = 0;
|
||||
uint TotalBytesLength = 1; // ExtraParamsNum
|
||||
@@ -823,6 +876,12 @@ namespace OpenSim.Framework
|
||||
TotalBytesLength += 17;// data
|
||||
TotalBytesLength += 2 + 4; // type
|
||||
}
|
||||
if (_projectionEntry)
|
||||
{
|
||||
ExtraParamsNum++;
|
||||
TotalBytesLength += 28;// data
|
||||
TotalBytesLength += 2 + 4;// type
|
||||
}
|
||||
|
||||
byte[] returnbytes = new byte[TotalBytesLength];
|
||||
|
||||
@@ -874,8 +933,20 @@ namespace OpenSim.Framework
|
||||
Array.Copy(SculptData, 0, returnbytes, i, SculptData.Length);
|
||||
i += SculptData.Length;
|
||||
}
|
||||
if (_projectionEntry)
|
||||
{
|
||||
byte[] ProjectionData = GetProjectionBytes();
|
||||
|
||||
if (!_flexiEntry && !_lightEntry && !_sculptEntry)
|
||||
returnbytes[i++] = (byte)(ProjectionEP % 256);
|
||||
returnbytes[i++] = (byte)((ProjectionEP >> 8) % 256);
|
||||
returnbytes[i++] = (byte)((ProjectionData.Length) % 256);
|
||||
returnbytes[i++] = (byte)((ProjectionData.Length >> 16) % 256);
|
||||
returnbytes[i++] = (byte)((ProjectionData.Length >> 20) % 256);
|
||||
returnbytes[i++] = (byte)((ProjectionData.Length >> 24) % 256);
|
||||
Array.Copy(ProjectionData, 0, returnbytes, i, ProjectionData.Length);
|
||||
i += ProjectionData.Length;
|
||||
}
|
||||
if (!_flexiEntry && !_lightEntry && !_sculptEntry && !_projectionEntry)
|
||||
{
|
||||
byte[] returnbyte = new byte[1];
|
||||
returnbyte[0] = 0;
|
||||
@@ -893,6 +964,7 @@ namespace OpenSim.Framework
|
||||
const ushort FlexiEP = 0x10;
|
||||
const ushort LightEP = 0x20;
|
||||
const ushort SculptEP = 0x30;
|
||||
const ushort ProjectionEP = 0x40;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -922,6 +994,14 @@ namespace OpenSim.Framework
|
||||
}
|
||||
ReadSculptData(data, 0);
|
||||
break;
|
||||
case ProjectionEP:
|
||||
if (!inUse)
|
||||
{
|
||||
_projectionEntry = false;
|
||||
return;
|
||||
}
|
||||
ReadProjectionData(data, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,10 +1013,12 @@ namespace OpenSim.Framework
|
||||
const ushort FlexiEP = 0x10;
|
||||
const ushort LightEP = 0x20;
|
||||
const ushort SculptEP = 0x30;
|
||||
const ushort ProjectionEP = 0x40;
|
||||
|
||||
bool lGotFlexi = false;
|
||||
bool lGotLight = false;
|
||||
bool lGotSculpt = false;
|
||||
bool lGotFilter = false;
|
||||
|
||||
int i = 0;
|
||||
byte extraParamCount = 0;
|
||||
@@ -973,6 +1055,11 @@ namespace OpenSim.Framework
|
||||
i += 17;
|
||||
lGotSculpt = true;
|
||||
break;
|
||||
case ProjectionEP:
|
||||
ReadProjectionData(data, i);
|
||||
i += 28;
|
||||
lGotFilter = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,6 +1069,8 @@ namespace OpenSim.Framework
|
||||
_lightEntry = false;
|
||||
if (!lGotSculpt)
|
||||
_sculptEntry = false;
|
||||
if (!lGotFilter)
|
||||
_projectionEntry = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -1121,6 +1210,42 @@ namespace OpenSim.Framework
|
||||
return data;
|
||||
}
|
||||
|
||||
public void ReadProjectionData(byte[] data, int pos)
|
||||
{
|
||||
byte[] ProjectionTextureUUID = new byte[16];
|
||||
|
||||
if (data.Length - pos >= 28)
|
||||
{
|
||||
_projectionEntry = true;
|
||||
Array.Copy(data, pos, ProjectionTextureUUID,0, 16);
|
||||
_projectionTextureID = new UUID(ProjectionTextureUUID, 0);
|
||||
|
||||
_projectionFOV = Utils.BytesToFloat(data, pos + 16);
|
||||
_projectionFocus = Utils.BytesToFloat(data, pos + 20);
|
||||
_projectionAmb = Utils.BytesToFloat(data, pos + 24);
|
||||
}
|
||||
else
|
||||
{
|
||||
_projectionEntry = false;
|
||||
_projectionTextureID = UUID.Zero;
|
||||
_projectionFOV = 0f;
|
||||
_projectionFocus = 0f;
|
||||
_projectionAmb = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] GetProjectionBytes()
|
||||
{
|
||||
byte[] data = new byte[28];
|
||||
|
||||
_projectionTextureID.GetBytes().CopyTo(data, 0);
|
||||
Utils.FloatToBytes(_projectionFOV).CopyTo(data, 16);
|
||||
Utils.FloatToBytes(_projectionFocus).CopyTo(data, 20);
|
||||
Utils.FloatToBytes(_projectionAmb).CopyTo(data, 24);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a OpenMetaverse.Primitive and populates it with converted PrimitiveBaseShape values
|
||||
|
||||
@@ -1474,7 +1474,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
if (!(contentType.Contains("image")
|
||||
|| contentType.Contains("x-shockwave-flash")
|
||||
|| contentType.Contains("application/x-oar")))
|
||||
|| contentType.Contains("application/x-oar")
|
||||
|| contentType.Contains("application/vnd.ll.mesh")))
|
||||
{
|
||||
// Text
|
||||
buffer = Encoding.UTF8.GetBytes(responseString);
|
||||
|
||||
Reference in New Issue
Block a user