Merge branch 'master' into httptests

httptests
UbitUmarov 2016-11-03 14:01:35 +00:00
commit 01a4a883e0
9 changed files with 90 additions and 87 deletions

View File

@ -2920,7 +2920,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString()); m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString());
} }
part.UpdatePhysRequired = false;
} }
} }

View File

@ -565,8 +565,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
return null; return null;
} }
return account;
/*
try try
{ {
string encpass = Util.Md5Hash(pass); string encpass = Util.Md5Hash(pass);
@ -587,7 +585,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e); m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e);
return null; return null;
} }
*/
} }
/// <summary> /// <summary>

View File

@ -1660,7 +1660,7 @@ namespace OpenSim.Region.Framework.Scenes
if (part != null) if (part != null)
{ {
part.UpdateExtraPhysics(PhysData); part.UpdateExtraPhysics(PhysData);
if (part.UpdatePhysRequired && remoteClient != null) if (remoteClient != null)
remoteClient.SendPartPhysicsProprieties(part); remoteClient.SendPartPhysicsProprieties(part);
} }
} }

View File

@ -1222,7 +1222,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
public UpdateRequired UpdateFlag { get; set; } public UpdateRequired UpdateFlag { get; set; }
public bool UpdatePhysRequired { get; set; }
/// <summary> /// <summary>
/// Used for media on a prim. /// Used for media on a prim.
@ -1637,7 +1636,6 @@ namespace OpenSim.Region.Framework.Scenes
if(ParentGroup != null) if(ParentGroup != null)
ParentGroup.HasGroupChanged = true; ParentGroup.HasGroupChanged = true;
ScheduleFullUpdateIfNone(); ScheduleFullUpdateIfNone();
UpdatePhysRequired = true;
} }
} }
} }
@ -1729,7 +1727,7 @@ namespace OpenSim.Region.Framework.Scenes
set set
{ {
byte oldv = m_physicsShapeType; byte oldv = m_physicsShapeType;
if (value >= 0 && value <= (byte)PhysShapeType.convex) if (value >= 0 && value <= (byte)PhysShapeType.convex)
{ {
if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this)
@ -1748,28 +1746,21 @@ namespace OpenSim.Region.Framework.Scenes
{ {
ParentGroup.Scene.RemovePhysicalPrim(1); ParentGroup.Scene.RemovePhysicalPrim(1);
RemoveFromPhysics(); RemoveFromPhysics();
Stop(); // Stop();
} }
} }
else if (PhysActor == null) else if (PhysActor == null)
{ {
ApplyPhysics((uint)Flags, VolumeDetectActive, false); if(oldv == (byte)PhysShapeType.none)
UpdatePhysicsSubscribedEvents(); {
ApplyPhysics((uint)Flags, VolumeDetectActive, false);
UpdatePhysicsSubscribedEvents();
}
} }
else else
{
PhysActor.PhysicsShapeType = m_physicsShapeType; PhysActor.PhysicsShapeType = m_physicsShapeType;
// if (Shape.SculptEntry)
// CheckSculptAndLoad();
}
if (ParentGroup != null) ParentGroup.HasGroupChanged = true;
ParentGroup.HasGroupChanged = true;
}
if (m_physicsShapeType != value)
{
UpdatePhysRequired = true;
} }
} }
} }
@ -1782,17 +1773,16 @@ namespace OpenSim.Region.Framework.Scenes
if (value >=1 && value <= 22587.0) if (value >=1 && value <= 22587.0)
{ {
m_density = value; m_density = value;
UpdatePhysRequired = true;
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.Density = m_density;
} }
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.Density = Density;
} }
} }
@ -1804,17 +1794,16 @@ namespace OpenSim.Region.Framework.Scenes
if( value >= -1 && value <=28.0f) if( value >= -1 && value <=28.0f)
{ {
m_gravitymod = value; m_gravitymod = value;
UpdatePhysRequired = true;
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.GravModifier = m_gravitymod;
} }
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.GravModifier = GravityModifier;
} }
} }
@ -1826,17 +1815,16 @@ namespace OpenSim.Region.Framework.Scenes
if (value >= 0 && value <= 255.0f) if (value >= 0 && value <= 255.0f)
{ {
m_friction = value; m_friction = value;
UpdatePhysRequired = true;
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.Friction = m_friction;
} }
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.Friction = Friction;
} }
} }
@ -1848,17 +1836,16 @@ namespace OpenSim.Region.Framework.Scenes
if (value >= 0 && value <= 1.0f) if (value >= 0 && value <= 1.0f)
{ {
m_bounce = value; m_bounce = value;
UpdatePhysRequired = true;
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.Restitution = m_bounce;
} }
ScheduleFullUpdateIfNone();
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
PhysicsActor pa = PhysActor;
if (pa != null)
pa.Restitution = Restitution;
} }
} }
@ -4541,24 +4528,24 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
} }
} }
public void UpdateExtraPhysics(ExtraPhysicsData physdata) public void UpdateExtraPhysics(ExtraPhysicsData physdata)
{ {
if (physdata.PhysShapeType == PhysShapeType.invalid || ParentGroup == null) if (physdata.PhysShapeType == PhysShapeType.invalid || ParentGroup == null)
return; return;
if (PhysicsShapeType != (byte)physdata.PhysShapeType) byte newtype = (byte)physdata.PhysShapeType;
{ if (PhysicsShapeType != newtype)
PhysicsShapeType = (byte)physdata.PhysShapeType; PhysicsShapeType = newtype;
}
if(Density != physdata.Density) if(Density != physdata.Density)
Density = physdata.Density; Density = physdata.Density;
if(GravityModifier != physdata.GravitationModifier) if(GravityModifier != physdata.GravitationModifier)
GravityModifier = physdata.GravitationModifier; GravityModifier = physdata.GravitationModifier;
if(Friction != physdata.Friction) if(Friction != physdata.Friction)
Friction = physdata.Friction; Friction = physdata.Friction;
if(Restitution != physdata.Bounce) if(Restitution != physdata.Bounce)
Restitution = physdata.Bounce; Restitution = physdata.Bounce;
} }

