Merge branch 'master' into bigmerge

Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
avinationmerge
Melanie 2011-11-05 11:17:40 +00:00
commit 03f5bbcaf2
5 changed files with 25 additions and 32 deletions

View File

@ -14,6 +14,7 @@ people that make the day to day of OpenSim happen.
* Marck * Marck
* Mic Bowman (Intel) * Mic Bowman (Intel)
* BlueWall (James Hughes) * BlueWall (James Hughes)
* Nebadon Izumi (Michael Cerquoni, OSgrid)
* Snoopy Pfeffer * Snoopy Pfeffer
* Richard Adams (Intel) * Richard Adams (Intel)
@ -102,6 +103,7 @@ what it is today.
* lulurun * lulurun
* M.Igarashi * M.Igarashi
* maimedleech * maimedleech
* Mana Janus
* Mic Bowman * Mic Bowman
* Michelle Argus * Michelle Argus
* Michael Cortez (The Flotsam Project, http://osflotsam.org/) * Michael Cortez (The Flotsam Project, http://osflotsam.org/)
@ -133,6 +135,7 @@ what it is today.
* Salahzar Stenvaag * Salahzar Stenvaag
* sempuki * sempuki
* SignpostMarv * SignpostMarv
* SpotOn3D
* Strawberry Fride * Strawberry Fride
* tglion * tglion
* tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud) * tlaukkan/Tommil (Tommi S. E. Laukkanen, Bubble Cloud)

View File

