* Send an avatar update to other clients when an avatar rotates, as well as when it moves

* This should fix a long standing issue where you often wouldn't see other people simply turn around without moving at all
* Arguably lastPhysRot (to mirror lastPhysPos) is not a good name, may change variable names later
This commit is contained in:
Justin Clarke Casey
2008-10-14 20:28:34 +00:00
parent 7d6426f156
commit b70a285373
2 changed files with 25 additions and 4 deletions

View File

@@ -2339,7 +2339,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
/// <summary>
///
/// Send a terse positional/rotation/velocity update about an avatar to the client. This avatar can be that of
/// the client itself.
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="timeDilation"></param>
@@ -2352,6 +2353,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
rotation = Quaternion.Identity;
//m_log.DebugFormat("[CLIENT]: Sending rotation {0} for {1} to {2}", rotation, localID, Name);
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
CreateAvatarImprovedBlock(localID, position, velocity, rotation);
ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);