View File

@ -443,6 +443,11 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
if (physicsParms != null) if (physicsParms != null)
usemesh = true; usemesh = true;
else
{
m_log.WarnFormat("[MESH]: Data for PRIM shape type not found for prim {0}",primName);
return false;
}
} }
if(!usemesh && (map.ContainsKey("physics_convex"))) if(!usemesh && (map.ContainsKey("physics_convex")))
@ -451,7 +456,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
if (physicsParms == null) if (physicsParms == null)
{ {
m_log.WarnFormat("[MESH]: unknown mesh type for {0}",primName); m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName);
return false; return false;
} }

View File

@ -100,11 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
protected IScriptEngine m_ScriptEngine; protected IScriptEngine m_ScriptEngine;
protected SceneObjectPart m_host; protected SceneObjectPart m_host;
/// <summary>
/// Used for script sleeps when we are using co-operative script termination.
/// </summary>
/// <remarks>null if co-operative script termination is not active</remarks>
/// <summary> /// <summary>
/// The item that hosts this script /// The item that hosts this script
/// </summary> /// </summary>
@ -1641,12 +1637,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
foreach (SceneObjectPart part in group.Parts) foreach (SceneObjectPart part in group.Parts)
{ {
if (part.PhysicsShapeType == (byte)PhysicsShapeType.None)
continue;
if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys)
{ {
allow = false; allow = false;
break; break;
} }
if (checkShape && part.PhysicsShapeType != (byte)PhysicsShapeType.None) if (checkShape)
{ {
if (--maxprims < 0) if (--maxprims < 0)
{ {

View File

@ -110,6 +110,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
private int m_ScriptFailCount; // Number of script fails since compile queue was last empty private int m_ScriptFailCount; // Number of script fails since compile queue was last empty
private string m_ScriptErrorMessage; private string m_ScriptErrorMessage;
private bool m_AppDomainLoading; private bool m_AppDomainLoading;
private bool m_CompactMemOnLoad;
private Dictionary<UUID,ArrayList> m_ScriptErrors = private Dictionary<UUID,ArrayList> m_ScriptErrors =
new Dictionary<UUID,ArrayList>(); new Dictionary<UUID,ArrayList>();
@ -301,8 +302,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300);
m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144);
m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000;
m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", true); m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", false);
m_CompactMemOnLoad = m_ScriptConfig.GetBoolean("CompactMemOnLoad", false);
m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30);
m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false);
m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000;
@ -1278,10 +1279,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
} }
} }
// do not load a assembly on top of a lot of to release memory // optionaly do not load a assembly on top of a lot of to release memory
// also yield a bit // only if logins disable since causes a lot of rubber banding
// only if logins disable since causes a lot of rubber banding if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled)
if(!m_Scene.LoginsEnabled)
GC.Collect(2); GC.Collect(2);
ScriptInstance instance = null; ScriptInstance instance = null;

