* (Untested) implementation of ObjectExtraParamsHandler
* Fixed several mono compiler warnings and one compiler error
* Converted to a non-deprecated method of fetching the local IP address

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2463 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-03-02 23:43:12 +00:00
parent abf0c15384
commit 18b5f70e53
12 changed files with 65 additions and 37 deletions

View File

@@ -49,7 +49,7 @@ namespace Simian.Extensions
Vector3 scale = add.ObjectData.Scale;
PCode pcode = (PCode)add.ObjectData.PCode;
PrimFlags flags = (PrimFlags)add.ObjectData.AddFlags;
bool bypassRaycast = (add.ObjectData.BypassRaycast == 1);
//bool bypassRaycast = (add.ObjectData.BypassRaycast == 1);
bool rayEndIsIntersection = (add.ObjectData.RayEndIsIntersection == 1);
#region Position Calculation
@@ -518,8 +518,40 @@ namespace Simian.Extensions
if (server.Scene.TryGetObject(block.ObjectLocalID, out obj))
{
ExtraParamType type = (ExtraParamType)block.ParamType;
if (block.ParamInUse)
{
switch (type)
{
case ExtraParamType.Flexible:
obj.Prim.Flexible = new Primitive.FlexibleData(block.ParamData, 0);
break;
case ExtraParamType.Light:
obj.Prim.Light = new Primitive.LightData(block.ParamData, 0);
break;
case ExtraParamType.Sculpt:
obj.Prim.Sculpt = new Primitive.SculptData(block.ParamData, 0);
break;
}
}
else
{
switch (type)
{
case ExtraParamType.Flexible:
obj.Prim.Flexible = null;
break;
case ExtraParamType.Light:
obj.Prim.Light = null;
break;
case ExtraParamType.Sculpt:
obj.Prim.Sculpt = null;
break;
}
}
server.Scene.ObjectAdd(this, obj, obj.Prim.OwnerID, 0, PrimFlags.None);
}
}
}
@@ -655,7 +687,7 @@ namespace Simian.Extensions
if (server.Scene.TryGetObject(block.ObjectLocalID, out obj))
{
UpdateType type = (UpdateType)block.Type;
bool linked = ((type & UpdateType.Linked) != 0);
//bool linked = ((type & UpdateType.Linked) != 0);
int pos = 0;
Vector3 position = obj.Prim.Position;
Quaternion rotation = obj.Prim.Rotation;
@@ -678,7 +710,7 @@ namespace Simian.Extensions
pos += 12;
// FIXME: Use this in linksets
bool uniform = ((type & UpdateType.Uniform) != 0);
//bool uniform = ((type & UpdateType.Uniform) != 0);
}
if (scaled)
@@ -787,7 +819,6 @@ namespace Simian.Extensions
}
Vector3 direction = Vector3.Normalize(rayEnd - rayStart);
Ray ray = new Ray(rayStart, direction);
// Get the mesh that has been transformed into world-space
SimpleMesh mesh = null;
@@ -802,7 +833,6 @@ namespace Simian.Extensions
mesh = obj.GetWorldMesh(DetailLevel.Low, null);
}
if (mesh != null)
{
// Iterate through all of the triangles in the mesh, doing a ray-triangle intersection