mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
add vector variant of osSlerp; update script syntax
This commit is contained in:
@@ -5647,6 +5647,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return LSL_Rotation.Slerp(a, b, amount);
|
||||
}
|
||||
|
||||
public LSL_Vector osSlerp(LSL_Vector a, LSL_Vector b, LSL_Float amount)
|
||||
{
|
||||
if (amount < 0)
|
||||
amount = 0;
|
||||
else if (amount > 1.0)
|
||||
amount = 1.0;
|
||||
|
||||
return LSL_Vector.Slerp(a, b, amount);
|
||||
}
|
||||
|
||||
public void osResetAllScripts(LSL_Integer linkset)
|
||||
{
|
||||
UUID me = m_item.ItemID;
|
||||
|
||||
@@ -561,6 +561,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Key osGetLastChangedEventKey();
|
||||
LSL_Float osGetPSTWallclock();
|
||||
LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount);
|
||||
vector osSlerp(vector a, vector b, LSL_Float amount);
|
||||
|
||||
void osResetAllScripts(LSL_Integer AllLinkset);
|
||||
LSL_Integer osIsNotValidNumber(LSL_Float v);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public partial class ScriptBaseClass
|
||||
{
|
||||
// SCRIPTS CONSTANTS
|
||||
public static readonly LSLInteger OS_APIVERSION = 15;
|
||||
public static readonly LSLInteger OS_APIVERSION = 16;
|
||||
|
||||
public static readonly LSLInteger TRUE = 1;
|
||||
public static readonly LSLInteger FALSE = 0;
|
||||
|
||||
@@ -1432,6 +1432,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osSlerp(a, b, amount);
|
||||
}
|
||||
|
||||
public vector osSlerp(vector a, vector b, LSL_Float amount)
|
||||
{
|
||||
return m_OSSL_Functions.osSlerp(a, b, amount);
|
||||
}
|
||||
|
||||
public void osResetAllScripts(LSL_Integer allLinkSet)
|
||||
{
|
||||
m_OSSL_Functions.osResetAllScripts(allLinkSet);
|
||||
|
||||
Reference in New Issue
Block a user