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)
|
||||
{
|
||||
string[] returnstring = new string[0];
|
||||
bool doLookup = false;
|
||||
|
||||
lock (m_nameRequestCache)
|
||||
{
|
||||
if (m_nameRequestCache.ContainsKey(uuid))
|
||||
{
|
||||
returnstring = m_nameRequestCache[uuid];
|
||||
}
|
||||
else
|
||||
{
|
||||
// we don't want to lock the dictionary while we're doing the lookup
|
||||
doLookup = true;
|
||||
}
|
||||
return m_nameRequestCache[uuid];
|
||||
}
|
||||
|
||||
if (doLookup) {
|
||||
UserProfileData profileData = m_userService.GetUserProfile(uuid);
|
||||
if (profileData != null)
|
||||
string[] returnstring = new string[0];
|
||||
CachedUserInfo uinfo = UserProfileCacheService.GetUserDetails(uuid);
|
||||
|
||||
if ((uinfo != null) && (uinfo.UserProfile != null))
|
||||
{
|
||||
returnstring = new string[2];
|
||||
// UUID profileId = profileData.ID;
|
||||
returnstring[0] = profileData.FirstName;
|
||||
returnstring[1] = profileData.SurName;
|
||||
returnstring[0] = uinfo.UserProfile.FirstName;
|
||||
returnstring[1] = uinfo.UserProfile.SurName;
|
||||
lock (m_nameRequestCache)
|
||||
{
|
||||
if (!m_nameRequestCache.ContainsKey(uuid))
|
||||
m_nameRequestCache.Add(uuid, returnstring);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnstring;
|
||||
}
|
||||
|
|
|
@ -556,6 +556,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
|
||||
// Customize the EveryoneMask
|
||||
uint objectEveryoneMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags);
|
||||
if (objectOwner != UUID.Zero)
|
||||
objectEveryoneMask |= (uint)PrimFlags.ObjectAnyOwner;
|
||||
|
||||
if (m_bypassPermissions)
|
||||
return objectOwnerMask;
|
||||
|
@ -581,9 +583,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return objectOwnerMask;
|
||||
}
|
||||
|
||||
if ((objectOwnerMask & (uint)PermissionMask.Transfer) != 0 && task.ObjectSaleType != 0)
|
||||
objectEveryoneMask |= (uint)PrimFlags.ObjectTransfer;
|
||||
|
||||
// Group permissions
|
||||
if ((task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0))
|
||||
return objectGroupMask | objectEveryoneMask;
|
||||
|
|
|
@ -3409,7 +3409,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
scene.AddPhysicsActorTaint(m_physicsActor);
|
||||
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
|
||||
m_physicsActor.SubscribeEvents(1000);
|
||||
m_physicsActor.SubscribeEvents(500);
|
||||
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.
|
||||
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;
|
||||
CollisionEventUpdate collisionData = (CollisionEventUpdate)e;
|
||||
Dictionary<uint, float> coldata = collisionData.m_objCollisionList;
|
||||
|
@ -3455,8 +3463,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_scene.EventManager.TriggerAvatarKill(killerObj, this);
|
||||
}
|
||||
|
||||
if (Velocity.X > 0 || Velocity.Y > 0)
|
||||
UpdateMovementAnimations();
|
||||
|
||||
}
|
||||
|
||||
public void setHealthWithUpdate(float health)
|
||||
|
|
|
@ -98,6 +98,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private bool m_alwaysRun = false;
|
||||
private bool m_hackSentFall = false;
|
||||
private bool m_hackSentFly = false;
|
||||
private int m_requestedUpdateFrequency = 0;
|
||||
private PhysicsVector m_taintPosition = new PhysicsVector(0, 0, 0);
|
||||
public uint m_localID = 0;
|
||||
public bool m_returnCollisions = false;
|
||||
|
@ -1184,26 +1185,31 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
public override void SubscribeEvents(int ms)
|
||||
{
|
||||
m_requestedUpdateFrequency = ms;
|
||||
m_eventsubscription = ms;
|
||||
_parent_scene.addCollisionEventReporting(this);
|
||||
}
|
||||
public override void UnSubscribeEvents()
|
||||
{
|
||||
_parent_scene.remCollisionEventReporting(this);
|
||||
m_requestedUpdateFrequency = 0;
|
||||
m_eventsubscription = 0;
|
||||
}
|
||||
public void AddCollisionEvent(uint CollidedWith, float depth)
|
||||
{
|
||||
if (m_eventsubscription > 0)
|
||||
{
|
||||
CollisionEventsThisFrame.addCollider(CollidedWith, depth);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendCollisions()
|
||||
{
|
||||
if (m_eventsubscription > 0)
|
||||
if (m_eventsubscription > m_requestedUpdateFrequency)
|
||||
{
|
||||
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
||||
CollisionEventsThisFrame = new CollisionEventUpdate();
|
||||
m_eventsubscription = 0;
|
||||
}
|
||||
}
|
||||
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:
|
||||
OdeCharacter cobj = (OdeCharacter)obj;
|
||||
cobj.AddCollisionFrameTime(100);
|
||||
cobj.SendCollisions();
|
||||
break;
|
||||
case ActorTypes.Prim:
|
||||
|
|
Loading…
Reference in New Issue