Merge branch 'master' of /home/opensim/var/repo/opensim

integration
BlueWall 2012-08-24 15:41:36 -04:00
commit d2a6d255e4
10 changed files with 98 additions and 21 deletions

1
.gitignore vendored
View File

@ -26,6 +26,7 @@
bin/Debug/*.dll bin/Debug/*.dll
bin/*.dll.mdb bin/*.dll.mdb
bin/*.db bin/*.db
bin/*.db-journal
bin/addin-db-* bin/addin-db-*
bin/*.dll bin/*.dll
bin/OpenSim.vshost.exe.config bin/OpenSim.vshost.exe.config

View File

@ -1943,6 +1943,9 @@ namespace OpenSim.Region.Framework.Scenes
deleteIDs.Add(localID); deleteIDs.Add(localID);
deleteGroups.Add(grp); deleteGroups.Add(grp);
// If child prims have invalid perms, fix them
grp.AdjustChildPrimPermissions();
if (remoteClient == null) if (remoteClient == null)
{ {
// Autoreturn has a null client. Nothing else does. So // Autoreturn has a null client. Nothing else does. So

View File

@ -2131,6 +2131,9 @@ namespace OpenSim.Region.Framework.Scenes
// Can't do this yet since backup still makes use of the root part without any synchronization // Can't do this yet since backup still makes use of the root part without any synchronization
// objectGroup.m_rootPart = null; // objectGroup.m_rootPart = null;
// If linking prims with different permissions, fix them
AdjustChildPrimPermissions();
AttachToBackup(); AttachToBackup();
// Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
@ -2622,12 +2625,21 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
public void AdjustChildPrimPermissions()
{
ForEachPart(part =>
{
if (part != RootPart)
part.ClonePermissions(RootPart);
});
}
public void UpdatePermissions(UUID AgentID, byte field, uint localID, public void UpdatePermissions(UUID AgentID, byte field, uint localID,
uint mask, byte addRemTF) uint mask, byte addRemTF)
{ {
SceneObjectPart[] parts = m_parts.GetArray(); RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
for (int i = 0; i < parts.Length; i++)
parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF); AdjustChildPrimPermissions();
HasGroupChanged = true; HasGroupChanged = true;

View File

@ -3890,6 +3890,27 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
public void ClonePermissions(SceneObjectPart source)
{
bool update = false;
if (BaseMask != source.BaseMask ||
OwnerMask != source.OwnerMask ||
GroupMask != source.GroupMask ||
EveryoneMask != source.EveryoneMask ||
NextOwnerMask != source.NextOwnerMask)
update = true;
BaseMask = source.BaseMask;
OwnerMask = source.OwnerMask;
GroupMask = source.GroupMask;
EveryoneMask = source.EveryoneMask;
NextOwnerMask = source.NextOwnerMask;
if (update)
SendFullUpdateToAllClients();
}
public bool IsHingeJoint() public bool IsHingeJoint()
{ {
// For now, we use the NINJA naming scheme for identifying joints. // For now, we use the NINJA naming scheme for identifying joints.

View File

@ -5165,25 +5165,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// separated list. There is a space after /// separated list. There is a space after
/// each comma. /// each comma.
/// </summary> /// </summary>
public LSL_String llList2CSV(LSL_List src) public LSL_String llList2CSV(LSL_List src)
{ {
string ret = String.Empty;
int x = 0;
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (src.Data.Length > 0) return string.Join(", ",
{ (new List<object>(src.Data)).ConvertAll<string>(o =>
ret = src.Data[x++].ToString(); {
for (; x < src.Data.Length; x++) return o.ToString();
{ }).ToArray());
ret += ", "+src.Data[x].ToString();
}
}
return ret;
} }
/// <summary> /// <summary>

View File

@ -2895,6 +2895,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
}); });
} }
public LSL_Float osGetHealth(string avatar)
{
CheckThreatLevel(ThreatLevel.None, "osGetHealth");
m_host.AddScriptLPS(1);
LSL_Float health = new LSL_Float(-1);
ScenePresence presence = World.GetScenePresence(new UUID(avatar));
if (presence != null) health = presence.Health;
return health;
}
public void osCauseDamage(string avatar, double damage) public void osCauseDamage(string avatar, double damage)
{ {

View File

@ -258,6 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
int osGetSimulatorMemory(); int osGetSimulatorMemory();
void osKickAvatar(string FirstName,string SurName,string alert); void osKickAvatar(string FirstName,string SurName,string alert);
void osSetSpeed(string UUID, LSL_Float SpeedModifier); void osSetSpeed(string UUID, LSL_Float SpeedModifier);
LSL_Float osGetHealth(string avatar);
void osCauseHealing(string avatar, double healing); void osCauseHealing(string avatar, double healing);
void osCauseDamage(string avatar, double damage); void osCauseDamage(string avatar, double damage);
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);

View File

@ -865,7 +865,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{ {
m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
} }
public LSL_Float osGetHealth(string avatar)
{
return m_OSSL_Functions.osGetHealth(avatar);
}
public void osCauseDamage(string avatar, double damage) public void osCauseDamage(string avatar, double damage)
{ {
m_OSSL_Functions.osCauseDamage(avatar, damage); m_OSSL_Functions.osCauseDamage(avatar, damage);

View File

@ -589,7 +589,19 @@ namespace OpenSim.Region.ScriptEngine.XEngine
if (m_Assemblies.ContainsKey(instance.AssetID)) if (m_Assemblies.ContainsKey(instance.AssetID))
{ {
string assembly = m_Assemblies[instance.AssetID]; string assembly = m_Assemblies[instance.AssetID];
instance.SaveState(assembly);
try
{
instance.SaveState(assembly);
}
catch (Exception e)
{
m_log.Error(
string.Format(
"[XEngine]: Failed final state save for script {0}.{1}, item UUID {2}, prim UUID {3} in {4}. Exception ",
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, World.Name)
, e);
}
} }
// Clear the event queue and abort the instance thread // Clear the event queue and abort the instance thread
@ -707,7 +719,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
assembly = m_Assemblies[i.AssetID]; assembly = m_Assemblies[i.AssetID];
} }
i.SaveState(assembly); try
{
i.SaveState(assembly);
}
catch (Exception e)
{
m_log.Error(
string.Format(
"[XEngine]: Failed to save state of script {0}.{1}, item UUID {2}, prim UUID {3} in {4}. Exception ",
i.PrimName, i.ScriptName, i.ItemID, i.ObjectID, World.Name)
, e);
}
} }
instances.Clear(); instances.Clear();

View File

@ -7,6 +7,16 @@
[AssetService] [AssetService]
ConnectionString = "URI=file:Asset.db,version=3" ConnectionString = "URI=file:Asset.db,version=3"
; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration.
; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead.
; However, the internal asset service will still use the [AssetService] section.
; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService]
; so that they both access the same database.
; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and
; do not have separate connection strings for different services.
[HGAssetService]
ConnectionString = "URI=file:Asset.db,version=3"
[InventoryService] [InventoryService]
;ConnectionString = "URI=file:inventory.db,version=3" ;ConnectionString = "URI=file:inventory.db,version=3"
; if you have a legacy inventory store use the connection string below ; if you have a legacy inventory store use the connection string below