add osSetHealth() value from 1 to 100; (mantis 7973)
parent
37936550f0
commit
2bb467e358
|
@ -3469,6 +3469,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osSetHealth(string avatar, double health)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.High, "osSetHealth");
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
UUID avatarId = new UUID(avatar);
|
||||||
|
ScenePresence presence = World.GetScenePresence(avatarId);
|
||||||
|
|
||||||
|
if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition()))
|
||||||
|
{
|
||||||
|
if (health > 100.0)
|
||||||
|
health = 100.0;
|
||||||
|
else if (health < 1.0)
|
||||||
|
health = 1.0;
|
||||||
|
|
||||||
|
presence.setHealthWithUpdate((float)health);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
|
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
|
CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
|
||||||
|
|
|
@ -368,6 +368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void osSetSpeed(string UUID, LSL_Float SpeedModifier);
|
void osSetSpeed(string UUID, LSL_Float SpeedModifier);
|
||||||
LSL_Float osGetHealth(string avatar);
|
LSL_Float osGetHealth(string avatar);
|
||||||
void osCauseHealing(string avatar, double healing);
|
void osCauseHealing(string avatar, double healing);
|
||||||
|
void osSetHealth(string avatar, double health);
|
||||||
void osCauseDamage(string avatar, double damage);
|
void osCauseDamage(string avatar, double damage);
|
||||||
void osForceOtherSit(string avatar);
|
void osForceOtherSit(string avatar);
|
||||||
void osForceOtherSit(string avatar, string target);
|
void osForceOtherSit(string avatar, string target);
|
||||||
|
|
|
@ -945,6 +945,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
m_OSSL_Functions.osCauseHealing(avatar, healing);
|
m_OSSL_Functions.osCauseHealing(avatar, healing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osSetHealth(string avatar, double health)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osSetHealth(avatar, health);
|
||||||
|
}
|
||||||
|
|
||||||
public void osForceOtherSit(string avatar)
|
public void osForceOtherSit(string avatar)
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osForceOtherSit(avatar);
|
m_OSSL_Functions.osForceOtherSit(avatar);
|
||||||
|
|
|
@ -157,6 +157,7 @@
|
||||||
; ThreatLevel High
|
; ThreatLevel High
|
||||||
Allow_osCauseDamage = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osCauseDamage = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
Allow_osCauseHealing = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osCauseHealing = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
|
Allow_osSetHealth = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
Allow_osForceAttachToAvatar = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osForceAttachToAvatar = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
Allow_osForceAttachToAvatarFromInventory = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osForceAttachToAvatarFromInventory = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
|
|
Loading…
Reference in New Issue