Merge branch 'master' into htb-throttle
This is hand-edited to not let master changes creep into here and may cause a somewhat rocky merge to master later.prioritization
commit
5e6e31591c
|
@ -209,37 +209,26 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
private string[] doUUIDNameRequest(UUID uuid)
|
private string[] doUUIDNameRequest(UUID uuid)
|
||||||
{
|
{
|
||||||
string[] returnstring = new string[0];
|
|
||||||
bool doLookup = false;
|
|
||||||
|
|
||||||
lock (m_nameRequestCache)
|
lock (m_nameRequestCache)
|
||||||
{
|
{
|
||||||
if (m_nameRequestCache.ContainsKey(uuid))
|
if (m_nameRequestCache.ContainsKey(uuid))
|
||||||
{
|
return m_nameRequestCache[uuid];
|
||||||
returnstring = m_nameRequestCache[uuid];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// we don't want to lock the dictionary while we're doing the lookup
|
|
||||||
doLookup = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doLookup) {
|
string[] returnstring = new string[0];
|
||||||
UserProfileData profileData = m_userService.GetUserProfile(uuid);
|
CachedUserInfo uinfo = UserProfileCacheService.GetUserDetails(uuid);
|
||||||
if (profileData != null)
|
|
||||||
|
if ((uinfo != null) && (uinfo.UserProfile != null))
|
||||||
{
|
{
|
||||||
returnstring = new string[2];
|
returnstring = new string[2];
|
||||||
// UUID profileId = profileData.ID;
|
returnstring[0] = uinfo.UserProfile.FirstName;
|
||||||
returnstring[0] = profileData.FirstName;
|
returnstring[1] = uinfo.UserProfile.SurName;
|
||||||
returnstring[1] = profileData.SurName;
|
|
||||||
lock (m_nameRequestCache)
|
lock (m_nameRequestCache)
|
||||||
{
|
{
|
||||||
if (!m_nameRequestCache.ContainsKey(uuid))
|
if (!m_nameRequestCache.ContainsKey(uuid))
|
||||||
m_nameRequestCache.Add(uuid, returnstring);
|
m_nameRequestCache.Add(uuid, returnstring);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return returnstring;
|
return returnstring;
|
||||||
}
|
}
|
||||||
|
|
|
@ -556,6 +556,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
|
|
||||||
// Customize the EveryoneMask
|
// Customize the EveryoneMask
|
||||||
uint objectEveryoneMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags);
|
uint objectEveryoneMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags);
|
||||||
|
if (objectOwner != UUID.Zero)
|
||||||
|
objectEveryoneMask |= (uint)PrimFlags.ObjectAnyOwner;
|
||||||
|
|
||||||
if (m_bypassPermissions)
|
if (m_bypassPermissions)
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
|
@ -581,9 +583,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((objectOwnerMask & (uint)PermissionMask.Transfer) != 0 && task.ObjectSaleType != 0)
|
|
||||||
objectEveryoneMask |= (uint)PrimFlags.ObjectTransfer;
|
|
||||||
|
|
||||||
// Group permissions
|
// Group permissions
|
||||||
if ((task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0))
|
if ((task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0))
|
||||||
return objectGroupMask | objectEveryoneMask;
|
return objectGroupMask | objectEveryoneMask;
|
||||||
|
|
|
@ -3409,7 +3409,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
scene.AddPhysicsActorTaint(m_physicsActor);
|
scene.AddPhysicsActorTaint(m_physicsActor);
|
||||||
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
||||||
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
||||||
m_physicsActor.SubscribeEvents(1000);
|
m_physicsActor.SubscribeEvents(500);
|
||||||
m_physicsActor.LocalID = LocalId;
|
m_physicsActor.LocalID = LocalId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3417,7 +3417,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Event called by the physics plugin to tell the avatar about a collision.
|
// Event called by the physics plugin to tell the avatar about a collision.
|
||||||
private void PhysicsCollisionUpdate(EventArgs e)
|
private void PhysicsCollisionUpdate(EventArgs e)
|
||||||
{
|
{
|
||||||
if ((e == null) || m_invulnerable)
|
if (e == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
|
||||||
|
// The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents(
|
||||||
|
// as of this comment the interval is set in AddToPhysicalScene
|
||||||
|
UpdateMovementAnimations();
|
||||||
|
|
||||||
|
if (m_invulnerable)
|
||||||
return;
|
return;
|
||||||
CollisionEventUpdate collisionData = (CollisionEventUpdate)e;
|
CollisionEventUpdate collisionData = (CollisionEventUpdate)e;
|
||||||
Dictionary<uint, float> coldata = collisionData.m_objCollisionList;
|
Dictionary<uint, float> coldata = collisionData.m_objCollisionList;
|
||||||
|
@ -3455,8 +3463,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_scene.EventManager.TriggerAvatarKill(killerObj, this);
|
m_scene.EventManager.TriggerAvatarKill(killerObj, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Velocity.X > 0 || Velocity.Y > 0)
|
|
||||||
UpdateMovementAnimations();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHealthWithUpdate(float health)
|
public void setHealthWithUpdate(float health)
|
||||||
|
|
|
@ -98,6 +98,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
private bool m_alwaysRun = false;
|
private bool m_alwaysRun = false;
|
||||||
private bool m_hackSentFall = false;
|
private bool m_hackSentFall = false;
|
||||||
private bool m_hackSentFly = false;
|
private bool m_hackSentFly = false;
|
||||||
|
private int m_requestedUpdateFrequency = 0;
|
||||||
private PhysicsVector m_taintPosition = new PhysicsVector(0, 0, 0);
|
private PhysicsVector m_taintPosition = new PhysicsVector(0, 0, 0);
|
||||||
public uint m_localID = 0;
|
public uint m_localID = 0;
|
||||||
public bool m_returnCollisions = false;
|
public bool m_returnCollisions = false;
|
||||||
|
@ -1184,26 +1185,31 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
public override void SubscribeEvents(int ms)
|
public override void SubscribeEvents(int ms)
|
||||||
{
|
{
|
||||||
|
m_requestedUpdateFrequency = ms;
|
||||||
m_eventsubscription = ms;
|
m_eventsubscription = ms;
|
||||||
_parent_scene.addCollisionEventReporting(this);
|
_parent_scene.addCollisionEventReporting(this);
|
||||||
}
|
}
|
||||||
public override void UnSubscribeEvents()
|
public override void UnSubscribeEvents()
|
||||||
{
|
{
|
||||||
_parent_scene.remCollisionEventReporting(this);
|
_parent_scene.remCollisionEventReporting(this);
|
||||||
|
m_requestedUpdateFrequency = 0;
|
||||||
m_eventsubscription = 0;
|
m_eventsubscription = 0;
|
||||||
}
|
}
|
||||||
public void AddCollisionEvent(uint CollidedWith, float depth)
|
public void AddCollisionEvent(uint CollidedWith, float depth)
|
||||||
{
|
{
|
||||||
if (m_eventsubscription > 0)
|
if (m_eventsubscription > 0)
|
||||||
|
{
|
||||||
CollisionEventsThisFrame.addCollider(CollidedWith, depth);
|
CollisionEventsThisFrame.addCollider(CollidedWith, depth);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SendCollisions()
|
public void SendCollisions()
|
||||||
{
|
{
|
||||||
if (m_eventsubscription > 0)
|
if (m_eventsubscription > m_requestedUpdateFrequency)
|
||||||
{
|
{
|
||||||
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
||||||
CollisionEventsThisFrame = new CollisionEventUpdate();
|
CollisionEventsThisFrame = new CollisionEventUpdate();
|
||||||
|
m_eventsubscription = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override bool SubscribedEvents()
|
public override bool SubscribedEvents()
|
||||||
|
@ -1309,5 +1315,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void AddCollisionFrameTime(int p)
|
||||||
|
{
|
||||||
|
// protect it from overflow crashing
|
||||||
|
if (m_eventsubscription + p >= int.MaxValue)
|
||||||
|
m_eventsubscription = 0;
|
||||||
|
m_eventsubscription += p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2928,6 +2928,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
case ActorTypes.Agent:
|
case ActorTypes.Agent:
|
||||||
OdeCharacter cobj = (OdeCharacter)obj;
|
OdeCharacter cobj = (OdeCharacter)obj;
|
||||||
|
cobj.AddCollisionFrameTime(100);
|
||||||
cobj.SendCollisions();
|
cobj.SendCollisions();
|
||||||
break;
|
break;
|
||||||
case ActorTypes.Prim:
|
case ActorTypes.Prim:
|
||||||
|
|
Loading…
Reference in New Issue