mantis 8634: add osSetSitActiveRange(float range) , osSetStandTarget(vector feetAproxPosition) and respective get functions. range <0 disables sits on the prim, = 0 uses region default,feetAproxPosition is in prim local frame. <0,0,0> disables it. Still no persistance. feedback required!

This commit is contained in:
UbitUmarov
2020-01-22 18:23:35 +00:00
parent 8db60ba3aa
commit 7adaede14a
6 changed files with 119 additions and 28 deletions

View File

@@ -5674,5 +5674,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return 3;
return 0;
}
public void osSetSitActiveRange(LSL_Float v)
{
if (v > 128f)
v = 128f;
m_host.SitActiveRange = (float)v;
}
public LSL_Float osGetSitActiveRange()
{
return m_host.SitActiveRange;
}
public void osSetStandTarget(LSL_Vector v)
{
// todo add limits ?
m_host.StandOffset = v;
}
public LSL_Vector osGetStandTarget()
{
return m_host.StandOffset;
}
}
}

View File

@@ -380,33 +380,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_List osGetRegionStats();
vector osGetRegionSize();
int osGetSimulatorMemory();
int osGetSimulatorMemoryKB();
int osGetSimulatorMemory();
int osGetSimulatorMemoryKB();
void osKickAvatar(string FirstName, string SurName, string alert);
void osKickAvatar(LSL_Key agentId, string alert);
void osSetSpeed(string UUID, LSL_Float SpeedModifier);
void osSetOwnerSpeed(LSL_Float SpeedModifier);
LSL_Float osGetHealth(key agentId);
LSL_Float osGetHealth(key agentId);
void osCauseHealing(key agentId, LSL_Float healing);
void osSetHealth(key agentId, LSL_Float health);
void osSetHealRate(key agentId, LSL_Float health);
LSL_Float osGetHealRate(key agentId);
LSL_Float osGetHealRate(key agentId);
void osCauseDamage(key avatar, LSL_Float damage);
void osForceOtherSit(string avatar);
void osForceOtherSit(string avatar, string target);
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
void osSetProjectionParams(LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
void osSetProjectionParams(LSL_Key prim, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
void osSetProjectionParams(LSL_Integer linknumber, LSL_Integer projection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb);
LSL_List osGetAvatarList();
LSL_List osGetNPCList();
LSL_List osGetAvatarList();
LSL_List osGetNPCList();
LSL_String osUnixTimeToTimestamp(LSL_Integer time);
LSL_String osUnixTimeToTimestamp(LSL_Integer time);
LSL_Integer osInviteToGroup(LSL_Key agentId);
LSL_Integer osEjectFromGroup(LSL_Key agentId);
LSL_Integer osInviteToGroup(LSL_Key agentId);
LSL_Integer osEjectFromGroup(LSL_Key agentId);
void osSetTerrainTexture(int level, LSL_Key texture);
void osSetTerrainTextureHeight(int corner, double low, double high);
@@ -416,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
/// </summary>
/// <param name="thing"></param>
/// <returns>1 if thing is a valid UUID, 0 otherwise</returns>
LSL_Integer osIsUUID(string thing);
LSL_Integer osIsUUID(string thing);
/// <summary>
/// Wraps to Math.Min()
@@ -424,7 +424,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
LSL_Float osMin(double a, double b);
LSL_Float osMin(double a, double b);
/// <summary>
/// Wraps to Math.max()
@@ -432,7 +432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
LSL_Float osMax(double a, double b);
LSL_Float osMax(double a, double b);
/// <summary>
/// Get the key of the object that rezzed this object.
@@ -559,5 +559,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void osResetAllScripts(LSL_Integer AllLinkset);
LSL_Integer osIsNotValidNumber(LSL_Float v);
void osSetSitActiveRange(LSL_Float v);
LSL_Float osGetSitActiveRange();
void osSetStandTarget(vector v);
vector osGetStandTarget();
}
}

View File

@@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public partial class ScriptBaseClass
{
// SCRIPTS CONSTANTS
public static readonly LSLInteger OS_APIVERSION = 10;
public static readonly LSLInteger OS_APIVERSION = 11;
public static readonly LSLInteger TRUE = 1;
public static readonly LSLInteger FALSE = 0;

View File

@@ -1421,5 +1421,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
return m_OSSL_Functions.osIsNotValidNumber(v);
}
public void osSetSitActiveRange(LSL_Float v)
{
m_OSSL_Functions.osSetSitActiveRange(v);
}
public LSL_Float osGetSitActiveRange()
{
return m_OSSL_Functions.osGetSitActiveRange();
}
public void osSetStandTarget(vector v)
{
m_OSSL_Functions.osSetStandTarget(v);
}
public vector osGetStandTarget()
{
return m_OSSL_Functions.osGetStandTarget();
}
}
}