Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization
commit
06354a093d
|
@ -3461,11 +3461,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
new CoarseLocationUpdatePacket.IndexBlock();
|
||||
loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total];
|
||||
loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total];
|
||||
|
||||
int selfindex = -1;
|
||||
for (int i = 0; i < total; i++)
|
||||
{
|
||||
CoarseLocationUpdatePacket.LocationBlock lb =
|
||||
new CoarseLocationUpdatePacket.LocationBlock();
|
||||
|
||||
lb.X = (byte)CoarseLocations[i].X;
|
||||
lb.Y = (byte)CoarseLocations[i].Y;
|
||||
|
||||
|
@ -3473,8 +3474,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
loc.Location[i] = lb;
|
||||
loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock();
|
||||
loc.AgentData[i].AgentID = users[i];
|
||||
if (users[i] == AgentId)
|
||||
selfindex = i;
|
||||
}
|
||||
ib.You = -1;
|
||||
ib.You = (short)selfindex;
|
||||
ib.Prey = -1;
|
||||
loc.Index = ib;
|
||||
loc.Header.Reliable = false;
|
||||
|
@ -10122,11 +10125,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
Utils.BytesToString(avatarNotesUpdate.Data.Notes));
|
||||
break;
|
||||
|
||||
// case PacketType.AvatarInterestsUpdate:
|
||||
// AvatarInterestsUpdatePacket avatarInterestUpdate =
|
||||
// (AvatarInterestsUpdatePacket)Pack;
|
||||
//
|
||||
// break;
|
||||
case PacketType.AvatarInterestsUpdate:
|
||||
AvatarInterestsUpdatePacket avatarInterestUpdate =
|
||||
(AvatarInterestsUpdatePacket)Pack;
|
||||
|
||||
#region Packet Session and User Check
|
||||
if (m_checkPackets)
|
||||
{
|
||||
if (avatarInterestUpdate.AgentData.SessionID != SessionId ||
|
||||
avatarInterestUpdate.AgentData.AgentID != AgentId)
|
||||
break;
|
||||
}
|
||||
#endregion
|
||||
|
||||
AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate;
|
||||
if (handlerAvatarInterestUpdate != null)
|
||||
handlerAvatarInterestUpdate(this,
|
||||
avatarInterestUpdate.PropertiesData.WantToMask,
|
||||
Utils.BytesToString(avatarInterestUpdate.PropertiesData.WantToText),
|
||||
avatarInterestUpdate.PropertiesData.SkillsMask,
|
||||
Utils.BytesToString(avatarInterestUpdate.PropertiesData.SkillsText),
|
||||
Utils.BytesToString(avatarInterestUpdate.PropertiesData.LanguagesText));
|
||||
break;
|
||||
|
||||
case PacketType.PlacesQuery:
|
||||
PlacesQueryPacket placesQueryPacket =
|
||||
|
|
|
@ -902,6 +902,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (PhysicsActor != null)
|
||||
{
|
||||
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||
m_physicsActor.UnSubscribeEvents();
|
||||
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||
|
@ -2500,8 +2501,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||
for (int i = 0; i < avatars.Count; i++)
|
||||
{
|
||||
if (avatars[i] != this)
|
||||
{
|
||||
// Requested by LibOMV. Send Course Location on self.
|
||||
//if (avatars[i] != this)
|
||||
//{
|
||||
if (avatars[i].ParentID != 0)
|
||||
{
|
||||
// sitting avatar
|
||||
|
@ -2523,7 +2525,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
CoarseLocations.Add(avatars[i].m_pos);
|
||||
AvatarUUIDs.Add(avatars[i].UUID);
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
|
||||
|
@ -3402,11 +3404,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
scene.AddPhysicsActorTaint(m_physicsActor);
|
||||
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
||||
m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
|
||||
m_physicsActor.SubscribeEvents(500);
|
||||
m_physicsActor.LocalID = LocalId;
|
||||
|
||||
}
|
||||
|
||||
private void OutOfBoundsCall(PhysicsVector pos)
|
||||
{
|
||||
bool flying = m_physicsActor.Flying;
|
||||
RemoveFromPhysicalScene();
|
||||
|
||||
AddToPhysicalScene(flying);
|
||||
}
|
||||
|
||||
// Event called by the physics plugin to tell the avatar about a collision.
|
||||
private void PhysicsCollisionUpdate(EventArgs e)
|
||||
{
|
||||
|
|
|
@ -1105,7 +1105,19 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
public void UpdatePositionAndVelocity()
|
||||
{
|
||||
// no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit!
|
||||
d.Vector3 vec = d.BodyGetPosition(Body);
|
||||
d.Vector3 vec;
|
||||
try
|
||||
{
|
||||
vec = d.BodyGetPosition(Body);
|
||||
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
vec = new d.Vector3(_position.X, _position.Y, _position.Z);
|
||||
base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem!
|
||||
m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar: {0}", m_name);
|
||||
}
|
||||
|
||||
|
||||
// kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!)
|
||||
if (vec.X < 0.0f) vec.X = 0.0f;
|
||||
|
@ -1137,7 +1149,16 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
else
|
||||
{
|
||||
m_lastUpdateSent = false;
|
||||
vec = d.BodyGetLinearVel(Body);
|
||||
try
|
||||
{
|
||||
vec = d.BodyGetLinearVel(Body);
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
vec.X = _velocity.X;
|
||||
vec.Y = _velocity.Y;
|
||||
vec.Z = _velocity.Z;
|
||||
}
|
||||
_velocity.X = (vec.X);
|
||||
_velocity.Y = (vec.Y);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
|
|||
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||
StorageProvider = "OpenSim.Data.MySQL.dll"
|
||||
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"
|
||||
; Realm = "auth"
|
||||
; Realm = "users"
|
||||
|
||||
; * This is the new style user service.
|
||||
; * "Realm" is the table that is used for user lookup.
|
||||
|
@ -75,7 +75,7 @@ ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=gr
|
|||
; * It defaults to "regions", which uses the legacy tables
|
||||
; *
|
||||
[GridService]
|
||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
||||
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;"
|
||||
Realm = "regions"
|
||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
||||
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;"
|
||||
Realm = "regions"
|
||||
|
|
Loading…
Reference in New Issue