mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
fix merge
This commit is contained in:
@@ -946,17 +946,26 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
continue;
|
||||
}
|
||||
|
||||
PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
|
||||
OSDArray face_list = (OSDArray)inner_instance_list["face_list"];
|
||||
|
||||
PrimitiveBaseShape pbs = null;
|
||||
if (inner_instance_list.ContainsKey("mesh")) // seems to happen always but ...
|
||||
{
|
||||
int meshindx = inner_instance_list["mesh"].AsInteger();
|
||||
if (meshAssets.Count > meshindx)
|
||||
pbs = PrimitiveBaseShape.CreateMesh(face_list.Count, meshAssets[meshindx]);
|
||||
}
|
||||
if(pbs == null) // fallback
|
||||
pbs = PrimitiveBaseShape.CreateBox();
|
||||
|
||||
Primitive.TextureEntry textureEntry
|
||||
= new Primitive.TextureEntry(Primitive.TextureEntry.WHITE_TEXTURE);
|
||||
|
||||
|
||||
OSDArray face_list = (OSDArray)inner_instance_list["face_list"];
|
||||
for (uint face = 0; face < face_list.Count; face++)
|
||||
{
|
||||
OSDMap faceMap = (OSDMap)face_list[(int)face];
|
||||
Primitive.TextureEntryFace f = pbs.Textures.CreateFace(face);
|
||||
|
||||
Primitive.TextureEntryFace f = textureEntry.CreateFace(face); //clone the default
|
||||
if (faceMap.ContainsKey("fullbright"))
|
||||
f.Fullbright = faceMap["fullbright"].AsBoolean();
|
||||
if (faceMap.ContainsKey("diffuse_color"))
|
||||
@@ -986,51 +995,11 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
if (textures.Count > textureNum)
|
||||
f.TextureID = textures[textureNum];
|
||||
else
|
||||
f.TextureID = Primitive.TextureEntry.WHITE_TEXTURE;
|
||||
|
||||
|
||||
textureEntry.FaceTextures[face] = f;
|
||||
}
|
||||
|
||||
pbs.TextureEntry = textureEntry.GetBytes();
|
||||
|
||||
if (inner_instance_list.ContainsKey("mesh")) // seems to happen always but ...
|
||||
{
|
||||
int meshindx = inner_instance_list["mesh"].AsInteger();
|
||||
if (meshAssets.Count > meshindx)
|
||||
{
|
||||
pbs.SculptEntry = true;
|
||||
pbs.SculptType = (byte)SculptType.Mesh;
|
||||
pbs.SculptTexture = meshAssets[meshindx]; // actual asset UUID after meshs suport introduction
|
||||
// data will be requested from asset on rez (i hope)
|
||||
}
|
||||
}
|
||||
|
||||
// faces number to pbs shape
|
||||
switch(face_list.Count)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
pbs.ProfileCurve = (byte)ProfileCurve.Circle;
|
||||
pbs.PathCurve = (byte)PathCurve.Circle;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 4:
|
||||
pbs.ProfileCurve = (byte)ProfileCurve.Circle;
|
||||
pbs.PathCurve = (byte)PathCurve.Line;
|
||||
break;
|
||||
case 5:
|
||||
pbs.ProfileCurve = (byte)ProfileCurve.EqualTriangle;
|
||||
pbs.PathCurve = (byte)PathCurve.Line;
|
||||
break;
|
||||
|
||||
default:
|
||||
pbs.ProfileCurve = (byte)ProfileCurve.Square;
|
||||
pbs.PathCurve = (byte)PathCurve.Line;
|
||||
break;
|
||||
}
|
||||
|
||||
Vector3 position = inner_instance_list["position"].AsVector3();
|
||||
Quaternion rotation = inner_instance_list["rotation"].AsQuaternion();
|
||||
|
||||
|
||||
@@ -121,6 +121,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
|
||||
OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]);
|
||||
if (r.Type != OSDType.Map) // not a proper req
|
||||
return responsedata;
|
||||
|
||||
//UUID session_id = UUID.Zero;
|
||||
bool bypass_raycast = false;
|
||||
uint everyone_mask = 0;
|
||||
@@ -157,9 +160,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
int state = 0;
|
||||
int lastattach = 0;
|
||||
|
||||
if (r.Type != OSDType.Map) // not a proper req
|
||||
return responsedata;
|
||||
|
||||
OSDMap rm = (OSDMap)r;
|
||||
|
||||
if (rm.ContainsKey("ObjectData")) //v2
|
||||
@@ -307,8 +307,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false);
|
||||
|
||||
PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
|
||||
@@ -359,6 +357,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
rootpart.NextOwnerMask = next_owner_mask;
|
||||
rootpart.Material = (byte)material;
|
||||
|
||||
obj.AggregatePerms();
|
||||
|
||||
m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
|
||||
|
||||
responsedata["int_response_code"] = 200; //501; //410; //404;
|
||||
|
||||
@@ -335,6 +335,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
grp.AbsolutePosition = obj.Position;
|
||||
prim.RotationOffset = obj.Rotation;
|
||||
|
||||
|
||||
// Required for linking
|
||||
grp.RootPart.ClearUpdateSchedule();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user