View File

@ -958,6 +958,13 @@
;; by scripts have changed. ;; by scripts have changed.
; DeleteScriptsOnStartup = true ; DeleteScriptsOnStartup = true
;# {CompactMemOnLoad} {} {compacts memory on each script load at startup?} {true false} false
;; forces calls to memory garbage collector before loading each script DLL during region startup.
;; Peak memory usage is reduced and region starts with a more compacted memory allocation.
;; But this costs a lot of time, so region load will take a lot longer.
;; it is more usefull if there are no previously compiled scripts DLLs (as with DeleteScriptsOnStartup = true)
;CompactMemOnLoad = false
;# {DefaultCompileLanguage} {Enabled:true} {Default script language?} {lsl vb cs} lsl ;# {DefaultCompileLanguage} {Enabled:true} {Default script language?} {lsl vb cs} lsl
;; Default language for scripts ;; Default language for scripts
; DefaultCompileLanguage = "lsl" ; DefaultCompileLanguage = "lsl"

View File

@ -1699,14 +1699,23 @@
; this may only be a problem if regions stay alive for a long time with lots of scripts added or edited. ; this may only be a problem if regions stay alive for a long time with lots of scripts added or edited.
; at this time some mono versions seem to have problems with the true option ; at this time some mono versions seem to have problems with the true option
; so default is now false until a fix is found ; so default is now false until a fix is found
AppDomainLoading = false ; AppDomainLoading = false
; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false ; Controls whether previously compiled scripts DLLs are deleted on sim restart.
; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the ; If you set this to false then startup will be considerably faster since scripts won't need to be recompiled.
; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used ; It should be true on first run after updating opensim binary version
; by scripts have changed. ; after first run you can change to false.
; DeleteScriptsOnStartup = false ; You can also set it to false and delete the script DLLs by hand
; This does not delete cached scripts state.
; DeleteScriptsOnStartup = true
; CompactMemOnLoad
; forces calls to memory garbage collector before loading each script DLL during region startup.
; Peak memory usage is reduced and region starts with a more compacted memory allocation.
; But this costs a lot of time, so region load will take a lot longer.
; it is more usefull if there are no previously compiled scripts DLLs (or DeleteScriptsOnStartup = true)
; CompactMemOnLoad = false
; Controls whether scripts are stopped by aborting their threads externally (abort) ; Controls whether scripts are stopped by aborting their threads externally (abort)
; or by co-operative checks inserted by OpenSimulator into compiled script (co-op). ; or by co-operative checks inserted by OpenSimulator into compiled script (co-op).
; co-op will be more stable as aborting threads can cause instability. ; co-op will be more stable as aborting threads can cause instability.