Merge branch 'master' into careminster

avinationmerge
Melanie 2012-08-24 01:22:44 +01:00
commit 7cdb564fdd
4 changed files with 21 additions and 1 deletions

View File

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

View File

@ -2943,6 +2943,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)
{

View File

@ -258,6 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
int osGetSimulatorMemory();
void osKickAvatar(string FirstName,string SurName,string alert);
void osSetSpeed(string UUID, LSL_Float SpeedModifier);
LSL_Float osGetHealth(string avatar);
void osCauseHealing(string avatar, double healing);
void osCauseDamage(string avatar, double damage);
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);
}
public LSL_Float osGetHealth(string avatar)
{
return m_OSSL_Functions.osGetHealth(avatar);
}
public void osCauseDamage(string avatar, double damage)
{
m_OSSL_Functions.osCauseDamage(avatar, damage);