mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
finish encoding number of mesh faces in pbs shape on new meshs upload, and *HACK* flag it setting hollow shape to triangle. (some limited encoding as added some months ago, but only for viewers LOD). Use this hack flag to fix sop number of faces. old meshs will still report 8 faces, information to fix this seems lost unless the mesh asset is decoded
This commit is contained in:
@@ -3728,7 +3728,18 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
|
||||
bool hasDimple;
|
||||
bool hasProfileCut;
|
||||
|
||||
PrimType primType = GetPrimType();
|
||||
if(Shape.SculptEntry)
|
||||
{
|
||||
if (Shape.SculptType != (byte)SculptType.Mesh)
|
||||
return 1; // sculp
|
||||
|
||||
//hack to detect new upload with faces data enconded on pbs
|
||||
if ((Shape.ProfileCurve & 0xf0) != (byte)HollowShape.Triangle)
|
||||
// old broken upload TODO
|
||||
return 8;
|
||||
}
|
||||
|
||||
PrimType primType = GetPrimType(true);
|
||||
HasCutHollowDimpleProfileCut(primType, Shape, out hasCut, out hasHollow, out hasDimple, out hasProfileCut);
|
||||
|
||||
switch (primType)
|
||||
@@ -3772,13 +3783,6 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
|
||||
if (hasProfileCut) ret += 2;
|
||||
if (hasHollow) ret += 1;
|
||||
break;
|
||||
case PrimType.SCULPT:
|
||||
// Special mesh handling
|
||||
if (Shape.SculptType == (byte)SculptType.Mesh)
|
||||
ret = 8; // if it's a mesh then max 8 faces
|
||||
else
|
||||
ret = 1; // if it's a sculpt then max 1 face
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -3789,9 +3793,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
|
||||
/// </summary>
|
||||
/// <param name="primShape"></param>
|
||||
/// <returns></returns>
|
||||
public PrimType GetPrimType()
|
||||
public PrimType GetPrimType(bool ignoreSculpt = false)
|
||||
{
|
||||
if (Shape.SculptEntry)
|
||||
if (Shape.SculptEntry && !ignoreSculpt)
|
||||
return PrimType.SCULPT;
|
||||
|
||||
if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
|
||||
|
||||
Reference in New Issue
Block a user