Replaced some magic PCode numbers with enum values.
parent
825c89e7ac
commit
7d1dcf3e68
|
@ -53,7 +53,11 @@ namespace OpenSim.Framework
|
||||||
public enum PCodeEnum : byte
|
public enum PCodeEnum : byte
|
||||||
{
|
{
|
||||||
Primitive = 9,
|
Primitive = 9,
|
||||||
Avatar = 47
|
Avatar = 47,
|
||||||
|
Grass = 95,
|
||||||
|
NewTree = 111,
|
||||||
|
ParticleSystem = 143,
|
||||||
|
Tree = 255
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Extrusion : byte
|
public enum Extrusion : byte
|
||||||
|
|
|
@ -2126,7 +2126,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
SetDefaultPrimPacketValues(objupdate);
|
SetDefaultPrimPacketValues(objupdate);
|
||||||
objupdate.UpdateFlags = flags;
|
objupdate.UpdateFlags = flags;
|
||||||
SetPrimPacketShapeData(objupdate, primShape);
|
SetPrimPacketShapeData(objupdate, primShape);
|
||||||
// if ((primShape.PCode == 111) || (primShape.PCode == 255))
|
|
||||||
if ((primShape.PCode == (byte)PCode.NewTree) || (primShape.PCode == (byte)PCode.Tree) || (primShape.PCode == (byte)PCode.Grass))
|
if ((primShape.PCode == (byte)PCode.NewTree) || (primShape.PCode == (byte)PCode.Tree) || (primShape.PCode == (byte)PCode.Grass))
|
||||||
{
|
{
|
||||||
objupdate.Data = new byte[1];
|
objupdate.Data = new byte[1];
|
||||||
|
@ -2206,7 +2206,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
objdata.ParentID = 0;
|
objdata.ParentID = 0;
|
||||||
objdata.OwnerID = LLUUID.Zero;
|
objdata.OwnerID = LLUUID.Zero;
|
||||||
objdata.Scale = new LLVector3(1, 1, 1);
|
objdata.Scale = new LLVector3(1, 1, 1);
|
||||||
objdata.PCode = 47;
|
objdata.PCode = (byte)PCode.Avatar;
|
||||||
if (textureEntry != null)
|
if (textureEntry != null)
|
||||||
{
|
{
|
||||||
objdata.TextureEntry = textureEntry;
|
objdata.TextureEntry = textureEntry;
|
||||||
|
|
|
@ -335,7 +335,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
objupdate.ObjectData[0].ParentID = 0;
|
objupdate.ObjectData[0].ParentID = 0;
|
||||||
objupdate.ObjectData[0].OwnerID = LLUUID.Zero;
|
objupdate.ObjectData[0].OwnerID = LLUUID.Zero;
|
||||||
objupdate.ObjectData[0].Scale = new LLVector3(1, 1, 1);
|
objupdate.ObjectData[0].Scale = new LLVector3(1, 1, 1);
|
||||||
objupdate.ObjectData[0].PCode = 47;
|
objupdate.ObjectData[0].PCode = (byte)PCode.Avatar;
|
||||||
objupdate.ObjectData[0].TextureEntry = ScenePresence.DefaultTexture;
|
objupdate.ObjectData[0].TextureEntry = ScenePresence.DefaultTexture;
|
||||||
|
|
||||||
objupdate.ObjectData[0].ID = av.LocalId;
|
objupdate.ObjectData[0].ID = av.LocalId;
|
||||||
|
|
|
@ -1121,7 +1121,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
||||||
// if grass or tree, make phantom
|
// if grass or tree, make phantom
|
||||||
//rootPart.TrimPermissions();
|
//rootPart.TrimPermissions();
|
||||||
if ((rootPart.Shape.PCode == 95) || (rootPart.Shape.PCode == 255) || (rootPart.Shape.PCode == 111))
|
if ((rootPart.Shape.PCode == (byte)PCode.Grass) || (rootPart.Shape.PCode == (byte)PCode.Tree) || (rootPart.Shape.PCode == (byte)PCode.NewTree))
|
||||||
{
|
{
|
||||||
rootPart.AddFlag(LLObject.ObjectFlags.Phantom);
|
rootPart.AddFlag(LLObject.ObjectFlags.Phantom);
|
||||||
//rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom;
|
//rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom;
|
||||||
|
|
Loading…
Reference in New Issue