@ -53,7 +53,6 @@ namespace OpenSim.Framework
protected AvatarWearable[] m_wearables; protected AvatarWearable[] m_wearables;
protected Dictionary<int, List<AvatarAttachment>> m_attachments; protected Dictionary<int, List<AvatarAttachment>> m_attachments;
protected float m_avatarHeight = 0; protected float m_avatarHeight = 0;
protected float m_hipOffset = 0;
public virtual int Serial public virtual int Serial
{ {
@ -89,11 +88,6 @@ namespace OpenSim.Framework
set { m_avatarHeight = value; } set { m_avatarHeight = value; }
} }
public virtual float HipOffset
{
get { return m_hipOffset; }
}
public AvatarAppearance() public AvatarAppearance()
{ {
// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance");
@ -184,7 +178,6 @@ namespace OpenSim.Framework
m_visualparams = (byte[])appearance.VisualParams.Clone(); m_visualparams = (byte[])appearance.VisualParams.Clone();
m_avatarHeight = appearance.m_avatarHeight; m_avatarHeight = appearance.m_avatarHeight;
m_hipOffset = appearance.m_hipOffset;
// Copy the attachment, force append mode since that ensures consistency // Copy the attachment, force append mode since that ensures consistency
m_attachments = new Dictionary<int, List<AvatarAttachment>>(); m_attachments = new Dictionary<int, List<AvatarAttachment>>();
@ -347,20 +340,18 @@ namespace OpenSim.Framework
public virtual void SetHeight() public virtual void SetHeight()
{ {
m_avatarHeight = 1.23077f // Shortest possible avatar height // Start with shortest possible female avatar height
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height m_avatarHeight = 1.14597f;
+ 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size // Add offset for male avatars
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length if (m_visualparams[(int)VPElement.SHAPE_MALE] != 0)
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height m_avatarHeight += 0.0848f;
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height // Add offsets for visual params
+ 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length m_avatarHeight += 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f
+ 0.08117f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f
m_hipOffset = (((1.23077f // Half of avatar + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f
+ 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f
+ 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f;
+ 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
} }
public virtual void SetWearable(int wearableId, AvatarWearable wearable) public virtual void SetWearable(int wearableId, AvatarWearable wearable)
@ -591,7 +582,6 @@ namespace OpenSim.Framework
data["serial"] = OSD.FromInteger(m_serial); data["serial"] = OSD.FromInteger(m_serial);
data["height"] = OSD.FromReal(m_avatarHeight); data["height"] = OSD.FromReal(m_avatarHeight);
data["hipoffset"] = OSD.FromReal(m_hipOffset);
// Wearables // Wearables
OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES); OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES);
@ -636,8 +626,6 @@ namespace OpenSim.Framework
m_serial = data["serial"].AsInteger(); m_serial = data["serial"].AsInteger();
if ((data != null) && (data["height"] != null)) if ((data != null) && (data["height"] != null))
m_avatarHeight = (float)data["height"].AsReal(); m_avatarHeight = (float)data["height"].AsReal();
if ((data != null) && (data["hipoffset"] != null))
m_hipOffset = (float)data["hipoffset"].AsReal();
try try
{ {

View File

@ -3362,7 +3362,6 @@ namespace OpenSim.Region.Framework.Scenes
prim.OffsetPosition = axPos; prim.OffsetPosition = axPos;
prim.IgnoreUndoUpdate = false; prim.IgnoreUndoUpdate = false;
prim.IgnoreUndoUpdate = false;
} }
} }

View File

@ -345,7 +345,10 @@ namespace OpenSim.Region.Framework.Scenes
} }
#region Client Camera #region Client Camera
// Position of agent's camera in world (region cordinates)
/// <summary>
/// Position of agent's camera in world (region cordinates)
/// </summary>
protected Vector3 m_lastCameraPosition; protected Vector3 m_lastCameraPosition;
protected Vector3 m_CameraPosition; protected Vector3 m_CameraPosition;
@ -2082,12 +2085,12 @@ namespace OpenSim.Region.Framework.Scenes
foreach (SceneObjectPart part in partArray) foreach (SceneObjectPart part in partArray)
{ {
// Is a sit target available? // Is a sit target available?
Vector3 avSitOffSet = part.SitTargetPosition; Vector3 avSitOffset = part.SitTargetPosition;
Quaternion avSitOrientation = part.SitTargetOrientation; Quaternion avSitOrientation = part.SitTargetOrientation;
UUID avOnTargetAlready = part.SitTargetAvatar; UUID avOnTargetAlready = part.SitTargetAvatar;
bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero)); bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero));
bool SitTargetisSet = (Vector3.Zero != avSitOffSet); //NB Latest SL Spec shows Sit Rotation setting is ignored. bool SitTargetisSet = (Vector3.Zero != avSitOffset); //NB Latest SL Spec shows Sit Rotation setting is ignored.
if (SitTargetisSet && SitTargetUnOccupied) if (SitTargetisSet && SitTargetUnOccupied)
{ {
@ -2110,7 +2113,6 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 cameraAtOffset = Vector3.Zero; Vector3 cameraAtOffset = Vector3.Zero;
bool forceMouselook = false; bool forceMouselook = false;
//SceneObjectPart part = m_scene.GetSceneObjectPart(targetID);
SceneObjectPart part = FindNextAvailableSitTarget(targetID); SceneObjectPart part = FindNextAvailableSitTarget(targetID);
if (part == null) return; if (part == null) return;
@ -2596,6 +2598,7 @@ namespace OpenSim.Region.Framework.Scenes
return; return;
} }
} }
ParentID = m_requestedSitTargetID; ParentID = m_requestedSitTargetID;
//We want our offsets to reference the root prim, not the child we may have sat on //We want our offsets to reference the root prim, not the child we may have sat on
@ -2794,9 +2797,6 @@ namespace OpenSim.Region.Framework.Scenes
// server. // server.
if (remoteClient.IsActive) if (remoteClient.IsActive)
{ {
Vector3 pos = m_pos;
pos.Z += Appearance.HipOffset;
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
remoteClient.SendEntityUpdate( remoteClient.SendEntityUpdate(

View File

@ -126,6 +126,9 @@ namespace OpenSim.Services.LLLoginService
if (accountService == string.Empty || authService == string.Empty) if (accountService == string.Empty || authService == string.Empty)
throw new Exception("LoginService is missing service specifications"); throw new Exception("LoginService is missing service specifications");
// replace newlines in welcome message
m_WelcomeMessage = m_WelcomeMessage.Replace("\\n", "\n");
Object[] args = new Object[] { config }; Object[] args = new Object[] { config };
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);