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