Add localid support to ch0de properly
parent
cc69d12d54
commit
bb402d0d95
|
@ -1767,7 +1767,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
part.AbsolutePosition,
|
||||
part.Scale,
|
||||
part.RotationOffset,
|
||||
part.PhysActor.IsPhysical);
|
||||
part.PhysActor.IsPhysical,
|
||||
m_localId);
|
||||
part.PhysActor.SetMaterial((int)part.Material);
|
||||
|
||||
part.PhysActor.LocalID = part.LocalId;
|
||||
|
|
|
@ -1633,7 +1633,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
AbsolutePosition,
|
||||
Scale,
|
||||
RotationOffset,
|
||||
RigidBody);
|
||||
RigidBody,
|
||||
m_localId);
|
||||
PhysActor.SetMaterial(Material);
|
||||
}
|
||||
catch
|
||||
|
@ -4442,7 +4443,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
AbsolutePosition,
|
||||
Scale,
|
||||
RotationOffset,
|
||||
UsePhysics);
|
||||
UsePhysics,
|
||||
m_localId);
|
||||
PhysActor.SetMaterial(Material);
|
||||
|
||||
pa = PhysActor;
|
||||
|
|
|
@ -84,13 +84,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
|||
*/
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation)
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -213,12 +213,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
|
|||
return newPrim;
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation)
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
PhysicsActor result;
|
||||
IMesh mesh = null;
|
||||
|
|
|
@ -626,13 +626,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
|
|||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position,
|
||||
OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation)
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position,
|
||||
OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, bool isPhysical)
|
||||
OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
PhysicsActor result;
|
||||
|
||||
|
|
|
@ -256,8 +256,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
|
||||
public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size,
|
||||
Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode)
|
||||
Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode, uint localid)
|
||||
{
|
||||
m_localID = localid;
|
||||
ode = dode;
|
||||
if (!pos.IsFinite())
|
||||
{
|
||||
|
|
|
@ -1717,7 +1717,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
|
||||
private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
|
||||
IMesh mesh, PrimitiveBaseShape pbs, bool isphysical)
|
||||
IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, uint localid)
|
||||
{
|
||||
|
||||
Vector3 pos = position;
|
||||
|
@ -1727,7 +1727,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
OdePrim newPrim;
|
||||
lock (OdeLock)
|
||||
{
|
||||
newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode);
|
||||
newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode, localid);
|
||||
|
||||
lock (_prims)
|
||||
_prims.Add(newPrim);
|
||||
|
@ -1749,13 +1749,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation) //To be removed
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
PhysicsActor result;
|
||||
IMesh mesh = null;
|
||||
|
@ -1763,7 +1757,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
if (needsMeshing(pbs))
|
||||
mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
|
||||
|
||||
result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical);
|
||||
result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, localid);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -77,15 +77,16 @@ namespace OpenSim.Region.Physics.Manager
|
|||
|
||||
public abstract void RemovePrim(PhysicsActor prim);
|
||||
|
||||
//public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
// Vector3 size, Quaternion rotation); //To be removed - Actually removed!
|
||||
|
||||
public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation); //To be removed
|
||||
public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical);
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid);
|
||||
|
||||
public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical);
|
||||
PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid);
|
||||
|
||||
if (ret != null)
|
||||
ret.LocalID = localID;
|
||||
|
@ -262,13 +263,7 @@ namespace OpenSim.Region.Physics.Manager
|
|||
*/
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation) //To be removed
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size);
|
||||
return PhysicsActor.Null;
|
||||
|
|
|
@ -1708,13 +1708,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation) //To be removed
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
#if SPAM
|
||||
m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
Vector3 position = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 128f);
|
||||
Vector3 size = new Vector3(0.5f, 0.5f, 0.5f);
|
||||
Quaternion rot = Quaternion.Identity;
|
||||
PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true);
|
||||
PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true, 0);
|
||||
OdePrim oprim = (OdePrim)prim;
|
||||
OdeScene pscene = (OdeScene) ps;
|
||||
|
||||
|
|
|
@ -91,13 +91,7 @@ namespace OpenSim.Region.Physics.POSPlugin
|
|||
*/
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation)
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
POSPrim prim = new POSPrim();
|
||||
prim.Position = position;
|
||||
|
|
|
@ -108,13 +108,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin
|
|||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation) //To be removed
|
||||
{
|
||||
return AddPrimShape(primName, pbs, position, size, rotation, false);
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
|
||||
{
|
||||
return AddPrim(position, size, rotation);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue