create a new ode character also with the new information
parent
b2f3516b68
commit
2ea0dc55d7
|
@ -3450,9 +3450,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
Vector3 pVec = AbsolutePosition;
|
||||
|
||||
/*
|
||||
PhysicsActor = scene.AddAvatar(
|
||||
LocalId, Firstname + "." + Lastname, pVec,
|
||||
new Vector3(0.45f, 0.6f, Appearance.AvatarHeight), isFlying);
|
||||
*/
|
||||
|
||||
PhysicsActor = scene.AddAvatar(
|
||||
LocalId, Firstname + "." + Lastname, pVec,
|
||||
Appearance.AvatarBoxSize,Appearance.AvatarFeetOffset, isFlying);
|
||||
|
||||
//PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
||||
PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
||||
|
|
|
@ -127,8 +127,10 @@ namespace OpenSim.Region.Physics.Manager
|
|||
/// <param name="size"></param>
|
||||
/// <param name="isFlying"></param>
|
||||
/// <returns></returns>
|
||||
public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying);
|
||||
|
||||
public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
/// <summary>
|
||||
/// Add an avatar
|
||||
/// </summary>
|
||||
|
@ -145,6 +147,18 @@ namespace OpenSim.Region.Physics.Manager
|
|||
return ret;
|
||||
}
|
||||
|
||||
public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size,float feetOffset, bool isFlying)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual PhysicsActor AddAvatar(uint localID,string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
|
||||
{
|
||||
PhysicsActor ret = AddAvatar(avName, position, size,feetOffset, isFlying);
|
||||
if (ret != null) ret.LocalID = localID;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an avatar.
|
||||
/// </summary>
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
|
||||
|
||||
public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float density, float walk_divisor, float rundivisor)
|
||||
public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float pfeetOffset, float density, float walk_divisor, float rundivisor)
|
||||
{
|
||||
m_uuid = UUID.Random();
|
||||
|
||||
|
@ -192,6 +192,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
if(m_size.Z <0.01f)
|
||||
m_size.Z = 0.01f;
|
||||
|
||||
m_feetOffset = pfeetOffset;
|
||||
m_orientation = Quaternion.Identity;
|
||||
m_density = density;
|
||||
|
||||
|
|
|
@ -1388,13 +1388,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
#region Add/Remove Entities
|
||||
|
||||
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
|
||||
public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
|
||||
{
|
||||
Vector3 pos;
|
||||
pos.X = position.X;
|
||||
pos.Y = position.Y;
|
||||
pos.Z = position.Z;
|
||||
OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
|
||||
OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
|
||||
newAv.Flying = isFlying;
|
||||
newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;
|
||||
|
||||
|
|
Loading…
Reference in New Issue